shapeup-sdlc 3.18.3 → 4.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.
Files changed (141) hide show
  1. package/.claude/settings.local.example.json +2 -3
  2. package/.claude-plugin/plugin.json +1 -1
  3. package/AGENTS.md +115 -56
  4. package/README.md +101 -143
  5. package/SECURITY.md +16 -25
  6. package/agents/orient.md +14 -0
  7. package/agents/qa-edge-hunter.md +13 -0
  8. package/agents/spec-evaluator.md +14 -0
  9. package/agents/task-executor.md +14 -0
  10. package/bin/init.mjs +13 -16
  11. package/bin/lib/grant.mjs +8 -19
  12. package/commands/build.md +9 -14
  13. package/commands/eval.md +3 -3
  14. package/commands/hammer.md +9 -5
  15. package/commands/retro.md +12 -11
  16. package/commands/scopes.md +1 -12
  17. package/commands/ship.md +45 -88
  18. package/commands/wire.md +1 -8
  19. package/hooks/dispatch-receipt.mjs +94 -8
  20. package/hooks/hooks.json +0 -41
  21. package/hooks/lib/decision.mjs +6 -9
  22. package/hooks/lib/tier.mjs +50 -0
  23. package/hooks/sandbox-guard.mjs +140 -64
  24. package/kernel/gate.mjs +203 -22
  25. package/kernel/harness.mjs +20 -67
  26. package/kernel/init/run.mjs +175 -523
  27. package/kernel/lib/contract.mjs +9 -93
  28. package/kernel/lib/floor.mjs +64 -0
  29. package/kernel/lib/paths.mjs +39 -112
  30. package/kernel/order.mjs +157 -0
  31. package/kernel/probe/digest.mjs +2 -38
  32. package/kernel/schemas/domain.schema.json +146 -1125
  33. package/kernel/schemas/work-order.schema.json +8 -4
  34. package/kernel/schemas/work-result.schema.json +1 -1
  35. package/kernel/verify/envelope.mjs +2 -2
  36. package/kernel/verify/skills.mjs +27 -8
  37. package/kernel/verify/t0.mjs +2 -2
  38. package/package.json +4 -2
  39. package/skills/building/SKILL.md +144 -0
  40. package/skills/building/resources/gates.md +76 -0
  41. package/skills/building/resources/guidance.md +23 -0
  42. package/skills/{translator/references/preservation-rules.md → building/resources/intake-preservation.md} +1 -1
  43. package/skills/building/resources/intake.md +157 -0
  44. package/skills/building/resources/orders.md +69 -0
  45. package/skills/{ba-pitch-analyzer/references → building/resources/plan-references}/doc-schemas.md +1 -1
  46. package/skills/{ba-pitch-analyzer/references → building/resources/plan-references}/task-generation.md +13 -13
  47. package/skills/{ba-pitch-analyzer/references → building/resources/plan-references}/test-surface.md +6 -7
  48. package/skills/building/resources/plan-scopes.md +95 -0
  49. package/skills/building/resources/plan-spec.md +102 -0
  50. package/skills/{ba-pitch-analyzer/assets/templates → building/resources/plan-templates}/_index.tmpl.md +1 -1
  51. package/skills/{ba-pitch-analyzer/assets/templates → building/resources/plan-templates}/assess-report.tmpl.md +10 -11
  52. package/skills/{ba-pitch-analyzer/assets/templates → building/resources/plan-templates}/run-state.tmpl.md +4 -4
  53. package/skills/{ba-pitch-analyzer/assets/templates → building/resources/plan-templates}/scope-summary.tmpl.md +2 -2
  54. package/skills/{ba-pitch-analyzer/assets/templates → building/resources/plan-templates}/synthesis.tmpl.md +4 -4
  55. package/skills/{ba-pitch-analyzer/assets/templates → building/resources/plan-templates}/usecase.tmpl.md +2 -2
  56. package/skills/building/resources/plan-wire.md +82 -0
  57. package/skills/building/resources/plan.md +98 -0
  58. package/skills/building/resources/retro-research.md +60 -0
  59. package/skills/building/resources/retro-scan.md +49 -0
  60. package/skills/building/resources/retro.md +225 -0
  61. package/skills/building/resources/rounds.md +78 -0
  62. package/skills/building/resources/stop.md +127 -0
  63. package/skills/orient/SKILL.md +37 -37
  64. package/skills/qa-edge-hunter/SKILL.md +14 -14
  65. package/skills/shapeup/SKILL.md +5 -5
  66. package/skills/shapeup/resources/breadboarding.md +1 -1
  67. package/skills/shapeup/resources/context-compaction.md +5 -5
  68. package/skills/shapeup/resources/shaping.md +1 -1
  69. package/skills/spec-evaluator/SKILL.md +17 -21
  70. package/skills/spec-evaluator/references/dimension-contract.md +1 -1
  71. package/skills/spec-evaluator/references/dimensions/completeness.md +3 -3
  72. package/skills/spec-evaluator/references/dimensions/spec-conformance.md +1 -1
  73. package/skills/spec-evaluator/references/dimensions/test-surface-conformance.md +5 -5
  74. package/skills/task-executor/SKILL.md +11 -15
  75. package/commands/hill.md +0 -10
  76. package/hooks/gate-intake.mjs +0 -109
  77. package/hooks/gate-zerowork.mjs +0 -349
  78. package/hooks/tier-guard.mjs +0 -162
  79. package/kernel/compile.mjs +0 -1419
  80. package/kernel/init/fit.mjs +0 -199
  81. package/kernel/init/run-args.mjs +0 -206
  82. package/kernel/lib/breadboard.mjs +0 -165
  83. package/kernel/probe/attempts.mjs +0 -161
  84. package/kernel/probe/concurrency.mjs +0 -535
  85. package/kernel/probe/eval.mjs +0 -405
  86. package/kernel/probe/hunt.mjs +0 -104
  87. package/kernel/probe/leg.mjs +0 -229
  88. package/kernel/probe/owner.mjs +0 -142
  89. package/kernel/probe/requirements.mjs +0 -328
  90. package/kernel/probe/resume.mjs +0 -1110
  91. package/kernel/probe/rounds.mjs +0 -115
  92. package/kernel/probe/staged.mjs +0 -83
  93. package/kernel/probe/stats.mjs +0 -477
  94. package/kernel/probe/t0.mjs +0 -115
  95. package/kernel/reduce/board.mjs +0 -350
  96. package/kernel/reduce/graph.mjs +0 -482
  97. package/kernel/reduce/hill.mjs +0 -322
  98. package/kernel/reduce/ingest.mjs +0 -767
  99. package/kernel/reduce/leftovers.mjs +0 -159
  100. package/kernel/reduce/ship.mjs +0 -529
  101. package/kernel/reduce/snapshot.mjs +0 -291
  102. package/kernel/reduce/verdict.mjs +0 -172
  103. package/kernel/report/export.mjs +0 -384
  104. package/kernel/report/facts.mjs +0 -234
  105. package/kernel/verify/budget.mjs +0 -153
  106. package/kernel/verify/build.mjs +0 -428
  107. package/kernel/verify/dispatch.mjs +0 -114
  108. package/kernel/verify/spec.mjs +0 -975
  109. package/kernel/verify/trace.mjs +0 -604
  110. package/skills/ba-pitch-analyzer/SKILL.md +0 -204
  111. package/skills/coach/SKILL.md +0 -397
  112. package/skills/hill-chart/SKILL.md +0 -154
  113. package/skills/hill-chart/assets/dashboard.template.html +0 -1432
  114. package/skills/scope-architect/SKILL.md +0 -174
  115. package/skills/scope-hammer/SKILL.md +0 -231
  116. package/skills/solution-architect/SKILL.md +0 -158
  117. package/skills/tech-lead/SKILL.md +0 -151
  118. package/skills/tech-lead/references/gates.md +0 -605
  119. package/skills/tech-lead/references/protocol.md +0 -889
  120. package/skills/tech-lead/references/tiny-lane.md +0 -53
  121. package/skills/tech-lead/workflows/shapeup-run.js +0 -2187
  122. package/skills/translator/SKILL.md +0 -258
  123. /package/skills/{ba-pitch-analyzer/references → building/resources/plan-references}/contract-patterns.md +0 -0
  124. /package/skills/{ba-pitch-analyzer/references → building/resources/plan-references}/ddd-patterns.md +0 -0
  125. /package/skills/{ba-pitch-analyzer/references → building/resources/plan-references}/integration-analysis.md +0 -0
  126. /package/skills/{ba-pitch-analyzer/references → building/resources/plan-references}/ux-behavior-patterns.md +0 -0
  127. /package/skills/{ba-pitch-analyzer/assets/templates → building/resources/plan-templates}/api-feasibility.tmpl.md +0 -0
  128. /package/skills/{ba-pitch-analyzer/assets/templates → building/resources/plan-templates}/contracts/be-service.contract.tmpl.md +0 -0
  129. /package/skills/{ba-pitch-analyzer/assets/templates → building/resources/plan-templates}/contracts/offline-storage.contract.tmpl.md +0 -0
  130. /package/skills/{ba-pitch-analyzer/assets/templates → building/resources/plan-templates}/contracts/third-party-api.contract.tmpl.md +0 -0
  131. /package/skills/{ba-pitch-analyzer/assets/templates → building/resources/plan-templates}/cross-context/context-map.tmpl.md +0 -0
  132. /package/skills/{ba-pitch-analyzer/assets/templates → building/resources/plan-templates}/cross-context/event-choreography.tmpl.md +0 -0
  133. /package/skills/{ba-pitch-analyzer/assets/templates → building/resources/plan-templates}/cross-context/migration-plan.tmpl.md +0 -0
  134. /package/skills/{ba-pitch-analyzer/assets/templates → building/resources/plan-templates}/cross-context/team-handoff.tmpl.md +0 -0
  135. /package/skills/{ba-pitch-analyzer/assets/templates → building/resources/plan-templates}/domain-model.tmpl.md +0 -0
  136. /package/skills/{ba-pitch-analyzer/assets/templates → building/resources/plan-templates}/feedback.tmpl.md +0 -0
  137. /package/skills/{ba-pitch-analyzer/assets/templates → building/resources/plan-templates}/integration.tmpl.md +0 -0
  138. /package/skills/{ba-pitch-analyzer/assets/templates → building/resources/plan-templates}/task-board.tmpl.md +0 -0
  139. /package/skills/{ba-pitch-analyzer/assets/templates → building/resources/plan-templates}/task-spike.tmpl.md +0 -0
  140. /package/skills/{ba-pitch-analyzer/assets/templates → building/resources/plan-templates}/task.tmpl.md +0 -0
  141. /package/skills/{ba-pitch-analyzer/assets/templates → building/resources/plan-templates}/ux-behavior.tmpl.md +0 -0
