liteagents 2.19.0 → 2.21.0

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.
Files changed (49) hide show
  1. package/CHANGELOG.md +60 -0
  2. package/README.md +4 -4
  3. package/package.json +1 -1
  4. package/packages/ampcode/AGENT.md +4 -4
  5. package/packages/ampcode/agents/code-developer.md +2 -2
  6. package/packages/ampcode/agents/quality-assurance.md +1 -1
  7. package/packages/ampcode/commands/branch-review.md +123 -0
  8. package/packages/ampcode/commands/release.md +108 -79
  9. package/packages/ampcode/commands/remember/AGENT_RULES.md +26 -26
  10. package/packages/ampcode/commands/remember.md +4 -4
  11. package/packages/ampcode/commands/security.md +34 -18
  12. package/packages/ampcode/commands/ship.md +29 -26
  13. package/packages/ampcode/commands/stash.md +12 -6
  14. package/packages/claude/CLAUDE.md +4 -4
  15. package/packages/claude/agents/code-developer.md +2 -2
  16. package/packages/claude/agents/quality-assurance.md +1 -1
  17. package/packages/claude/commands/branch-review.md +123 -0
  18. package/packages/claude/commands/release.md +108 -79
  19. package/packages/claude/commands/remember/AGENT_RULES.md +26 -26
  20. package/packages/claude/commands/remember.md +4 -4
  21. package/packages/claude/commands/security.md +34 -18
  22. package/packages/claude/commands/ship.md +29 -26
  23. package/packages/claude/commands/stash.md +12 -6
  24. package/packages/droid/AGENTS.md +4 -4
  25. package/packages/droid/commands/branch-review.md +123 -0
  26. package/packages/droid/commands/release.md +108 -79
  27. package/packages/droid/commands/remember/AGENT_RULES.md +26 -26
  28. package/packages/droid/commands/remember.md +4 -4
  29. package/packages/droid/commands/security.md +34 -18
  30. package/packages/droid/commands/ship.md +29 -26
  31. package/packages/droid/commands/stash.md +12 -6
  32. package/packages/droid/droids/code-developer.md +2 -2
  33. package/packages/droid/droids/quality-assurance.md +1 -1
  34. package/packages/opencode/AGENTS.md +4 -4
  35. package/packages/opencode/agent/code-developer.md +2 -2
  36. package/packages/opencode/agent/quality-assurance.md +1 -1
  37. package/packages/opencode/command/branch-review.md +123 -0
  38. package/packages/opencode/command/release.md +108 -79
  39. package/packages/opencode/command/remember/AGENT_RULES.md +26 -26
  40. package/packages/opencode/command/remember.md +4 -4
  41. package/packages/opencode/command/security.md +34 -18
  42. package/packages/opencode/command/ship.md +29 -26
  43. package/packages/opencode/command/stash.md +12 -6
  44. package/packages/opencode/opencode.jsonc +6 -6
  45. package/packages/subagentic-manual.md +5 -5
  46. package/packages/ampcode/commands/diff-review.md +0 -78
  47. package/packages/claude/commands/diff-review.md +0 -78
  48. package/packages/droid/commands/diff-review.md +0 -78
  49. package/packages/opencode/command/diff-review.md +0 -78
package/CHANGELOG.md CHANGED
@@ -9,12 +9,72 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
9
9
 
10
10
  ## [Unreleased]
11
11
 
12
+ ## [2.21.0] - 2026-08-30
13
+
14
+ ### Changed
15
+ - **`/diff-review` renamed to `/branch-review`, in all four kits.** The command's subject is
16
+ the branch, not a diff — it reads whole files around each hunk, skims `git log` for intent,
17
+ and now runs a repo- and history-scoped security audit — so the old name described neither
18
+ its input nor its output. No command-count change; `/code-review` (Anthropic's plugin
19
+ skill) is untouched.
20
+ - **`/branch-review` gains effort levels and a second stage.** `low | medium | high | max`
21
+ (default `medium`) governs the general review's breadth. Stage 2 delegates to `/security`
22
+ and **always runs it in full at every level** — a shallow security pass reads as coverage
23
+ while missing the class of bug that costs the most. Stage 3 verifies adversarially (try to
24
+ break each claim, not confirm it), and **every surviving finding must carry a concrete
25
+ failure scenario** — inputs/state → wrong output, crash, or exposure — or it is dropped.
26
+ - **`/branch-review` and `/security` never edit code.** Both previously applied "confirmed and
27
+ unambiguous" fixes directly, which contradicted the gate they are meant to be; `/security`
28
+ also lost `Edit` from its tool list. They report and escalate; fixing is a separate,
29
+ separately authorized action. `/security` behaves identically standalone or as stage 2 —
30
+ only the report's recipient changes.
31
+ - **`/release` no longer reviews, and no longer touches the remote.** Review moved out
32
+ entirely (anything that returns a work-list forks into fix→re-review and does not belong
33
+ inside a linear release run). It now gates on a **review precondition**: a review must have
34
+ run at the current HEAD SHA, which makes "all findings fixed" mechanically checkable, since
35
+ a fix commit moves HEAD and staleness forces a re-review. It releases the **current branch**
36
+ only — no branch argument, no branch creation, and on `main` it stops and asks. It runs
37
+ `/ship`, sweeps the docs, bumps the version, commits locally, then **stops and reports the
38
+ remaining push → PR → merge → tag → publish sequence** for a human to authorize.
39
+ - **`/ship` is now purely mechanical.** Every item is answerable by running a command and
40
+ reading an exit code. Dropped four code-judgment checks (error handling, authorization,
41
+ rate limiting, data-access scoping) that duplicated `/security` in weaker form, plus the
42
+ "run `/security` before shipping" line. The secrets grep stays, deliberately and with the
43
+ reason stated inline. New evidence rule: record the exact command and exit code; a check you
44
+ did not run is a fail, and **N/A requires a stated reason**.
45
+ - **Worker guardrails, in `/branch-review`, `/release`, `/stash` and `/remember`.** The
46
+ mid-tier model rule no longer names vendor models (they drift, and these kits ship to four
47
+ tools); it now says "your tool's balanced default tier" and explicitly excludes the
48
+ cheapest/fastest tier, which measurably degrades on judgment work. All four also carry an
49
+ "escalate, never assume" rule, and `/stash` gains a "write only what the brief contains"
50
+ rule — its subagent expands a brief, which is exactly where fabrication happens.
51
+
52
+ ### Fixed
53
+ - `/stash` carried two guardrails about writing minimal code, in a command that writes one
54
+ markdown file.
55
+
12
56
  ### Planned
