fix: route PM briefs through fjx prompt commands #13

Merged
erik merged 2 commits from fix/pm-prompt-refs into main 2026-05-14 09:55:01 +00:00
Member

Summary

Closes #7.

The PM was emitting briefs pointing working agents at wiki/workflow/prompts/<file>.md, but those files were moved into the CLI as bundled prompts accessed via fjx <role> prompt <name>. Briefs now point at the CLI command directly.

  • src/pm/render.ts: PHASE_PROMPT now maps phase → prompt name. renderBrief emits Run `fjx <role> prompt <name>` for the cycle protocol.
  • Justfile: agent-dev / agent-test loops invoke fjx <role> prompt bootstrap | codex exec - instead of codex exec - < wiki/workflow/prompts/<role>-bootstrap.md.
  • src/prompts/pm.md: brief-context guidance now points at fjx <role> prompt <name>; wiki section drops the dead wiki/workflow/fjx.md ref in favour of fjx wiki --help.
  • src/prompts/usage.md: example brief updated.
  • src/commands/pm.ts: comment now points at src/prompts/pm.md (the in-CLI source) instead of wiki/workflow/prompts/pm.md.

Out of scope (follow-up)

Audit found a much larger set of wiki/workflow/* references in prose docs (src/doc/, openspec/specs/, AGENTS.md, wiki/findings/2-better-agent-bootstrap.md) pointing at PR.md, ISSUE.md, README.md, SCENARIOS.md, fjx.md, agent-bootstrap.md, prompts/pm.md. Those files no longer exist; the live equivalents are in src/doc/. Surfaced as a follow-up issue rather than fixed here — the migration is non-trivial and unrelated to PM brief emission.

Test plan

  • just check (format, lint, types) passes.
  • deno test -A src/ — 85 passed, 0 failed. (Note: just validate picks up a stale sibling worktree under .claude/worktrees/fjx-8 that contains old test fixtures; that worktree is unrelated to this branch.)
  • Reviewer confirms fjx dev prompt apply etc. are the intended verb form for briefs.
## Summary Closes #7. The PM was emitting briefs pointing working agents at `wiki/workflow/prompts/<file>.md`, but those files were moved into the CLI as bundled prompts accessed via `fjx <role> prompt <name>`. Briefs now point at the CLI command directly. - `src/pm/render.ts`: `PHASE_PROMPT` now maps phase → prompt name. `renderBrief` emits ``Run `fjx <role> prompt <name>` for the cycle protocol.`` - `Justfile`: `agent-dev` / `agent-test` loops invoke `fjx <role> prompt bootstrap | codex exec -` instead of `codex exec - < wiki/workflow/prompts/<role>-bootstrap.md`. - `src/prompts/pm.md`: brief-context guidance now points at `fjx <role> prompt <name>`; wiki section drops the dead `wiki/workflow/fjx.md` ref in favour of `fjx wiki --help`. - `src/prompts/usage.md`: example brief updated. - `src/commands/pm.ts`: comment now points at `src/prompts/pm.md` (the in-CLI source) instead of `wiki/workflow/prompts/pm.md`. ## Out of scope (follow-up) Audit found a much larger set of `wiki/workflow/*` references in prose docs (`src/doc/`, `openspec/specs/`, `AGENTS.md`, `wiki/findings/2-better-agent-bootstrap.md`) pointing at `PR.md`, `ISSUE.md`, `README.md`, `SCENARIOS.md`, `fjx.md`, `agent-bootstrap.md`, `prompts/pm.md`. Those files no longer exist; the live equivalents are in `src/doc/`. Surfaced as a follow-up issue rather than fixed here — the migration is non-trivial and unrelated to PM brief emission. ## Test plan - [x] `just check` (format, lint, types) passes. - [x] `deno test -A src/` — 85 passed, 0 failed. (Note: `just validate` picks up a stale sibling worktree under `.claude/worktrees/fjx-8` that contains old test fixtures; that worktree is unrelated to this branch.) - [x] Reviewer confirms `fjx dev prompt apply` etc. are the intended verb form for briefs.
fix: route PM briefs through fjx prompt commands
All checks were successful
Validate / validate (pull_request) Successful in 20s
bf12213ad2
Closes #7.

- src/pm/render.ts: PHASE_PROMPT now maps to prompt names; renderBrief
  emits "Run `fjx <role> prompt <name>`" instead of stale
  wiki/workflow/prompts/<file>.md paths.
- Justfile: agent-dev/agent-test loops invoke `fjx <role> prompt
  bootstrap` instead of cat-ing a wiki path.
- src/prompts/pm.md, src/prompts/usage.md: updated PM-facing examples
  and the wiki-command reference (drops dead wiki/workflow/fjx.md).
- src/commands/pm.ts: comment now points at src/prompts/pm.md.

Remaining wiki/workflow/* references live in prose docs
(src/doc/, openspec/, AGENTS.md) — surfaced as a follow-up.
docs: migrate wiki/workflow/* refs to src/doc/* and fjx help
All checks were successful
Validate / validate (pull_request) Successful in 20s
5eda5895cb
The wiki/workflow/ tree no longer exists; canonical homes are:

- wiki/workflow/ISSUE.md     -> src/doc/forgejo/issue.md
- wiki/workflow/PR.md        -> src/doc/forgejo/pr.md
- wiki/workflow/README.md    -> src/doc/index.md
- wiki/workflow/SCENARIOS.md -> src/doc/scenarios.md
- wiki/workflow/prompts/pm.md -> src/prompts/pm.md
- wiki/workflow/prompts/dev-* -> `fjx dev prompt <name>`
- wiki/workflow/fjx.md       -> `fjx --help` / `fjx wiki --help`

Touched: AGENTS.md, openspec/specs/{fjx-core,fjx-workflows}/spec.md,
src/doc/{index,scenarios}.md, src/doc/forgejo/{issue,pr}.md,
src/doc/roles/pm.md.

The two remaining refs in wiki/findings/2-better-agent-bootstrap.md
are forward-looking proposals for a doc that never existed; leaving
the finding intact as a historical record of that investigation.
Author
Member

Implemented the "Out of scope" follow-up in this same PR (commit docs: migrate wiki/workflow/* refs to src/doc/* and fjx help):

  • wiki/workflow/ISSUE.mdsrc/doc/forgejo/issue.md
  • wiki/workflow/PR.mdsrc/doc/forgejo/pr.md
  • wiki/workflow/README.mdsrc/doc/index.md
  • wiki/workflow/SCENARIOS.mdsrc/doc/scenarios.md
  • wiki/workflow/prompts/pm.mdsrc/prompts/pm.md
  • wiki/workflow/prompts/dev-*fjx dev prompt <name>
  • wiki/workflow/fjx.mdfjx --help / fjx wiki --help

Touched: AGENTS.md, openspec/specs/{fjx-core,fjx-workflows}/spec.md, src/doc/{index,scenarios}.md, src/doc/forgejo/{issue,pr}.md, src/doc/roles/pm.md.

rg wiki/workflow is now clean except for two refs in wiki/findings/2-better-agent-bootstrap.md — those are forward-looking proposals for a doc that never existed; leaving the finding intact as a historical record.

Implemented the "Out of scope" follow-up in this same PR (commit `docs: migrate wiki/workflow/* refs to src/doc/* and fjx help`): - `wiki/workflow/ISSUE.md` → `src/doc/forgejo/issue.md` - `wiki/workflow/PR.md` → `src/doc/forgejo/pr.md` - `wiki/workflow/README.md` → `src/doc/index.md` - `wiki/workflow/SCENARIOS.md` → `src/doc/scenarios.md` - `wiki/workflow/prompts/pm.md` → `src/prompts/pm.md` - `wiki/workflow/prompts/dev-*` → `fjx dev prompt <name>` - `wiki/workflow/fjx.md` → `fjx --help` / `fjx wiki --help` Touched: `AGENTS.md`, `openspec/specs/{fjx-core,fjx-workflows}/spec.md`, `src/doc/{index,scenarios}.md`, `src/doc/forgejo/{issue,pr}.md`, `src/doc/roles/pm.md`. `rg wiki/workflow` is now clean except for two refs in `wiki/findings/2-better-agent-bootstrap.md` — those are forward-looking proposals for a doc that never existed; leaving the finding intact as a historical record.
erik merged commit 2defe02a50 into main 2026-05-14 09:55:01 +00:00
erik deleted branch fix/pm-prompt-refs 2026-05-14 09:55:01 +00:00
Sign in to join this conversation.
No description provided.