shapeup-sdlc 1.6.3 → 3.0.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/.claude/settings.local.example.json +5 -5
- package/.claude-plugin/plugin.json +1 -1
- package/AGENTS.md +54 -107
- package/README.md +165 -151
- package/SECURITY.md +49 -27
- package/bin/init.mjs +93 -108
- package/bin/lib/grant.mjs +145 -0
- package/commands/build.md +20 -0
- package/commands/eval.md +5 -4
- package/commands/scopes.md +5 -4
- package/commands/shape.md +1 -1
- package/commands/ship.md +53 -7
- package/commands/wire.md +1 -1
- package/hooks/dispatch-receipt.mjs +195 -0
- package/hooks/gate-intake.mjs +16 -17
- package/hooks/gate-zerowork.mjs +107 -25
- package/hooks/hooks.json +9 -48
- package/hooks/lib/decision.mjs +38 -19
- package/hooks/safety-spine.mjs +4 -4
- package/hooks/sandbox-guard.mjs +130 -50
- package/{skills/tech-lead/scripts/compile-order.mjs → kernel/compile.mjs} +344 -55
- package/{skills/tech-lead/scripts/gate-answers.mjs → kernel/gate.mjs} +69 -26
- package/kernel/harness.mjs +134 -0
- package/{skills/tech-lead/scripts/fit-check.mjs → kernel/init/fit.mjs} +25 -22
- package/kernel/init/run.mjs +489 -0
- package/{skills/tech-lead/scripts → kernel}/lib/argv.mjs +52 -31
- package/{skills/tech-lead/scripts/lib/contract-md.mjs → kernel/lib/contract.mjs} +261 -17
- package/kernel/lib/paths.mjs +491 -0
- package/kernel/probe/concurrency.mjs +510 -0
- package/{skills/tech-lead/scripts/aegis-digest.mjs → kernel/probe/digest.mjs} +10 -11
- package/kernel/probe/eval.mjs +77 -0
- package/kernel/probe/leg.mjs +125 -0
- package/kernel/probe/resume.mjs +528 -0
- package/{skills/tech-lead/scripts → kernel/probe}/stats.mjs +102 -21
- package/kernel/probe/t0.mjs +66 -0
- package/{skills/ba-pitch-analyzer/scripts/board-derive.mjs → kernel/reduce/board.mjs} +104 -28
- package/kernel/reduce/graph.mjs +437 -0
- package/kernel/reduce/hill.mjs +152 -0
- package/kernel/reduce/ingest.mjs +633 -0
- package/{hooks/slop-cleaner.mjs → kernel/reduce/leftovers.mjs} +40 -57
- package/{skills/tech-lead/scripts/ship-report.mjs → kernel/reduce/ship.mjs} +93 -14
- package/{skills/tech-lead/scripts/run-snapshot.mjs → kernel/reduce/snapshot.mjs} +22 -21
- package/{skills/spec-evaluator/scripts/verdict-ledger.mjs → kernel/reduce/verdict.mjs} +14 -8
- package/kernel/report/export.mjs +325 -0
- package/kernel/report/facts.mjs +347 -0
- package/{skills/tech-lead/scripts/budget-check.mjs → kernel/verify/budget.mjs} +22 -25
- package/kernel/verify/dispatch.mjs +114 -0
- package/{skills/tech-lead/scripts/validate-envelope.mjs → kernel/verify/envelope.mjs} +20 -15
- package/{skills/tech-lead/scripts/lib → kernel/verify}/ratchet-tree.mjs +36 -14
- package/kernel/verify/skills.mjs +125 -0
- package/kernel/verify/spec.mjs +559 -0
- package/{skills/tech-lead/scripts/t0-verify.mjs → kernel/verify/t0.mjs} +138 -28
- package/{skills/tech-lead/scripts/trace-lint.mjs → kernel/verify/trace.mjs} +28 -13
- package/oracles/_shared.mjs +1 -1
- package/oracles/http-oracle.mjs +2 -2
- package/oracles/index.mjs +1 -1
- package/oracles/process-oracle.mjs +2 -2
- package/oracles/snapshot-oracle.mjs +2 -2
- package/oracles/test-oracle.mjs +2 -2
- package/package.json +11 -13
- package/skills/ba-pitch-analyzer/SKILL.md +24 -19
- package/skills/ba-pitch-analyzer/assets/templates/_index.tmpl.md +1 -1
- package/skills/ba-pitch-analyzer/assets/templates/api-feasibility.tmpl.md +12 -7
- package/skills/ba-pitch-analyzer/assets/templates/contracts/third-party-api.contract.tmpl.md +6 -3
- package/skills/ba-pitch-analyzer/assets/templates/cross-context/migration-plan.tmpl.md +5 -4
- package/skills/ba-pitch-analyzer/assets/templates/cross-context/team-handoff.tmpl.md +23 -13
- package/skills/ba-pitch-analyzer/assets/templates/scope-summary.tmpl.md +17 -12
- package/skills/ba-pitch-analyzer/assets/templates/synthesis.tmpl.md +17 -38
- package/skills/ba-pitch-analyzer/assets/templates/task.tmpl.md +3 -0
- package/skills/ba-pitch-analyzer/references/contract-patterns.md +8 -4
- package/skills/ba-pitch-analyzer/references/doc-schemas.md +3 -1
- package/skills/ba-pitch-analyzer/references/task-generation.md +8 -8
- package/skills/ba-pitch-analyzer/references/test-surface.md +1 -1
- package/skills/coach/SKILL.md +3 -3
- package/skills/orient/SKILL.md +2 -1
- package/skills/qa-edge-hunter/SKILL.md +15 -41
- package/skills/scope-architect/SKILL.md +57 -18
- package/skills/scope-hammer/SKILL.md +5 -5
- package/skills/shapeup/SKILL.md +3 -3
- package/skills/shapeup/resources/context-compaction.md +4 -3
- package/skills/solution-architect/SKILL.md +37 -15
- package/skills/spec-evaluator/SKILL.md +24 -7
- package/skills/spec-evaluator/references/dimensions/_registry.md +2 -2
- package/skills/spec-evaluator/references/dimensions/completeness.md +1 -1
- package/skills/spec-evaluator/references/dimensions/integration.md +98 -67
- package/skills/spec-evaluator/references/dimensions/spec-conformance.md +4 -4
- package/skills/spec-evaluator/references/dimensions/test-surface-conformance.md +1 -1
- package/skills/spec-evaluator/references/probing.md +42 -23
- package/skills/spec-evaluator/references/report-schema.md +2 -2
- package/skills/task-executor/SKILL.md +32 -18
- package/skills/tech-lead/SKILL.md +127 -438
- package/skills/tech-lead/references/gates.md +140 -49
- package/skills/tech-lead/references/protocol.md +832 -0
- package/skills/tech-lead/schemas/domain.schema.json +645 -198
- package/skills/tech-lead/schemas/gate-answers.schema.json +2 -2
- package/skills/tech-lead/schemas/work-order.schema.json +11 -2
- package/skills/tech-lead/schemas/work-result.schema.json +56 -18
- package/skills/tech-lead/workflows/shapeup-run.js +1474 -0
- package/skills/translator/SKILL.md +2 -2
- package/hooks/anti-rationalization.mjs +0 -244
- package/hooks/compact-snapshot.mjs +0 -47
- package/hooks/gate-deadline.mjs +0 -151
- package/hooks/gate-l2.mjs +0 -161
- package/hooks/session-rehydrate.mjs +0 -109
- package/skills/advisor-protocol/SKILL.md +0 -171
- package/skills/ba-pitch-analyzer/scripts/spec-lint.mjs +0 -239
- package/skills/spec-evaluator/README.md +0 -93
- package/skills/tech-lead/README.md +0 -71
- package/skills/tech-lead/references/delegation.md +0 -254
- package/skills/tech-lead/references/invocation.md +0 -45
- package/skills/tech-lead/references/ledger-schema.md +0 -214
- package/skills/tech-lead/references/round-protocol.md +0 -184
- package/skills/tech-lead/references/state-model.md +0 -66
- package/skills/tech-lead/scripts/ingest-result.mjs +0 -270
- package/skills/tech-lead/scripts/init-run.mjs +0 -326
- package/skills/tech-lead/scripts/lib/is-main.mjs +0 -82
- package/skills/tech-lead/scripts/lib/paths.mjs +0 -278
- package/skills/translator/README.md +0 -66
|
@@ -1,278 +0,0 @@
|
|
|
1
|
-
// paths — the single source of truth for where the harness writes.
|
|
2
|
-
//
|
|
3
|
-
// WHY THIS FILE EXISTS (measured by grepping the shipped tree, not theorized).
|
|
4
|
-
//
|
|
5
|
-
// The two storage roots were hard-coded in ~90 files, in TWO syntaxes that no single search finds:
|
|
6
|
-
//
|
|
7
|
-
// "docs/shapeup-sdlc/<slug>/scopes/..." 568 string literals
|
|
8
|
-
// join(cwd, "docs", "shapeup-sdlc", slug, ...) 48 segment-built sites
|
|
9
|
-
//
|
|
10
|
-
// A find/replace over the first set leaves the second silently pointing at the old root. That is
|
|
11
|
-
// the failure mode this project keeps rediscovering: a change that appears complete, produces no
|
|
12
|
-
// error, and is wrong — `lib/is-main.mjs` (a guard duplicated 18 times, inert under a symlink) and
|
|
13
|
-
// `lib/argv.mjs` (`rNaN-a1.json` written with exit 0) are the same defect at different layers. The
|
|
14
|
-
// remedy each time is to give the duplicated thing one home and add a test that no one may bypass
|
|
15
|
-
// it (`tests/structural/45-paths.mjs`, mirroring #11a).
|
|
16
|
-
//
|
|
17
|
-
// It also removes a live ambiguity. `gate-answers.mjs` resolved three candidate paths and
|
|
18
|
-
// `sandbox-guard.mjs` built a fourth independently; the same filename meant "my personal lane" at
|
|
19
|
-
// one path and "team policy" at another, auto-discovered with no flag (ADR-0001 §Context).
|
|
20
|
-
//
|
|
21
|
-
// TIER DISCIPLINE, restated here because this is where it becomes mechanical:
|
|
22
|
-
// SHARED (committed) — prose a teammate reads: shaping, spec, contracts, requirements, report.
|
|
23
|
-
// LOCAL (gitignored) — run state, envelopes, verification artifacts, machine policy.
|
|
24
|
-
// See docs/design/adr/0001-consumer-file-organization.md.
|
|
25
|
-
//
|
|
26
|
-
// Zero dependencies. Pure — every function takes `cwd` and returns a path; nothing here touches
|
|
27
|
-
// the filesystem, so importing this module can never have a side effect.
|
|
28
|
-
|
|
29
|
-
import { join } from "node:path";
|
|
30
|
-
|
|
31
|
-
// ---------------------------------------------------------------------------
|
|
32
|
-
// The two roots. Renaming a root is these two lines plus migration 0006.
|
|
33
|
-
// ---------------------------------------------------------------------------
|
|
34
|
-
|
|
35
|
-
// Both roots are POSIX strings, deliberately. They are used two ways — fed to `join()` (which
|
|
36
|
-
// normalises separators on Windows) and interpolated into SUBSTRATE GLOBS, which are matched
|
|
37
|
-
// against repo-relative POSIX paths by `sandbox-guard`. A backslash reaching a glob would silently
|
|
38
|
-
// stop matching, so the canonical form is the one the globs need.
|
|
39
|
-
|
|
40
|
-
/**
|
|
41
|
-
* Committed tier — the authored deliverable a teammate gets on `git pull`.
|
|
42
|
-
*
|
|
43
|
-
* Was `docs/shapeup-sdlc`. Moved out of `docs/` because many projects publish that directory
|
|
44
|
-
* through a static-site generator, which either publishes the spec tree by accident or fails the
|
|
45
|
-
* site build on it (ADR-0001).
|
|
46
|
-
*/
|
|
47
|
-
export const SHARED = "shapeup";
|
|
48
|
-
|
|
49
|
-
/** Gitignored tier — run state for the machine that invoked the harness. Was `.shapeup-sdlc`. */
|
|
50
|
-
export const LOCAL = ".shapeup";
|
|
51
|
-
|
|
52
|
-
/**
|
|
53
|
-
* The pre-ADR-0001 roots. Migration `0006` moves a project from these to the pair above;
|
|
54
|
-
* `bin/init.mjs` writes ignore rules covering both so a half-migrated checkout cannot commit a
|
|
55
|
-
* run trace. Nothing else should read these.
|
|
56
|
-
*/
|
|
57
|
-
export const LEGACY = { shared: "docs/shapeup-sdlc", local: ".shapeup-sdlc" };
|
|
58
|
-
|
|
59
|
-
// ---------------------------------------------------------------------------
|
|
60
|
-
// Roots
|
|
61
|
-
// ---------------------------------------------------------------------------
|
|
62
|
-
|
|
63
|
-
/**
|
|
64
|
-
* The committed tier root.
|
|
65
|
-
* @param {string} cwd - Project root.
|
|
66
|
-
* @returns {string} `<cwd>/shapeup`.
|
|
67
|
-
*/
|
|
68
|
-
export const sharedDir = (cwd) => join(cwd, SHARED);
|
|
69
|
-
|
|
70
|
-
/**
|
|
71
|
-
* The gitignored tier root.
|
|
72
|
-
* @param {string} cwd - Project root.
|
|
73
|
-
* @returns {string} `<cwd>/.shapeup`.
|
|
74
|
-
*/
|
|
75
|
-
export const localDir = (cwd) => join(cwd, LOCAL);
|
|
76
|
-
|
|
77
|
-
/**
|
|
78
|
-
* A feature's committed root.
|
|
79
|
-
* @param {string} cwd - Project root.
|
|
80
|
-
* @param {string} slug - Feature slug.
|
|
81
|
-
* @returns {string} `<cwd>/shapeup/<slug>`.
|
|
82
|
-
*/
|
|
83
|
-
export const sharedRoot = (cwd, slug) => join(cwd, SHARED, slug);
|
|
84
|
-
|
|
85
|
-
/**
|
|
86
|
-
* A feature's run-trace root.
|
|
87
|
-
* @param {string} cwd - Project root.
|
|
88
|
-
* @param {string} slug - Feature slug.
|
|
89
|
-
* @returns {string} `<cwd>/.shapeup/<slug>`.
|
|
90
|
-
*/
|
|
91
|
-
export const localRoot = (cwd, slug) => join(cwd, LOCAL, slug);
|
|
92
|
-
|
|
93
|
-
// ---------------------------------------------------------------------------
|
|
94
|
-
// SHARED — the deliverable
|
|
95
|
-
// ---------------------------------------------------------------------------
|
|
96
|
-
|
|
97
|
-
/** The committed spec tree — the evaluator's grading truth. */
|
|
98
|
-
export const specDir = (cwd, slug) => join(sharedRoot(cwd, slug), "spec");
|
|
99
|
-
/** Use-case directory inside the spec tree. */
|
|
100
|
-
export const usecasesDir = (cwd, slug) => join(specDir(cwd, slug), "usecases");
|
|
101
|
-
/** Shaping artifacts — pitch, framing, breadboard, baseline, glossary. */
|
|
102
|
-
export const shapingDir = (cwd, slug) => join(sharedRoot(cwd, slug), "shaping");
|
|
103
|
-
// The three contracts are markdown on disk and JSON on the wire (ADR-0001) — see
|
|
104
|
-
// `lib/contract-md.mjs`. `readContract()` accepts either extension, so a project mid-migration
|
|
105
|
-
// keeps working; these builders name the form the harness WRITES.
|
|
106
|
-
|
|
107
|
-
/** Scope contracts, one markdown file per vertical slice. */
|
|
108
|
-
export const scopesDir = (cwd, slug) => join(sharedRoot(cwd, slug), "scopes");
|
|
109
|
-
/** One scope contract by id. */
|
|
110
|
-
export const scopeContract = (cwd, slug, id) => join(scopesDir(cwd, slug), `${id}.md`);
|
|
111
|
-
/** The wiring map — engine → seam → entry-point call site → affordance. */
|
|
112
|
-
export const wiringMap = (cwd, slug) => join(sharedRoot(cwd, slug), "wiring-map.md");
|
|
113
|
-
/** Archetype + entry_point; gates the reachability arm of trace-lint. */
|
|
114
|
-
export const projectProfile = (cwd, slug) => join(sharedRoot(cwd, slug), "project-profile.md");
|
|
115
|
-
/** The REQ clause registry that covers-closure checks against. */
|
|
116
|
-
export const requirements = (cwd, slug) => join(sharedRoot(cwd, slug), "requirements.md");
|
|
117
|
-
/** Hill shards — mechanical phase per scope. */
|
|
118
|
-
export const hillDir = (cwd, slug) => join(sharedRoot(cwd, slug), "hill");
|
|
119
|
-
/** The frozen ship report, written once at GATE L4. */
|
|
120
|
-
export const report = (cwd, slug) => join(sharedRoot(cwd, slug), "REPORT.md");
|
|
121
|
-
/** Team-shared coaching rules, read back by the three coachable workers. */
|
|
122
|
-
export const knowledgeBaseDir = (cwd) => join(sharedDir(cwd), "knowledge-base");
|
|
123
|
-
/** One worker's coaching file. */
|
|
124
|
-
export const knowledgeBase = (cwd, skill) => join(knowledgeBaseDir(cwd), `${skill}.md`);
|
|
125
|
-
/** Migration bookkeeping — committed by necessity (ADR-0001 exception 3). */
|
|
126
|
-
export const harnessVersion = (cwd) => join(sharedDir(cwd), ".harness-version");
|
|
127
|
-
/** Applied-migration record — committed by necessity (ADR-0001 exception 3). */
|
|
128
|
-
export const harnessMigrations = (cwd) => join(sharedDir(cwd), ".harness-migrations");
|
|
129
|
-
|
|
130
|
-
// ---------------------------------------------------------------------------
|
|
131
|
-
// LOCAL — run state
|
|
132
|
-
// ---------------------------------------------------------------------------
|
|
133
|
-
|
|
134
|
-
/** The run receipt — the mechanical fact that a run started (GATE L0.1). */
|
|
135
|
-
export const receipt = (cwd, slug) => join(localRoot(cwd, slug), "receipt.json");
|
|
136
|
-
/** The intake, verbatim, next to its digest in the receipt. */
|
|
137
|
-
export const intake = (cwd, slug) => join(localRoot(cwd, slug), "intake.md");
|
|
138
|
-
/** The run ledger — rounds, decisions, status frontmatter. */
|
|
139
|
-
export const harnessRun = (cwd, slug) => join(localRoot(cwd, slug), "harness-run.md");
|
|
140
|
-
/** File-derived mid-run digest, frozen before compaction. */
|
|
141
|
-
export const runSnapshot = (cwd, slug) => join(localRoot(cwd, slug), "run-snapshot.json");
|
|
142
|
-
/** The task board directory. */
|
|
143
|
-
export const tasksDir = (cwd, slug) => join(localRoot(cwd, slug), "tasks");
|
|
144
|
-
/** The board index. */
|
|
145
|
-
export const boardIndex = (cwd, slug) => join(tasksDir(cwd, slug), "_index.md");
|
|
146
|
-
/** Compiled WorkOrders. */
|
|
147
|
-
export const ordersDir = (cwd, slug) => join(localRoot(cwd, slug), "orders");
|
|
148
|
-
/** Returned WorkResults. */
|
|
149
|
-
export const resultsDir = (cwd, slug) => join(localRoot(cwd, slug), "results");
|
|
150
|
-
/** T0 verification artifacts. */
|
|
151
|
-
export const t0Dir = (cwd, slug) => join(localRoot(cwd, slug), "t0");
|
|
152
|
-
/** Immutable per-attempt verdict artifacts the evaluator must cite. */
|
|
153
|
-
export const verdictsDir = (cwd, slug) => join(t0Dir(cwd, slug), "verdicts");
|
|
154
|
-
/** The append-only trial ledger the ratchet reduces over. */
|
|
155
|
-
export const trials = (cwd, slug) => join(t0Dir(cwd, slug), "trials.jsonl");
|
|
156
|
-
/** Finished-scope fixture registry for the seesaw regression check. */
|
|
157
|
-
export const seesawRegistry = (cwd, slug) => join(localRoot(cwd, slug), "seesaw", "registry.json");
|
|
158
|
-
/** Evaluator output — report, evidence, verdict ledger. */
|
|
159
|
-
export const evaluationDir = (cwd, slug) => join(localRoot(cwd, slug), "evaluation");
|
|
160
|
-
/** QA hunt output. */
|
|
161
|
-
export const qaDir = (cwd, slug) => join(localRoot(cwd, slug), "qa");
|
|
162
|
-
/** Scout recon — code-surface map, spikes, discovered seed. */
|
|
163
|
-
export const orientDir = (cwd, slug) => join(localRoot(cwd, slug), "orient");
|
|
164
|
-
/** Time-boxed spike workspace. */
|
|
165
|
-
export const spikesDir = (cwd, slug) => join(localRoot(cwd, slug), "spikes");
|
|
166
|
-
/** Covers-closure + reachability run trace. */
|
|
167
|
-
export const traceDir = (cwd, slug) => join(localRoot(cwd, slug), "trace");
|
|
168
|
-
/** The discovered-task ledger every discovery flow appends to. */
|
|
169
|
-
export const discoveryLedger = (cwd, slug) => join(localRoot(cwd, slug), "discovery", "ledger.md");
|
|
170
|
-
/** Queued worker escalations awaiting adjudication. */
|
|
171
|
-
export const escalatesDir = (cwd, slug) => join(localRoot(cwd, slug), "escalates");
|
|
172
|
-
/**
|
|
173
|
-
* Adjudicated decisions, read back by `compile-order` as binding precedent.
|
|
174
|
-
*
|
|
175
|
-
* LOCAL since ADR-0001. It was committed, and it is appended to DURING a build round — so a run
|
|
176
|
-
* left the working tree dirty in the deliverable tier while it was still building. Its
|
|
177
|
-
* conclusions reach the team in `REPORT.md` at GATE L4 instead, frozen once.
|
|
178
|
-
*/
|
|
179
|
-
export const roundLedger = (cwd, slug) => join(localRoot(cwd, slug), "round-ledger.md");
|
|
180
|
-
|
|
181
|
-
/**
|
|
182
|
-
* Spec WORKING NOTES — analysis that informed the contract but is not the contract.
|
|
183
|
-
*
|
|
184
|
-
* `synthesis.md`, `assess-report.md`, `feedback.md`, `api-feasibility.md`, `integration.md`. The
|
|
185
|
-
* committed `spec/` keeps only what the evaluator grades against and a reviewer needs (ADR-0001
|
|
186
|
-
* "contract vs working artifact").
|
|
187
|
-
*/
|
|
188
|
-
export const workingDir = (cwd, slug) => join(localRoot(cwd, slug), "working");
|
|
189
|
-
|
|
190
|
-
// --- checkout-wide ---------------------------------------------------------
|
|
191
|
-
|
|
192
|
-
/** The pointer the sandbox guard reads to answer "which scope is checked out?". */
|
|
193
|
-
export const activeScope = (cwd) => join(localDir(cwd), "active-scope");
|
|
194
|
-
/** Hook receipts — one row per evaluation, so `allow` carries evidence. */
|
|
195
|
-
export const decisions = (cwd) => join(localDir(cwd), "decisions.jsonl");
|
|
196
|
-
/** Human-authored safety escape hatch. LOCAL so no PR can widen another machine's envelope. */
|
|
197
|
-
export const safetyOverrides = (cwd) => join(localDir(cwd), "safety-overrides.json");
|
|
198
|
-
/**
|
|
199
|
-
* Telemetry shards.
|
|
200
|
-
*
|
|
201
|
-
* LOCAL since ADR-0001. Committed, they put `process.env.HOSTNAME` — a person's laptop name —
|
|
202
|
-
* into the repository, and append-only JSONL in git only grows. The cost, stated plainly: with
|
|
203
|
-
* these local, `stats.mjs` becomes a personal tool and "is the KB flywheel working across the
|
|
204
|
-
* team?" is no longer answerable from the repo.
|
|
205
|
-
*/
|
|
206
|
-
export const metricsDir = (cwd) => join(localDir(cwd), "metrics");
|
|
207
|
-
/** This machine's telemetry shard. */
|
|
208
|
-
export const metricsShard = (cwd, id = process.env.HOSTNAME || "local") =>
|
|
209
|
-
join(metricsDir(cwd), `${id}.jsonl`);
|
|
210
|
-
/** Archived pitches. */
|
|
211
|
-
export const pitchArchiveDir = (cwd) => join(localDir(cwd), "pitch-archive");
|
|
212
|
-
|
|
213
|
-
/**
|
|
214
|
-
* Gate answer sets, in resolution order (first hit wins).
|
|
215
|
-
*
|
|
216
|
-
* ONE TIER ONLY, since ADR-0001. There used to be a third candidate — a COMMITTED
|
|
217
|
-
* `gate-answers.json`, auto-discovered with no flag — so a file with `preset: ci` pre-approved
|
|
218
|
-
* GATE L4 ship sign-off for everyone who pulled the repo, and the same filename meant "my
|
|
219
|
-
* personal lane" at one path and "team policy" at another. Consent is now per-machine by
|
|
220
|
-
* construction: no committed file can cross a gate on another person's behalf.
|
|
221
|
-
*
|
|
222
|
-
* @param {string} cwd - Project root.
|
|
223
|
-
* @param {(string|null)} [slug] - Feature slug; adds the per-run candidate when given.
|
|
224
|
-
* @returns {string[]} Candidate paths, most specific first.
|
|
225
|
-
*/
|
|
226
|
-
export const gateAnswerCandidates = (cwd, slug = null) => [
|
|
227
|
-
...(slug ? [join(localRoot(cwd, slug), "gate-answers.json")] : []),
|
|
228
|
-
join(localDir(cwd), "gate-answers.json"),
|
|
229
|
-
];
|
|
230
|
-
|
|
231
|
-
// ---------------------------------------------------------------------------
|
|
232
|
-
// Relative forms — for messages, receipts and anything a human reads
|
|
233
|
-
// ---------------------------------------------------------------------------
|
|
234
|
-
|
|
235
|
-
/**
|
|
236
|
-
* A run-trace path relative to the project root, for display.
|
|
237
|
-
* @param {string} slug - Feature slug.
|
|
238
|
-
* @param {...string} parts - Path segments under the feature's local root.
|
|
239
|
-
* @returns {string} e.g. `.shapeup/checkout/t0/verdicts`.
|
|
240
|
-
*/
|
|
241
|
-
export const relLocal = (slug, ...parts) => join(LOCAL, slug, ...parts);
|
|
242
|
-
|
|
243
|
-
/**
|
|
244
|
-
* A deliverable path relative to the project root, for display.
|
|
245
|
-
* @param {string} slug - Feature slug.
|
|
246
|
-
* @param {...string} parts - Path segments under the feature's shared root.
|
|
247
|
-
* @returns {string} e.g. `shapeup/checkout/spec`.
|
|
248
|
-
*/
|
|
249
|
-
export const relShared = (slug, ...parts) => join(SHARED, slug, ...parts);
|
|
250
|
-
|
|
251
|
-
// ---------------------------------------------------------------------------
|
|
252
|
-
// Glob forms — substrate whitelists, matched against repo-relative POSIX paths
|
|
253
|
-
// ---------------------------------------------------------------------------
|
|
254
|
-
|
|
255
|
-
/**
|
|
256
|
-
* A run-trace glob. Always POSIX-separated: `sandbox-guard` matches these against
|
|
257
|
-
* `path.relative()` output normalised to forward slashes, so a `join()` here would stop matching
|
|
258
|
-
* on Windows without any error to notice.
|
|
259
|
-
* @param {string} slug - Feature slug.
|
|
260
|
-
* @param {...string} parts - Glob segments under the feature's local root.
|
|
261
|
-
* @returns {string} e.g. `.shapeup-sdlc/checkout/tasks/**`.
|
|
262
|
-
*/
|
|
263
|
-
export const globLocal = (slug, ...parts) => [LOCAL, slug, ...parts].join("/");
|
|
264
|
-
|
|
265
|
-
/**
|
|
266
|
-
* A deliverable glob, POSIX-separated for the same reason as {@link globLocal}.
|
|
267
|
-
* @param {string} slug - Feature slug.
|
|
268
|
-
* @param {...string} parts - Glob segments under the feature's shared root.
|
|
269
|
-
* @returns {string} e.g. `docs/shapeup-sdlc/checkout/scopes/*.json`.
|
|
270
|
-
*/
|
|
271
|
-
export const globShared = (slug, ...parts) => [SHARED, slug, ...parts].join("/");
|
|
272
|
-
|
|
273
|
-
/**
|
|
274
|
-
* The coaching file a coachable worker reads, as a repo-relative path for the WorkOrder payload.
|
|
275
|
-
* @param {string} skill - Worker name (task-executor | ba-pitch-analyzer | qa-edge-hunter).
|
|
276
|
-
* @returns {string} e.g. `docs/shapeup-sdlc/knowledge-base/task-executor.md`.
|
|
277
|
-
*/
|
|
278
|
-
export const relKnowledgeBase = (skill) => [SHARED, "knowledge-base", `${skill}.md`].join("/");
|
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
# translator
|
|
2
|
-
|
|
3
|
-
The language gate upstream of the harness. It turns the PO's non-English intake (pitch /
|
|
4
|
-
PRD / requirement / transcript) into faithful **English** copies the harness can consume,
|
|
5
|
-
then proves the result is English and structurally identical to the source. It is **narrow
|
|
6
|
-
by design** — it normalizes language, nothing else.
|
|
7
|
-
|
|
8
|
-
```
|
|
9
|
-
PO intake (any language) → TRANSLATOR → <name>.en.md (+ glossary.md + report) → ba-pitch-analyzer → …
|
|
10
|
-
```
|
|
11
|
-
|
|
12
|
-
**Why it exists:** the harness (ba-pitch-analyzer → task-executor → spec-evaluator) is
|
|
13
|
-
English-only end to end and HARD-FAILs on anything else. Previously `tech-lead` was expected
|
|
14
|
-
to cover this; that conflated orchestration with language normalization. This skill owns the
|
|
15
|
-
language concern so the orchestrator stays thin.
|
|
16
|
-
|
|
17
|
-
**What it does NOT do:** plan, build, judge, or translate harness output back to the PO's
|
|
18
|
-
language. Input-normalization only.
|
|
19
|
-
|
|
20
|
-
## Resource map
|
|
21
|
-
```
|
|
22
|
-
translator/
|
|
23
|
-
├── SKILL.md # entry — GATE T0–T2, the detect→glossary→translate→verify flow, flags, hard rules
|
|
24
|
-
├── README.md # this file
|
|
25
|
-
└── references/
|
|
26
|
-
└── preservation-rules.md # ★ translate-vs-preserve table, 1:1 structure rule, glossary protocol, verification scan
|
|
27
|
-
```
|
|
28
|
-
|
|
29
|
-
| Resource | Loaded at | Purpose |
|
|
30
|
-
|----------|-----------|---------|
|
|
31
|
-
| `SKILL.md` | always | T-gates, phase sequence, invocation, hard rules |
|
|
32
|
-
| `references/preservation-rules.md` | before translating | what stays verbatim, glossary format, the 3 verification checks |
|
|
33
|
-
|
|
34
|
-
## Install
|
|
35
|
-
```bash
|
|
36
|
-
cp -r translator <repo>/.claude/skills/ # or ~/.claude/skills/
|
|
37
|
-
```
|
|
38
|
-
Pairs with the harness skills (`ba-pitch-analyzer`, `task-executor`, `spec-evaluator`,
|
|
39
|
-
`tech-lead`). `tech-lead` auto-invokes it at GATE L0 when intake is non-English.
|
|
40
|
-
|
|
41
|
-
## Invoke
|
|
42
|
-
```bash
|
|
43
|
-
/translator docs/pitch.md # → docs/pitch.en.md (+ glossary.md, report)
|
|
44
|
-
/translator docs/intake/ # folder; already-English files skipped
|
|
45
|
-
/translator --glossary docs/glossary.md docs/pitch.md # reuse vocabulary across docs/runs
|
|
46
|
-
/translator --check docs/pitch.md # detect-only (what tech-lead L0 calls)
|
|
47
|
-
/translator --auto docs/pitch.md # headless; still stops on a dirty residual scan
|
|
48
|
-
```
|
|
49
|
-
|
|
50
|
-
## Gate map
|
|
51
|
-
| Gate | When | Decision |
|
|
52
|
-
|------|------|----------|
|
|
53
|
-
| T0 | intake | detect source language per file; scope what to translate; `--check` stops here |
|
|
54
|
-
| T1 | after glossary | PO confirms term mappings; ambiguous terms resolved (never guessed) |
|
|
55
|
-
| T2 | after verify | sign off only on a clean residual scan + matching structure |
|
|
56
|
-
|
|
57
|
-
## Output
|
|
58
|
-
- `<name>.en.md` — the English copy (original never overwritten)
|
|
59
|
-
- `glossary.md` — source→English term map (persisted, reusable)
|
|
60
|
-
- `translation-report.md` — detect table, glossary diff, verification result
|
|
61
|
-
|
|
62
|
-
## Version
|
|
63
|
-
0.1 — initial language gate. Detect → glossary → translate → verify → sign-off. Strict
|
|
64
|
-
English-only for the whole harness; faithful 1:1 with structure/frontmatter/wikilink/code/
|
|
65
|
-
number preservation; reusable glossary; idempotent already-English no-op; `--check` mode;
|
|
66
|
-
residual-non-English scan blocks sign-off even under `--auto`.
|