@@ -1,114 +0,0 @@
1
- #!/usr/bin/env node
2
- // Did THIS SESSION resolve that skill? — the canary's read half.
3
- //
4
- // `verify skills` proves the SKILL.md files exist at a root at a version. It cannot prove the
5
- // session will resolve that copy, because that is a property of how the CLI was launched:
6
- // `--plugin-dir`, an enabled marketplace install, the right version among several installed. Both
7
- // states the diagnosis names — installed-but-disabled, and wrong-version-loaded — pass a file check
8
- // green. Only a live dispatch answers the question, and this reads its evidence.
9
- //
10
- // THE EVIDENCE, and why it is evidence rather than a claim. A `Skill(...)` call whose name does not
11
- // resolve fires NO hook at all: the host rejects the name upstream of the hook layer. Measured, in a
12
- // live session with a sub-agent making the calls — not inferred. So a decision row from
13
- // `dispatch-receipt` naming a skill is proof that the name resolved, and its absence after a call
14
- // was attempted is proof that it did not. Nothing here trusts a sub-agent's report of what happened;
15
- // the sub-agent cannot write these rows.
16
- //
17
- // The canary deliberately dispatches with NO `--order`. It is testing name resolution, not doing
18
- // work: an order would mean a compiled order with no result sitting in `orders/`, which every reader
19
- // of that directory would then have to know about, and a canary that perturbs the run it is
20
- // clearing is not a preflight.
21
- //
22
- // Usage: node kernel/harness.mjs verify dispatch --skill <worker> [--since <iso>] [--cwd <dir>] [--json]
23
- // Exit: 0 = this session dispatched that skill and the hook layer saw it · 1 = no such evidence
24
-
25
- import { readFileSync, existsSync } from "node:fs";
26
- import { resolve } from "node:path";
27
- import { runArgs } from "../lib/argv.mjs";
28
- import { decisionsPath } from "../../hooks/lib/decision.mjs";
29
-
30
- /**
31
- * Every decision row on disk, newest last. An unreadable or absent ledger is an empty list — an
32
- * absence proves nothing on its own, and the caller decides what that means.
33
- *
34
- * @param {string} cwd - Project root the ledger resolves against.
35
- * @returns {object[]} Parsed rows; unparseable lines are dropped rather than throwing.
36
- */
37
- export function decisionRows(cwd) {
38
- const path = decisionsPath(cwd);
39
- if (!existsSync(path)) return [];
40
- try {
41
- return readFileSync(path, "utf8").split("\n").filter((l) => l.trim())
42
- .map((l) => { try { return JSON.parse(l); } catch { return null; } }).filter(Boolean);
43
- } catch { return []; }
44
- }
45
-
46
- /**
47
- * Find evidence that a skill resolved in this checkout.
48
- *
49
- * The host reports skills namespaced (`shapeup-sdlc-plugin:orient`) and orders name them bare
50
- * (`orient`), so a row matches on either form — the caller should not have to know which spelling
51
- * the hook happened to capture.
52
- *
53
- * @param {object[]} rows - Decision rows, e.g. from {@link decisionRows}.
54
- * @param {string} skill - The worker name to look for, bare or namespaced.
55
- * @param {string} [since] - ISO timestamp; rows older than this are ignored. Without it, evidence
56
- * from any point in the checkout's history counts, which is why the canary always passes one.
57
- * @returns {{resolved:boolean, rows:object[], considered:number}} The matching rows, newest last.
58
- */
59
- export function dispatchEvidence(rows, skill, since = null) {
60
- const bare = String(skill).slice(String(skill).lastIndexOf(":") + 1);
61
- const floor = since ? Date.parse(since) : null;
62
- const hits = rows.filter((r) => {
63
- if (r.hook !== "dispatch-receipt" || !r.subject) return false;
64
- const subj = String(r.subject);
65
- const subjBare = subj.slice(subj.lastIndexOf(":") + 1).split("/")[0];
66
- if (subjBare !== bare && subj !== skill) return false;
67
- if (floor !== null && !Number.isNaN(floor) && !(Date.parse(r.at) >= floor)) return false;
68
- return true;
69
- });
70
- return { resolved: hits.length > 0, rows: hits, considered: rows.length };
71
- }
72
-
73
- // ---------------------------------------------------------------------------
74
- /** The typed argv contract (see `./lib/argv.mjs`). */
75
- export const ARGV_SPEC = {
76
- usage: "harness.mjs verify dispatch --skill <worker> [--since <iso> | --within <seconds>] [--cwd <dir>] [--json]",
77
- _: { arity: 0, max: 0 },
78
- skill: { type: "str", required: true },
79
- since: { type: "str" },
80
- // `--within` exists because the canary's caller cannot compute a timestamp. A Workflow script may
81
- // not call `Date.now()` — it would break resume — so a control script asking "was this dispatched
82
- // JUST NOW" has no clock of its own. Without a window the check answers "ever, in this checkout",
83
- // which a project that once had the plugin loaded satisfies forever: the canary would pass on the
84
- // strength of a run from last month. The kernel has a clock; it does the arithmetic.
85
- within: { type: "int", min: 1 },
86
- cwd: { type: "path" },
87
- json: { type: "flag" },
88
- };
89
-
90
- /**
91
- * Report whether this session has been observed dispatching a named skill.
92
- *
93
- * @param {string[]} rawArgv - The subcommand's own arguments (harness.mjs strips the verb words).
94
- * @returns {void} Exits 0 when the evidence exists, 1 when it does not.
95
- */
96
- export function cli(rawArgv) {
97
- const args = runArgs(ARGV_SPEC, rawArgv);
98
- const cwd = resolve(args.cwd || process.cwd());
99
- const since = args.since || (args.within ? new Date(Date.now() - args.within * 1000).toISOString() : null);
100
- const ev = dispatchEvidence(decisionRows(cwd), args.skill, since);
101
- if (args.json) {
102
- console.log(JSON.stringify({ skill: args.skill, since, ...ev }, null, 2));
103
- } else if (ev.resolved) {
104
- const last = ev.rows[ev.rows.length - 1];
105
- console.log(`✅ ${args.skill} resolved in this session — dispatch observed at ${last.at} (${ev.rows.length} row(s))`);
106
- }
107
- if (ev.resolved) process.exit(0);
108
- console.error(` ✗ verify dispatch: no evidence this session resolved "${args.skill}".`);
109
- console.error(` A Skill call whose name does not resolve fires no hook at all, so the absence of a`);
110
- console.error(` decision row after an attempted dispatch means the skill was never reached. Either the`);
111
- console.error(` plugin is not loaded in this session (\`claude --plugin-dir <repo>\`, or install and`);
112
- console.error(` enable it), or the dispatch was never attempted. ${ev.considered} decision row(s) scanned${since ? ` since ${since}` : ""}.`);
113
- process.exit(1);
114
- }