Simplify dev & test life #11

Closed
opened 2026-05-14 09:12:41 +00:00 by erik · 1 comment
Owner

From the dev-bootstrap.md prompt:

1. Run `fjx dev next` to select next best issue to work on and write it to local cache.  Exit code 3 means no work — stop.
2. Claim the issue: `fjx dev claim <N>` (transitions `agent/dev` → `agent/working`).
3. Isolate work in a per-issue git worktree at `../worktrees/<project>-<N>` (where `<N>` is the issue number from cache):
   - If the worktree already exists (resuming a prior cycle), `cd` into it.
   - Otherwise create it from `origin/main`: `git fetch origin && git worktree add ../worktrees/<project>-<N> origin/main`, then `cd` in.  The phase prompt will create the `<type>/<slug>` branch inside the worktree when appropriate.
4. Create or locate the dev ledger on the issue (`<!-- agent-dev:ledger -->`):
   - `fjx comment list <N>` — scan for an existing ledger comment with that marker.
   - If found: note its checkpoint (from `Status: <status> @ <timestamp>`); fetch any new comments with `fjx comment list <N> --since <timestamp>`.
   - If not found: create one via `fjx dev ledger --body-file ./tmp/ledger.md --status working` with an initial task list derived from the brief. Pass only the agent-managed section in the file; fjx adds the metadata header.
5. Read the issue's `<!-- pm:brief:dev -->` comment and follow it.  The brief routes you to your phase prompt.
6. As you work, keep the ledger current: mark tasks complete with evidence (commit SHA or explanation), add new tasks for any directives that arrive.
7. Before signalling review, do a final ledger update: run `fjx dev ledger --body-file ./tmp/ledger.md --status review` with the updated agent-managed section.
8. Hand off: `fjx dev done <N>` — transitions the issue to `agent/review` and adds `agent/review` to the linked PR.

Step 4 can be simplified in fjx dev claim by ensuring that a ledger has been created. There is no fjx test claim, but there should be and there should be a similar step for agent-test to claim the issue.

From the dev-bootstrap.md prompt: ``` 1. Run `fjx dev next` to select next best issue to work on and write it to local cache. Exit code 3 means no work — stop. 2. Claim the issue: `fjx dev claim <N>` (transitions `agent/dev` → `agent/working`). 3. Isolate work in a per-issue git worktree at `../worktrees/<project>-<N>` (where `<N>` is the issue number from cache): - If the worktree already exists (resuming a prior cycle), `cd` into it. - Otherwise create it from `origin/main`: `git fetch origin && git worktree add ../worktrees/<project>-<N> origin/main`, then `cd` in. The phase prompt will create the `<type>/<slug>` branch inside the worktree when appropriate. 4. Create or locate the dev ledger on the issue (`<!-- agent-dev:ledger -->`): - `fjx comment list <N>` — scan for an existing ledger comment with that marker. - If found: note its checkpoint (from `Status: <status> @ <timestamp>`); fetch any new comments with `fjx comment list <N> --since <timestamp>`. - If not found: create one via `fjx dev ledger --body-file ./tmp/ledger.md --status working` with an initial task list derived from the brief. Pass only the agent-managed section in the file; fjx adds the metadata header. 5. Read the issue's `<!-- pm:brief:dev -->` comment and follow it. The brief routes you to your phase prompt. 6. As you work, keep the ledger current: mark tasks complete with evidence (commit SHA or explanation), add new tasks for any directives that arrive. 7. Before signalling review, do a final ledger update: run `fjx dev ledger --body-file ./tmp/ledger.md --status review` with the updated agent-managed section. 8. Hand off: `fjx dev done <N>` — transitions the issue to `agent/review` and adds `agent/review` to the linked PR. ``` Step 4 can be simplified in `fjx dev claim` by ensuring that a ledger has been created. There is no `fjx test claim`, but there should be and there should be a similar step for agent-test to claim the issue.
Member

Ledger for: agent-dev

Status: review @ 2026-05-14T10:20:54.912Z


Tasks

  • Add fjx test claim that assigns agent-test and creates the initial test ledger if absent — src/commands/test.ts.
  • Factor initial-ledger rendering into shared renderInitialLedger(role, checkpoint) in src/commands/ledger.ts; have dev claim use it.
  • Simplify dev-bootstrap.md step 4 — ledger creation is now in dev claim; add a tiny resume catch-up note.
  • Add fjx test claim to test-bootstrap.md as step 2.
  • Update usage.md and docs (forgejo/issue.md, doc/index.md) for fjx test claim.
  • Add tests for renderInitialLedger and test claim behavior (src/test.test.ts).
  • just validate clean.

Notes

  • Test claim does not change labels — the tester operates during agent/review. It only ensures the assignee is agent-test and that a test ledger exists.
<!-- agent-dev:ledger --> ## Ledger for: agent-dev Status: review @ 2026-05-14T10:20:54.912Z --- ### Tasks - [x] Add `fjx test claim` that assigns agent-test and creates the initial test ledger if absent — `src/commands/test.ts`. - [x] Factor initial-ledger rendering into shared `renderInitialLedger(role, checkpoint)` in `src/commands/ledger.ts`; have dev claim use it. - [x] Simplify dev-bootstrap.md step 4 — ledger creation is now in `dev claim`; add a tiny resume catch-up note. - [x] Add `fjx test claim` to test-bootstrap.md as step 2. - [x] Update usage.md and docs (forgejo/issue.md, doc/index.md) for `fjx test claim`. - [x] Add tests for `renderInitialLedger` and `test claim` behavior (`src/test.test.ts`). - [x] `just validate` clean. ### Notes - Test claim does not change labels — the tester operates during `agent/review`. It only ensures the assignee is `agent-test` and that a test ledger exists.
agent-dev removed their assignment 2026-05-14 10:21:39 +00:00
erik closed this issue 2026-05-14 10:25:08 +00:00
Sign in to join this conversation.
No description provided.