Let us create your first intend bundle.

The goal is not just to run a command. The goal is to put one change under contract, lock it, and verify it with normal Go tooling.

Before you start#

intend init checks for these tools before it writes anything:

  • go
  • golangci-lint
  • trufflehog
  • gitleaks
  • trivy

If one of them is missing, init stops early. That is deliberate.

Build the CLI#

go build ./cmd/intend

This produces ./intend in the repository root.

Initialize a workspace#

./intend init

Example output:

initialized intend workspace

This creates:

specs/
features/
.intend/trace/
.intend/locks/

The layout is plain on purpose. You can inspect every file that intend manages.

Create the first bundle#

./intend new hello-world

Example output:

created bundle hello-world

This creates:

specs/hello-world.md
features/hello-world.feature
.intend/trace/hello-world.json

Now stop and edit the contract files before you write implementation code.

  • specs/hello-world.md explains the change in plain language.
  • features/hello-world.feature records the expected behavior.

Lock the approved contract#

./intend lock hello-world

Example output:

locked hello-world at version 1

This writes:

.intend/locks/hello-world.json

The lock file records the current baseline of the contract files.

Trace the bundle#

./intend trace hello-world

Example output:

trace ok: hello-world

If a locked contract file changes, intend trace hello-world reports contract drift instead of silently accepting it.

Implement and verify#

Now write the Go code and tests for the change.

When you are ready, run:

./intend verify

intend verify traces all known bundles first. Then it runs the repository checks:

go test ./...
golangci-lint run
trufflehog filesystem .
gitleaks dir .
trivy fs .

That is the heart of the workflow: first the contract, then the code, then the evidence.

Change the contract on purpose#

Sometimes the contract itself needs to move. When that happens, record the new baseline explicitly:

./intend amend hello-world

If nothing changed, intend says so. If the contract changed intentionally, the lock version is incremented.

Delete a bundle you do not want to keep#

If you decide to abandon the bundle entirely, remove it through the CLI:

./intend delete hello-world

This removes:

specs/hello-world.md
features/hello-world.feature
.intend/trace/hello-world.json

If the bundle was already locked, intend delete refuses by default. Use --force when you really mean to remove that locked bundle too:

./intend delete --force hello-world

That also removes:

.intend/locks/hello-world.json

Next steps#

  • Read Workflow for the full owned and contribution-mode lifecycle.
  • Read Reference for commands, files, and exit codes.