liteagents 3.5.0 → 3.7.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 (28) hide show
  1. package/CHANGELOG.md +104 -0
  2. package/installer/package-manager.js +3 -1
  3. package/package.json +1 -1
  4. package/packages/ampcode/skills/branch-review/SKILL.md +34 -3
  5. package/packages/ampcode/skills/docs-builder/SKILL.md +168 -70
  6. package/packages/ampcode/skills/docs-builder/docs-builder.cjs +325 -70
  7. package/packages/ampcode/skills/release/SKILL.md +38 -8
  8. package/packages/ampcode/skills/security/SKILL.md +6 -3
  9. package/packages/claude/plugins/live-canvas-marketplace/plugins/live-canvas-channel/package-lock.json +3 -3
  10. package/packages/claude/skills/branch-review/SKILL.md +34 -3
  11. package/packages/claude/skills/docs-builder/SKILL.md +168 -69
  12. package/packages/claude/skills/docs-builder/docs-builder.cjs +325 -70
  13. package/packages/claude/skills/release/SKILL.md +38 -8
  14. package/packages/claude/skills/security/SKILL.md +6 -3
  15. package/packages/droid/commands/branch-review.md +34 -3
  16. package/packages/droid/commands/docs-builder/docs-builder.cjs +325 -70
  17. package/packages/droid/commands/docs-builder.md +168 -70
  18. package/packages/droid/commands/release.md +38 -8
  19. package/packages/droid/commands/security.md +6 -3
  20. package/packages/opencode/command/branch-review.md +34 -3
  21. package/packages/opencode/command/docs-builder/docs-builder.cjs +325 -70
  22. package/packages/opencode/command/docs-builder.md +168 -70
  23. package/packages/opencode/command/release.md +38 -8
  24. package/packages/opencode/command/security.md +6 -3
  25. package/tools/ampcode/manifest-template.json +0 -1
  26. package/tools/claude/manifest-template.json +0 -1
  27. package/tools/droid/manifest-template.json +0 -1
  28. package/tools/opencode/manifest-template.json +0 -1
@@ -126,19 +126,49 @@ confirmed in Phase 0.5.
126
126
  summarize, escalate. Do not weigh it yourself.
127
127
  - **All clean** → continue.
128
128
 
129
- ## Phase 2 — Docs sweep
130
- Update what this feature actually changed, wherever those docs live in this
131
- project — match each file's existing format, touch nothing unrelated. Use
132
- `docs/index.md` when the project has one to find what exists.
133
-
134
- - **CHANGELOG.md** — new entry.
135
- - **README.md** — only if user-facing usage changed.
129
+ ## Phase 2 — Docs sweep (required — no skipping, no sampling)
130
+ Update what this branch changed, wherever those docs live in this project —
131
+ match each file's existing format, touch nothing unrelated. Use
132
+ `docs/index.md` when the project has one to find what exists. **All three
133
+ passes run on every release**; the size of the branch or the change never
134
+ cuts one.
135
+
136
+ 1. **List every change.** Read `git log --format='%h %s%n%b'
137
+ origin/main..HEAD` — the bodies, not just the subjects — and the diff.
138
+ Write one line per user-visible change: feature, command, flag, behaviour,
139
+ fix, dependency bump. A subject is a summary; the body is the list, and a
140
+ sweep built from subjects drops whatever only a body mentions.
141
+ 2. **CHANGELOG.md** — a new entry holding every line from pass 1, each under
142
+ the heading the file already uses for its kind (Added / Changed / Fixed /
143
+ Security). A new capability is **Added** even when it shipped in a `fix:`
144
+ commit. Then check it back: every pass-1 line maps to an entry, and the
145
+ semver level in Phase 3 agrees with the headings (an Added entry means at
146
+ least minor).
147
+ 3. **Grep for stale text.** For every string the diff removed or replaced
148
+ that a reader might have copied — a command line, flag, file name, recipe,
149
+ env var, printed message — search the docs for the old form:
150
+ `grep -rnF "<old string>" --include='*.md' .` (past CHANGELOG entries are
151
+ history; leave them). Every other hit is stale **because of this branch** —
152
+ update it. "It was already stale before this branch" is a claim: prove it
153
+ with `git show $(git merge-base origin/main HEAD):<source path>`. If the
154
+ base code already disagreed with the doc, report it as out of scope;
155
+ otherwise it is yours to fix.
156
+
157
+ Then judge each of these against the pass-1 list:
158
+ - **README.md** — if user-facing usage changed.
136
159
  - **PRD** — the feature's entry / status.
