@punks/cli 2.6.0 → 2.6.1
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/README.md +5 -1
- package/dist/BASELINE_CHANGELOG.md +9 -0
- package/dist/CHANGELOG.md +22 -0
- package/dist/index.js +599 -482
- package/dist/skills/agnostic/cli/hi-cli/SKILL.md +22 -15
- package/dist/skills/agnostic/cli/hi-cli/references/commands.md +21 -5
- package/dist/skills/agnostic/cli/hi-cli/references/post-command-flow.md +87 -55
- package/dist/skills/agnostic/planning/create-plan/SKILL.md +1 -1
- package/dist/skills/agnostic/planning/create-plan/references/plan-schema.md +18 -0
- package/dist/skills/agnostic/planning/implement-spec/SKILL.md +3 -1
- package/dist/skills/agnostic/planning/implement-spec/assets/IMPLEMENTATION-NOTES-TEMPLATE.md +6 -0
- package/dist/skills/agnostic/planning/implement-spec/references/lifecycle.md +11 -0
- package/dist/skills/agnostic/planning/implement-spec/references/parallel-orchestration.md +5 -0
- package/dist/skills/agnostic/planning/implement-spec/references/parallel-worker-brief.md +7 -0
- package/dist/skills/agnostic/planning/implement-spec/references/runtime-product-validation.md +50 -0
- package/dist/skills/agnostic/planning/implement-spec/references/sequential.md +7 -5
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: hi-cli
|
|
3
|
-
description: Operates the Harness Intelligence CLI (`hi`, alias `hint`) and interactively follows scaffold, update, report, upgrade, and post-command handoff
|
|
3
|
+
description: Operates the Harness Intelligence CLI (`hi`, alias `hint`) and interactively follows scaffold, update, report, upgrade, operator-skill, and post-command handoff flows through to completion. Use when a repo contains `.devpunks/` output, when the user mentions `hi scaffold`, `hi update`, `hi report`, `hi upgrade`, `hi operator`, `hint`, or asks what to do after running a Harness CLI command.
|
|
4
4
|
metadata: {"Harness Intelligence":{"entrypoint":true}}
|
|
5
5
|
---
|
|
6
6
|
|
|
@@ -21,15 +21,21 @@ hi update --write
|
|
|
21
21
|
hi update --yes
|
|
22
22
|
hi report --help
|
|
23
23
|
hi upgrade --help
|
|
24
|
+
hi operator status
|
|
25
|
+
hi operator update
|
|
24
26
|
```
|
|
25
27
|
|
|
26
|
-
After any command,
|
|
28
|
+
After any command, classify the command result before reading artifacts or acting.
|
|
27
29
|
|
|
28
30
|
## Core Rule
|
|
29
31
|
|
|
30
|
-
`.devpunks/`
|
|
32
|
+
For scaffold init/setup, generated `.devpunks/` artifacts are an active work queue. Follow the scaffold branch through repo-specific authoring and validation.
|
|
31
33
|
|
|
32
|
-
|
|
34
|
+
For update, artifact existence is not a trigger. Route only from the current command summary and changed paths. Do not reopen standing specs, regenerate prompts or subagents, scan every skill home, or repeat setup work unless the current update changed the corresponding input.
|
|
35
|
+
|
|
36
|
+
For `hi operator`, inspect only the command result. Never read `.devpunks/` or run scaffold follow-through. See [references/post-command-flow.md](references/post-command-flow.md) for the full operator-skill completion rules.
|
|
37
|
+
|
|
38
|
+
An assigned execution worker runs its bounded command and reports the result. It does not delegate or launch another execution agent.
|
|
33
39
|
|
|
34
40
|
## Interactive Rule
|
|
35
41
|
|
|
@@ -49,7 +55,7 @@ Do not ask for trivial file reads, validation commands, or direct execution of a
|
|
|
49
55
|
|
|
50
56
|
See [references/commands.md](references/commands.md) for command intent and when to use each command.
|
|
51
57
|
|
|
52
|
-
See [references/post-command-flow.md](references/post-command-flow.md) for the
|
|
58
|
+
See [references/post-command-flow.md](references/post-command-flow.md) for the command-specific read order, update routing table, and completion gates.
|
|
53
59
|
|
|
54
60
|
The former backlog scaffold subcommand is not part of current guidance. `hi scaffold init` provides the requirements/backlog skills and initial wiki structure; `hi scaffold setup` provides repo-aware managed scaffold output.
|
|
55
61
|
|
|
@@ -89,15 +95,15 @@ When lint specs suggest Oxlint or hooks suggest Oxfmt, treat migration as a repo
|
|
|
89
95
|
|
|
90
96
|
## Update
|
|
91
97
|
|
|
92
|
-
After `hi update` or `hi update --check`,
|
|
98
|
+
After `hi update` or `hi update --check`, classify the update summary and changed paths before opening generated artifacts.
|
|
93
99
|
|
|
94
100
|
- `--check` reports managed-file drift without writing.
|
|
95
101
|
- `--write` refreshes scaffold-managed assets.
|
|
96
102
|
- `--yes` refreshes scaffold-managed assets without prompting and is the non-interactive apply flag.
|
|
97
103
|
- drift output can include changelog summaries; use them to explain why update/upgrade matters.
|
|
98
|
-
- pack
|
|
104
|
+
- auto-accepted default or detected pack additions follow their affected changed categories only; optional, removal, policy, or surface-shape drift can require a setup decision.
|
|
99
105
|
|
|
100
|
-
|
|
106
|
+
Use the update decision table and completion gate in [references/post-command-flow.md](references/post-command-flow.md).
|
|
101
107
|
|
|
102
108
|
## Report
|
|
103
109
|
|
|
@@ -124,11 +130,12 @@ Upgrade deliberately bypasses package-manager release-age gates for the CLI pack
|
|
|
124
130
|
|
|
125
131
|
Startup update checks are advisory and detached. They should not mutate installs during normal command startup; `hi upgrade` is the explicit update path.
|
|
126
132
|
|
|
127
|
-
##
|
|
133
|
+
## Operator Skill
|
|
134
|
+
|
|
135
|
+
Use `hi operator status|install|update|migrate` to manage the separately installed `hi-cli` operator skill. `hi skills rename` remains a deprecated compatibility alias for `hi operator migrate`.
|
|
136
|
+
|
|
137
|
+
This flow is separate from CLI executable upgrade and project scaffold update. Follow the operator-skill branch in [references/post-command-flow.md](references/post-command-flow.md).
|
|
138
|
+
|
|
139
|
+
## Completion
|
|
128
140
|
|
|
129
|
-
-
|
|
130
|
-
- `.devpunks/specs/**` items were implemented or listed as unresolved.
|
|
131
|
-
- required tools were checked when `.devpunks/required-tools.json` exists.
|
|
132
|
-
- final prompt files and harness mirrors match the handoff contract.
|
|
133
|
-
- subagent manifests were reconciled when specs exist.
|
|
134
|
-
- user decisions were requested for policy-level choices instead of guessed silently.
|
|
141
|
+
Use the branch-specific completion criteria in [references/post-command-flow.md](references/post-command-flow.md). Do not substitute an existence-based checklist.
|
|
@@ -26,21 +26,19 @@ After init, the agent must reconcile pre-existing skills. The command does not d
|
|
|
26
26
|
|
|
27
27
|
Use at session start when `.devpunks/` exists or to preview managed scaffold drift from `.devpunks/scaffold-manifest.json`.
|
|
28
28
|
|
|
29
|
-
Report CLI, baseline, missing, changed, or pack-drift findings. Do not write files. If remediation is accepted,
|
|
29
|
+
Report CLI, baseline, missing, changed, or pack-drift findings. Do not write files. If remediation is accepted, the parent may assign one bounded execution worker for `hi upgrade`, `hi update --write`, or `hi update --yes` under the core execution rule.
|
|
30
30
|
|
|
31
31
|
## `hi update --write`
|
|
32
32
|
|
|
33
33
|
Use to refresh scaffold-managed files recorded in `.devpunks/scaffold-manifest.json`.
|
|
34
34
|
|
|
35
|
-
After writing,
|
|
36
|
-
|
|
37
|
-
Also run the agent-owned pre-existing skill reconciliation check. `hi update` does not detect overlaps.
|
|
35
|
+
After writing, follow only the matching update branches in [post-command-flow.md](post-command-flow.md).
|
|
38
36
|
|
|
39
37
|
## `hi update --yes`
|
|
40
38
|
|
|
41
39
|
Use in non-interactive harnesses to apply managed scaffold updates without answering the terminal confirmation prompt.
|
|
42
40
|
|
|
43
|
-
It has the same managed-file apply behavior as `--write`.
|
|
41
|
+
It has the same managed-file apply behavior and branch-sensitive follow-through as `--write`.
|
|
44
42
|
|
|
45
43
|
## `hi report`
|
|
46
44
|
|
|
@@ -74,3 +72,21 @@ The command checks the selected npm dist-tag, detects Bun, pnpm, npm, or Yarn fr
|
|
|
74
72
|
- npm uses `--min-release-age=0`.
|
|
75
73
|
- pnpm uses `npm_config_minimum_release_age=0`.
|
|
76
74
|
- Yarn uses `YARN_NPM_MINIMAL_AGE_GATE=0`.
|
|
75
|
+
|
|
76
|
+
## `hi operator status`
|
|
77
|
+
|
|
78
|
+
Use to report global and project `hi-cli` installations plus legacy `dp-cli` installations without changing them.
|
|
79
|
+
|
|
80
|
+
## `hi operator install`
|
|
81
|
+
|
|
82
|
+
Use to install `hi-cli` when absent. Report both scopes and reload or reactivate `$hi-cli` after success.
|
|
83
|
+
|
|
84
|
+
## `hi operator update`
|
|
85
|
+
|
|
86
|
+
Use to update every detected global or project `hi-cli` installation. Verify each detected copy and reload or reactivate `$hi-cli` after success.
|
|
87
|
+
|
|
88
|
+
## `hi operator migrate`
|
|
89
|
+
|
|
90
|
+
Use to install or update `hi-cli`, then remove detected legacy `dp-cli` installations. Verify every affected scope and reload or reactivate `$hi-cli` after success.
|
|
91
|
+
|
|
92
|
+
`hi skills rename` is a deprecated compatibility alias for `hi operator migrate`.
|
|
@@ -1,8 +1,16 @@
|
|
|
1
1
|
# Post-Command Flow
|
|
2
2
|
|
|
3
|
-
##
|
|
3
|
+
## 1. Classify the Result
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
Capture the command, mode, summary, and paths changed by this run. Choose one branch: scaffold setup, scaffold init, update, report, upgrade, or operator skill.
|
|
6
|
+
|
|
7
|
+
Existing `.devpunks/` artifacts describe project state. Their existence does not make them current work. Read an artifact only when the active branch or a changed category below points to it.
|
|
8
|
+
|
|
9
|
+
## 2. Read the Active Branch
|
|
10
|
+
|
|
11
|
+
### Scaffold Setup
|
|
12
|
+
|
|
13
|
+
Read available artifacts in this order:
|
|
6
14
|
|
|
7
15
|
1. `.devpunks/AGENT-SYSTEM-PROMPT.md`
|
|
8
16
|
2. `.devpunks/AGENT-HANDOFF.md`
|
|
@@ -11,74 +19,98 @@ When `.devpunks/` exists, read in this order:
|
|
|
11
19
|
5. `.devpunks/settings.json`
|
|
12
20
|
6. `.devpunks/specs/**`
|
|
13
21
|
|
|
14
|
-
If
|
|
22
|
+
If an expected artifact is missing, continue and report it.
|
|
23
|
+
|
|
24
|
+
Artifact meanings:
|
|
25
|
+
|
|
26
|
+
- `AGENT-SYSTEM-PROMPT.md`: next-agent instructions
|
|
27
|
+
- `AGENT-HANDOFF.md`: scaffold summary and follow-up
|
|
28
|
+
- `scaffold-manifest.json`: managed-file and update authority
|
|
29
|
+
- `required-tools.json`: tools implied by selected skills
|
|
30
|
+
- `settings.json`: accepted CLI and baseline pins
|
|
31
|
+
- `specs/prompts/**`: instructions for final prompts, not prompt bodies
|
|
32
|
+
- `specs/lint/**`: lint selection and starter guidance
|
|
33
|
+
- `specs/subagents/**`: desired subagent manifest shape
|
|
34
|
+
|
|
35
|
+
Then:
|
|
36
|
+
|
|
37
|
+
- author the requested root, docs, and workspace guidance plus sibling `CLAUDE.md` symlink mirrors
|
|
38
|
+
- keep `.agents/AGENTS.md` as shared global prompt source and `.agents/skills/` as the main skill directory; only `.claude/skills` mirrors it
|
|
39
|
+
- reconcile the seeded wiki with the real repo boundary before durable docs are written
|
|
40
|
+
- inspect pre-existing skill homes and `.devpunks/pre-existing-skills` when present; keep the HI baseline active for exact IDs, archive replaced evidence, preserve non-overlaps through mirrors, and use `hi report` for semantic overlap
|
|
41
|
+
- reconcile `.agents/subagents/manifest.mjs` with its prompt and generated spec
|
|
42
|
+
- implement applicable lint specs; ask before replacing lint or format policy, scripts, CI, hooks, or docs
|
|
43
|
+
- ask which detected core libraries matter when source context is broad, then inspect only that set
|
|
44
|
+
|
|
45
|
+
Do not stop because generated files exist. Finish applicable repo-authored outputs and validation.
|
|
46
|
+
|
|
47
|
+
### Scaffold Init
|
|
48
|
+
|
|
49
|
+
- inspect the generated requirements skills and seeded wiki root
|
|
50
|
+
- reconcile pre-existing skills with the same exact-ID policy as setup
|
|
51
|
+
- treat the wiki root as provisional and move or refactor it to match the repo
|
|
52
|
+
- do not start requirements discovery by default
|
|
53
|
+
- run `requirements-grill` before `write-backlog` only when the user asks for requirements or backlog generation
|
|
54
|
+
- use `hi scaffold setup` only when the repo is ready for repo-aware setup
|
|
55
|
+
|
|
56
|
+
### Update
|
|
57
|
+
|
|
58
|
+
Read the command summary before any generated artifact. If it reports no diff, report success and stop.
|
|
15
59
|
|
|
16
|
-
|
|
60
|
+
For a diff, classify only paths changed or flagged by this run. If the summary is insufficient, read the matching manifest entries. Read settings only for pin changes. Read a prompt, handoff, tool list, or spec only when its own category changed.
|
|
17
61
|
|
|
18
|
-
|
|
19
|
-
- `.devpunks/AGENT-HANDOFF.md`: human-readable scaffold summary and required follow-up.
|
|
20
|
-
- `.devpunks/scaffold-manifest.json`: source of truth for managed files and update behavior.
|
|
21
|
-
- `.devpunks/required-tools.json`: tools implied by selected skills.
|
|
22
|
-
- `.devpunks/specs/prompts/**`: instructions for final prompt files, not final prompt bodies.
|
|
23
|
-
- `.devpunks/specs/lint/**`: lint asset selection and starter config guidance.
|
|
24
|
-
- `.devpunks/specs/subagents/**`: desired subagent manifest shape.
|
|
62
|
+
Apply every matching row:
|
|
25
63
|
|
|
26
|
-
|
|
64
|
+
| Changed category | Required follow-through |
|
|
65
|
+
| --- | --- |
|
|
66
|
+
| Settings or manifest pins only | Confirm accepted pins. The standard fresh drift gate below is the only follow-through. |
|
|
67
|
+
| Skill content; IDs unchanged | Inspect affected skills and active mirrors only. Preserve repo-owned edits. Do not scan every skill home or touch prompts, subagents, packs, or wiki. |
|
|
68
|
+
| Skill added, removed, or renamed | Reconcile affected IDs and their mirrors. Inspect overlap evidence only for those IDs. |
|
|
69
|
+
| `local-edited` conflict | Inspect the flagged path and its relevant snapshot/evidence. Preserve local intent; ask only when project and baseline intent conflict. |
|
|
70
|
+
| Missing or stale path | Confirm the named recreation or deletion and its direct references. Do not audit unrelated managed files. |
|
|
71
|
+
| Prompt spec or prompt input | Reconcile only affected prompt scopes and their mirrors. |
|
|
72
|
+
| Subagent contract input | Reconcile only the generated and final subagent manifests. Do not spawn agents merely to perform reconciliation. |
|
|
73
|
+
| Lint, hook, or script input | Validate the affected config or command. Ask before changing project policy. |
|
|
74
|
+
| Required tools | Check only added, changed, or failed tools. |
|
|
75
|
+
| Source-guide content | Inspect only affected guide files. Do not run `opensrc` unless the user's current task requires that library's source. |
|
|
76
|
+
| Wiki input | Reconcile affected routes or documents against the real repo boundary, then run route- or runtime-targeted validation. |
|
|
77
|
+
| Auto-accepted default or detected pack addition | Follow only the other changed categories caused by that addition. Do not ask or rerun setup. |
|
|
78
|
+
| Optional pack addition, pack removal, policy change, surface reshape, or explicit unresolved setup decision | Ask for the required decision. Run full setup follow-through only when the accepted decision requires repo-authored final outputs. |
|
|
79
|
+
| First adoption or missing/corrupt final output | Run the applicable scaffold setup follow-through. |
|
|
27
80
|
|
|
28
|
-
|
|
81
|
+
After write modes, run targeted validation for the affected category and one fresh `hi check --json` drift gate. Do not rerun `hi update` merely because an earlier command mentioned a possible version race. Rerun once only when `hi check --json` detects new CLI or baseline drift; then run the final `hi check --json` gate.
|
|
29
82
|
|
|
30
|
-
|
|
83
|
+
For `hi update --check`, report the classified preview without writing. A clean preview is complete.
|
|
31
84
|
|
|
32
|
-
|
|
33
|
-
- Reconcile any scaffolded wiki root with the real repo layout before writing durable docs.
|
|
34
|
-
- Reconcile pre-existing skills yourself; commands do not detect overlap. Inspect `.agents/skills`, `.claude/skills`, `.codex/skills`, `.cursor/skills`, and `.opencode/skills`. If `.devpunks/pre-existing-skills` exists, inspect it as blind pre-command evidence.
|
|
35
|
-
- Exact canonical directory id/name overlap keeps the HI baseline skill active. Archive local evidence under `.devpunks/replaced-skills/<skill-id>/...`, then remove active local copies or mirrors.
|
|
36
|
-
- Preserve non-overlapping local skills and expose them through harness mirrors or symlinks. Use `hi report` when archived local knowledge should be proposed for HI baseline integration; semantic overlap belongs there.
|
|
37
|
-
- Create sibling `CLAUDE.md` symlink mirrors for those neutral prompt files.
|
|
38
|
-
- Keep `.agents/AGENTS.md` as the shared global prompt source.
|
|
39
|
-
- Keep `.agents/skills/` as the main skill directory; only `.claude/skills` mirrors it.
|
|
40
|
-
- Reconcile `.agents/subagents/manifest.mjs` with both `.agents/subagents/manifest.prompt.md` and `.devpunks/specs/subagents/manifest-spec.json`.
|
|
41
|
-
- Use lint specs to produce or update the repo's real lint config when requested.
|
|
42
|
-
- Ask before replacing existing lint/format tooling with Oxlint/Oxfmt. If approved, update scripts, CI/task pipelines, hooks, and docs together.
|
|
43
|
-
- Ask which detected core libraries to inspect when source context is broad; then use `opensrc path <package>` or `opensrc path owner/repo` for only the chosen set.
|
|
85
|
+
### Report
|
|
44
86
|
|
|
45
|
-
|
|
87
|
+
Confirm that the command returned a GitHub issue URL before saying the report was submitted. Return the URL, labels, command, skill pack, and any blocker. Do not duplicate project backlog into Harness reports unless maintainers explicitly promote it.
|
|
46
88
|
|
|
47
|
-
|
|
89
|
+
### Upgrade
|
|
48
90
|
|
|
49
|
-
|
|
50
|
-
- For write modes, confirm `cliVersion` and `baselineVersion` reflect accepted project authority after writes.
|
|
51
|
-
- Verify refreshed files still fit repo shape; handle pack drift intentionally.
|
|
52
|
-
- Apply the same pre-existing skill reconciliation policy as scaffold setup. `hi update` does not detect overlaps; the agent checks the skill homes and `.devpunks/pre-existing-skills` when present, keeps HI baseline active for exact name/id overlaps, preserves non-overlaps through mirrors, and uses `hi report` for semantic overlap or baseline integration proposals.
|
|
91
|
+
Report whether the CLI upgraded, was current, could not detect its install manager, or failed. Include the package manager and command when available. For registry or install-manager failure, give the matching manual reinstall command instead of treating the repo as broken.
|
|
53
92
|
|
|
54
|
-
|
|
93
|
+
### Operator Skill
|
|
55
94
|
|
|
56
|
-
|
|
57
|
-
- Inspect the generated skills and seeded wiki root.
|
|
58
|
-
- Reconcile pre-existing skills yourself using `.agents/skills`, `.claude/skills`, `.codex/skills`, `.cursor/skills`, and `.opencode/skills`; inspect `.devpunks/pre-existing-skills` when present; the command did not detect overlap.
|
|
59
|
-
- Treat the seeded wiki root as provisional until it matches the repo layout.
|
|
60
|
-
- Move, rename, or refactor generated init output when needed so it matches the actual repository.
|
|
61
|
-
- Run `requirements-grill` before `write-backlog` only when the user actually asks for requirements or backlog generation.
|
|
62
|
-
- Use `hi scaffold setup` only after the repo is ready for repo-aware setup.
|
|
95
|
+
Classify `hi operator status`, `install`, `update`, or `migrate` from the command result only. `hi skills rename` is a deprecated compatibility alias for `hi operator migrate` and follows this same branch.
|
|
63
96
|
|
|
64
|
-
|
|
97
|
+
Never read `.devpunks/` artifacts or inspect project files for this branch. Do not scan skill homes, run scaffold or update checks, generate prompts, or delegate again.
|
|
65
98
|
|
|
66
|
-
-
|
|
67
|
-
- Include the issue URL, labels, affected command, affected skill pack, and remaining blocker if creation failed.
|
|
68
|
-
- Do not duplicate project product backlog into Harness reports unless maintainers explicitly promote it.
|
|
99
|
+
Report `hi-cli` and legacy `dp-cli` state for both global and project scopes:
|
|
69
100
|
|
|
70
|
-
|
|
101
|
+
- `status`: report detected installations without changing them
|
|
102
|
+
- `install`: verify the resulting `hi-cli` installation
|
|
103
|
+
- `update`: verify every detected `hi-cli` copy updated successfully
|
|
104
|
+
- `migrate`: verify `hi-cli` was installed or updated in every affected scope and every detected legacy `dp-cli` copy was removed
|
|
71
105
|
|
|
72
|
-
|
|
73
|
-
- Include the package manager and command used when available.
|
|
74
|
-
- If upgrade failed because registry lookup or install-manager detection failed, give the manual reinstall command for Bun, pnpm, npm, or Yarn rather than treating the repo as broken.
|
|
106
|
+
If any action partially fails, return the exact failed Skills CLI command from the command result. After successful `install`, `update`, or `migrate`, tell the agent to reload or reactivate `$hi-cli` before relying on its instructions.
|
|
75
107
|
|
|
76
|
-
##
|
|
108
|
+
## 3. Complete the Branch
|
|
77
109
|
|
|
78
|
-
|
|
110
|
+
- scaffold setup/init: applicable generated instructions are reconciled into final repo outputs; targeted validation ran; unresolved policy choices are named
|
|
111
|
+
- update: only changed categories were handled; the required drift gate is clean, or its remaining findings are reported
|
|
112
|
+
- report: a GitHub issue URL or exact submission blocker is returned
|
|
113
|
+
- upgrade: install manager, command, and outcome are returned
|
|
114
|
+
- operator skill: global and project states are returned; requested actions are verified or the exact failed Skills CLI command is returned; reload/reactivation is requested after successful mutation
|
|
79
115
|
|
|
80
|
-
|
|
81
|
-
- what final files were authored or reconciled
|
|
82
|
-
- report issue URL or upgrade command/result, when relevant
|
|
83
|
-
- what validation ran
|
|
84
|
-
- what remains unresolved, if anything
|
|
116
|
+
Report only artifacts consumed for the active branch, final files changed, validation run, and unresolved items.
|
|
@@ -52,7 +52,7 @@ Create a plan first. Never implement code in this skill.
|
|
|
52
52
|
6. Resolve each task's scoped guidance from root `AGENTS.md` down to the nearest `AGENTS.md` for its `location`.
|
|
53
53
|
7. Use each task's required skill guidance while shaping its scope, dependencies, validation, RED target, and review mode; do not merely list skills after the plan is written.
|
|
54
54
|
8. Assign each task the exact existing skills required by those scoped `Primary skills here` lists, merging all scopes for cross-directory tasks.
|
|
55
|
-
9. Normalize every task with stable ids, `depends_on`, `location`, `description`, `validation`, `status`, `log`, `files edited/created`, owning-story backlog references, `assigned_skills`, `tdd_status`, `tdd_target`, RED/GREEN commands, evidence fields, `codebase_design_notes`, and `
|
|
55
|
+
9. Normalize every task with stable ids, `depends_on`, `location`, `description`, `validation`, `status`, `log`, `files edited/created`, owning-story backlog references, `assigned_skills`, `tdd_status`, `tdd_target`, RED/GREEN commands, evidence fields, `codebase_design_notes`, `review_mode`, `runtime_validation`, `runtime_target`, `runtime_evidence`, and `runtime_cleanup`.
|
|
56
56
|
10. Keep `PLAN.md` self-contained: embed gathered context, relevant code paths, existing patterns, constraints, assumptions, design reasoning, tradeoffs, initial situation, issue, solution shape, findings, research, dependency graph, testing strategy, skill-routing notes, risks, validation gates, unresolved questions, and a resolved decision ledger.
|
|
57
57
|
11. Write enough conceptual reasoning that an executor can implement from `PLAN.md` alone, using supplementary research only when they choose to refresh or deepen context.
|
|
58
58
|
12. For complex work, express the plan as a swarm graph of `Tn` tasks with dependency-aware validation gates, expected outcomes, assertions, or checks that let the executor self-verify before moving on.
|
|
@@ -50,6 +50,10 @@ Every task must include:
|
|
|
50
50
|
- `green_evidence`
|
|
51
51
|
- `codebase_design_notes`
|
|
52
52
|
- `review_mode`
|
|
53
|
+
- `runtime_validation`
|
|
54
|
+
- `runtime_target`
|
|
55
|
+
- `runtime_evidence`
|
|
56
|
+
- `runtime_cleanup`
|
|
53
57
|
|
|
54
58
|
`backlog_item_id` and `backlog_item_url` reference the owning product-facing story, not a task-owned backlog record.
|
|
55
59
|
|
|
@@ -67,6 +71,16 @@ For behavior-changing code tasks, `tdd_status` must be `required` and the task m
|
|
|
67
71
|
|
|
68
72
|
`codebase_design_notes` must name the relevant module interface, seam, adapter, or test surface when the task changes code structure. Use `not_applicable` only when the task has no codebase-design consequence.
|
|
69
73
|
|
|
74
|
+
`runtime_validation` must be `required` when acceptance crosses a process or infrastructure boundary that automated checks or mocks cannot faithfully prove, including workers, queues, persistence, providers, tracing, deployment wiring, or similar runtime integration. Otherwise use `not_required`.
|
|
75
|
+
|
|
76
|
+
When runtime validation is required:
|
|
77
|
+
|
|
78
|
+
- `runtime_target` names the supported running product surface.
|
|
79
|
+
- `runtime_evidence` names the externally visible result and durable side effect or diagnostic proof required.
|
|
80
|
+
- `runtime_cleanup` defines the provenance identifiers and owned-resource cleanup expectation.
|
|
81
|
+
|
|
82
|
+
Use `not_applicable` for the other runtime fields when `runtime_validation: not_required`. Runtime validation is orthogonal to `review_mode`; a `cli`, `browser`, or `mixed` task may still require it. Execution mechanics are disclosed in [../../implement-spec/references/runtime-product-validation.md](../../implement-spec/references/runtime-product-validation.md).
|
|
83
|
+
|
|
70
84
|
```md
|
|
71
85
|
### T3: Example task
|
|
72
86
|
|
|
@@ -91,4 +105,8 @@ For behavior-changing code tasks, `tdd_status` must be `required` and the task m
|
|
|
91
105
|
- **green_evidence**:
|
|
92
106
|
- **codebase_design_notes**: Interface/seam/adapter/test-surface notes, or not_applicable.
|
|
93
107
|
- **review_mode**: cli | browser | mixed
|
|
108
|
+
- **runtime_validation**: required | not_required
|
|
109
|
+
- **runtime_target**: Supported local API and background worker.
|
|
110
|
+
- **runtime_evidence**: Public response plus correlated persisted state and worker completion.
|
|
111
|
+
- **runtime_cleanup**: Tag fixtures with a unique run id; remove only resources carrying that id.
|
|
94
112
|
```
|
|
@@ -56,7 +56,8 @@ That means `implement-spec` itself owns all of the following in parallel mode:
|
|
|
56
56
|
9. If a debt item needs a product/scope decision outside the active goal, stop and run a very small `$requirements-phase` clarification before continuing.
|
|
57
57
|
10. If backlog sync is in scope, keep epic/story bodies product-facing and use native metadata or comments instead of execution handoff rewrites.
|
|
58
58
|
11. For UI implementation changes, follow [references/ui-screenshot-evidence.md](references/ui-screenshot-evidence.md) and use `repo-asset-management` for durable before/after asset links.
|
|
59
|
-
12.
|
|
59
|
+
12. For tasks with `runtime_validation: required`, follow [references/runtime-product-validation.md](references/runtime-product-validation.md) and do not mark them complete without conclusive runtime evidence; an exact blocker keeps the task blocked.
|
|
60
|
+
13. Finish with the shared acceptance audit, manual review checklist, and spec finalization contract.
|
|
60
61
|
|
|
61
62
|
## Stack-aware branch gate
|
|
62
63
|
|
|
@@ -97,6 +98,7 @@ If the user already chose a mode, honor it. If not, choose `sequential` and stat
|
|
|
97
98
|
|
|
98
99
|
- Shared lifecycle, notes contract, tech-debt rules, acceptance audit, finalization: see [references/lifecycle.md](references/lifecycle.md)
|
|
99
100
|
- UI before/after screenshot evidence and PR handoff links: see [references/ui-screenshot-evidence.md](references/ui-screenshot-evidence.md)
|
|
101
|
+
- Supported-runtime proof and cleanup contract: see [references/runtime-product-validation.md](references/runtime-product-validation.md)
|
|
100
102
|
- Sequential execution specifics: see [references/sequential.md](references/sequential.md)
|
|
101
103
|
- Parallel execution specifics: see [references/parallel.md](references/parallel.md)
|
|
102
104
|
- Parallel plan parsing and wave construction: see [references/parallel-orchestration.md](references/parallel-orchestration.md)
|
package/dist/skills/agnostic/planning/implement-spec/assets/IMPLEMENTATION-NOTES-TEMPLATE.md
CHANGED
|
@@ -28,6 +28,12 @@
|
|
|
28
28
|
|---------|----------|--------|-------|-------|
|
|
29
29
|
| | | | | |
|
|
30
30
|
|
|
31
|
+
## Runtime Validation Evidence
|
|
32
|
+
|
|
33
|
+
| Task | Scenario and target | Public action | Correlation or provenance | Expected result | Observed result and durable evidence | Cleanup | Status or exact blocker |
|
|
34
|
+
|------|---------------------|---------------|---------------------------|-----------------|--------------------------------------|---------|-------------------------|
|
|
35
|
+
| | | | | | | | |
|
|
36
|
+
|
|
31
37
|
## Visual Evidence Acceptance Map
|
|
32
38
|
|
|
33
39
|
| Source | Backlog attachment or fallback | PR-ready before/after evidence |
|
|
@@ -58,6 +58,7 @@ Use [../assets/IMPLEMENTATION-NOTES-TEMPLATE.md](../assets/IMPLEMENTATION-NOTES-
|
|
|
58
58
|
- Append or refine when it already exists.
|
|
59
59
|
- Keep it current during the run, not only at the end.
|
|
60
60
|
- For UI implementation changes, load [ui-screenshot-evidence.md](ui-screenshot-evidence.md) and keep `## UI Evidence Links` current.
|
|
61
|
+
- For tasks with `runtime_validation: required`, load [runtime-product-validation.md](runtime-product-validation.md) and keep `## Runtime Validation Evidence` current.
|
|
61
62
|
|
|
62
63
|
## 5. Prepare the tech-debt ledger
|
|
63
64
|
|
|
@@ -104,6 +105,9 @@ Do not create the file when nothing durable must survive the run.
|
|
|
104
105
|
- Accept missing RED/GREEN evidence only when the task has an explicit `reason_not_testable` or `tdd_status: not_applicable`.
|
|
105
106
|
- Do not accept `reason_not_testable` for forgotten RED. If code came first, recover by writing the public-result RED test, recording failure, patching to pass, and marking `tdd_status: recovered`.
|
|
106
107
|
- Treat every `review_mode` as required validation routing, never optional metadata.
|
|
108
|
+
- Treat `runtime_validation`, `runtime_target`, `runtime_evidence`, and `runtime_cleanup` as a task completion contract orthogonal to `review_mode`.
|
|
109
|
+
- When `runtime_validation: required`, do not mark the task complete until the supported runtime has conclusive public-entrypoint-first evidence recorded under `## Runtime Validation Evidence`.
|
|
110
|
+
- An exact runtime blocker is an honest blocked result, not completion. Record it and keep the affected task and acceptance criterion blocked.
|
|
107
111
|
- Keep an operator-visible execution board in the conversation so progress is obvious.
|
|
108
112
|
- Keep scope discipline. Out-of-scope findings that do not affect the current implementation go to `IMPLEMENTATION-NOTES.md`, not silent scope creep.
|
|
109
113
|
- Never leave sloppy debt, TODO placeholders, temporary compromises, or "later" implementation notes for in-goal work.
|
|
@@ -123,6 +127,7 @@ After each completed task or wave:
|
|
|
123
127
|
- fill or reconcile `codebase_design_notes` when module shape, seam placement, adapters, or test surface changed
|
|
124
128
|
- update `IMPLEMENTATION-NOTES.md` with non-obvious decisions, surprises, or deviations
|
|
125
129
|
- for UI implementation changes, record durable before/after screenshot asset links in `IMPLEMENTATION-NOTES.md`
|
|
130
|
+
- for required runtime validation, record the scenario, public action, correlation or provenance ids, observed result, durable evidence, cleanup, and status or exact blocker in `IMPLEMENTATION-NOTES.md`
|
|
126
131
|
- resolve any in-goal debt before advancing
|
|
127
132
|
- update the spec-linked tech-debt file only for blocked or explicitly parked debt with exact owner/next action
|
|
128
133
|
- if backlog sync is in scope, prefer native metadata changes or concise comments over body rewrites
|
|
@@ -151,6 +156,8 @@ If running inside a worktree and `portless` is available, prefer it for server-b
|
|
|
151
156
|
|
|
152
157
|
For UI implementation changes, runtime validation must also follow [ui-screenshot-evidence.md](ui-screenshot-evidence.md).
|
|
153
158
|
|
|
159
|
+
For every task with `runtime_validation: required`, follow [runtime-product-validation.md](runtime-product-validation.md). Automated checks alone do not satisfy this gate.
|
|
160
|
+
|
|
154
161
|
## 10. Verify acceptance criteria
|
|
155
162
|
|
|
156
163
|
Re-read `SPEC.md` acceptance criteria and mark each one:
|
|
@@ -161,6 +168,8 @@ Re-read `SPEC.md` acceptance criteria and mark each one:
|
|
|
161
168
|
|
|
162
169
|
Record a reason for every unmet or blocked item in `IMPLEMENTATION-NOTES.md`.
|
|
163
170
|
|
|
171
|
+
Acceptance that depends on required runtime validation is `met` only when its recorded evidence is conclusive. An exact blocker makes it `blocked`.
|
|
172
|
+
|
|
164
173
|
## 11. Write the manual review checklist
|
|
165
174
|
|
|
166
175
|
Before finalization, `IMPLEMENTATION-NOTES.md` must contain `## Manual Review Checklist`.
|
|
@@ -188,6 +197,7 @@ Before reporting back:
|
|
|
188
197
|
- ensure **Execution mode** reflects the mode actually used
|
|
189
198
|
- ensure **Sanity checks** lists only commands actually run
|
|
190
199
|
- ensure **UI Evidence Links** has durable before/after asset links for UI implementation changes, or an explicit reason no pair was possible
|
|
200
|
+
- ensure **Runtime Validation Evidence** contains conclusive proof for every required task, or an exact blocker with the task and acceptance criterion still marked blocked
|
|
191
201
|
- ensure **Manual Review Checklist** has at least one concrete row, or one explicit non-applicability row
|
|
192
202
|
- ensure **Remaining work** matches any unmet or blocked criteria
|
|
193
203
|
- ensure no in-goal debt remains as TODO, follow-up cleanup, or vague later-work text
|
|
@@ -204,6 +214,7 @@ Summarize:
|
|
|
204
214
|
- validation results
|
|
205
215
|
- key deviations or surprises
|
|
206
216
|
- acceptance-criteria status
|
|
217
|
+
- runtime-validation evidence and exact blockers
|
|
207
218
|
- manual review checklist
|
|
208
219
|
- blocked tasks needing input
|
|
209
220
|
- whether the spec-linked tech-debt file was created or updated
|
|
@@ -29,6 +29,10 @@ For each task, extract:
|
|
|
29
29
|
- validation
|
|
30
30
|
- `tdd_target`
|
|
31
31
|
- `review_mode`
|
|
32
|
+
- `runtime_validation`
|
|
33
|
+
- `runtime_target`
|
|
34
|
+
- `runtime_evidence`
|
|
35
|
+
- `runtime_cleanup`
|
|
32
36
|
- backlog metadata when present
|
|
33
37
|
- related tasks or plan-level constraints when they materially shape execution
|
|
34
38
|
|
|
@@ -89,6 +93,7 @@ A task is complete only when all of the following are true:
|
|
|
89
93
|
- acceptance criteria are satisfied, not only partially implemented
|
|
90
94
|
- RED -> GREEN evidence exists for testable tasks, or an explicit `reason_not_testable` plus exact alternative verification exists
|
|
91
95
|
- validation evidence matches the task contract
|
|
96
|
+
- required runtime validation has conclusive evidence recorded, or the task remains blocked with an exact blocker
|
|
92
97
|
- `PLAN.md` reflects the completed status and execution log
|
|
93
98
|
- touched files are recorded
|
|
94
99
|
- any non-obvious deviations are reflected in `IMPLEMENTATION-NOTES.md`
|
|
@@ -23,8 +23,13 @@ Every worker brief should include:
|
|
|
23
23
|
- `green_command`
|
|
24
24
|
- `reason_not_testable`
|
|
25
25
|
- `review_mode`
|
|
26
|
+
- `runtime_validation`
|
|
27
|
+
- `runtime_target`
|
|
28
|
+
- `runtime_evidence`
|
|
29
|
+
- `runtime_cleanup`
|
|
26
30
|
- relevant risks or constraints from the plan
|
|
27
31
|
- UI screenshot evidence requirements from [ui-screenshot-evidence.md](ui-screenshot-evidence.md) when the task changes UI
|
|
32
|
+
- supported-runtime evidence requirements from [runtime-product-validation.md](runtime-product-validation.md) when `runtime_validation: required`
|
|
28
33
|
|
|
29
34
|
## Required instructions
|
|
30
35
|
|
|
@@ -46,6 +51,7 @@ Each worker brief should require:
|
|
|
46
51
|
14. stopping for parent clarification when a debt item requires a product/scope decision outside the assigned task
|
|
47
52
|
15. capturing and linking durable before/after screenshot evidence when the task changes UI
|
|
48
53
|
16. updating the plan entry with status, log, touched files, and gotchas before handoff closes
|
|
54
|
+
17. refusing completion for required runtime validation without conclusive recorded evidence; returning an exact blocker leaves the task blocked
|
|
49
55
|
|
|
50
56
|
## Worker output contract
|
|
51
57
|
|
|
@@ -57,6 +63,7 @@ Require the worker to return:
|
|
|
57
63
|
- verification evidence: RED -> GREEN for testable tasks, or the exact non-testable alternative that was run
|
|
58
64
|
- validation evidence performed
|
|
59
65
|
- durable UI before/after screenshot links when UI changed
|
|
66
|
+
- required runtime-validation scenario, observed evidence, cleanup result, or exact blocker
|
|
60
67
|
- validation intentionally deferred
|
|
61
68
|
- anything blocked or risky, with exact reason and required decision
|
|
62
69
|
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
# Runtime Product Validation
|
|
2
|
+
|
|
3
|
+
Use this reference only for tasks with `runtime_validation: required`. The plan fields define what must be proved; this reference defines how to obtain and report the proof.
|
|
4
|
+
|
|
5
|
+
## Discover and recover the supported runtime
|
|
6
|
+
|
|
7
|
+
Read scoped repository guidance, runbooks, manifests, and scripts to identify:
|
|
8
|
+
|
|
9
|
+
- the supported startup command and required services
|
|
10
|
+
- health or readiness gates
|
|
11
|
+
- public product actions
|
|
12
|
+
- privileged setup or diagnostic adapters
|
|
13
|
+
- durable evidence sources
|
|
14
|
+
- cleanup rules
|
|
15
|
+
|
|
16
|
+
Start the supported runtime and dependencies. Treat a missing or broken runtime as a diagnosis and recovery task before declaring a blocker. Record an exact blocker only after relevant recovery attempts fail or required authority or infrastructure is unavailable.
|
|
17
|
+
|
|
18
|
+
## Run an isolated scenario
|
|
19
|
+
|
|
20
|
+
1. Create fixtures with a unique correlation or provenance id for this validation run.
|
|
21
|
+
2. Exercise the public product entrypoint a real client uses: API, command, browser flow, mobile action, or equivalent supported surface.
|
|
22
|
+
3. Verify the public result and the durable evidence named by `runtime_evidence`, such as persisted state, operation reports, queue or worker completion, emitted resources, provider results, correlated logs, traces, or spans.
|
|
23
|
+
4. Confirm automated checks also pass; they complement runtime proof but do not replace it.
|
|
24
|
+
5. Clean up only resources conclusively owned by the validation run through its correlation, provenance, or returned resource ids.
|
|
25
|
+
|
|
26
|
+
## Privileged adapter boundary
|
|
27
|
+
|
|
28
|
+
A privileged local adapter or hidden controller is allowed only for:
|
|
29
|
+
|
|
30
|
+
- fixture setup the public product cannot perform
|
|
31
|
+
- agent-only or otherwise unreachable actions required by the scenario
|
|
32
|
+
- diagnostics needed to reach a conclusive result
|
|
33
|
+
|
|
34
|
+
Do not use it as the default action path, a second product API, or a substitute for exercising a reachable public entrypoint. Record why each privileged use was necessary.
|
|
35
|
+
|
|
36
|
+
## Evidence and reporting
|
|
37
|
+
|
|
38
|
+
Keep evidence durable enough for another reviewer to inspect or replay. Under `## Runtime Validation Evidence` in `IMPLEMENTATION-NOTES.md`, record exactly:
|
|
39
|
+
|
|
40
|
+
- task, scenario, and `runtime_target`
|
|
41
|
+
- public action performed
|
|
42
|
+
- correlation or provenance ids
|
|
43
|
+
- expected result
|
|
44
|
+
- observed public result and durable evidence
|
|
45
|
+
- cleanup performed and owned resources removed or retained
|
|
46
|
+
- status, or the exact blocker
|
|
47
|
+
|
|
48
|
+
An exact blocker names the command or action attempted, observed failure, recovery attempted, missing dependency or authority, and next action needed. Also keep the task and affected acceptance criterion marked blocked.
|
|
49
|
+
|
|
50
|
+
Runtime validation is conclusive only when the supported public action produces the expected public result and the required durable evidence is correlated to the same isolated run. Missing correlation, mock-only proof, direct database mutation as the primary action, a success response without the required side effect, or unverified cleanup cannot satisfy completion.
|
|
@@ -15,11 +15,12 @@ Hard gate: sequential implementation never runs in the parent main thread. If th
|
|
|
15
15
|
1. Load the shared lifecycle from `lifecycle.md`.
|
|
16
16
|
2. Record `sequential` under **Execution mode** in `IMPLEMENTATION-NOTES.md`.
|
|
17
17
|
3. Read `.agents/subagents/manifest.mjs` when present and choose the best specialist for the whole sequential implementation.
|
|
18
|
-
4. Spawn one worker with the full spec folder, plan, lifecycle rules, required skills, task order, and
|
|
18
|
+
4. Spawn one worker with the full spec folder, plan, lifecycle rules, required skills, task order, update obligations, and each task's `runtime_validation`, `runtime_target`, `runtime_evidence`, and `runtime_cleanup` fields.
|
|
19
19
|
5. If any assigned task changes UI, include the screenshot evidence contract from [ui-screenshot-evidence.md](ui-screenshot-evidence.md) in the worker brief.
|
|
20
|
-
6.
|
|
21
|
-
7.
|
|
22
|
-
8.
|
|
20
|
+
6. If any assigned task requires runtime validation, include [runtime-product-validation.md](runtime-product-validation.md) in the worker brief.
|
|
21
|
+
7. Require the worker to execute one task at a time in dependency order.
|
|
22
|
+
8. After worker handoff, review the diff, plan updates, notes, and validation evidence before finalization.
|
|
23
|
+
9. Run any parent-level acceptance or smoke checks needed to trust the worker output.
|
|
23
24
|
|
|
24
25
|
## Task loop
|
|
25
26
|
|
|
@@ -33,7 +34,8 @@ The worker owns this loop for every task:
|
|
|
33
34
|
6. run `green_command`, record `green_evidence`, and only then mark the task done
|
|
34
35
|
7. for non-testable or non-applicable tasks, record `reason_not_testable` plus the exact alternative verification
|
|
35
36
|
8. for UI implementation changes, capture and link durable before/after screenshot evidence
|
|
36
|
-
9.
|
|
37
|
+
9. for `runtime_validation: required`, follow the disclosed runtime validation reference and record conclusive evidence before completion; an exact blocker leaves the task blocked
|
|
38
|
+
10. update the execution board before advancing
|
|
37
39
|
|
|
38
40
|
The parent owns:
|
|
39
41
|
|