13
57
  - Community marketplace submissions
14
58
  - Additional skills for data analysis
15
59
  - Enhanced testing capabilities
16
60
  - Performance optimizations
17
61
 
62
+ ## [2.20.0] - 2026-08-29
63
+
64
+ ### Changed
65
+ - **`AGENT_RULES.md` template (all 4 kits): the spec layer now requires the interview to
66
+ happen but leaves its shape free.** PRD is defined as a portal with 5 minimum fields
67
+ (problem & goal, go/no-go, out of scope, modules, open questions) that every POC refines.
68
+ - **Four one-sentence execution-order rules (Sequence / Selection / Iteration / Verify) added
69
+ to Operating Flow.**
70
+ - **"Build incrementally" replaced by "One module at a time"** (works alone, then connects,
71
+ both proven) and a separate "No fitting to pass" rule, with a matching Red Flag.
72
+ - **New safeguard: never commit to `main`** — branch, then propose `/code-review` followed by
73
+ `/release`; merge/release only on a named go.
74
+ - **Removed restated content**: the "AI Agent Instructions" section, the "Safety First"
75
+ bullet, the "POC scope" bullet, and duplicated spec/POC prose in the Communication Protocol
76
+ and the CLAUDE.md stub.
77
+
18
78
  ## [2.19.0] - 2026-08-26
19
79
 
20
80
  ### Changed
package/README.md CHANGED
@@ -148,10 +148,10 @@ Results land in `.claude/remember/friction/antigen_review.md` with projects, err
148
148
  - **debug-method** - Four-phase debugging framework
149
149
  - **optimize** - Performance analysis
150
150
  - **refactor** - Safe refactoring with behavior preservation
151
- - **diff-review** - Review a file, branch, or range; verifies findings, fixes confirmed/unambiguous ones, asks on ambiguous or downstream-affecting ones
152
- - **security** - Vulnerability scan; same verify→fix→ask flow as `/diff-review`
151
+ - **branch-review** - Pre-merge gate: general review at a chosen effort level plus a full security audit, adversarial verify pass; reports findings, never fixes
152
+ - **security** - Standalone vulnerability scan; also runs as stage 2 of `/branch-review`
153
153
  - **ship** - Pre-deployment checklist
154
- - **release** - Deliver a feature end-to-end: verify → docs → merge → tag (publish stays manual)
154
+ - **release** - Prepare a release on the current branch: verify → docs sweep version bump local commit, then hand back the merge/tag/publish sequence (never pushes)
155
155
  - **test-generate** - Generate test suites
156
156
 
157
157
  > **Claude-only plugin:** `live-canvas-channel` is a bundled Claude Code MCP channel plugin that ships under `~/.claude/plugins/live-canvas-marketplace/`. One-time `/plugin install` + a session started with `--dangerously-load-development-channels` unlocks live mode. Skill probes for the channel on each invocation and handholds setup when missing. See [`packages/claude/skills/live-canvas/README.md`](packages/claude/skills/live-canvas/README.md) for the full walkthrough.
@@ -184,7 +184,7 @@ Results land in `.claude/remember/friction/antigen_review.md` with projects, err
184
184
  **Code Quality:**
185
185
  ```
186
186
  @quality-assurance Review this PR before merge
187
- /diff-review main # review branch vs main, fixes confirmed issues, asks on ambiguous ones
187
+ /branch-review main medium # review branch vs main + security audit; reports, never fixes
188
188
  /debug-method Investigate this race condition
189
189
  ```
190
190
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "liteagents",
3
- "version": "2.19.0",
3
+ "version": "2.21.0",
4
4
  "description": "AI development toolkit with 11 specialized agents and 18 commands including live-canvas UI design with click-to-annotate feedback. Simple one-question installer for Claude, Opencode, Ampcode, and Droid.",
5
5
  "main": "index.js",
