@aperant/framework 0.13.0 → 0.15.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.
- package/CHANGELOG.md +87 -0
- package/README.md +1 -1
- package/agents/apt-pr-review-i18n.md +190 -0
- package/agents/apt-pr-review-xplatform.md +189 -0
- package/dist/cli/commands/audit-branch-current.d.mts +27 -5
- package/dist/cli/commands/audit-branch-current.d.mts.map +1 -1
- package/dist/cli/commands/audit-branch-current.mjs +3 -3
- package/dist/cli/commands/audit-branch-current.mjs.map +1 -1
- package/dist/cli/commands/event.d.mts.map +1 -1
- package/dist/cli/commands/event.mjs +6 -4
- package/dist/cli/commands/event.mjs.map +1 -1
- package/dist/cli/commands/fan-out.d.mts.map +1 -1
- package/dist/cli/commands/fan-out.mjs +3 -1
- package/dist/cli/commands/fan-out.mjs.map +1 -1
- package/dist/cli/commands/features-audit.d.mts.map +1 -1
- package/dist/cli/commands/features-audit.mjs +6 -1
- package/dist/cli/commands/features-audit.mjs.map +1 -1
- package/dist/cli/commands/followups.d.mts +5 -0
- package/dist/cli/commands/followups.d.mts.map +1 -0
- package/dist/cli/commands/followups.mjs +266 -0
- package/dist/cli/commands/followups.mjs.map +1 -0
- package/dist/cli/commands/health-check.d.mts.map +1 -1
- package/dist/cli/commands/health-check.mjs +3 -1
- package/dist/cli/commands/health-check.mjs.map +1 -1
- package/dist/cli/commands/merge-detect.d.mts +29 -0
- package/dist/cli/commands/merge-detect.d.mts.map +1 -0
- package/dist/cli/commands/merge-detect.mjs +196 -0
- package/dist/cli/commands/merge-detect.mjs.map +1 -0
- package/dist/cli/commands/merge-integrate.d.mts +28 -0
- package/dist/cli/commands/merge-integrate.d.mts.map +1 -0
- package/dist/cli/commands/merge-integrate.mjs +383 -0
- package/dist/cli/commands/merge-integrate.mjs.map +1 -0
- package/dist/cli/commands/pr-review/detect-specialists.d.mts +58 -0
- package/dist/cli/commands/pr-review/detect-specialists.d.mts.map +1 -0
- package/dist/cli/commands/pr-review/detect-specialists.mjs +980 -0
- package/dist/cli/commands/pr-review/detect-specialists.mjs.map +1 -0
- package/dist/cli/commands/pr-review.d.mts.map +1 -1
- package/dist/cli/commands/pr-review.mjs +11 -2
- package/dist/cli/commands/pr-review.mjs.map +1 -1
- package/dist/cli/commands/precompact-hook.d.mts.map +1 -1
- package/dist/cli/commands/precompact-hook.mjs +10 -6
- package/dist/cli/commands/precompact-hook.mjs.map +1 -1
- package/dist/cli/commands/roadmap.d.mts.map +1 -1
- package/dist/cli/commands/roadmap.mjs +24 -11
- package/dist/cli/commands/roadmap.mjs.map +1 -1
- package/dist/cli/commands/seed.d.mts.map +1 -1
- package/dist/cli/commands/seed.mjs +3 -1
- package/dist/cli/commands/seed.mjs.map +1 -1
- package/dist/cli/commands/state.d.mts.map +1 -1
- package/dist/cli/commands/state.mjs +9 -3
- package/dist/cli/commands/state.mjs.map +1 -1
- package/dist/cli/commands/statusline.d.mts.map +1 -1
- package/dist/cli/commands/statusline.mjs +5 -1
- package/dist/cli/commands/statusline.mjs.map +1 -1
- package/dist/cli/commands/task.d.mts.map +1 -1
- package/dist/cli/commands/task.mjs +126 -23
- package/dist/cli/commands/task.mjs.map +1 -1
- package/dist/cli/commands/worktree.d.mts +1 -1
- package/dist/cli/commands/worktree.d.mts.map +1 -1
- package/dist/cli/commands/worktree.mjs +282 -83
- package/dist/cli/commands/worktree.mjs.map +1 -1
- package/dist/cli/config/post-merge-sweep.d.mts.map +1 -1
- package/dist/cli/config/post-merge-sweep.mjs +3 -2
- package/dist/cli/config/post-merge-sweep.mjs.map +1 -1
- package/dist/cli/config/share-policy.d.mts +3 -1
- package/dist/cli/config/share-policy.d.mts.map +1 -1
- package/dist/cli/config/share-policy.mjs +16 -3
- package/dist/cli/config/share-policy.mjs.map +1 -1
- package/dist/cli/config/upgrade-gitignore.d.mts.map +1 -1
- package/dist/cli/config/upgrade-gitignore.mjs +27 -5
- package/dist/cli/config/upgrade-gitignore.mjs.map +1 -1
- package/dist/cli/consistency/parse-qa.mjs +12 -1
- package/dist/cli/consistency/parse-qa.mjs.map +1 -1
- package/dist/cli/consistency/parse-review.d.mts +23 -0
- package/dist/cli/consistency/parse-review.d.mts.map +1 -1
- package/dist/cli/consistency/parse-review.mjs +36 -0
- package/dist/cli/consistency/parse-review.mjs.map +1 -1
- package/dist/cli/consistency/parse-spec.d.mts +16 -0
- package/dist/cli/consistency/parse-spec.d.mts.map +1 -1
- package/dist/cli/consistency/parse-spec.mjs +44 -0
- package/dist/cli/consistency/parse-spec.mjs.map +1 -1
- package/dist/cli/coordination/agent-identity.d.mts +5 -2
- package/dist/cli/coordination/agent-identity.d.mts.map +1 -1
- package/dist/cli/coordination/agent-identity.mjs +6 -4
- package/dist/cli/coordination/agent-identity.mjs.map +1 -1
- package/dist/cli/coordination/store.d.mts +1 -1
- package/dist/cli/dispatch.d.mts.map +1 -1
- package/dist/cli/dispatch.mjs +4 -0
- package/dist/cli/dispatch.mjs.map +1 -1
- package/dist/cli/followups/derive.d.mts +63 -0
- package/dist/cli/followups/derive.d.mts.map +1 -0
- package/dist/cli/followups/derive.mjs +115 -0
- package/dist/cli/followups/derive.mjs.map +1 -0
- package/dist/cli/followups/schema.d.mts +165 -0
- package/dist/cli/followups/schema.d.mts.map +1 -0
- package/dist/cli/followups/schema.mjs +251 -0
- package/dist/cli/followups/schema.mjs.map +1 -0
- package/dist/cli/gate/context.d.mts +1 -1
- package/dist/cli/gate/gates/followups-adjudicated.d.mts +69 -0
- package/dist/cli/gate/gates/followups-adjudicated.d.mts.map +1 -0
- package/dist/cli/gate/gates/followups-adjudicated.mjs +141 -0
- package/dist/cli/gate/gates/followups-adjudicated.mjs.map +1 -0
- package/dist/cli/gate/gates/index.mjs +1 -0
- package/dist/cli/gate/gates/index.mjs.map +1 -1
- package/dist/cli/git/materialize-env.d.mts +39 -0
- package/dist/cli/git/materialize-env.d.mts.map +1 -0
- package/dist/cli/git/materialize-env.mjs +217 -0
- package/dist/cli/git/materialize-env.mjs.map +1 -0
- package/dist/cli/help.d.mts.map +1 -1
- package/dist/cli/help.mjs +9 -1
- package/dist/cli/help.mjs.map +1 -1
- package/dist/cli/install/legacy-paths.d.mts.map +1 -1
- package/dist/cli/install/legacy-paths.mjs +4 -0
- package/dist/cli/install/legacy-paths.mjs.map +1 -1
- package/dist/cli/roadmap/lifecycle.d.mts.map +1 -1
- package/dist/cli/roadmap/lifecycle.mjs +4 -1
- package/dist/cli/roadmap/lifecycle.mjs.map +1 -1
- package/dist/cli/task/ids.d.mts +9 -0
- package/dist/cli/task/ids.d.mts.map +1 -1
- package/dist/cli/task/ids.mjs +9 -0
- package/dist/cli/task/ids.mjs.map +1 -1
- package/dist/cli/task/index-md.d.mts +5 -0
- package/dist/cli/task/index-md.d.mts.map +1 -1
- package/dist/cli/task/index-md.mjs +12 -4
- package/dist/cli/task/index-md.mjs.map +1 -1
- package/dist/cli/util/io.d.mts +6 -0
- package/dist/cli/util/io.d.mts.map +1 -1
- package/dist/cli/util/io.mjs +16 -1
- package/dist/cli/util/io.mjs.map +1 -1
- package/dist/cli/util/project.d.mts +7 -2
- package/dist/cli/util/project.d.mts.map +1 -1
- package/dist/cli/util/project.mjs +11 -14
- package/dist/cli/util/project.mjs.map +1 -1
- package/dist/cli/util/state-paths.d.mts +19 -0
- package/dist/cli/util/state-paths.d.mts.map +1 -0
- package/dist/cli/util/state-paths.mjs +45 -0
- package/dist/cli/util/state-paths.mjs.map +1 -0
- package/dist/plugin/.claude-plugin/plugin.json +4 -1
- package/dist/plugin/agents/apt-pr-review-i18n.md +190 -0
- package/dist/plugin/agents/apt-pr-review-xplatform.md +189 -0
- package/dist/plugin/skills/apt/SKILL.md +9 -3
- package/dist/plugin/skills/apt-close-task/SKILL.md +48 -0
- package/dist/plugin/skills/apt-debug/SKILL.md +19 -9
- package/dist/plugin/skills/apt-execute/SKILL.md +3 -1
- package/dist/plugin/skills/apt-fan-out/SKILL.md +65 -1
- package/dist/plugin/skills/apt-merge-conflict-resolution/SKILL.md +227 -0
- package/dist/plugin/skills/apt-pr-review/SCHEMA.md +4 -2
- package/dist/plugin/skills/apt-pr-review/SKILL.md +117 -29
- package/dist/plugin/skills/apt-quick/SKILL.md +24 -1
- package/dist/plugin/skills/apt-review/SKILL.md +6 -0
- package/dist/plugin/skills/apt-run/SKILL.md +1 -1
- package/dist/plugin/skills/apt-setup/SKILL.md +21 -3
- package/dist/plugin/skills/apt-ship/SKILL.md +32 -11
- package/dist/plugin/skills/apt-terminal/SKILL.md +8 -0
- package/dist/plugin/skills/apt-triage/SKILL.md +4 -0
- package/dist/plugin/skills/apt-verify/SKILL.md +24 -0
- package/dist/plugin/skills/apt-watch-ci/SKILL.md +3 -1
- package/dist/types/config.d.ts +33 -0
- package/dist/types/config.d.ts.map +1 -1
- package/package.json +1 -1
- package/prompts/conductor-framework-context.md +1 -1
- package/prompts/github/pr_i18n_agent.md +279 -0
- package/prompts/github/pr_xplatform_agent.md +283 -0
- package/prompts/inbox-clarification.md +18 -11
- package/skills/apt/SKILL.md +9 -3
- package/skills/apt-close-task/SKILL.md +48 -0
- package/skills/apt-debug/SKILL.md +19 -9
- package/skills/apt-execute/SKILL.md +3 -1
- package/skills/apt-fan-out/SKILL.md +65 -1
- package/skills/apt-merge-conflict-resolution/SKILL.md +227 -0
- package/skills/apt-pr-review/SCHEMA.md +4 -2
- package/skills/apt-pr-review/SKILL.md +117 -29
- package/skills/apt-quick/SKILL.md +24 -1
- package/skills/apt-review/SKILL.md +6 -0
- package/skills/apt-run/SKILL.md +1 -1
- package/skills/apt-setup/SKILL.md +21 -3
- package/skills/apt-ship/SKILL.md +32 -11
- package/skills/apt-terminal/SKILL.md +8 -0
- package/skills/apt-triage/SKILL.md +4 -0
- package/skills/apt-verify/SKILL.md +24 -0
- package/skills/apt-watch-ci/SKILL.md +3 -1
- package/src/cli/commands/audit-branch-current.mjs +3 -3
- package/src/cli/commands/event.mjs +6 -4
- package/src/cli/commands/fan-out.mjs +3 -1
- package/src/cli/commands/features-audit.mjs +6 -1
- package/src/cli/commands/followups.mjs +303 -0
- package/src/cli/commands/health-check.mjs +3 -1
- package/src/cli/commands/merge-detect.mjs +203 -0
- package/src/cli/commands/merge-integrate.mjs +392 -0
- package/src/cli/commands/pr-review/__fixtures__/android-strings/app/src/main/res/values-fr/strings.xml +3 -0
- package/src/cli/commands/pr-review/__fixtures__/babel-js/package.json +4 -0
- package/src/cli/commands/pr-review/__fixtures__/c-ifdef/src/main.c +4 -0
- package/src/cli/commands/pr-review/__fixtures__/ci-matrix/.github/workflows/ci.yml +10 -0
- package/src/cli/commands/pr-review/__fixtures__/cmake-win/CMakeLists.txt +5 -0
- package/src/cli/commands/pr-review/__fixtures__/diffs/add-arb.patch +9 -0
- package/src/cli/commands/pr-review/__fixtures__/diffs/ci-single-os-dep.patch +13 -0
- package/src/cli/commands/pr-review/__fixtures__/diffs/ci-single-os-list-item-dep.patch +17 -0
- package/src/cli/commands/pr-review/__fixtures__/diffs/lone-weak-t.patch +8 -0
- package/src/cli/commands/pr-review/__fixtures__/diffs/monorepo-b.patch +7 -0
- package/src/cli/commands/pr-review/__fixtures__/diffs/two-weak-xpl.patch +12 -0
- package/src/cli/commands/pr-review/__fixtures__/dropped-underscore/src/app.js +2 -0
- package/src/cli/commands/pr-review/__fixtures__/electron-app/package.json +4 -0
- package/src/cli/commands/pr-review/__fixtures__/i18n-locale-file/src/locales/fr.json +1 -0
- package/src/cli/commands/pr-review/__fixtures__/monorepo/packages/a/locales/fr.json +1 -0
- package/src/cli/commands/pr-review/__fixtures__/monorepo/packages/b/src/index.ts +1 -0
- package/src/cli/commands/pr-review/__fixtures__/py-babel/pyproject.toml +3 -0
- package/src/cli/commands/pr-review/__fixtures__/qt-i18n-dir/i18n/app_fr.ts +11 -0
- package/src/cli/commands/pr-review/__fixtures__/rust-cli/Cargo.toml +7 -0
- package/src/cli/commands/pr-review/__fixtures__/rust-cli/src/main.rs +1 -0
- package/src/cli/commands/pr-review/__fixtures__/ts-dir/ts/foo.ts +3 -0
- package/src/cli/commands/pr-review/detect-specialists.mjs +1023 -0
- package/src/cli/commands/pr-review.mjs +12 -2
- package/src/cli/commands/precompact-hook.mjs +10 -6
- package/src/cli/commands/roadmap.mjs +24 -11
- package/src/cli/commands/seed.mjs +3 -1
- package/src/cli/commands/state.mjs +9 -3
- package/src/cli/commands/statusline.mjs +5 -1
- package/src/cli/commands/task.mjs +135 -23
- package/src/cli/commands/worktree.mjs +298 -81
- package/src/cli/config/post-merge-sweep.mjs +3 -2
- package/src/cli/config/share-policy.mjs +16 -3
- package/src/cli/config/upgrade-gitignore.mjs +27 -5
- package/src/cli/consistency/parse-qa.mjs +11 -1
- package/src/cli/consistency/parse-review.mjs +36 -0
- package/src/cli/consistency/parse-spec.mjs +43 -0
- package/src/cli/coordination/agent-identity.mjs +6 -4
- package/src/cli/dispatch.mjs +4 -0
- package/src/cli/followups/derive.mjs +123 -0
- package/src/cli/followups/schema.mjs +264 -0
- package/src/cli/gate/gates/followups-adjudicated.mjs +158 -0
- package/src/cli/gate/gates/index.mjs +1 -0
- package/src/cli/git/materialize-env.mjs +212 -0
- package/src/cli/help.mjs +9 -1
- package/src/cli/install/legacy-paths.mjs +4 -0
- package/src/cli/roadmap/lifecycle.mjs +4 -1
- package/src/cli/task/ids.mjs +9 -0
- package/src/cli/task/index-md.mjs +12 -4
- package/src/cli/util/io.mjs +15 -1
- package/src/cli/util/project.mjs +11 -14
- package/src/cli/util/state-paths.mjs +45 -0
- package/prompts/followup_planner.md +0 -399
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,93 @@
|
|
|
3
3
|
All notable changes to `@aperant/framework` are documented here. See
|
|
4
4
|
[`VERSIONING.md`](VERSIONING.md) for the per-tier contract.
|
|
5
5
|
|
|
6
|
+
## [Unreleased]
|
|
7
|
+
|
|
8
|
+
## 0.15.0 — 2026-06-25 — Quick/debug worktree isolation + CI-watcher setup opt-in
|
|
9
|
+
|
|
10
|
+
### Added
|
|
11
|
+
|
|
12
|
+
- **`/apt:quick` + `/apt:debug` honor `task_isolation.worktree_per_task`** —
|
|
13
|
+
dispatch-prose fix so quick/debug invocations (direct skill-passthrough AND
|
|
14
|
+
the router classify-mode QUICK/DEBUG path) land their edits in the isolated
|
|
15
|
+
task worktree, matching `/apt:run` + `/apt:execute`. `apt-quick/SKILL.md` §1a
|
|
16
|
+
now parses the `worktree` block from `task create` + prints the banner;
|
|
17
|
+
`apt-debug/SKILL.md` gains a `<your_environment>` worktree clause + §1a banner
|
|
18
|
+
+ `cd {worktree_path}` discipline at the fix/checkpoint phases (investigation
|
|
19
|
+
stays cwd-agnostic); `apt/SKILL.md` classify Step 3 `spawn_agent:false` branch
|
|
20
|
+
now names both skills and threads `worktree_path`. No code change — `task
|
|
21
|
+
create` already returns the right envelope. **Post-merge: re-run `apt-tools
|
|
22
|
+
init . --<runtime>` (or `/apt:update`) to refresh the installed copies under
|
|
23
|
+
`.claude/skills/**` and `.aperant/deps/node_modules/@aperant/framework/skills/**`**
|
|
24
|
+
(apt-skill-version header + per-runtime `apt-file-manifest.json`) so the
|
|
25
|
+
canonical SKILL.md edits actually take effect across runtimes.
|
|
26
|
+
- **`/apt:setup` post-ship CI watcher opt-in** — Batch 2 (Pipeline) now asks
|
|
27
|
+
whether `/apt:ship` should arm the post-ship CI watcher, with three
|
|
28
|
+
automation levels: *Off*, *Watch & auto-fix* (`ci_watch.after_ship: "auto"`,
|
|
29
|
+
`auto_merge_on_green: false`), and *Watch, fix & auto-merge on green*
|
|
30
|
+
(`auto_merge_on_green: true`). Previously these were silent code defaults
|
|
31
|
+
configurable only by hand-editing `.aperant/config.json` — the consequential
|
|
32
|
+
`auto_merge_on_green` flag (which auto-merges PRs) was undiscoverable through
|
|
33
|
+
guided setup. Maps to the shared `ci_watch` block in Step 4 and surfaces in
|
|
34
|
+
the §8 confirmation table. `ci_watch.merge_method` is left untouched.
|
|
35
|
+
|
|
36
|
+
## 0.14.0 — 2026-06-11 — Follow-ups ledger + adjudication + disposition (G45)
|
|
37
|
+
|
|
38
|
+
Pipeline follow-ups become a derived, adjudicated, dispositioned ledger that
|
|
39
|
+
gates ship and close instead of evaporating into prose. Implements
|
|
40
|
+
[`docs/frameworks/spec-gaps.md` G42 Phase 2](docs/../../../docs/frameworks/spec-gaps.md#g45)
|
|
41
|
+
with wider scope (all origin points, not just review findings).
|
|
42
|
+
|
|
43
|
+
### Added
|
|
44
|
+
|
|
45
|
+
- **`apt-tools followups check | disposition | policy`** — the deterministic
|
|
46
|
+
surface for the per-task `{task_dir}/followups.json` ledger. `check` derives
|
|
47
|
+
the expected candidate universe (parsed `## Out of Scope` bullets ∪ raw review
|
|
48
|
+
rows ∪ qa findings, `status !== 'fixed'`) and reports `missing_expected[]` /
|
|
49
|
+
`invalid_outcome_refs[]` / `unadjudicated_open[]` / `load_bearing_unfixed[]` /
|
|
50
|
+
`undispositioned[]`; `disposition` flips a row to `dispositioned` with a
|
|
51
|
+
validated record (atomic write; `dropped_by_user` requires `--reason`);
|
|
52
|
+
`policy` returns the effective `after_close` (`ask | file | chain`) +
|
|
53
|
+
`max_chain_depth`, config-then-autonomy derived.
|
|
54
|
+
- **`followups-adjudicated` ship gate** (blocking, full-pipeline only) — fails
|
|
55
|
+
when spec.md has Out of Scope bullets but `followups.json` is absent, when
|
|
56
|
+
expected rows are missing, when an open row lacks adjudication, or when a
|
|
57
|
+
load-bearing row is not fixed. Only the audited `--force --reason` bypasses.
|
|
58
|
+
- **CLI-level close disposition gate** inside `task close` — refuses while any
|
|
59
|
+
open row lacks a durable disposition (`filed_task | executed_commit |
|
|
60
|
+
parked_note | dropped_by_user`); `close-merged` + the passive post-merge sweep
|
|
61
|
+
inherit it; forced bypass appends a `task.close.followups-override` audit
|
|
62
|
+
event.
|
|
63
|
+
- **`followups` config key** (`FollowupsConfig`: `after_close?`,
|
|
64
|
+
`max_chain_depth?`) on `AperantConfig`, autonomy-degrade-documented mirroring
|
|
65
|
+
`ci_watch.after_ship`. Consumed in code by `followups policy` (no prose-only
|
|
66
|
+
schema).
|
|
67
|
+
- **Additive parser exports** — `parseOutOfScope` (parse-spec.mjs) and
|
|
68
|
+
`parseReviewRaw` (parse-review.mjs, sub-critical severities retained);
|
|
69
|
+
existing `parseSpec` / `parseReview` contracts are byte-stable.
|
|
70
|
+
- **Skill contract amendments** — `apt:verify` gains a mandatory adjudication
|
|
71
|
+
pass ("would the feature satisfy its stated User Outcomes right now without
|
|
72
|
+
this?" → `adjudication {verdict, by: 'verify', outcome_ref}`); `apt:ship`
|
|
73
|
+
enumerates every open/dispositioned row VERBATIM (never counts) in a
|
|
74
|
+
`## Follow-ups` PR-body section + the report; `apt:close-task` runs an
|
|
75
|
+
autonomy-aware disposition step (`new-task` via the EXISTING triage machine —
|
|
76
|
+
no new `gh issue create`; `polish` → `## Deferred Ideas` parked note;
|
|
77
|
+
`chain` → depth-1 auto-chain of `ready-for-agent` rows); `apt:review` limits
|
|
78
|
+
`in-pr` execution to the fix-all loop; `apt:triage` notes the new-task
|
|
79
|
+
disposition entry point.
|
|
80
|
+
|
|
81
|
+
### Fast Path
|
|
82
|
+
|
|
83
|
+
- QUICK/DEBUG (lite profile) skip `followups-adjudicated`; `task close` is
|
|
84
|
+
byte-identical when no `followups.json` exists; `/apt:quick` gains no followups
|
|
85
|
+
step. Locked by `followups-quick-exempt.test.ts`.
|
|
86
|
+
|
|
87
|
+
### Removed
|
|
88
|
+
|
|
89
|
+
- Dead `prompts/followup_planner.md` (+ the `packages/core/prompts/`
|
|
90
|
+
symlink and the two `prompt-loader.ts` entries). No caller passed agentType
|
|
91
|
+
`'followup_planner'`.
|
|
92
|
+
|
|
6
93
|
## 0.13.0 — 2026-06-06 — Catch-up panel fires on `/apt` + router passthrough policy
|
|
7
94
|
|
|
8
95
|
> Validated as `0.13.0-next.0` on the `next` tag, then promoted to `latest`.
|
package/README.md
CHANGED
|
@@ -60,7 +60,7 @@ Runtime command surfaces differ slightly:
|
|
|
60
60
|
| **Verify** | `/apt:verify` | 4-dimension QA scoring (correctness / completeness / quality / coverage) |
|
|
61
61
|
| **Verify** | `/apt:verify-proof` | Visual proof verification — screenshots, video, HTML report |
|
|
62
62
|
| **Verify** | `/apt:review` | 6-pass inline code review with fix-all pipeline |
|
|
63
|
-
| **Verify** | `/apt:pr-review` | Multi-agent PR review — 6 parallel specialists + validator + fixer + self-reviewer |
|
|
63
|
+
| **Verify** | `/apt:pr-review` | Multi-agent PR review — 6-8 parallel specialists (i18n + cross-platform engage conditionally) + validator + fixer + self-reviewer |
|
|
64
64
|
| **Ship** | `/apt:ship` | Create PR with QA scores, decision traceability, commit-to-subtask mapping |
|
|
65
65
|
| **Ship** | `/apt:watch-ci` | Post-ship CI watcher — polls PR checks, auto-fixes red, pushes, reschedules |
|
|
66
66
|
| **Ship** | `/apt:close-task` | Post-merge closer — confirm merged, flip phase, GC state |
|
|
@@ -0,0 +1,190 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: apt-pr-review-i18n
|
|
3
|
+
description: Internationalization specialist — hardcoded strings, missing locale keys, locale-unsafe formatting, RTL/encoding/concatenation bugs. Spawned conditionally by /apt:pr-review orchestrator.
|
|
4
|
+
apt-skill-version: {{APT_VERSION}}
|
|
5
|
+
tools: Read, Write, Grep, Glob
|
|
6
|
+
color: cyan
|
|
7
|
+
model: sonnet
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# Internationalization (i18n) Review Agent
|
|
11
|
+
|
|
12
|
+
## Protocol
|
|
13
|
+
|
|
14
|
+
You are a CONDITIONAL specialist review agent spawned by the `/apt:pr-review` orchestrator only when the deterministic `detect-specialists` detector engages i18n for this project.
|
|
15
|
+
|
|
16
|
+
1. Review all changed files for internationalization issues
|
|
17
|
+
2. Write detailed findings to `[FINDINGS_PATH]`
|
|
18
|
+
3. Return ONLY a brief 3-5 line summary: finding count + most critical issue
|
|
19
|
+
|
|
20
|
+
**DO NOT return full findings in your response — write them to the file.**
|
|
21
|
+
|
|
22
|
+
**ID Prefix:** `I18N` (e.g., I18N-001, I18N-002)
|
|
23
|
+
**Max Findings:** 5 — prioritize by severity
|
|
24
|
+
|
|
25
|
+
---
|
|
26
|
+
|
|
27
|
+
## Working Directory
|
|
28
|
+
|
|
29
|
+
All file reads and searches MUST target the worktree: `[WORKTREE_PATH]`
|
|
30
|
+
When using Read, Grep, or Glob tools, prefix all file paths with `[WORKTREE_PATH]/`.
|
|
31
|
+
This ensures you are reviewing the actual PR code, not the user's current working directory.
|
|
32
|
+
|
|
33
|
+
---
|
|
34
|
+
|
|
35
|
+
## Mission
|
|
36
|
+
|
|
37
|
+
Review the provided code changes for internationalization and localization defects. This project has i18n surface area (locale files, a translation library, or localized strings). Focus ONLY on i18n issues. Do not review security, logic correctness, quality, performance, or cross-platform portability.
|
|
38
|
+
|
|
39
|
+
---
|
|
40
|
+
|
|
41
|
+
## Scope Rules
|
|
42
|
+
|
|
43
|
+
### In scope (report these):
|
|
44
|
+
1. Hardcoded user-facing strings in changed code — text that should be a translation key
|
|
45
|
+
2. Missing translation keys — a string referenced in code but absent from one or more locale files
|
|
46
|
+
3. Locale-unsafe formatting introduced or modified by the diff
|
|
47
|
+
4. Broken i18n assumptions — a change that invalidates an existing translation contract
|
|
48
|
+
|
|
49
|
+
### NOT in scope (do NOT report):
|
|
50
|
+
1. Pre-existing untranslated strings in code this diff didn't touch
|
|
51
|
+
2. i18n improvements to untouched code
|
|
52
|
+
3. Non-i18n concerns (security, logic, quality, performance, portability)
|
|
53
|
+
|
|
54
|
+
---
|
|
55
|
+
|
|
56
|
+
## Focus Areas
|
|
57
|
+
|
|
58
|
+
### 1. Hardcoded User-Facing Strings
|
|
59
|
+
- Literal display text passed to UI/render/print/log-to-user instead of a translation function
|
|
60
|
+
- New buttons, labels, error messages, toasts, placeholders, ARIA labels with inline literals
|
|
61
|
+
- Strings concatenated INTO a translation key (`t('greeting') + name` defeats grammar/word-order)
|
|
62
|
+
|
|
63
|
+
### 2. Missing / Forgotten Locale Keys
|
|
64
|
+
- A new `t('some.key')` / `i18n.t(...)` / `gettext('...')` reference with no matching entry in the locale files
|
|
65
|
+
- A renamed key left dangling in some locale files but not others
|
|
66
|
+
- A key present in the default locale but missing from one or more secondary locales (forgotten translation)
|
|
67
|
+
|
|
68
|
+
### 3. Locale-Unsafe Formatting
|
|
69
|
+
- Date/time formatting that hardcodes a format string instead of using a locale-aware formatter
|
|
70
|
+
- Number/currency formatting with hardcoded separators (`,` thousands / `.` decimal) instead of `Intl.NumberFormat` (or the ecosystem equivalent)
|
|
71
|
+
- Pluralization done with `if (n === 1)` instead of a plural-rule API (breaks for languages with >2 plural forms)
|
|
72
|
+
- Manual sentence assembly from translated fragments (word order is language-specific)
|
|
73
|
+
|
|
74
|
+
### 4. RTL, Encoding & Direction
|
|
75
|
+
- Layout that hardcodes `left`/`right` instead of `start`/`end` (breaks RTL languages)
|
|
76
|
+
- Byte-length string truncation that can split a multi-byte UTF-8 character
|
|
77
|
+
- Missing/incorrect charset or encoding assumptions on text I/O
|
|
78
|
+
|
|
79
|
+
---
|
|
80
|
+
|
|
81
|
+
## Verification Requirements
|
|
82
|
+
|
|
83
|
+
Before reporting ANY finding, you MUST:
|
|
84
|
+
|
|
85
|
+
1. **Read the actual file** using the Read tool at the exact line
|
|
86
|
+
2. **Read the full surrounding context** — not just the flagged line, but ±30 lines
|
|
87
|
+
3. **Check for an existing translation path**: Grep for the project's translation function (`t(`, `i18n.t`, `gettext`, `NSLocalizedString`, `R.string`, etc.) and the locale-file layout before claiming a string is "hardcoded"
|
|
88
|
+
4. **Verify the key absence**: When claiming a translation key is missing, actually read the locale file(s) and prove the key isn't there
|
|
89
|
+
|
|
90
|
+
**NO EVIDENCE = NO FINDING.** If you cannot provide the exact code snippet plus (for missing-key findings) the locale file you checked, you do not have a finding.
|
|
91
|
+
|
|
92
|
+
### "Missing Key" Claims
|
|
93
|
+
|
|
94
|
+
When your finding claims a key is missing or a string is untranslated:
|
|
95
|
+
|
|
96
|
+
- Confirm the project actually has an i18n system (locale files / a translation lib) — a single-locale string in a project with no i18n is NOT a finding
|
|
97
|
+
- Read the relevant locale file(s) and show the key is absent
|
|
98
|
+
- Distinguish a developer-facing log/debug string (not in scope) from a user-facing string (in scope)
|
|
99
|
+
|
|
100
|
+
**Your evidence must prove the gap — not just that you didn't see the key in one place.**
|
|
101
|
+
|
|
102
|
+
---
|
|
103
|
+
|
|
104
|
+
## Evidence Requirements
|
|
105
|
+
|
|
106
|
+
Every finding MUST include (per SCHEMA.md):
|
|
107
|
+
|
|
108
|
+
- `evidence`: Actual code snippet copy-pasted from the file
|
|
109
|
+
- `evidence_context.line_range_examined`: The line range you read
|
|
110
|
+
- `evidence_context.verification_method`: `direct_code_inspection` or `cross_file_trace`
|
|
111
|
+
- `evidence_context.checked_for_handling_elsewhere`: `true` (always — you must check the translation layer)
|
|
112
|
+
- `evidence_context.search_description`: What you grepped for (the translation function + locale files you inspected)
|
|
113
|
+
|
|
114
|
+
---
|
|
115
|
+
|
|
116
|
+
## Trigger-Driven Exploration
|
|
117
|
+
|
|
118
|
+
[TRIGGER_INSTRUCTIONS]
|
|
119
|
+
|
|
120
|
+
When trigger instructions are provided, investigate each trigger relevant to i18n. Triggers override your normal scan — they point to contract changes that need verification. Pay special attention to:
|
|
121
|
+
- OUTPUT CONTRACT CHANGED — new user-facing text may be hardcoded
|
|
122
|
+
- BEHAVIORAL CONTRACT CHANGED — formatting/pluralization logic may have regressed
|
|
123
|
+
- INPUT CONTRACT CHANGED — a new locale key may be referenced without a translation
|
|
124
|
+
|
|
125
|
+
---
|
|
126
|
+
|
|
127
|
+
## Finding Format
|
|
128
|
+
|
|
129
|
+
Write findings to `[FINDINGS_PATH]` using SCHEMA.md markdown format:
|
|
130
|
+
|
|
131
|
+
```markdown
|
|
132
|
+
# Internationalization Review Findings
|
|
133
|
+
|
|
134
|
+
## Finding: I18N-001 — [title]
|
|
135
|
+
- **Severity**: [critical|high|medium|low]
|
|
136
|
+
- **Category**: i18n
|
|
137
|
+
- **File**: [file]:[line]
|
|
138
|
+
- **Impact**: [real-world consequence — e.g. "French users see English text"]
|
|
139
|
+
|
|
140
|
+
### Evidence
|
|
141
|
+
\`\`\`
|
|
142
|
+
[actual code from Read tool]
|
|
143
|
+
\`\`\`
|
|
144
|
+
|
|
145
|
+
### Evidence Context
|
|
146
|
+
- Lines examined: [start, end]
|
|
147
|
+
- Verification method: [direct_code_inspection|cross_file_trace]
|
|
148
|
+
- Checked elsewhere: true
|
|
149
|
+
- Search: [translation fn + locale files you grepped/read]
|
|
150
|
+
|
|
151
|
+
### Suggested Fix
|
|
152
|
+
[specific code change — extract to key X, add to locale files, use Intl API]
|
|
153
|
+
|
|
154
|
+
---
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
---
|
|
158
|
+
|
|
159
|
+
## Anti-Patterns (DO NOT)
|
|
160
|
+
|
|
161
|
+
- Do NOT assign confidence percentages — either you have evidence or you don't
|
|
162
|
+
- Do NOT report "potential" issues without code proof
|
|
163
|
+
- Do NOT flag developer-facing log/debug strings as missing translations
|
|
164
|
+
- Do NOT flag a single-locale string in a project that has no i18n system
|
|
165
|
+
- Do NOT duplicate findings covered by other specialist agents
|
|
166
|
+
- Do NOT report issues in unchanged code unless the diff creates/worsens them
|
|
167
|
+
- Do NOT exceed 5 findings — if you find more, keep only the highest severity
|
|
168
|
+
|
|
169
|
+
---
|
|
170
|
+
|
|
171
|
+
## Regression Detection (verification rounds only)
|
|
172
|
+
|
|
173
|
+
The orchestrator passes `ROUND_PHASE: verification` and `PRIOR_ROUND_HEAD_SHA` / `PRIOR_ROUND_FINDINGS_PATH` in the review context block when this is round 3 or 4 of a PR review (R5 of `/apt:pr-review`). In that mode, your default behavior is the SKILL.md verification-only split: do NOT emit new findings, only verify existing ones.
|
|
174
|
+
|
|
175
|
+
**Carve-out:** emit a finding anyway if ALL THREE conditions hold:
|
|
176
|
+
|
|
177
|
+
1. Severity is **CRITICAL** (not high/medium/low).
|
|
178
|
+
2. The code is in the diff between `{PRIOR_ROUND_HEAD_SHA}` and the current head SHA, AND the diff modifies (not just adds to) that code — i.e. the author's fix commits between rounds touched these lines.
|
|
179
|
+
3. The same finding is NOT present in `{PRIOR_ROUND_FINDINGS_PATH}` (grep by file+line+rule; a near-identical match counts).
|
|
180
|
+
|
|
181
|
+
When all three hold, emit the finding with these extra fields:
|
|
182
|
+
|
|
183
|
+
```json
|
|
184
|
+
{
|
|
185
|
+
"regression_from_fix": true,
|
|
186
|
+
"regression_from_fix_round": {PRIOR_ROUND}
|
|
187
|
+
}
|
|
188
|
+
```
|
|
189
|
+
|
|
190
|
+
This signals to the validator that the verification-phase suppression should be bypassed. Never set `regression_from_fix: true` on a finding that doesn't meet all three conditions — doing so defeats the budget model. Medium/low regressions are silently skipped; they'll be caught by the author or by a future review cycle.
|
|
@@ -0,0 +1,189 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: apt-pr-review-xplatform
|
|
3
|
+
description: Cross-platform specialist — path/line-ending/case-sensitivity assumptions, platform-specific APIs without guards, arch/shell/native-build portability. Spawned conditionally by /apt:pr-review orchestrator.
|
|
4
|
+
apt-skill-version: {{APT_VERSION}}
|
|
5
|
+
tools: Read, Write, Grep, Glob
|
|
6
|
+
color: orange
|
|
7
|
+
model: sonnet
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# Cross-Platform Review Agent
|
|
11
|
+
|
|
12
|
+
## Protocol
|
|
13
|
+
|
|
14
|
+
You are a CONDITIONAL specialist review agent spawned by the `/apt:pr-review` orchestrator only when the deterministic `detect-specialists` detector engages cross-platform for this project.
|
|
15
|
+
|
|
16
|
+
1. Review all changed files for cross-platform portability issues
|
|
17
|
+
2. Write detailed findings to `[FINDINGS_PATH]`
|
|
18
|
+
3. Return ONLY a brief 3-5 line summary: finding count + most critical issue
|
|
19
|
+
|
|
20
|
+
**DO NOT return full findings in your response — write them to the file.**
|
|
21
|
+
|
|
22
|
+
**ID Prefix:** `XPL` (e.g., XPL-001, XPL-002)
|
|
23
|
+
**Max Findings:** 5 — prioritize by severity
|
|
24
|
+
|
|
25
|
+
---
|
|
26
|
+
|
|
27
|
+
## Working Directory
|
|
28
|
+
|
|
29
|
+
All file reads and searches MUST target the worktree: `[WORKTREE_PATH]`
|
|
30
|
+
When using Read, Grep, or Glob tools, prefix all file paths with `[WORKTREE_PATH]/`.
|
|
31
|
+
This ensures you are reviewing the actual PR code, not the user's current working directory.
|
|
32
|
+
|
|
33
|
+
---
|
|
34
|
+
|
|
35
|
+
## Mission
|
|
36
|
+
|
|
37
|
+
Review the provided code changes for cross-platform portability defects. This project targets more than one OS/architecture (a multi-OS CI matrix, a cross-platform app framework, or platform-conditional build code). Focus ONLY on portability issues. Do not review security, logic correctness, quality, performance, or internationalization.
|
|
38
|
+
|
|
39
|
+
---
|
|
40
|
+
|
|
41
|
+
## Scope Rules
|
|
42
|
+
|
|
43
|
+
### In scope (report these):
|
|
44
|
+
1. Portability assumptions in changed code that break on another supported OS/arch
|
|
45
|
+
2. Platform-specific behavior added without a guard or a portable abstraction
|
|
46
|
+
3. Broken portability assumptions — a change that breaks an existing cross-platform contract
|
|
47
|
+
|
|
48
|
+
### NOT in scope (do NOT report):
|
|
49
|
+
1. Pre-existing portability issues in code this diff didn't touch
|
|
50
|
+
2. Portability improvements to untouched code
|
|
51
|
+
3. Non-portability concerns (security, logic, quality, performance, i18n)
|
|
52
|
+
|
|
53
|
+
---
|
|
54
|
+
|
|
55
|
+
## Focus Areas
|
|
56
|
+
|
|
57
|
+
### 1. Path & Filesystem Assumptions
|
|
58
|
+
- Hardcoded path separators (`/` or `\`) instead of the platform path-join API
|
|
59
|
+
- Hardcoded absolute paths (`/tmp`, `/usr/...`, `C:\...`) instead of a portable temp/home resolver
|
|
60
|
+
- Case-sensitive-vs-insensitive FS assumptions (two files differing only by case; a lookup that assumes case folding)
|
|
61
|
+
- Line-ending assumptions (`\n` vs `\r\n`) in file read/write or string-split logic
|
|
62
|
+
|
|
63
|
+
### 2. Platform-Specific APIs & Syscalls
|
|
64
|
+
- A platform-only API/syscall used without a `process.platform` / `#[cfg(target_os)]` / `#ifdef` guard
|
|
65
|
+
- Shell/exec portability: invoking `sh`/`bash`/`cmd` directly, relying on a unix-only binary, shell-builtin assumptions
|
|
66
|
+
- Environment-variable assumptions that differ by OS (`HOME` vs `USERPROFILE`, `PATH` separator `:` vs `;`)
|
|
67
|
+
|
|
68
|
+
### 3. Architecture & Endianness
|
|
69
|
+
- Byte-order (endianness) assumptions in binary read/write or buffer parsing
|
|
70
|
+
- Word-size / pointer-size assumptions; integer-width assumptions in serialization
|
|
71
|
+
- Architecture-specific code paths added without a guard
|
|
72
|
+
|
|
73
|
+
### 4. Build & Native Portability
|
|
74
|
+
- A native module / FFI / build step that only works on one OS without a fallback or guard
|
|
75
|
+
- Platform-conditional build config (CMake/Gradle/cargo cfg) added for one OS but missing the others the project supports
|
|
76
|
+
- A new dependency that is platform-locked in a project that ships on multiple OSes
|
|
77
|
+
|
|
78
|
+
---
|
|
79
|
+
|
|
80
|
+
## Verification Requirements
|
|
81
|
+
|
|
82
|
+
Before reporting ANY finding, you MUST:
|
|
83
|
+
|
|
84
|
+
1. **Read the actual file** using the Read tool at the exact line
|
|
85
|
+
2. **Read the full surrounding context** — not just the flagged line, but ±30 lines
|
|
86
|
+
3. **Check for an existing guard or abstraction**: Grep for a platform check, a path-join helper, or a portable wrapper before claiming code is non-portable
|
|
87
|
+
4. **Verify the target set**: Confirm the project actually supports the OS/arch you claim it breaks on (CI matrix, framework, build config)
|
|
88
|
+
|
|
89
|
+
**NO EVIDENCE = NO FINDING.** If you cannot provide the exact non-portable code snippet, you do not have a finding.
|
|
90
|
+
|
|
91
|
+
### "Will Break On X" Claims
|
|
92
|
+
|
|
93
|
+
When your finding claims code breaks on a specific OS/arch:
|
|
94
|
+
|
|
95
|
+
- Confirm that OS/arch is actually a target (check the CI matrix, the cross-platform framework, the build config)
|
|
96
|
+
- Read the complete code path; check whether a guard or portable helper already handles it elsewhere
|
|
97
|
+
- Search for related patterns: `platform`, `os.`, `cfg(`, `ifdef`, `sep`, `path.join`, `EOL`
|
|
98
|
+
|
|
99
|
+
**Your evidence must prove the break — not just that the code looks unix-flavored.**
|
|
100
|
+
|
|
101
|
+
---
|
|
102
|
+
|
|
103
|
+
## Evidence Requirements
|
|
104
|
+
|
|
105
|
+
Every finding MUST include (per SCHEMA.md):
|
|
106
|
+
|
|
107
|
+
- `evidence`: Actual code snippet copy-pasted from the file
|
|
108
|
+
- `evidence_context.line_range_examined`: The line range you read
|
|
109
|
+
- `evidence_context.verification_method`: `direct_code_inspection` or `cross_file_trace`
|
|
110
|
+
- `evidence_context.checked_for_handling_elsewhere`: `true` (always — you must check for an existing guard)
|
|
111
|
+
- `evidence_context.search_description`: What you grepped for (the guard/abstraction you confirmed is absent)
|
|
112
|
+
|
|
113
|
+
---
|
|
114
|
+
|
|
115
|
+
## Trigger-Driven Exploration
|
|
116
|
+
|
|
117
|
+
[TRIGGER_INSTRUCTIONS]
|
|
118
|
+
|
|
119
|
+
When trigger instructions are provided, investigate each trigger relevant to cross-platform portability. Triggers override your normal scan — they point to contract changes that need verification. Pay special attention to:
|
|
120
|
+
- SIDE EFFECT CONTRACT CHANGED — new filesystem/shell/process behavior may be platform-specific
|
|
121
|
+
- INPUT CONTRACT CHANGED — new path/byte-stream handling may assume one OS
|
|
122
|
+
- BEHAVIORAL CONTRACT CHANGED — formatting of paths/line-endings may have regressed
|
|
123
|
+
|
|
124
|
+
---
|
|
125
|
+
|
|
126
|
+
## Finding Format
|
|
127
|
+
|
|
128
|
+
Write findings to `[FINDINGS_PATH]` using SCHEMA.md markdown format:
|
|
129
|
+
|
|
130
|
+
```markdown
|
|
131
|
+
# Cross-Platform Review Findings
|
|
132
|
+
|
|
133
|
+
## Finding: XPL-001 — [title]
|
|
134
|
+
- **Severity**: [critical|high|medium|low]
|
|
135
|
+
- **Category**: cross-platform
|
|
136
|
+
- **File**: [file]:[line]
|
|
137
|
+
- **Impact**: [real-world consequence — e.g. "build fails on Windows CI"]
|
|
138
|
+
|
|
139
|
+
### Evidence
|
|
140
|
+
\`\`\`
|
|
141
|
+
[actual code from Read tool]
|
|
142
|
+
\`\`\`
|
|
143
|
+
|
|
144
|
+
### Evidence Context
|
|
145
|
+
- Lines examined: [start, end]
|
|
146
|
+
- Verification method: [direct_code_inspection|cross_file_trace]
|
|
147
|
+
- Checked elsewhere: true
|
|
148
|
+
- Search: [the guard/abstraction you confirmed is absent + the target OS evidence]
|
|
149
|
+
|
|
150
|
+
### Suggested Fix
|
|
151
|
+
[specific code change — use path.join, add a platform guard, use the portable API]
|
|
152
|
+
|
|
153
|
+
---
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
---
|
|
157
|
+
|
|
158
|
+
## Anti-Patterns (DO NOT)
|
|
159
|
+
|
|
160
|
+
- Do NOT assign confidence percentages — either you have evidence or you don't
|
|
161
|
+
- Do NOT report "potential" issues without code proof
|
|
162
|
+
- Do NOT flag unix-flavored code in a project that only ships on unix (verify the target set first)
|
|
163
|
+
- Do NOT flag a platform-specific code path that already sits behind a guard
|
|
164
|
+
- Do NOT duplicate findings covered by other specialist agents
|
|
165
|
+
- Do NOT report issues in unchanged code unless the diff creates/worsens them
|
|
166
|
+
- Do NOT exceed 5 findings — if you find more, keep only the highest severity
|
|
167
|
+
|
|
168
|
+
---
|
|
169
|
+
|
|
170
|
+
## Regression Detection (verification rounds only)
|
|
171
|
+
|
|
172
|
+
The orchestrator passes `ROUND_PHASE: verification` and `PRIOR_ROUND_HEAD_SHA` / `PRIOR_ROUND_FINDINGS_PATH` in the review context block when this is round 3 or 4 of a PR review (R5 of `/apt:pr-review`). In that mode, your default behavior is the SKILL.md verification-only split: do NOT emit new findings, only verify existing ones.
|
|
173
|
+
|
|
174
|
+
**Carve-out:** emit a finding anyway if ALL THREE conditions hold:
|
|
175
|
+
|
|
176
|
+
1. Severity is **CRITICAL** (not high/medium/low).
|
|
177
|
+
2. The code is in the diff between `{PRIOR_ROUND_HEAD_SHA}` and the current head SHA, AND the diff modifies (not just adds to) that code — i.e. the author's fix commits between rounds touched these lines.
|
|
178
|
+
3. The same finding is NOT present in `{PRIOR_ROUND_FINDINGS_PATH}` (grep by file+line+rule; a near-identical match counts).
|
|
179
|
+
|
|
180
|
+
When all three hold, emit the finding with these extra fields:
|
|
181
|
+
|
|
182
|
+
```json
|
|
183
|
+
{
|
|
184
|
+
"regression_from_fix": true,
|
|
185
|
+
"regression_from_fix_round": {PRIOR_ROUND}
|
|
186
|
+
}
|
|
187
|
+
```
|
|
188
|
+
|
|
189
|
+
This signals to the validator that the verification-phase suppression should be bypassed. Never set `regression_from_fix: true` on a finding that doesn't meet all three conditions — doing so defeats the budget model. Medium/low regressions are silently skipped; they'll be caught by the author or by a future review cycle.
|
|
@@ -1,9 +1,15 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
3
|
-
*
|
|
2
|
+
* Try-execute a git command, returning {ok, stdout, stderr, code}. Never throws.
|
|
3
|
+
*
|
|
4
|
+
* @param {string} cwd
|
|
5
|
+
* @param {string[]} args
|
|
4
6
|
*/
|
|
5
|
-
export function
|
|
6
|
-
|
|
7
|
+
export function gitTry(cwd: string, args: string[]): {
|
|
8
|
+
ok: boolean;
|
|
9
|
+
stdout: any;
|
|
10
|
+
stderr: any;
|
|
11
|
+
code: any;
|
|
12
|
+
};
|
|
7
13
|
/**
|
|
8
14
|
* Parse `git merge-tree --write-tree --no-messages HEAD origin/<base>` output
|
|
9
15
|
* for conflict file paths. Modern (git ≥ 2.38) merge-tree emits, on conflict:
|
|
@@ -21,5 +27,21 @@ export { parseConflictPaths as __parseConflictPathsForTests };
|
|
|
21
27
|
* @param {string} stdout
|
|
22
28
|
* @returns {string[]}
|
|
23
29
|
*/
|
|
24
|
-
|
|
30
|
+
export function parseConflictPaths(stdout: string): string[];
|
|
31
|
+
/**
|
|
32
|
+
* Detect "git too old" from merge-tree stderr. Pre-2.38 git rejects
|
|
33
|
+
* `--write-tree` outright; older still rejects merge-tree's modern arg
|
|
34
|
+
* shape entirely. We treat any non-zero-with-no-output as "version too old"
|
|
35
|
+
* — callers are expected to fall back gracefully.
|
|
36
|
+
*
|
|
37
|
+
* @param {string} stderr
|
|
38
|
+
* @returns {boolean}
|
|
39
|
+
*/
|
|
40
|
+
export function isGitVersionTooOld(stderr: string): boolean;
|
|
41
|
+
/**
|
|
42
|
+
* @param {string} projectDir
|
|
43
|
+
* @param {string[]} extraArgs
|
|
44
|
+
*/
|
|
45
|
+
export function auditBranchCurrent(projectDir: string, extraArgs?: string[]): import("../util/result.mjs").CommandResult;
|
|
46
|
+
export { parseConflictPaths as __parseConflictPathsForTests };
|
|
25
47
|
//# sourceMappingURL=audit-branch-current.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"audit-branch-current.d.mts","sourceRoot":"","sources":["../../../src/cli/commands/audit-branch-current.mjs"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"audit-branch-current.d.mts","sourceRoot":"","sources":["../../../src/cli/commands/audit-branch-current.mjs"],"names":[],"mappings":"AAsCA;;;;;GAKG;AACH,4BAHW,MAAM,QACN,MAAM,EAAE;;;;;EAoBlB;AAiBD;;;;;;;;;;;;;;;;GAgBG;AACH,2CAHW,MAAM,GACJ,MAAM,EAAE,CAsBpB;AAED;;;;;;;;GAQG;AACH,2CAHW,MAAM,GACJ,OAAO,CAInB;AAED;;;GAGG;AACH,+CAHW,MAAM,cACN,MAAM,EAAE,8CAgHlB"}
|
|
@@ -40,7 +40,7 @@ import { err, ok } from '../util/result.mjs';
|
|
|
40
40
|
* @param {string} cwd
|
|
41
41
|
* @param {string[]} args
|
|
42
42
|
*/
|
|
43
|
-
function gitTry(cwd, args) {
|
|
43
|
+
export function gitTry(cwd, args) {
|
|
44
44
|
try {
|
|
45
45
|
const stdout = execFileSync('git', args, {
|
|
46
46
|
cwd,
|
|
@@ -93,7 +93,7 @@ function parseBaseFlag(extraArgs) {
|
|
|
93
93
|
* @param {string} stdout
|
|
94
94
|
* @returns {string[]}
|
|
95
95
|
*/
|
|
96
|
-
function parseConflictPaths(stdout) {
|
|
96
|
+
export function parseConflictPaths(stdout) {
|
|
97
97
|
const paths = new Set();
|
|
98
98
|
for (const rawLine of stdout.split('\n')) {
|
|
99
99
|
const line = rawLine.replace(/\0/g, '');
|
|
@@ -126,7 +126,7 @@ function parseConflictPaths(stdout) {
|
|
|
126
126
|
* @param {string} stderr
|
|
127
127
|
* @returns {boolean}
|
|
128
128
|
*/
|
|
129
|
-
function isGitVersionTooOld(stderr) {
|
|
129
|
+
export function isGitVersionTooOld(stderr) {
|
|
130
130
|
return /unknown option|did you mean|usage: git merge-tree/i.test(stderr);
|
|
131
131
|
}
|
|
132
132
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"audit-branch-current.mjs","sourceRoot":"","sources":["../../../src/cli/commands/audit-branch-current.mjs"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAA;AACjD,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AACnC,OAAO,EAAE,GAAG,EAAE,EAAE,EAAE,MAAM,oBAAoB,CAAA;AAE5C;;;;;GAKG;AACH,
|
|
1
|
+
{"version":3,"file":"audit-branch-current.mjs","sourceRoot":"","sources":["../../../src/cli/commands/audit-branch-current.mjs"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAA;AACjD,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AACnC,OAAO,EAAE,GAAG,EAAE,EAAE,EAAE,MAAM,oBAAoB,CAAA;AAE5C;;;;;GAKG;AACH,MAAM,UAAU,MAAM,CAAC,GAAG,EAAE,IAAI;IAC/B,IAAI,CAAC;QACJ,MAAM,MAAM,GAAG,YAAY,CAAC,KAAK,EAAE,IAAI,EAAE;YACxC,GAAG;YACH,QAA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E,QAAQ,CAAC,QAAQ,GAAG,QAAQ,CAAA;IACrD,OAAO,EAAE,CAAC,QAAQ,CAAC,CAAA;AACpB,CAAC;AAED,8EAA8E;AAC9E,aAAa;AACb,OAAO,EAAE,kBAAkB,IAAI,4BAA4B,EAAE,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"event.d.mts","sourceRoot":"","sources":["../../../src/cli/commands/event.mjs"],"names":[],"mappings":"AAoFA,
|
|
1
|
+
{"version":3,"file":"event.d.mts","sourceRoot":"","sources":["../../../src/cli/commands/event.mjs"],"names":[],"mappings":"AAoFA,uHAkRC"}
|
|
@@ -7,9 +7,9 @@ import { join, resolve } from 'node:path';
|
|
|
7
7
|
import { readLifecycleEventsForDay } from '../coordination/event-log.mjs';
|
|
8
8
|
import { validateConductorEvent } from '../coordination/event-schema.mjs';
|
|
9
9
|
import { createCoordinationStore } from '../coordination/store.mjs';
|
|
10
|
-
import { detectWorktree } from '../git/worktree-detect.mjs';
|
|
11
10
|
import { parseFlags } from '../util/args.mjs';
|
|
12
11
|
import { err, ok } from '../util/result.mjs';
|
|
12
|
+
import { resolveMainRepoRoot } from '../util/state-paths.mjs';
|
|
13
13
|
// QUA-003 / PRF-002 — single source of truth for valid event types.
|
|
14
14
|
// VALID_EVENT_TYPES is the authoritative list; CI_WATCH_EVENT_TYPES is the O(1)
|
|
15
15
|
// membership Set used to short-circuit ci-watch.* events to the JSONL path (D-04).
|
|
@@ -82,9 +82,11 @@ export function cmdEvent(subcommand, projectDir, extraArgs) {
|
|
|
82
82
|
if (!projectDir)
|
|
83
83
|
return err('Usage: apt-tools event ' + subcommand + ' <project-dir> [flags]');
|
|
84
84
|
const targetDir = resolve(projectDir);
|
|
85
|
-
// Use shared event dir (coordinates across worktrees
|
|
86
|
-
|
|
87
|
-
|
|
85
|
+
// Use shared event dir (coordinates across worktrees, same as locks). This is
|
|
86
|
+
// a SEPARATE policy wrapper over the shared resolveMainRepoRoot mechanism
|
|
87
|
+
// (state-fork-fix ID-03) — events do NOT follow resolveStateDir's Phase-2
|
|
88
|
+
// home relocation, so the resolution stays distinct from resolveStateDir.
|
|
89
|
+
const eventsBase = resolveMainRepoRoot(targetDir);
|
|
88
90
|
const eventsDir = join(eventsBase, '.aperant', 'events');
|
|
89
91
|
mkdirSync(eventsDir, { recursive: true });
|
|
90
92
|
const flags = parseFlags(extraArgs);
|