137
160
  - **Guide / context docs** — the project's standing context.
138
161
  - **Findings / learnings** — where the project keeps them.
139
162
  - **Any other frequently-updated doc** this change makes stale.
140
163
 
141
- If a doc needs no change, **say so** rather than editing it for its own sake.
164
+ Report **one row per doc**: file · changed / no change · the evidence (the
165
+ grep or diff you ran). A "no change" with no evidence is a skip, and a skip
166
+ fails this phase — it is not a pass. If a doc truly needs no change, say so
167
+ with the evidence rather than editing it for its own sake.
168
+
169
+ **The sweep is the worker's job, start to finish.** The orchestrator checks
170
+ the report; it does not redo or patch the sweep. A gap it finds goes back to
171
+ the worker, and it counts as a failed sweep, not a small follow-up.
142
172
 
143
173
  ## Phase 3 — Cut (local only)
144
174
  1. **Version bump** — pick the semver level from the change (patch / minor /
@@ -23,9 +23,12 @@ These show up in nearly every quickly-built app regardless of stack:
23
23
 
24
24
  1. **Secrets in the repo.** Tokens / API keys / `.env` files committed to
25
25
  tracked files or anywhere in git history. Verify `.env` is gitignored and
26
- only a value-less `.env.example` is tracked; scan history (`git log -p`,
27
- `git grep`) for leaked keys. Secrets must load from env / a secret store at
28
- runtime never hardcoded, never logged.
26
+ only a value-less `.env.example` is tracked. Scan ALL history, every
27
+ branch a range or target never narrows this with:
28
+ `git log --all -p | grep -nE '(sk-[A-Za-z0-9_-]{16,}|AKIA[0-9A-Z]{16}|gh[pousr]_[A-Za-z0-9]{30,}|xox[abprs]-[A-Za-z0-9-]{10,}|AIza[0-9A-Za-z_-]{35}|-----BEGIN [A-Z ]*PRIVATE KEY)'`
29
+ plus any key shape specific to this project's providers. Report each hit
30
+ as real or a known test fixture. Secrets must load from env / a secret
31
+ store at runtime — never hardcoded, never logged.
29
32
  2. **Data-access authorization (tenant isolation).** Every record read or
30
33
  written must be scoped to the requesting principal — via DB-level rules
31
34
  (RLS / row policies) and/or application-layer ownership checks. Flag any
@@ -97,6 +97,20 @@ was actually read rather than assuming.
97
97
  you owe an answer on — take both from the file, never from the orchestrator's
98
98
  recollection, for the same reason `/release` does. Then:
99
99
 
100
+ - **First, check the record belongs to this branch.** There is one record file
101
+ per repo, not one per branch. Validate `<that sha>` first with
102
+ `git rev-parse --verify <that sha>` — a value that fails this (e.g. a
103
+ corrupted or hand-edited record, or one starting with `-`, which git would
104
+ otherwise parse as an option) is a malformed record; treat it exactly as
105
+ **No file** below. If it validates, and its `branch:` line differs from the
106
+ current branch, or `git merge-base --is-ancestor <that sha> HEAD` exits
107
+ non-zero, the record describes a different or rewritten history — treat it
108
+ exactly as **No file** below and review the whole branch. Skipping this
109
+ resolves `<that sha>..HEAD` against a merged, renamed, or rebased sha, which
110
+ is not a subset of this branch but a range that never existed. Check both:
111
+ the branch name catches a switch, the ancestry check catches a rebase or
112
+ squash under the same name. Otherwise:
113
+
100
114
  - **`sha:` ≠ HEAD** → this is a re-review. Target the range
101
115
  `<that sha>..HEAD`. Stage 1 reads only the commits since, and stage 3
102
116
  re-verifies each recorded blocker as fixed, unfixed, or dismissed with a
@@ -123,6 +137,13 @@ governs **stage 1 only**:
123
137
  - **high / max** — broader coverage; uncertain findings are allowed, but each
124
138
  must be labelled uncertain.
125
139
 
140
+ **No shortcuts.** The level decides how many findings you report, never which
141
+ checks you run. Every check this file calls required runs at every level —
142
+ never cut or sample one "given the effort level", the branch size, or time. If
143
+ a check truly cannot run, write `NOT RUN: <reason>` for it on the `checks:`
144
+ line of the report and the review record. That is a visible gap, not a
145
+ blocker and not a pass.
146
+
126
147
  **Stage 2 (security) always runs full, at every level.** A shallow security
127
148
  pass is worse than none — it reads as coverage while missing the class of bug
128
149
  that costs the most.
@@ -172,7 +193,10 @@ carries the reproduction.
172
193
  location outside the repo; the tree must still be clean at exit. A test that
173
194
  passes against both the buggy and the fixed source is a tautology and proves
174
195
  nothing. Flag every one you find, and say so explicitly when the tests are
175
- the branch's only evidence for its claims.
196
+ the branch's only evidence for its claims. **Required, every test file the
197
+ diff adds or changes — one red run per file is enough; checking a sample of
198
+ the files is a skip.** Count them as `fail-first N/M files` on the
199
+ `checks:` line.
176
200
  - **Maintainability.** Complexity, naming, duplication — only when material.
177
201
 
178
202
  ## Stage 2 — Security (always full)
@@ -187,7 +211,10 @@ If `security.md` cannot be found, run what you can from the list above and
187
211
 
188
212
  This stage is repo- and history-scoped, not diff-scoped: a key committed forty
189
213
  commits ago, an unbounded route the diff never touched, or a missing row
190
- policy on a table the new code now reads are all in scope.
214
+ policy on a table the new code now reads are all in scope. **The review range
215
+ never narrows this stage** — even when you were handed `main..HEAD`, the
216
+ secrets scan covers every commit on every branch (`security.md` item 1 has
217
+ the command).
191
218
 
192
219
  ## Stage 3 — Verify (adversarial)
193
220
  Findings are claims, not facts. **Try to break each one, not to confirm it** —
@@ -275,7 +302,10 @@ uncertain).
275
302
 
276
303
  Then a coverage line: stage 1 at level `<level>`, stage 2 full, stage 3 —
277
304
  each `ran ✓/✗` with its evidence. A stage you did not actually run is a **✗**, never an
278
- assumed pass.
305
+ assumed pass. Then a `checks:` line for the two checks most often cut short:
306
+ `fail-first N/M files` and `secrets-history all-branches` (or `NOT RUN:
307
+ <reason>` for either). An N below M, or a NOT RUN, is reported as-is — it
308
+ does not block.
279
309
 
280
310
  **Write the review record** to `.factory/remember/last-review.md`, overwriting
281
311
  it. `/release` reads this file; a SHA that lives only in a chat message is
@@ -294,6 +324,7 @@ level: <low | medium | high | max>
294
324
  verdict: <ready | blocked>
295
325
  date: <YYYY-MM-DD>
296
326
  coverage: stage1 <ran|NOT RUN>, stage2 <ran|NOT RUN>, stage3 <ran|NOT RUN>
327
+ checks: fail-first <N/M files|NOT RUN: reason>, secrets-history <all-branches|NOT RUN: reason>
297
328
  blockers:
298
329
  - <file:line> · <one-sentence claim, no scenario, no suggested fix>
299
330
  ```