6
6
  "bin": {
@@ -43,10 +43,10 @@ These subagents are available when using Ampcode CLI.
43
43
  | optimize | Analyze and optimize performance issues | /optimize <target-area> |
44
44
  | refactor | Refactor code while maintaining behavior and tests | /refactor <code-section> |
45
45
  | remember | Consolidate stashes + friction into project memory | /remember |
46
- | diff-review | Comprehensive code review including quality, tests, and architecture | /diff-review |
47
- | security | Security vulnerability scan and analysis | /security |
48
- | ship | Pre-deployment verification checklist | /ship |
49
- | release | Deliver a feature end-to-end: verify, docs, merge, tag (publish stays manual) | /release [branch] |
46
+ | branch-review | Pre-merge review: general review + full security audit, verify pass, no fixes | /branch-review [target] [level] |
47
+ | security | Security audit recurring six, injection, auth, trust boundaries; reports, never fixes | /security [target] |
48
+ | ship | Mechanical pre-deploy gate tests, build, tree state | /ship |
49
+ | release | Verify, sweep docs, cut a version then hand back the merge/tag/publish sequence | /release |
50
50
  | stash | Save session context for compaction recovery or handoffs | /stash ["optional-name"] |
51
51
  | test-generate | Generate tests, run them, verify each one actually exercises the code | /test-generate <file> |
52
52
 
@@ -75,7 +75,7 @@ digraph CodeDeveloper {
75
75
  regression_fixable [label="Fixable?", shape=diamond];
76
76
 
77
77
  // Review and complete
78
- code_review [label="Run /diff-review"];
78
+ code_review [label="Run /branch-review"];
79
79
  verification [label="Run /verify-done", fillcolor=orange];
80
80
 
81
81
  // Story-specific
@@ -191,7 +191,7 @@ All require `*` prefix. Invocation commands in table above. Additional:
191
191
  | Writing any test | `/test-traps` (avoid mocks, production pollution) |
192
192
  | Before completion | `/verify-done` |
193
193
  | After code changes | `/security` |
194
- | Task complete / general review | `/diff-review` (diffs branch or staged changes, verifies, fixes confirmed issues, asks on ambiguous ones) |
194
+ | Task complete / general review | `/branch-review` (reviews the branch + full security audit, verifies claims, reports findings never fixes) |
195
195
  | Performance issues | `/optimize` |
196
196
 
197
197
  You are an autonomous implementation specialist. Execute with precision, delegate appropriately, and communicate clearly when you need guidance or encounter blockers.
@@ -65,7 +65,7 @@ Before any analysis, read (if exists):
65
65
 
66
66
  ## Slash Commands Available
67
67
 
68
- Use these during analysis: `/diff-review`, `/security`, `/verify-done`
68
+ Use these during analysis: `/branch-review`, `/security`, `/verify-done`
69
69
 
70
70
  ## Analysis Areas
71
71
 
@@ -0,0 +1,123 @@
1
+ ---
2
+ name: branch-review
3
+ description: Review a branch before merge [target] [level]
4
+ usage: /branch-review [target] [low|medium|high|max]
5
+ argument-hint: [file, branch (e.g. main), range (main..HEAD), or empty] [effort level]
6
+ allowed-tools: Read, Grep, Glob, Agent, Bash(git diff *), Bash(git log *), Bash(git show *), Bash(git status *), Bash(git grep *), Bash(git rev-parse *), Bash(git merge-base *), Bash(rg *)
7
+ ---
8
+ Pre-merge review gate. Two stages — **general review** then a **full security
9
+ audit** — followed by an adversarial verify pass. It **never edits code**: it
10
+ reports findings and hands them back. Fixing is a separate, separately
11
+ authorized action.
12
+
13
+ Run this **before** `/release`. `/release` will refuse to run without a review
14
+ at the current HEAD SHA.
15
+
16
+ ## Guardrails
17
+ - **Spawn a worker on a mid-tier model, not hardcoded.** The review runs in a
18
+ subagent on your tool's balanced default tier — judgment-capable, cheaper and
19
+ faster than your top reasoning tier. **Not the cheapest/fastest tier**: on
20
+ judgment work it measurably degrades (misclassification rates several times
21
+ higher). Never hardcode a vendor-specific model name. Fall back to running
22
+ inline if your tool has no subagent mechanism.
23
+ - **Escalate, never assume.** Anything you cannot decide, cannot verify, or
24
+ that this spec does not cover → **stop and report it to the orchestrator**
25
+ (the main session). Never improvise, never widen scope, never fix a side
26
+ issue you noticed along the way.
27
+ - **No edits.** You have no authorization to change code, even for a finding
28
+ you are certain about. Report it.
29
+
30
+ ## Target — interpret `$ARGUMENTS` in this order
31
+ 1. **Empty** → the current branch vs its merge-base with `main`
32
+ (`git diff $(git merge-base main HEAD)..HEAD`). If that is empty, the
33
+ staged diff; if that is empty too, the working tree.
34
+ 2. **A range** like `main..HEAD` or `origin/main...HEAD` → `git diff <range>`.
35
+ 3. **A single ref** (branch / tag / SHA — confirm with `git rev-parse
36
+ --verify`) → that ref's merge-base against `HEAD`.
37
+ 4. **A file or directory path** → that target.
38
+ 5. Otherwise → ask.
39
+
40
+ Record the **HEAD SHA** you reviewed. `/release` checks it, and any commit
41
+ made after the review makes the review stale.
42
+
43
+ ## Effort level
44
+ `low | medium | high | max` — default **medium** if not given. The level
45
+ governs **stage 1 only**:
46
+ - **low / medium** — fewer findings, only ones you are confident in.
47
+ - **high / max** — broader coverage; uncertain findings are allowed, but each
48
+ must be labelled uncertain.
49
+
50
+ **Stage 2 (security) always runs full, at every level.** A shallow security
51
+ pass is worse than none — it reads as coverage while missing the class of bug
52
+ that costs the most.
53
+
54
+ ## Stage 1 — General review
55
+ The diff is the subject, but **read the whole file around every hunk** — a
56
+ hunk-only read cannot see that a caller further down the same file is now
57
+ wrong. For multi-commit ranges, skim `git log <range>` for intent before
58
+ judging.
59
+
60
+ - **Bugs needing a fix.** Logic errors, off-by-one, null/undefined paths,
61
+ races, wrong defaults, broken edge cases.
62
+ - **Dead code.** Unreferenced functions / vars / imports / params, unreachable
63
+ branches, commented-out blocks, legacy paths the diff just obsoleted.
64
+ `git grep` the symbol before flagging — easy to be wrong.
65
+ - **Loose ends.** TODO / FIXME / XXX added by this diff, half-finished
66
+ branches, silently swallowed errors, stub bodies, mocked-out paths,
67
+ "temporary" names, abandoned feature flags.
68
+ - **Correctness.** Edge cases, error handling, type / contract violations,
69
+ broken invariants.
70
+ - **Performance.** N+1, blocking calls in hot paths, unbounded loops, indexes
71
+ the diff actually touches.
72
+ - **Maintainability.** Complexity, naming, duplication — only when material.
73
+
74
+ ## Stage 2 — Security (always full)
75
+ **Delegate; do not re-implement.** Locate and **read** the installed
76
+ `security.md` and run its actual checklist — the recurring six (secrets in the
77
+ repo *and in git history*, data-access authorization / tenant isolation, rate
78
+ limiting, unhappy-path error handling, authorization beyond authentication,
79
+ inefficient data access) plus injection, auth/session, and trust boundaries.
80
+
81
+ If `security.md` cannot be found, run what you can from the list above and
82
+ **flag that the full checklist was unavailable** — never report it as passed.
83
+
84
+ This stage is repo- and history-scoped, not diff-scoped: a key committed forty
85
+ commits ago, an unbounded route the diff never touched, or a missing row
86
+ policy on a table the new code now reads are all in scope.
87
+
88
+ ## Stage 3 — Verify (adversarial)
89
+ Findings are claims, not facts. **Try to break each one, not to confirm it** —
90
+ a pass that sets out to confirm reliably misses what an adversarial pass
91
+ finds.
92
+
93
+ - Re-read the cited `file:line` in full context.
94
+ - `git grep` the name across the repo before trusting any dead-code or
95
+ unused-symbol claim.
96
+ - Mark each **confirmed**, **false positive** (with the reason), or
97
+ **uncertain** (with what would settle it).
98
+
99
+ **Every surviving finding must carry a concrete failure scenario**: specific
100
+ inputs or state → the wrong output, crash, or exposure that results. If you
101
+ cannot write that sentence, the finding is not ready — drop it or mark it
102
+ uncertain. No vibes.
103
+
104
+ ## Report — then escalate
105
+ Order findings most severe first.
106
+
107
+ ### 🚨 Critical (blocks merge)
108
+ ### ⚠️ Warnings (should fix)
109
+ ### 💡 Suggestions (nice to have)
110
+
111
+ Each finding: **Location** (`file:line`) · **What's wrong** · **Failure
112
+ scenario** (inputs/state → result) · **Why it matters** · **Suggested fix**
113
+ (described, not applied) · **Verdict** (confirmed / uncertain).
114
+
115
+ Then a coverage line: stage 1 at level `<level>`, stage 2 full — each `ran ✓/✗`
116
+ with its evidence. A stage you did not actually run is a **✗**, never an
117
+ assumed pass.
118
+
119
+ End with:
120
+ - **Reviewed at HEAD `<sha>` on `<branch>`.**
121
+ - One-line verdict: **Ready to merge? Yes / No / Not until these are fixed.**
122
+ - **Escalate to the orchestrator** with the findings. It decides what gets
123
+ fixed and by whom. Say plainly what you could not verify.
@@ -1,90 +1,119 @@
1
1
  ---
2
2
  name: release
3
- description: Deliver a feature end-to-end verify, docs, merge, tag (publish stays manual)
4
- usage: /release [branch]
5
- argument-hint: [branch new or existing; else current]
6
- allowed-tools: Read, Grep, Glob, Edit, Write, Bash(git *), Bash(gh *), Bash(npm *), Bash(pnpm *), Bash(yarn *), Bash(pytest *), Bash(python *), Bash(go *), Bash(cargo *), Bash(make *)
3
+ description: Verify, sweep docs, cut a versionthen hand the release sequence back
4
+ usage: /release
5
+ allowed-tools: Read, Grep, Glob, Edit, Write, Agent, Bash(git status *), Bash(git diff *), Bash(git log *), Bash(git show *), Bash(git fetch *), Bash(git add *), Bash(git commit *), Bash(git rev-parse *), Bash(git merge-base *), Bash(npm *), Bash(pnpm *), Bash(yarn *), Bash(pytest *), Bash(python *), Bash(go *), Bash(cargo *), Bash(make *)
7
6
  ---
8
- End-to-end feature-delivery **orchestrator**. It does **not** re-implement
9
- checks it runs your existing gates (`/ship`, `/security`, `/diff-review`)
10
- under `/verify-done` discipline, then performs the release actions. Two halves
11
- split by a hard gate: everything **before** the gate is safe and read-only;
12
- everything **after** rewrites history and is confirmed step by step.
13
-
14
- **A feature branch is required `main` is only the merge target.** `$ARGUMENTS`
15
- names the branch to release. Omit it only if you are already on a feature
16
- branch. If you are on `main` with nothing named, a branch is created for you —
17
- but you should be releasing a deliberately-named feature branch.
18
-
19
- ## Phase 0 Preflight (resolve a feature branch never `main`)
20
- - **Resolve the release branch** whatever gets merged into `main`:
21
- - `$ARGUMENTS` given `git switch` to it (create it if it does not exist).
22
- - else not on `main` release the **current** branch.
23
- - else on `main` with no arg **create** `feat/<slug>` (named for the
24
- change) and carry your working changes onto it. **Never release `main`.**
25
- - **Land the feature on the branch** if the working tree still has
26
- uncommitted feature changes, commit them now; the gates must review a real
27
- diff, not a dirty tree.
28
- - `git fetch origin`; the release diff is `origin/main...HEAD` (now guaranteed
29
- to be the resolved branch). If it is empty, **stop** — nothing to release.
30
- - Print a one-line plan: branch · commit count · files changed.
31
-
32
- ## Phase 1 VERIFY (delegate; no hand-waving)
33
- **First, load the real checklists.** Locate and **read** the sibling command
34
- definitions so you apply their exact checks, not an approximation — glob your
35
- installed commands/skills for `ship.md`, `security.md`, `diff-review.md`, and
36
- `verify-done` (a skill or command). If one cannot be found, run that check from
37
- its name and **flag that its full checklist was unavailable** — never pretend
38
- it passed.
39
-
40
- Then run each gate and capture **fresh evidence** — the exact command, its exit
41
- code, and the result. Per `/verify-done`: a check you did **not** actually run
42
- is a **FAIL**, never an assumed pass.
43
- - **`/ship`** pre-deploy gate (tests, lint, build, secrets, authz, rate
44
- limit, data scope, migrations, docs-sync).
45
- - **`/security`** on the changed files.
46
- - **`/diff-review`** on `origin/main...HEAD`.
47
-
48
- Emit a coverage table, one row per gate: `ran? ✓/✗` · evidence · verdict. If
49
- any row is (could not run), the run is **Blocked 🛑** — do not continue.
7
+ Release **preparation** orchestrator for the **current branch**. It runs your
8
+ existing pre-deploy gate, sweeps the docs, bumps the version and commits —
9
+ then **stops and reports**. It never pushes, opens a PR, merges, tags, or
10
+ publishes: those are yours to authorize by name.
11
+
12
+ It does not re-implement checks, and it does not review code. Review is a
13
+ separate command that must have run first.
14
+
15
+ ## Guardrails
16
+ - **Spawn a worker on a mid-tier model, not hardcoded.** The run happens in a
17
+ subagent on your tool's balanced default tier — judgment-capable, cheaper and
18
+ faster than your top reasoning tier. **Not the cheapest/fastest tier**: on
19
+ judgment work it measurably degrades (misclassification rates several times
20
+ higher). Never hardcode a vendor-specific model name. Fall back to running
21
+ inline if your tool has no subagent mechanism.
22
+ - **Escalate, never assume.** Anything you cannot decide, cannot verify, or
23
+ that this spec does not cover **stop and report it to the orchestrator**
24
+ (the main session). Never improvise, never widen scope, never fix a finding
25
+ you noticed along the way.
26
+ - **Nothing leaves the machine.** No `git push`, no `gh`, no `npm publish`,
27
+ under any circumstance not even if every gate is green. You report the
28
+ sequence; a human authorizes it.
29
+
30
+ ## Phase 0 — Preflight (current branch, always)
31
+ - **Release the branch you are on.** No branch argument, no branch creation.
32
+ - **On `main` stop and ask** what should be released. `main` is only ever
33
+ the merge target; never release it, never commit to it.
34
+ - If the working tree still has uncommitted feature changes, commit them to
35
+ the branch now the gate must see a real diff, not a dirty tree.
36
+ - `git fetch origin`; the release diff is `origin/main...HEAD`. Empty
37
+ **stop**, nothing to release.
38
+ - Print a one-line plan: branch · commit count · files changed · HEAD SHA.
39
+
40
+ ## Phase 0.5 Review precondition (do not skip)
41
+ Ask the orchestrator: **has `/branch-review` or `/code-review` run on this
42
+ branch at the current HEAD SHA?**
43
+
44
+ - **No review** **stop**: "No review at `<sha>`. Run `/branch-review medium`
45
+ (or `/code-review medium`) first."
46
+ - **Stale** — the review ran at an earlier SHA, i.e. commits landed after it
47
+ (including fix commits) **stop** and ask for a re-review. This is what
48
+ makes "all findings fixed" checkable instead of promised.
49
+ - **Reviewed at this SHA with findings outstanding** → **stop**. Findings are
50
+ resolved before a release is cut.
51
+
52
+ This is the only thing guaranteeing the branch was reviewed *and* security
53
+ scanned, so treat a missing answer as a **stop**, never as a pass.
54
+
55
+ ## Phase 1 — Verify
56
+ **Load the real checklist**: locate and **read** the installed `ship.md` so
57
+ you apply its exact checks, not an approximation. If it cannot be found, run
58
+ what you can from its name and **flag that the full checklist was
59
+ unavailable** — never pretend it passed.
60
+
61
+ - **`/ship`** — mechanical pre-deploy gate (tests, lint, build, debug
62
+ leftovers, secrets grep, migrations, docs/config sync, tree state).
63
+
64
+ Capture **fresh evidence**: the exact command, its exit code, and the result.
65
+ A check you did not actually run is a **FAIL**, never an assumed pass. Emit a
66
+ coverage row: `ran? ✓/✗` · evidence · verdict. A ✗ is **Blocked 🛑**.
67
+
68
+ Security is **not** re-run here — it is stage 2 of the review, already
69
+ confirmed in Phase 0.5.
50
70
 
51
71
  ## 🚦 Gate
52
- - **Any Critical** (failing tests/build, a Critical security or diff-review
53
- finding) → **stop**, report, ask how to proceed. Touch no history.
72
+ - **Any Critical** (failing tests, broken build) **stop**, report, escalate.
54
73
  - **Warnings, or anything you cannot confidently decide** → **stop**,
55
- summarize, ask.
56
- - **All clean** → continue to Phase 2.
74
+ summarize, escalate. Do not weigh it yourself.
75
+ - **All clean** → continue.
76
+
77
+ ## Phase 2 — Docs sweep
78
+ Update what this feature actually changed, wherever those docs live in this
79
+ project — match each file's existing format, touch nothing unrelated. Use
80
+ `docs/index.md` when the project has one to find what exists.
57
81
 
58
- ## Phase 2 — DOCS (only what the feature changed)
59
- Update as needed, matching each file's existing format; touch nothing
60
- unrelated. If a doc needs no change, **say so** rather than editing for its
61
- own sake.
62
82
  - **CHANGELOG.md** — new entry.
63
- - **PRD** — the feature's PRD entry / status.
64
- - **context / guide** — the project's context or guide doc.
65
83
  - **README.md** — only if user-facing usage changed.
84
+ - **PRD** — the feature's entry / status.
85
+ - **Guide / context docs** — the project's standing context.
86
+ - **Findings / learnings** — where the project keeps them.
87
+ - **Any other frequently-updated doc** this change makes stale.
88
+
89
+ If a doc needs no change, **say so** rather than editing it for its own sake.
66
90
 
67
- ## Phase 3 — RELEASE (irreversible — confirm each step)
91
+ ## Phase 3 — Cut (local only)
68
92
  1. **Version bump** — pick the semver level from the change (patch / minor /
69
- major; ask if ambiguous) and update `package.json`.
70
- 2. **Commit** `release: vX.Y.Z<summary>`, including the docs + bump.
71
- 3. **Push** the branch.
72
- 4. **Open PR** — `gh pr create` into `main` (main is PR-protected: 1 approving
73
- review).
74
- 5. **Merge** — `gh pr merge --delete-branch`. If the review requirement blocks
75
- it, **stop** and ask — never force or silently bypass. On a **solo repo** you
76
- cannot approve your own PR, so the expected path is an owner-authorized
77
- admin-merge (`gh pr merge --admin`), run only on the user's explicit say-so.
78
- 6. **Tag** — after the merge, `git tag vX.Y.Z` on `main` and push it. Keep
79
- cut→tag tight one frozen step.
80
-
81
- ## Stop herepublish is your call
82
- Do **not** publish. `publish.yml` is manual `workflow_dispatch` **by design**.
83
- Print the handoff:
84
- > Merged, branch deleted, tagged **vX.Y.Z**. To publish, run it yourself:
85
- > `gh workflow run publish.yml`
86
- > Then confirm the version is actually live (`npm view <pkg> versions`) and
87
- > validate the **installed** artifact, not the working tree.
88
-
89
- Final report: **Delivered (vX.Y.Z publish pending)** or **Blocked 🛑**
90
- with the specific reason.
93
+ major; **ask if ambiguous**) and update `package.json`. The bump must land
94
+ on the branch, before any merge a version committed to `main` directly,
95
+ or added after the merge, breaks the tag/package match.
96
+ 2. **Commit** — `release: vX.Y.Z <summary>`, including the docs and the
97
+ bump.
98
+
99
+ Then **stop.** Nothing else.
100
+
101
+ ## Report the sequence, for a human to authorize
102
+ Print the evidence, then hand back the exact remaining steps so the
103
+ orchestrator can run them on the user's named go:
104
+
105
+ > **Cut vX.Y.Z on `<branch>`** `/ship` green, docs updated, release commit
106
+ > made locally. Reviewed at `<sha>`.
107
+ > Ready when you are:
108
+ > 1. `git push -u origin <branch>`
109
+ > 2. `gh pr create` into `main`
110
+ > 3. `gh pr merge --admin --squash --delete-branch` (main is PR-protected;
111
+ > owner-authorized admin merge on a solo repo)
112
+ > 4. `git tag vX.Y.Z` on `main` and push the tag
113
+ > 5. Publish **if this project has a publish path** (e.g.
114
+ > `gh workflow run publish.yml`) — manual by design
115
+ > 6. Verify it is actually live (`npm view <pkg> version`, and the published
116
+ > tarball's contents), not the working tree
117
+
118
+ Final line: **Cut ✅ (vX.Y.Z — ready to push)** or **Blocked 🛑** with the
119
+ specific reason.
@@ -10,7 +10,6 @@
10
10
  7. [Development Workflow](#development-workflow)
11
11
  8. [Twelve-Factor Checklist](#twelve-factor-checklist)
12
12
  9. [AGENT.md Stub](#agentmd-stub)
13
- 10. [AI Agent Instructions](#ai-agent-instructions)
14
13
 
15
14
  ---
16
15
 
@@ -18,10 +17,25 @@
18
17
 
19
18
  Every task runs through three layers. Do not skip ahead to code.
20
19
 
21
- 1. **Spec — agree on intent before touching anything.** Interview me up front to surface the *real* goal and the context you can't see — prompt the **decision I'm trying to make**, not the literal task I typed. Break the scope into small buckets with checkpoints. **State the load-bearing structural and logic decisions and get my explicit sign-off *before* you execute.** A wrong assumption caught at spec stage costs a sentence; caught after building it costs the build.
22
- 2. **Verify — define "good" up front, then prove it.** Write down what success looks like *before* changing code. Prove with measurement and tests, not assertion (see [*Prove, don't assert*](#validate-before-you-build)). Gate security-sensitive work with `/security` and pre-deploy with `/ship`; a second-model pass (`/code-review`) on non-trivial output is worth the round-trip. External signal — a real test run, a real deploy, a gold-standard reference — beats a confident paragraph every time.
20
+ 1. **Spec — the interview must happen; its shape is yours.** Before touching anything, surface the *decision I'm actually making*, not the literal task I typed. Ask what you need to know no more; how you ask is your call. Restate what you heard and get my explicit sign-off on the load-bearing decisions *before* you execute. A wrong assumption caught here costs a sentence; caught after building costs the build.
21
+
22
+ Write the outcome down as a **PRD**. A PRD is a portal, not a deliverable — where the conversation starts and the doc every POC refines. Minimum content, whatever the form:
23
+ - **Problem & goal** — what we're solving and why now
24
+ - **Go / no-go** — the 1–2 capabilities the product stands or falls on; usually module 0's riskiest assumption (e.g. "can a phone camera read the ID?"). Fails → stop
25
+ - **Out of scope** — what we're explicitly not doing
26
+ - **Modules** — the pieces to build, in order (see [*One module at a time*](#validate-before-you-build))
27
+ - **Open questions** — unknowns that don't block; never silently assumed
28
+
29
+ Every POC result updates the PRD; one that flips the go/no-go or a module's assumption is a spec change, not a footnote.
30
+ 2. **Verify — define "good" up front, then prove it.** Write down what success looks like *before* changing code. Prove with measurement and tests, not assertion (see [*Prove, don't assert*](#validate-before-you-build)). Gate security-sensitive work with `/security` and pre-deploy with `/ship`. When the work is done, propose `/code-review` and then `/release` — you never merge or release on your own (see [Required Safeguards](#required-safeguards-always--ask--never)). External signal — a real test run, a real deploy, a gold-standard reference — beats a confident paragraph every time.
23
31
  3. **Environment — the standing context.** This file primes every session. Critical-path protections (secrets, auth, schema, CI) are stated as **Always / Ask / Never** below and bind you as written. Where your tool offers a permission allow/ask/deny list, mirror them there so they are enforced and not merely requested.
24
32
 
33
+ **Execution order — work the way a program runs, in this order, nothing skipped:**
34
+ 1. **Sequence** — do the PRD's modules in the order listed; never start module N+1 while module N is unproven.
35
+ 2. **Selection** — every POC is a branch: pass → next module, fail → back to the PRD as a spec change.
36
+ 3. **Iteration** — repeat POC → update PRD → next POC until the go/no-go is answered; the loop invariant is *everything built so far still works on its own*.
37
+ 4. **Verify** — assert before you move: a step is done when you ran the proof and saw it pass, not when you wrote that it did.
38
+
25
39
  > The model is brilliant at execution and blind to intent. You can outsource the typing; you cannot outsource the understanding. Surface assumptions — don't bury them.
26
40
 
27
41
  ---
@@ -29,16 +43,14 @@ Every task runs through three layers. Do not skip ahead to code.
29
43
  ## Communication Protocol
30
44
 
31
45
  ### Core Rules
32
- - **Spec before build**: Don't wait for ambiguity to block you interview me up front to extract the real goal and the context you can't see. Prompt the *decision*, not the literal task. Restate what you heard before building
33
- - **Checkpoint before executing**: State the load-bearing structural and logic decisions and get my explicit sign-off *before* you write code. Never run ahead on an unverified assumption — flag it and stop
46
+ - **Spec first, then checkpoint**: see [Operating Flow §1](#operating-flow). Never run ahead on an unverified assumption flag it and stop
34
47
  - **Fact-Based**: Base all recommendations on verified, current information. Prefer external signal (a real run, a real source) over a confident guess
35
48
  - **Simplicity Advocate**: Call out overcomplications and suggest simpler alternatives
36
- - **Safety First**: Never modify critical systems without explicit understanding and approval
37
49
 
38
50
  ### User Profile
39
51
  - **Technical Level**: Non-coder but technically savvy
40
52
  - **Learning Style**: Understands concepts, needs executable instructions
41
- - **Expects**: Step-by-step guidance with clear explanations
53
+ - **Expects**: Step-by-step guidance, ready-to-run commands, and the *why* behind each recommendation
42
54
  - **Comfortable with**: Command-line operations and scripts
43
55
  - **Builds a lot of web apps** — assume any UI work will be consumed on phones as well as desktop
44
56
 
@@ -49,6 +61,7 @@ Not courtesies. These bind you as written, whether or not your tool enforces the
49
61
  - **Always** identify affected files before making changes, and explain what will change and why
50
62
  - **Ask first** — stop and get explicit sign-off — before modifying authentication systems, database schema or migrations, CI workflows, or `.amp/settings.json`
51
63
  - **Never** write secrets into the tree (`.env`/`*.env`, keys, credentials). They load from the environment at runtime; only a value-less `.env.example` is committed
64
+ - **Never** commit to `main`. Commit to a new branch (name doesn't matter), then propose `/code-review` followed by `/release`; merging and releasing are my call, made by name — "approve", "good", or "go" on a draft is not that call
52
65
 
53
66
  ---
54
67
 
@@ -57,12 +70,12 @@ Not courtesies. These bind you as written, whether or not your tool enforces the
57
70
  ### Validate Before You Build
58
71
 
59
72
  - **POC everything first.** Before committing to a design, build a quick proof-of-concept (~15 min) that validates the core logic. Keep it stupidly simple — manual steps are fine, hardcoded values are fine, no tests needed yet
60
- - **POC scope:** Cover the happy path, 2-3 common edge cases, **and the riskiest assumption (see below) — not just the parts that are easy to check**. If those hold, the idea is sound
61
73
  - **Graduation criteria:** POC validates logic and covers most common scenarios → stop, design properly, then build with structure, tests, and error handling. Never ship the POC — rewrite it
62
- - **Aim the POC at the load-bearing claim — not the easy part.** Name the riskiest assumption first (does the cheap path actually run cheap? does the library really do X? does the perf hold?), then point the spike straight at *that*. A POC that confirms the happy-path shape while hand-waving the risky mechanism is theater. If you catch yourself writing "production would do X" instead of *doing* X in the spike, the POC has not validated X — go do X
74
+ - **Aim the POC at the load-bearing claim — not the easy part.** Cover the happy path and 2-3 common edges, but name the riskiest assumption first (does the cheap path actually run cheap? does the library really do X? does the perf hold?), then point the spike straight at *that*. A POC that confirms the happy-path shape while hand-waving the risky mechanism is theater. If you catch yourself writing "production would do X" instead of *doing* X in the spike, the POC has not validated X — go do X
63
75
  - **Prove, don't assert — a POC's output is evidence you ran, not prose you wrote.** Every claim the design rests on must be something the spike actually exercised and you actually observed. **Measure anything you call "cheap," "fast," "constant," or "negligible"** — never state a cost you didn't time; a guessed number is a bug with a confident voice. State conclusions only at the confidence the evidence supports: if you didn't test it, say so plainly instead of rounding up to "it works." Better a small honest finding than a big-mouthed claim that measurement later falsifies
64
76
  - **The test must be able to FAIL — pre-flight check, not an afterthought.** Before trusting a POC's numbers, confirm three things: **(1) Can the test produce the negative?** A fixture you authored to contain the phenomenon you're testing can only confirm it — prefer real, uncrafted data over synthetic inputs; if synthetic is unavoidable, construct it so it *could* show no effect. **(2) Is the harness free of confounds?** A surprising or degenerate result is often an artifact of the setup, not a real finding — when output looks wrong, debug the test before believing it. **(3) Did the test actually exercise the variable?** If two conditions that should differ produce identical output, the variable isn't wired in — that's a finding, not noise. Run this checklist every time, especially when a result confirms what you hoped
65
- - **Build incrementally.** After POC graduates, break the work into small, independent modules. Focus on one at a time. Each piece must work on its own before integrating with the next
77
+ - **One module at a time.** Build the PRD's modules in order, never several at once. Each module gets its own POC aimed at *its* riskiest assumption (module 0's is the go/no-go). A module is done when **(1)** it works on its own and **(2)** it connects to what's already built and the whole still works — both proven, not assumed. Only then start the next
78
+ - **No fitting to pass.** Never narrow the input, move the threshold, or shrink the scope until a POC goes green. Report the failure and take it back to the PRD
66
79
 
67
80
  ### Dependency Hierarchy
68
81
 
@@ -106,6 +119,7 @@ Before adding any external dependency, all of these must be true:
106
119
  - Skipping POC validation for unproven ideas
107
120
  - POC-ing only the easy part while hand-waving the risky mechanism, or claiming a cost ("cheap"/"fast"/"constant") you never measured
108
121
  - Authoring a fixture/corpus that *guarantees* the result (a test that can't return the negative), or trusting a degenerate-looking number without auditing the harness for confounds — use real uncrafted data; the test must be able to fail
122
+ - Fitting a POC to pass (narrowed input, moved threshold, shrunk scope) instead of reporting the failure; starting module N+1 while module N is unproven
109
123
 
110
124
  ---
111
125
 
@@ -269,9 +283,9 @@ Copy this to any project's AGENT.md. These are mandatory rules, not suggestions.
269
283
  ```markdown
270
284
  ## Dev Rules
271
285
 
272
- **POC first.** Always validate logic with a ~15min proof-of-concept before building. Cover happy path + common edges. POC works → design properly → build with tests. Never ship the POC. **Aim the spike at the riskiest assumption, not the easy part; prove, don't assert measure anything you call "cheap"/"fast"/"constant," and claim only what the evidence supports (no big-mouthed conclusions measurement can falsify). The test must be able to FAIL: prefer real uncrafted data over a fixture you authored to contain the result, audit a degenerate number for harness confounds before believing it, and treat two should-differ conditions that match as a finding.**
286
+ **Spec first.** Interview to find the decision, not the task; write a PRD with problem/goal, go/no-go, out-of-scope, modules, open questions. POCs refine it.
273
287
 
274
- **Build incrementally.** Break work into small independent modules. One piece at a time, each must work on its own before integrating.
288
+ **POC first, one module at a time.** Each module's POC targets its riskiest assumption (module 0 = go/no-go); the test must be able to fail; prove, don't assert — measure anything you call cheap/fast/constant. No fitting to pass. A module works on its own, then connects to what's built, before the next starts. Never ship the POC.
275
289
 
276
290
  **Dependency hierarchy — follow strictly:** vanilla language → standard library → external (only when stdlib can't do it in <100 lines). External deps must be maintained, lightweight, and widely adopted. Exception: always use vetted libraries for security-critical code (crypto, auth, sanitization).
277
291
 
@@ -283,17 +297,3 @@ Copy this to any project's AGENT.md. These are mandatory rules, not suggestions.
283
297
 
284
298
  For full development and testing standards, see `.amp/remember/AGENT_RULES.md`.
285
299
  ```
286
-
287
- ---
288
-
289
- ## AI Agent Instructions
290
-
291
- When working with this user:
292
- 1. **Interview before building** — extract the real goal and surface load-bearing decisions for sign-off before you execute (see [Operating Flow](#operating-flow))
293
- 2. **Provide step-by-step** instructions with clear explanations
294
- 3. **Include ready-to-run** scripts and commands
295
- 4. **Explain the "why"** behind technical recommendations
296
- 5. **Flag potential issues** before they become problems — name the assumption, don't bury it
297
- 6. **Suggest simpler alternatives** when appropriate
298
- 7. **Ask first** before touching auth, DB schema/migrations, CI, or settings; **never** commit secrets
299
- 8. **Always identify** which files will be affected by changes