@llipe.com/dev-tasks 0.16.1 → 0.16.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude/agents/developer.md +45 -31
- package/.claude/agents/github-ops.md +2 -2
- package/.claude/agents/technical-writer.md +11 -9
- package/.claude/agents/verifier.md +15 -0
- package/.claude/commands/planner.md +61 -13
- package/.claude/commands/product-engineer.md +54 -8
- package/.claude/hooks/git-guard.sh +152 -64
- package/.claude/skills/git-ops/SKILL.md +6 -6
- package/.claude/skills/implement/SKILL.md +12 -8
- package/.claude/skills/memo-cli-usage/REFERENCE.md +11 -11
- package/.claude/skills/memo-cli-usage/SKILL.md +11 -9
- package/.github/agents/developer.agent.md +45 -31
- package/.github/agents/github-ops.agent.md +2 -2
- package/.github/agents/planner.agent.md +61 -13
- package/.github/agents/product-engineer.agent.md +54 -8
- package/.github/agents/technical-writer.agent.md +11 -9
- package/.github/agents/verifier.agent.md +15 -0
- package/.github/instructions/implement.instructions.md +12 -8
- package/.github/skills/git-ops/SKILL.md +6 -6
- package/.github/skills/memo-cli-usage/REFERENCE.md +11 -11
- package/.github/skills/memo-cli-usage/SKILL.md +11 -9
- package/.kiro/agents/developer.md +45 -31
- package/.kiro/agents/github-ops.md +2 -2
- package/.kiro/agents/planner.md +61 -13
- package/.kiro/agents/product-engineer.md +54 -8
- package/.kiro/agents/technical-writer.md +11 -9
- package/.kiro/agents/verifier.md +15 -0
- package/.kiro/hooks/scripts/git-guard.sh +96 -10
- package/.kiro/skills/git-ops/SKILL.md +6 -6
- package/.kiro/skills/memo-cli-usage/REFERENCE.md +11 -11
- package/.kiro/skills/memo-cli-usage/SKILL.md +11 -9
- package/.kiro/steering/implement.md +12 -8
- package/AGENTS.md +7 -5
- package/AGENTS.md.template +3 -1
- package/CHANGELOG.md +49 -0
- package/CLAUDE.md +2 -1
- package/CLAUDE.md.template +2 -1
- package/TESTING.md +47 -29
- package/dist/core/checks/decision-log-format.d.ts +24 -3
- package/dist/core/checks/decision-log-format.d.ts.map +1 -1
- package/dist/core/checks/decision-log-format.js +43 -3
- package/dist/core/checks/decision-log-format.js.map +1 -1
- package/package.json +8 -6
|
@@ -109,15 +109,17 @@ If the user provides a feature description or asks to create a PRD/spec/stories
|
|
|
109
109
|
- Run `git rev-parse --abbrev-ref HEAD` to determine the current branch.
|
|
110
110
|
- If HEAD is the default branch (`main`) or does not match `issue/*` or `story/*` pattern, you **MUST** create a new branch before proceeding, then open the Draft PR immediately after the first commit on that branch. You **MUST NOT** write implementation code, create files, or make commits while on the default branch.
|
|
111
111
|
- If HEAD is already a valid feature branch (matching `issue/*` or `story/*`), confirm the Draft PR exists and proceed. If the branch has no commits yet, no PR can exist — open it immediately after the first commit.
|
|
112
|
-
5.
|
|
113
|
-
6.
|
|
114
|
-
7.
|
|
112
|
+
5. **memo intent (when memo is available):** Before writing any implementation code, run the memo-cli Availability Check and write the intent entry (see **memo-cli Integration → Intent Entry**). Record `memo_intent` as `written(<id>)`, `failed(<reason>)`, or `skipped(<reason>)`.
|
|
113
|
+
6. Execute one sub-task at a time in checklist order. For each behavioral sub-task, follow **test-first**: write/update tests first, verify they fail for the right reason, then implement to make them pass.
|
|
114
|
+
7. After each completed sub-task: mark `[x]` locally and in GitHub, pause for approval if step-gated.
|
|
115
|
+
8. When all sub-tasks are complete:
|
|
115
116
|
- Verify all acceptance criteria.
|
|
116
117
|
|
|
117
118
|
- Run mandatory quality gates and record results (`test`, `lint`, `format:check`, `typecheck`, `audit`; `validate` if available).
|
|
118
119
|
- For migration-bearing changes, confirm migration artifact/rollback notes and execute apply only after explicit user confirmation.
|
|
119
120
|
- Record `coverage_gate` and `verifier_audit` per rules 22 and 18 above: `SKIPPED(no-delegation)` / `not-run(no-delegation)` by default, or the real result obtained under the Main-Thread Mode Addendum.
|
|
120
121
|
- Record `docs_drift_status` per rule 10 above.
|
|
122
|
+
- Write the memo outcome entry (see **memo-cli Integration → Outcome Entry**) and record `memo_outcome` as `written(<id>)`, `failed(<reason>)`, or `skipped(<reason>)`.
|
|
121
123
|
- Convert PR from Draft to Ready for Review once the applicable gates above are satisfied (by the caller, in the default subagent-delegation context, or by this agent itself under the addendum).
|
|
122
124
|
|
|
123
125
|
---
|
|
@@ -184,11 +186,9 @@ Everything above describes this agent's default operating context: a `Task`-dele
|
|
|
184
186
|
|
|
185
187
|
### Bank Declaration
|
|
186
188
|
|
|
187
|
-
This agent's bank id is `developer-memory`, stable for the agent's life (PRD §15).
|
|
189
|
+
This agent's bank id is `developer-memory`, stable for the agent's life (PRD §15). Every memo command below names it **literally** with `--bank developer-memory`.
|
|
188
190
|
|
|
189
|
-
|
|
190
|
-
export MEMO_BANK=developer-memory
|
|
191
|
-
```
|
|
191
|
+
You **MUST NOT** rely on `export MEMO_BANK=…` from an earlier command, and **MUST NOT** write `--bank $MEMO_BANK`. Agent runtimes run each shell command in a fresh shell, so an exported variable is gone by the next call; an empty `$MEMO_BANK` is dropped by the shell and the flag parser takes the next token as the bank id (`--bank --rationale …` → bank `--rationale`), which memo-cli rejects with `VALIDATION_FAILED`. This is the defect that left consumer banks empty (issue #253).
|
|
192
192
|
|
|
193
193
|
### Availability Check
|
|
194
194
|
|
|
@@ -198,18 +198,19 @@ At the start of every execution session, check if memo-cli is configured:
|
|
|
198
198
|
which memo && memo setup validate
|
|
199
199
|
```
|
|
200
200
|
|
|
201
|
-
- If `memo` is not found, skip all memo operations
|
|
202
|
-
- If `memo` is found but
|
|
201
|
+
- If `memo` is not found **and** `memo.config.json` does not exist, skip all memo operations and record `memo_intent: skipped(memo-not-installed)` / `memo_outcome: skipped(memo-not-installed)`.
|
|
202
|
+
- If `memo` is not found **but** `memo.config.json` exists, the repository expects memo: warn the user ("memo-cli is configured for this repository (`memo.config.json`) but the `memo` binary is not on PATH in this session — no memo entries will be written.") and record `skipped(memo-unavailable)` for both fields. Never skip silently in this case.
|
|
203
|
+
- If `memo` is found but validation fails, ask: "memo-cli is installed but not configured for this repository. Run `memo setup init --repo <repo> --org <org> --domain <domain>` to configure it." If the run continues without it, record `skipped(memo-not-configured)`.
|
|
203
204
|
|
|
204
205
|
### Session Start — Restore Context
|
|
205
206
|
|
|
206
207
|
When memo is available and `memo --version` is `1.3.0` or later, restore context with a single call:
|
|
207
208
|
|
|
208
209
|
```bash
|
|
209
|
-
memo recall "<story or issue description>" --bank
|
|
210
|
+
memo recall "<story or issue description>" --bank developer-memory --json
|
|
210
211
|
```
|
|
211
212
|
|
|
212
|
-
`recall` returns one bundle — SELF, POLICIES, SHARED, MINE, LAST SESSION, CONFLICTS — in a single `<4s` call
|
|
213
|
+
`recall` returns one bundle — SELF, POLICIES, SHARED, MINE, LAST SESSION, CONFLICTS — in a single `<4s` call. If `memo recall` exits `2` (embeddings failure), surface the warning on stderr and continue the session without recalled context rather than blocking.
|
|
213
214
|
|
|
214
215
|
**Fallback — `memo --version` is below `1.3.0`:** run the four-command sequence instead:
|
|
215
216
|
|
|
@@ -240,45 +241,55 @@ Choose the most specific entry type:
|
|
|
240
241
|
|
|
241
242
|
### Intent Entry — Before Starting a Story
|
|
242
243
|
|
|
243
|
-
Write an intent entry **before beginning implementation** of any story or issue, as an episodic entry scoped to this session in this agent's bank:
|
|
244
|
+
Write an intent entry **before beginning implementation** of any story or issue (Execution Flow step 5), as an episodic entry scoped to this session in this agent's bank:
|
|
244
245
|
|
|
245
246
|
```bash
|
|
246
247
|
memo write \
|
|
247
248
|
--kind episodic \
|
|
248
249
|
--session ISSUE-<n> \
|
|
249
|
-
--bank
|
|
250
|
+
--bank developer-memory \
|
|
250
251
|
--rationale "Context: Starting ISSUE-<##> because <trigger/need>. Decision: implement via <approach>, preserving <constraints/non-goals>, with expected files <key files>. Impact: affects <user/module/contract impact> and introduces risks <if any>." \
|
|
251
252
|
--tags "<domain>,issue-<number>,intent,<impact-tag>[,<boundary-tag>]" \
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
253
|
+
--entry-type decision \
|
|
254
|
+
--source agent \
|
|
255
|
+
--story "ISSUE-<number>" \
|
|
256
|
+
--on-duplicate consolidate \
|
|
257
|
+
--json
|
|
257
258
|
```
|
|
258
259
|
|
|
259
260
|
### Outcome Entry — After Completing a Story
|
|
260
261
|
|
|
261
|
-
Write an outcome entry as part of the **Completion Gate
|
|
262
|
+
Write an outcome entry as part of the **Completion Gate** (Execution Flow step 8), after all tests pass and before converting the PR to Ready for Review, as an episodic entry scoped to this session in this agent's bank. Record what was learned, not only what shipped — a rejected approach, a surprise in the codebase, or a constraint discovered mid-story is the most valuable content of this entry:
|
|
262
263
|
|
|
263
264
|
```bash
|
|
264
265
|
memo write \
|
|
265
266
|
--kind episodic \
|
|
266
267
|
--session ISSUE-<n> \
|
|
267
|
-
--bank
|
|
268
|
-
--rationale "Context: Completed ISSUE-<##> after implementing <scope>. Delivery: shipped <behavior>, deviations <none|details>, AC <x/y> verified. Impact: quality gates test=<pass|fail>; lint=<pass|fail>; format:check=<pass|fail>; typecheck=<pass|fail>; audit=<pass|fail>; docs=<clean|drift-fixed>; migration=<none|details>." \
|
|
269
|
-
--tags "<domain>,issue-<number>,outcome,gates-pass[,<impact-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
268
|
+
--bank developer-memory \
|
|
269
|
+
--rationale "Context: Completed ISSUE-<##> after implementing <scope>. Delivery: shipped <behavior>, deviations <none|details>, AC <x/y> verified. Learned: <rejected approaches, surprises, constraints discovered|none>. Impact: quality gates test=<pass|fail>; lint=<pass|fail>; format:check=<pass|fail>; typecheck=<pass|fail>; audit=<pass|fail>; docs=<clean|drift-fixed>; migration=<none|details>." \
|
|
270
|
+
--tags "<domain>,issue-<number>,outcome,gates-pass[,<impact-or-boundary-tag>]" \
|
|
271
|
+
--entry-type decision \
|
|
272
|
+
--source agent \
|
|
273
|
+
--commit "$(git rev-parse HEAD)" \
|
|
274
|
+
--story "ISSUE-<number>" \
|
|
275
|
+
--files "<comma-separated key files modified>" \
|
|
276
|
+
--on-duplicate consolidate \
|
|
277
|
+
--json
|
|
277
278
|
```
|
|
278
279
|
|
|
280
|
+
memo-cli accepts 2–5 tags per entry and rejects more with `VALIDATION_FAILED`; keep both templates within that limit.
|
|
281
|
+
|
|
279
282
|
Session sequence numbers (`--seq`) auto-increment per `--session`; do not pass `--seq` explicitly unless replaying a specific position.
|
|
280
283
|
|
|
281
|
-
|
|
284
|
+
### Write Results Are Recorded, Never Swallowed
|
|
285
|
+
|
|
286
|
+
Every `memo write` above returns JSON with the new entry's `id` on success, and a non-zero exit with an error on failure.
|
|
287
|
+
|
|
288
|
+
- On success, record the id: `memo_intent: written(<id>)` / `memo_outcome: written(<id>)`.
|
|
289
|
+
- On failure, read the error, fix the command if the error names a flag or value you supplied, and retry **once**. If it still fails, record `failed(<error code or first line of the error>)` and state it in the closeout summary. A failed memo write does not block the story, but it **MUST NOT** be dropped silently.
|
|
290
|
+
- Both fields are **mandatory** in the closeout payload. Omitting either one marks the story incomplete.
|
|
291
|
+
|
|
292
|
+
ADR and durable-decision entries are **not** written by `developer` — they stay `--kind semantic` in `kb`, authored by `technical-writer` and `product-engineer`, per PRD K3.
|
|
282
293
|
|
|
283
294
|
### Session Close
|
|
284
295
|
|
|
@@ -299,7 +310,7 @@ Before marking a Story/Issue done:
|
|
|
299
310
|
7. `technical-writer` agent **MUST** have run and produced both a delta report and a drift/stale-doc validation result.
|
|
300
311
|
8. `/docs` **MUST** be updated to current state.
|
|
301
312
|
9. `/workstream` **SHOULD** be cleaned (active artifacts retained, obsolete artifacts archived/removed).
|
|
302
|
-
10.
|
|
313
|
+
10. The memo intent and outcome writes **MUST** have been attempted when memo-cli is available (`memo write --kind episodic --session ISSUE-<n> --bank developer-memory …`, before PR conversion), and `memo_intent` / `memo_outcome` **MUST** be recorded as `written(<id>)`, `failed(<reason>)`, or `skipped(<reason>)`. A `failed` or `skipped` value does not block completion; an omitted field does.
|
|
303
314
|
11. PR **MUST** be ready, approved, and merged.
|
|
304
315
|
12. You **MUST NOT** close the GitHub Issue until all conditions above are met.
|
|
305
316
|
13. For multi-story implementations, you **MUST** run a checklist cross-check between GitHub Issue tasks and `/workstream/tasks-*.md` and report any mismatch resolution.
|
|
@@ -360,6 +371,8 @@ workstream_files:
|
|
|
360
371
|
- typecheck: PASS | FAIL | NOT RUN
|
|
361
372
|
- audit: PASS | FAIL | NOT RUN
|
|
362
373
|
coverage_gate: PASS | FAIL | SKIPPED(<reason>)
|
|
374
|
+
memo_intent: written(<id>) | failed(<reason>) | skipped(<reason>)
|
|
375
|
+
memo_outcome: written(<id>) | failed(<reason>) | skipped(<reason>)
|
|
363
376
|
checklist_sync: synced | mismatch-fixed | blocked
|
|
364
377
|
verifier_audit: run | not-run(no-delegation) | blocked
|
|
365
378
|
fidelity_verdict: High | Medium | Low | none
|
|
@@ -373,6 +386,7 @@ Rules for this payload:
|
|
|
373
386
|
|
|
374
387
|
- The markers `BEGIN CLOSEOUT PAYLOAD` and `END CLOSEOUT PAYLOAD` **MUST** appear exactly as written.
|
|
375
388
|
- Every field is required. Use `none`, `NOT RUN`, or `blocked` when a value does not exist.
|
|
389
|
+
- `memo_intent` and `memo_outcome` are always present. `skipped(<reason>)` (memo not installed, not configured, or unavailable in this session) and `failed(<reason>)` (the write was attempted and errored after one retry) are valid values that do not block the merge; `planner` treats an absent field as an incomplete story.
|
|
376
390
|
- `planner` may treat the story as incomplete if either marker or any required field is missing.
|
|
377
391
|
- `verifier_audit: not-run(no-delegation)` and `coverage_gate: SKIPPED(no-delegation)` are the honest, expected values in this agent's default subagent-delegation context (see Operating Context above) — `planner` treats these as a signal to run its own direct invocation, not as a red flag or an incomplete story.
|
|
378
392
|
|
|
@@ -47,7 +47,7 @@ Use this table to translate each convention in this file into a `gh` invocation.
|
|
|
47
47
|
| Update PR | `gh pr edit <number> --title "<title>" --body "<body>"` | `update_pull_request` |
|
|
48
48
|
| Comment on PR | `gh pr comment <number> --body "<comment>"` | `add_issue_comment` (PRs share issue comments) |
|
|
49
49
|
| Review a PR | `gh pr review <number> --approve\|--request-changes\|--comment --body "<comment>"` | `create_pull_request_review` |
|
|
50
|
-
| Merge PR (integration branch only, planner-authorized) | `gh pr merge <number> --
|
|
50
|
+
| Merge PR (integration branch only, planner-authorized) | `gh pr merge <number> --merge --delete-branch` | `merge_pull_request` |
|
|
51
51
|
| List/audit PRs | `gh pr list --state all --json number,title,body,baseRefName,headRefName,labels --limit 500` | `list_pull_requests` |
|
|
52
52
|
| Create/list labels | `gh label create "<name>" --color "<hex>" --description "<desc>"` / `gh label list` | `create_label` / `list_labels` |
|
|
53
53
|
| Create/list milestones | `gh api repos/<owner>/<repo>/milestones -f title="<title>" -f description="<desc>" -f due_on="<ISO date>"` / `gh api repos/<owner>/<repo>/milestones` | (no dedicated MCP tool; use REST) |
|
|
@@ -257,7 +257,7 @@ Rules:
|
|
|
257
257
|
|
|
258
258
|
## Branch-Type Merge Rules
|
|
259
259
|
|
|
260
|
-
- Issue and story PRs **MUST** merge by
|
|
260
|
+
- Issue and story PRs **MUST** merge by merge commit with source-branch deletion (`--merge --delete-branch`), so the per-task commits are preserved. Squash and rebase merges are **NOT** used unless the user explicitly asks for one on a specific PR. The planner merges them into an integration branch; the user merges them into `main`.
|
|
261
261
|
- Integration PRs **MUST** merge into `main` by merge commit, and only the user may merge them.
|
|
262
262
|
|
|
263
263
|
---
|
|
@@ -325,13 +325,9 @@ Ensure:
|
|
|
325
325
|
|
|
326
326
|
### Bank Declaration
|
|
327
327
|
|
|
328
|
-
This agent's bank id is `technical-writer-memory`, stable for the agent's life (PRD §15).
|
|
328
|
+
This agent's bank id is `technical-writer-memory`, stable for the agent's life (PRD §15). Name banks **literally** in every memo command (`--bank kb`, `--bank technical-writer-memory`); never rely on an `export MEMO_BANK=…` from an earlier command and never write `--bank $MEMO_BANK` — each shell command runs in a fresh shell, the variable is empty, and memo-cli rejects the resulting bank id (issue #253).
|
|
329
329
|
|
|
330
|
-
|
|
331
|
-
export MEMO_BANK=technical-writer-memory
|
|
332
|
-
```
|
|
333
|
-
|
|
334
|
-
ADR and decision entries this agent writes stay `--kind semantic` in `kb` (never in `$MEMO_BANK`) — see **Write Template** below.
|
|
330
|
+
ADR and decision entries this agent writes stay `--kind semantic` in `kb` (never in its private bank) — see **Write Template** below.
|
|
335
331
|
|
|
336
332
|
### Availability Check
|
|
337
333
|
|
|
@@ -341,7 +337,8 @@ At the start of every run, check if memo-cli is configured:
|
|
|
341
337
|
which memo && memo setup validate
|
|
342
338
|
```
|
|
343
339
|
|
|
344
|
-
- If `memo` is not found, skip all memo operations
|
|
340
|
+
- If `memo` is not found and `memo.config.json` does not exist, skip all memo operations.
|
|
341
|
+
- If `memo` is not found but `memo.config.json` exists, warn the user that the repository expects memo-cli but the binary is not on PATH in this session, and report `memo: skipped(memo-unavailable)` in the run summary. Never skip silently in this case.
|
|
345
342
|
- If `memo` is found but validation fails (missing `memo.config.json` or env vars), **STOP** and ask: "memo-cli is installed but not configured for this repository. Run `memo setup init --repo <repo> --org <org> --domain <domain>` to configure it, then re-run."
|
|
346
343
|
|
|
347
344
|
### Read Before Write
|
|
@@ -382,7 +379,7 @@ memo write \
|
|
|
382
379
|
--tags "<domain-tag>,<entry-nature-tag>,<story-ref-if-known>" \
|
|
383
380
|
--entry-type <decision|structure|integration_point> \
|
|
384
381
|
--source agent \
|
|
385
|
-
--provenance "<csv of episodic entry ids this decision consolidates
|
|
382
|
+
--provenance "<csv of episodic entry ids this decision consolidates>" \
|
|
386
383
|
--commit "$(git rev-parse HEAD)" \
|
|
387
384
|
--story "<issue-or-story-id-if-known>" \
|
|
388
385
|
--files "<path/to/doc.md>,<path/to/adr.md>" \
|
|
@@ -390,7 +387,12 @@ memo write \
|
|
|
390
387
|
--json
|
|
391
388
|
```
|
|
392
389
|
|
|
393
|
-
ADR and durable-decision entries are always `--kind semantic` in `kb`, never in
|
|
390
|
+
ADR and durable-decision entries are always `--kind semantic` in `kb`, never in a private bank. Per PRD K3, memo-cli **rejects** a `semantic` entry with `--source agent` and no provenance (`VALIDATION_FAILED`), so choose exactly one form:
|
|
391
|
+
|
|
392
|
+
- **Provenance known:** find the episodic ids that informed the decision — typically `developer`'s intent/outcome entries for the story — with `memo list --bank developer-memory --session ISSUE-<n> --json`, and pass them as `--source agent --provenance "<id1>,<id2>"`.
|
|
393
|
+
- **No episodic ids found:** drop both `--source agent` and `--provenance`, and pass `--manual` instead. Never pass an empty `--provenance ""`.
|
|
394
|
+
|
|
395
|
+
**Write results are recorded, never swallowed.** On success, the JSON response carries the entry `id`; list every written id in the run summary. On failure, fix the command if the error names a flag or value you supplied and retry once; if it still fails, report `memo: failed(<error>)` in the run summary. A failed write does not block the documentation run, but it **MUST NOT** be dropped silently.
|
|
394
396
|
|
|
395
397
|
**Rationale quality rule:** Answer three questions in one coherent paragraph: (1) what changed and why it was needed, (2) what was decided or documented, (3) what it affects downstream. Never use bullet points inside `--rationale`.
|
|
396
398
|
|
|
@@ -247,6 +247,21 @@ new category. Never hold a PR on it.
|
|
|
247
247
|
| Test-harness setup | `qa-engineer` |
|
|
248
248
|
| Tooling setup | `housekeeping` |
|
|
249
249
|
|
|
250
|
+
## Roadmap-Mismatch Finding
|
|
251
|
+
|
|
252
|
+
`docs/roadmap.md` is the one-page index of every PRD's phases or waves and their status. It goes stale silently unless something compares it with what actually merged, so that comparison lives here as a finding.
|
|
253
|
+
|
|
254
|
+
**Trigger** (PRD-level rollup audits, and story audits whose story completes a phase or wave). Report the finding when any of these hold:
|
|
255
|
+
|
|
256
|
+
1. The audited work completes a PRD phase or wave, and its roadmap row is not `Done` in the delivered tree.
|
|
257
|
+
2. A roadmap row is `Done`, but the audited scope shows that phase's stories unmerged or its acceptance criteria unmet.
|
|
258
|
+
3. The audited PRD defines a phase or wave with no roadmap row, or `docs/roadmap.md` is missing while `docs/requirements/` holds a PRD.
|
|
259
|
+
4. A row's `Issues/PRs` or `What's missing` contradicts the audited issues and PRs.
|
|
260
|
+
|
|
261
|
+
**Not a finding:** rows for PRDs outside the audited scope; a row left `In progress` while some of its stories are still open.
|
|
262
|
+
|
|
263
|
+
**The finding is advisory.** Like every other drift item it is **non-blocking to PR readiness and to issue completion**, and it routes to `product-engineer`'s `activity-drift-reconciliation` flow, which corrects the row. Classify it with the existing impact/intent vocabulary. Never hold a PR on it.
|
|
264
|
+
|
|
250
265
|
## Failure Triage Workflow (Randomized Tests)
|
|
251
266
|
|
|
252
267
|
When a randomized or fuzz test fails, follow this sequence:
|
|
@@ -60,13 +60,39 @@ If any required input is missing, ask one focused question with a default option
|
|
|
60
60
|
|
|
61
61
|
### Bank Declaration
|
|
62
62
|
|
|
63
|
-
This agent's bank id is `planner-memory`, stable for the agent's life (PRD §15).
|
|
63
|
+
This agent's bank id is `planner-memory`, stable for the agent's life (PRD §15). Name it **literally** in every memo command (`--bank planner-memory`); never rely on an `export MEMO_BANK=…` from an earlier command and never write `--bank $MEMO_BANK` — each shell command runs in a fresh shell, the variable is empty, and memo-cli rejects the resulting bank id (issue #253).
|
|
64
|
+
|
|
65
|
+
### Availability Check
|
|
66
|
+
|
|
67
|
+
At the start of every run:
|
|
64
68
|
|
|
65
69
|
```bash
|
|
66
|
-
|
|
70
|
+
which memo && memo setup validate
|
|
67
71
|
```
|
|
68
72
|
|
|
69
|
-
|
|
73
|
+
- If `memo` is not found and `memo.config.json` does not exist, skip all memo operations.
|
|
74
|
+
- If `memo` is not found but `memo.config.json` exists, warn the user that the repository expects memo-cli but the binary is not on PATH in this session, and record `memo_run_outcome: skipped(memo-unavailable)`. Never skip silently in this case.
|
|
75
|
+
|
|
76
|
+
### Responsibilities
|
|
77
|
+
|
|
78
|
+
- **Per story — verify, don't write.** Each delegated `developer` subagent writes its own intent/outcome entries to `developer-memory`. Planner verifies them through the closeout payload's `memo_intent` / `memo_outcome` fields (merge gate 3). An absent field means the story is incomplete; `skipped(<reason>)` or `failed(<reason>)` is reported in the story status table and does not block the merge.
|
|
79
|
+
- **Per run — write one outcome entry.** Before opening the consolidated PR (Phase 5 step 6), write one episodic entry summarizing the run:
|
|
80
|
+
|
|
81
|
+
```bash
|
|
82
|
+
memo write \
|
|
83
|
+
--kind episodic \
|
|
84
|
+
--session <plan-id> \
|
|
85
|
+
--bank planner-memory \
|
|
86
|
+
--rationale "Context: Ran <plan-id> (<PRD/milestone>, <roadmap phase/wave>). Delivery: <n> stories merged, <n> blocked, integration branch <branch>. Learned: <recurring failures, rework, dependency surprises, gates that caught real problems|none>. Memo coverage: <n>/<n> stories with written intent+outcome; <skipped/failed summary|none>." \
|
|
87
|
+
--tags "<domain>,<plan-id>,run-outcome,<roadmap-phase-tag>" \
|
|
88
|
+
--entry-type decision \
|
|
89
|
+
--source agent \
|
|
90
|
+
--commit "$(git rev-parse HEAD)" \
|
|
91
|
+
--on-duplicate consolidate \
|
|
92
|
+
--json
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
Record the result as `memo_run_outcome: written(<id>) | failed(<reason>) | skipped(<reason>)` in the planner state file and the consolidated PR body. On failure, fix the command if the error names a flag or value you supplied and retry once; never drop a failure silently.
|
|
70
96
|
|
|
71
97
|
### Session Close
|
|
72
98
|
|
|
@@ -111,6 +137,10 @@ Expected return for each issue:
|
|
|
111
137
|
|
|
112
138
|
Map milestone issues into the same internal story model used by Option A.
|
|
113
139
|
|
|
140
|
+
### Roadmap Read
|
|
141
|
+
|
|
142
|
+
Read `docs/roadmap.md` (the roadmap overview — see **Roadmap Maintenance** below). Identify the PRD and the phase/wave row this run delivers, and state it when confirming the source. If the file is missing, or no row matches this run's scope, say so and ask `product-engineer` (or the user) to add the row before Phase 4; do not invent a row's scope yourself.
|
|
143
|
+
|
|
114
144
|
Confirm source and story count before Phase 0.5.
|
|
115
145
|
|
|
116
146
|
---
|
|
@@ -339,6 +369,7 @@ Integration target branch: {{ integration_branch }}
|
|
|
339
369
|
Test-first: YES — write/update tests before implementation for each behavioral sub-task
|
|
340
370
|
Test plan: {{ test_plan_path | default: "none — derive tests from acceptance criteria" }}
|
|
341
371
|
Decision log: {{ decision_log_path }}
|
|
372
|
+
Memo: if memo-cli is available, write the intent entry before coding and the outcome entry before PR conversion, with `--bank developer-memory` named literally; return `memo_intent` and `memo_outcome` in the closeout payload
|
|
342
373
|
|
|
343
374
|
Implement only this story scope.
|
|
344
375
|
Follow test-first design: for each behavioral sub-task, write tests first, verify they fail, then implement.
|
|
@@ -424,7 +455,7 @@ For each completed story PR:
|
|
|
424
455
|
|
|
425
456
|
1. Verify PR base branch is the integration branch.
|
|
426
457
|
2. Verify required checks are successful.
|
|
427
|
-
3. Verify delegated closeout payload reports `docs_drift_status` as `clean` or `drift-fixed
|
|
458
|
+
3. Verify delegated closeout payload reports `docs_drift_status` as `clean` or `drift-fixed`, and carries both `memo_intent` and `memo_outcome` fields. An absent memo field marks the story incomplete (retry the closeout once, as for any missing payload field); a `skipped(<reason>)` or `failed(<reason>)` value is recorded in the story status table and does **NOT** block the merge.
|
|
428
459
|
4. Verify delegated quality gates are all `PASS` (`test`, `lint`, `format:check`, `typecheck`, `audit`).
|
|
429
460
|
5. **Invoke `qa-engineer` directly** — scoped to this story's diff/branch/PR — immediately after receiving the `developer` subagent's closeout payload. The `developer` subagent structurally lacks the `Task` tool (see `.claude/agents/developer.md`'s Operating Context) and may honestly self-report `coverage_gate: SKIPPED(no-delegation)`; that is expected in this path, not a red flag. Record the result of _planner's own_ `qa-engineer` invocation and verify it is `PASS`, `FAIL`, or `SKIPPED(<reason>)` carrying a non-empty reason. An omitted result means the QA gate was never reached — treat the story as incomplete. A `FAIL` or `SKIPPED` value does **NOT** block the merge; only omission does.
|
|
430
461
|
6. **Invoke `verifier` in Audit Mode directly** — scoped to this story's diff/branch/PR — immediately after step 5, and post its human-readable summary to the story PR via `github-ops` comment conventions. A bare developer-reported `verifier_audit: run` string is one signal but is **NOT sufficient evidence on its own** — `verifier_audit: not-run(no-delegation)` is a valid, expected self-report from the `developer` subagent in this path (it structurally cannot invoke `verifier`), not a red flag. This merge gate checks the result of _planner's own_ `verifier` invocation, not the self-reported field. The audit's drift findings (`fidelity_verdict`/`highest_drift_impact`/`drift_findings`) **MUST NOT** block the merge.
|
|
@@ -432,7 +463,7 @@ For each completed story PR:
|
|
|
432
463
|
8. Verify branch is up to date with integration branch (update/rebase if required by policy). Use the `git-ops` skill for rebase and conflict resolution.
|
|
433
464
|
9. Detect merge conflicts before attempting merge. If conflicts are found, invoke the `git-ops` skill to resolve them.
|
|
434
465
|
10. **Review the PR** — planner **MUST** review the story PR (verify scope, files, test and quality-gate results) and approve it.
|
|
435
|
-
11. Merge PR into integration branch using one consistent strategy (default: `squash
|
|
466
|
+
11. Merge PR into integration branch using one consistent strategy (default: `merge`, a merge commit with source-branch deletion; never squash or rebase unless the user explicitly asks for it).
|
|
436
467
|
12. Confirm integration branch is green after merge before moving to next story.
|
|
437
468
|
13. **Verify the merge actually happened, then write checkpoint.** Before writing `✅ Merged` to the state file, confirm observed GitHub state — run `gh pr view <n> --json state,mergedAt` and require `state` to be `MERGED` and `mergedAt` to be non-null. If the check fails or errors, do **not** write `✅ Merged`; mark the story blocked, report the exact `gh pr view` output, and stop rather than guessing at the outcome. Only once this is confirmed: update the planner state file (see Phase 0.5 State File Format), mark the completed story as `✅ Merged` with its PR link and branch name, update `Current Position` to the next pending story, update the `Last updated` timestamp, and post a GitHub Issue comment on the plan/milestone issue with the current story status table.
|
|
438
469
|
|
|
@@ -461,14 +492,18 @@ After all stories are merged into integration:
|
|
|
461
492
|
2. Invoke `qa-engineer` at **PRD scope** (all packages affected by the merged stories, all layers) for a coverage and gap rollup. Report a PRD-level `coverage_gate` that aggregates per-story gates. Scope to packages affected by the merged stories, not the entire workspace.
|
|
462
493
|
3. Invoke `verifier` in `audit` mode for a **PRD-level rollup audit** against the full integrated scope (all merged stories on the integration branch, cross-checked against the source PRD/spec/milestone). This is mandatory and non-skippable — it runs whether or not any story-level drift was previously reported. Post the resulting human-readable summary to the plan/milestone issue via `github-ops` comment conventions. Rollup drift findings **MUST NOT** block the consolidated PR handoff; Unintended/Intended drift routes to `product-engineer`'s `activity-drift-reconciliation` flow.
|
|
463
494
|
4. Invoke `technical-writer` for a planner-level drift/stale-doc validation pass against integrated changes; unresolved drift **MUST** block handoff.
|
|
464
|
-
5.
|
|
465
|
-
6. **
|
|
466
|
-
7.
|
|
467
|
-
8. **
|
|
468
|
-
9.
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
495
|
+
5. **Roadmap update (mandatory).** Update the run's row(s) in `docs/roadmap.md` on the integration branch, so the change ships in the consolidated PR itself: set `Status` (`Done` when every story in the phase/wave merged, otherwise `In progress`), fill `Issues/PRs` with the story issues and the consolidated PR, rewrite `What's missing` to the remaining scope (`—` when none), and set the `Last updated` date. A consolidated PR without this roadmap change is incomplete. See **Roadmap Maintenance** below.
|
|
496
|
+
6. **memo run outcome.** Write the per-run outcome entry described in **memo-cli Integration → Responsibilities** and record `memo_run_outcome`.
|
|
497
|
+
7. Open one consolidated PR from integration branch to `main`.
|
|
498
|
+
8. **Do NOT merge.** Notify the user that the consolidated PR is ready for their review.
|
|
499
|
+
9. Wait for the user to approve and merge the PR into `main`.
|
|
500
|
+
10. **Post-integration deploy handoff (conditional).** When the merged scope includes deployable changes and the repository declares environments in `infra/environments.yaml`, planner **MUST** hand the deploy off to `infra-engineer` rather than running any platform write or deploy command itself. This handoff is conditional — it applies only when infrastructure/deploy scope is present; a docs- or test-only integration triggers no deploy. Planner names `infra-engineer` as the owner of the post-integration deploy (dev on merge to `main`, production behind the protected-environment reviewer on the release tag via the `deploy-ops` workflow templates) and never invokes `deploy.sh`, `release.sh`, `flyctl`, `aws`, or `supabase` directly.
|
|
501
|
+
11. Before final handoff, **MUST** ensure the local working branch is the integration branch used for this run:
|
|
502
|
+
|
|
503
|
+
- Preferred: run `git checkout integration/<plan-id>-<short-description>`.
|
|
504
|
+
- Alternative (if checkout is not possible in the current runtime): explicitly verify and report current branch, and provide the exact checkout command the user can run.
|
|
505
|
+
|
|
506
|
+
12. Final user response **MUST** include a `PR Directives (User Action Required)` section with:
|
|
472
507
|
|
|
473
508
|
- consolidated PR URL
|
|
474
509
|
- current CI/check status
|
|
@@ -482,6 +517,8 @@ Consolidated PR should include:
|
|
|
482
517
|
- Per-story changed files and test results
|
|
483
518
|
- Manual validation instructions per story
|
|
484
519
|
- Integration test summary
|
|
520
|
+
- Roadmap row(s) updated in `docs/roadmap.md` (before → after status)
|
|
521
|
+
- Memo coverage: per-story `memo_intent` / `memo_outcome` values and `memo_run_outcome`
|
|
485
522
|
|
|
486
523
|
PR title **MUST** follow Conventional Commits and PR body **MUST** follow `github-ops` conventions.
|
|
487
524
|
|
|
@@ -489,6 +526,17 @@ Planner **MUST NOT** merge the consolidated PR. Only the user may approve and me
|
|
|
489
526
|
|
|
490
527
|
---
|
|
491
528
|
|
|
529
|
+
## Roadmap Maintenance
|
|
530
|
+
|
|
531
|
+
`docs/roadmap.md` is the one-page overview of every PRD's phases or waves: what is done, what is in progress, and what is missing. It is an index over the PRDs, GitHub issues, and merged PRs — when they disagree, they win and the roadmap is corrected.
|
|
532
|
+
|
|
533
|
+
- **Read** it in Phase 0 (see **Roadmap Read**).
|
|
534
|
+
- **Update** the run's row(s) in Phase 5 step 5, in the consolidated PR. Never leave the roadmap claiming `In progress` for a phase this run finished, or `Done` for one it did not.
|
|
535
|
+
- Change only the rows this run touched; rows for other PRDs belong to `product-engineer` and to the planner runs that deliver them.
|
|
536
|
+
- The `verifier` rollup audit (Phase 5 step 3) compares the roadmap against merged work and reports a mismatch as an advisory finding.
|
|
537
|
+
|
|
538
|
+
---
|
|
539
|
+
|
|
492
540
|
## Error Handling
|
|
493
541
|
|
|
494
542
|
| Situation | Action |
|
|
@@ -71,17 +71,38 @@ If any required input is missing, you **MUST** ask concise clarifying questions.
|
|
|
71
71
|
|
|
72
72
|
---
|
|
73
73
|
|
|
74
|
-
##
|
|
74
|
+
## Roadmap Maintenance
|
|
75
75
|
|
|
76
|
-
|
|
76
|
+
`docs/roadmap.md` is the one-page overview of every PRD's phases or waves: what is done, what is in progress, and what is missing. `product-engineer` owns its rows and structure; `planner` updates the status of the rows a run delivers. It is an index over the PRDs, GitHub issues, and merged PRs — when they disagree, they win and the roadmap is corrected.
|
|
77
77
|
|
|
78
|
-
|
|
78
|
+
- **Read it at session start**, in every mode, before any activity, so a new PRD or issue is placed against what already exists and what is still missing.
|
|
79
|
+
- **Create it** in Init Mode, or the first time a PRD is written in a repository that has none, from the template shape below.
|
|
80
|
+
- **Add rows when a PRD is created or changed** (`activity-refine`): one row per delivery phase or wave the PRD defines, or a single `All` row when it defines none, each `Not started`. A PRD changelog that adds, removes, or re-scopes a phase updates its rows in the same change.
|
|
81
|
+
- **Fill `Issues/PRs` when stories are published** (`activity-publish-github`), and set the row to `In progress` once its first story is being implemented.
|
|
82
|
+
- **Correct it during drift reconciliation** (`activity-drift-reconciliation`) when a `verifier` roadmap-mismatch finding is confirmed.
|
|
83
|
+
- Never mark a row `Done` yourself on the strength of a plan; `Done` requires merged work, and `planner` sets it in the consolidated PR that delivers it.
|
|
79
84
|
|
|
80
|
-
|
|
81
|
-
|
|
85
|
+
Shape (one table, one row per PRD phase or wave, newest PRD first):
|
|
86
|
+
|
|
87
|
+
```markdown
|
|
88
|
+
# Roadmap
|
|
89
|
+
|
|
90
|
+
Last updated: YYYY-MM-DD
|
|
91
|
+
|
|
92
|
+
| PRD | Phase/Wave | Scope (one line) | Status | Issues/PRs | What's missing |
|
|
93
|
+
| ---------------------------------------- | ---------- | ---------------- | ----------- | ----------- | ---------------- |
|
|
94
|
+
| [prd-<name>](requirements/prd-<name>.md) | 1 | <scope> | Not started | #12, PR #20 | <remaining or —> |
|
|
82
95
|
```
|
|
83
96
|
|
|
84
|
-
`
|
|
97
|
+
`Status` is exactly one of `Not started`, `In progress`, `Done`.
|
|
98
|
+
|
|
99
|
+
---
|
|
100
|
+
|
|
101
|
+
## memo-cli Integration (When Available)
|
|
102
|
+
|
|
103
|
+
### Bank Declaration
|
|
104
|
+
|
|
105
|
+
This agent's bank id is `product-engineer-memory`, stable for the agent's life (PRD §15). The decisions this agent records go to the shared `kb` (see **Decision Write-Back** below), not its private bank. Name the bank **literally** in every memo command (`--bank kb`); never rely on an `export MEMO_BANK=…` from an earlier command and never write `--bank $MEMO_BANK` — each shell command runs in a fresh shell, the variable is empty, and memo-cli rejects the resulting bank id (issue #253).
|
|
85
106
|
|
|
86
107
|
### Availability Check
|
|
87
108
|
|
|
@@ -91,7 +112,8 @@ At the start of every session, verify memo-cli is configured:
|
|
|
91
112
|
which memo && memo setup validate
|
|
92
113
|
```
|
|
93
114
|
|
|
94
|
-
- If `memo` is not found, skip all memo operations
|
|
115
|
+
- If `memo` is not found and `memo.config.json` does not exist, skip all memo operations.
|
|
116
|
+
- If `memo` is not found but `memo.config.json` exists, warn the user that the repository expects memo-cli but the binary is not on PATH in this session, so no decisions will be recorded in memo. Never skip silently in this case.
|
|
95
117
|
- If `memo` is found but validation fails, ask: "memo-cli is installed but not configured for this repository. Run `memo setup init --repo <repo> --org <org> --domain <domain>` to configure it."
|
|
96
118
|
|
|
97
119
|
### Session Start — Restore Context
|
|
@@ -126,7 +148,31 @@ Before making design choices in `activity-refine`, `activity-generate-spec`, or
|
|
|
126
148
|
memo search "<specific topic, technology, or module>" --json
|
|
127
149
|
```
|
|
128
150
|
|
|
129
|
-
|
|
151
|
+
### Decision Write-Back — After Each Grilling Exit Gate
|
|
152
|
+
|
|
153
|
+
The decisions made with the user during refinement and specification are the most durable knowledge the workflow produces; they **MUST** reach memo, not only `workstream/decisions-<feature>.md`.
|
|
154
|
+
|
|
155
|
+
When `activity-grill`'s exit gate is satisfied (the WHAT phase in `activity-refine`, the HOW phase in `activity-generate-spec`, or Issue Mode refinement), write **one `kb` entry per user-answered decision row** recorded in that phase. Skip self-resolved rows (`Accepted rec.` is `n/a`): they restate knowledge that already exists. Do not batch several decisions into one entry.
|
|
156
|
+
|
|
157
|
+
```bash
|
|
158
|
+
memo write \
|
|
159
|
+
--kind semantic \
|
|
160
|
+
--bank kb \
|
|
161
|
+
--manual \
|
|
162
|
+
--rationale "<feature>#D-NN (<WHAT|HOW>): <question in one sentence>. Decided: <answer>. Why: <reason given or the accepted recommendation's reasoning>. Rejected: <alternatives considered|none>." \
|
|
163
|
+
--tags "<domain>,<feature>,decision,<phase-lowercase>,<feature>-d-NN" \
|
|
164
|
+
--entry-type decision \
|
|
165
|
+
--story "<issue-or-feature-id-if-known>" \
|
|
166
|
+
--files "workstream/decisions-<feature>.md" \
|
|
167
|
+
--on-duplicate consolidate \
|
|
168
|
+
--json
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
- `--manual` is correct here: the decision was made by the user in conversation, so it has no episodic provenance, and memo-cli rejects an agent-sourced semantic entry without one.
|
|
172
|
+
- A row that supersedes an earlier decision is written as a new entry naming the superseded ID in its rationale; `--on-duplicate consolidate` merges near-duplicates.
|
|
173
|
+
- **Write results are recorded, never swallowed.** Report the written ids (or `skipped(<reason>)`) in the phase's completion summary. On failure, fix the command if the error names a flag or value you supplied and retry once; then report `failed(<error>)`. A failed write never blocks the phase.
|
|
174
|
+
|
|
175
|
+
`technical-writer` still owns ADR and doc-change entries, and `developer` owns per-story intent/outcome entries.
|
|
130
176
|
|
|
131
177
|
### Session Close
|
|
132
178
|
|