@am_shork/attest 0.2.1 → 0.3.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 (79) hide show
  1. package/CHANGELOG.md +655 -79
  2. package/README.md +132 -18
  3. package/dist/cli/index.js +91 -21
  4. package/dist/cli/index.js.map +1 -1
  5. package/dist/cli/json.d.ts +52 -5
  6. package/dist/cli/json.d.ts.map +1 -1
  7. package/dist/cli/json.js +50 -2
  8. package/dist/cli/json.js.map +1 -1
  9. package/dist/cli/report.d.ts +28 -1
  10. package/dist/cli/report.d.ts.map +1 -1
  11. package/dist/cli/report.js +100 -1
  12. package/dist/cli/report.js.map +1 -1
  13. package/dist/core/apply.d.ts +8 -0
  14. package/dist/core/apply.d.ts.map +1 -1
  15. package/dist/core/apply.js +10 -0
  16. package/dist/core/apply.js.map +1 -1
  17. package/dist/core/gate.d.ts +36 -10
  18. package/dist/core/gate.d.ts.map +1 -1
  19. package/dist/core/gate.js +59 -12
  20. package/dist/core/gate.js.map +1 -1
  21. package/dist/core/loader.d.ts +8 -0
  22. package/dist/core/loader.d.ts.map +1 -1
  23. package/dist/core/loader.js +1 -0
  24. package/dist/core/loader.js.map +1 -1
  25. package/dist/core/locate.d.ts +4 -0
  26. package/dist/core/locate.d.ts.map +1 -1
  27. package/dist/core/locate.js +8 -3
  28. package/dist/core/locate.js.map +1 -1
  29. package/dist/core/paths.d.ts +15 -0
  30. package/dist/core/paths.d.ts.map +1 -0
  31. package/dist/core/paths.js +36 -0
  32. package/dist/core/paths.js.map +1 -0
  33. package/dist/core/pipeline.d.ts +63 -2
  34. package/dist/core/pipeline.d.ts.map +1 -1
  35. package/dist/core/pipeline.js +190 -34
  36. package/dist/core/pipeline.js.map +1 -1
  37. package/dist/core/red-record.d.ts +50 -0
  38. package/dist/core/red-record.d.ts.map +1 -0
  39. package/dist/core/red-record.js +148 -0
  40. package/dist/core/red-record.js.map +1 -0
  41. package/dist/core/render.d.ts +1 -1
  42. package/dist/core/render.d.ts.map +1 -1
  43. package/dist/core/render.js +16 -2
  44. package/dist/core/render.js.map +1 -1
  45. package/dist/core/runner.d.ts.map +1 -1
  46. package/dist/core/runner.js +16 -6
  47. package/dist/core/runner.js.map +1 -1
  48. package/dist/core/skill.d.ts +23 -0
  49. package/dist/core/skill.d.ts.map +1 -0
  50. package/dist/core/skill.js +276 -0
  51. package/dist/core/skill.js.map +1 -0
  52. package/dist/core/static-registry.d.ts +28 -0
  53. package/dist/core/static-registry.d.ts.map +1 -1
  54. package/dist/core/static-registry.js +86 -25
  55. package/dist/core/static-registry.js.map +1 -1
  56. package/dist/core/status.d.ts +39 -0
  57. package/dist/core/status.d.ts.map +1 -0
  58. package/dist/core/status.js +64 -0
  59. package/dist/core/status.js.map +1 -0
  60. package/dist/core/targets.d.ts +52 -0
  61. package/dist/core/targets.d.ts.map +1 -0
  62. package/dist/core/targets.js +141 -0
  63. package/dist/core/targets.js.map +1 -0
  64. package/dist/core/types.d.ts +13 -0
  65. package/dist/core/types.d.ts.map +1 -1
  66. package/dist/core/types.js.map +1 -1
  67. package/dist/core/validator.d.ts +11 -0
  68. package/dist/core/validator.d.ts.map +1 -1
  69. package/dist/core/validator.js +28 -12
  70. package/dist/core/validator.js.map +1 -1
  71. package/dist/core/write.d.ts +2 -0
  72. package/dist/core/write.d.ts.map +1 -0
  73. package/dist/core/write.js +21 -0
  74. package/dist/core/write.js.map +1 -0
  75. package/dist/runtime.d.ts +9 -1
  76. package/dist/runtime.d.ts.map +1 -1
  77. package/dist/runtime.js +10 -2
  78. package/dist/runtime.js.map +1 -1
  79. package/package.json +1 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"red-record.js","sourceRoot":"","sources":["../../src/core/red-record.ts"],"names":[],"mappings":"AAAA,+EAA+E;AAC/E,sBAAsB;AACtB,EAAE;AACF,+EAA+E;AAC/E,8EAA8E;AAC9E,iFAAiF;AACjF,6EAA6E;AAC7E,iFAAiF;AACjF,uCAAuC;AACvC,E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,CAAC;AAC9C,CAAC;AAED,SAAS,QAAQ,CAAC,KAAc;IAC9B,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;AAC9E,CAAC"}
@@ -23,7 +23,7 @@ export interface RenderTarget {
23
23
  }
24
24
  /**
25
25
  * The freshness verdict for a committed rendering: `undefined` when the file on
26
- * disk is exactly what the registry renders to now, an ERROR otherwise.
26
+ * disk is the document the registry renders to now, an ERROR otherwise.
27
27
  *
28
28
  * The two failures get distinct codes — `missing-spec-doc` for a rendering that
29
29
  * was never generated, `stale-spec-doc` for one whose bytes drifted — even
@@ -1 +1 @@
1
- {"version":3,"file":"render.d.ts","sourceRoot":"","sources":["../../src/core/render.ts"],"names":[],"mappings":"AAwBA,OAAO,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAe,MAAM,YAAY,CAAC;AAQ/D;;;;;;;GAOG;AACH,wBAAgB,cAAc,CAAC,QAAQ,EAAE,QAAQ,GAAG,MAAM,CAezD;AAED;;;;;;GAMG;AACH,MAAM,WAAW,YAAY;IAC3B,4CAA4C;IAC5C,OAAO,EAAE,MAAM,CAAC;IAChB,mDAAmD;IACnD,OAAO,EAAE,MAAM,CAAC;CACjB;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,UAAU,CACxB,MAAM,EAAE,YAAY,EACpB,OAAO,EAAE,MAAM,GAAG,SAAS,EAC3B,KAAK,EAAE,MAAM,GACZ,KAAK,GAAG,SAAS,CAYnB"}
1
+ {"version":3,"file":"render.d.ts","sourceRoot":"","sources":["../../src/core/render.ts"],"names":[],"mappings":"AAwBA,OAAO,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAe,MAAM,YAAY,CAAC;AAQ/D;;;;;;;GAOG;AACH,wBAAgB,cAAc,CAAC,QAAQ,EAAE,QAAQ,GAAG,MAAM,CAezD;AAED;;;;;;GAMG;AACH,MAAM,WAAW,YAAY;IAC3B,4CAA4C;IAC5C,OAAO,EAAE,MAAM,CAAC;IAChB,mDAAmD;IACnD,OAAO,EAAE,MAAM,CAAC;CACjB;AAiBD;;;;;;;;;;;;;GAaG;AACH,wBAAgB,UAAU,CACxB,MAAM,EAAE,YAAY,EACpB,OAAO,EAAE,MAAM,GAAG,SAAS,EAC3B,KAAK,EAAE,MAAM,GACZ,KAAK,GAAG,SAAS,CAYnB"}
@@ -43,9 +43,23 @@ export function renderMarkdown(registry) {
43
43
  }
44
44
  return out.join('\n');
45
45
  }
46
+ /**
47
+ * Line endings are a checkout artifact, not content.
48
+ *
49
+ * `render` always writes `\n`, but Git hands the file back as `\r\n` wherever
50
+ * `core.autocrlf` is on — the default on Windows. A byte comparison therefore
51
+ * failed on every fresh clone there: `stale-spec-doc`, permanently, on a
52
+ * registry nobody had touched, with a fix hint whose command regenerates a file
53
+ * that is already correct. The comparison is about whether the *document* still
54
+ * matches the registry, and no `\r` in the file came from the registry.
55
+ */
56
+ function sameDocument(a, b) {
57
+ const eol = (s) => s.replace(/\r\n/g, '\n');
58
+ return eol(a) === eol(b);
59
+ }
46
60
  /**
47
61
  * The freshness verdict for a committed rendering: `undefined` when the file on
48
- * disk is exactly what the registry renders to now, an ERROR otherwise.
62
+ * disk is the document the registry renders to now, an ERROR otherwise.
49
63
  *
50
64
  * The two failures get distinct codes — `missing-spec-doc` for a rendering that
51
65
  * was never generated, `stale-spec-doc` for one whose bytes drifted — even
@@ -58,7 +72,7 @@ export function renderMarkdown(registry) {
58
72
  * that makes a generated file safe to commit: a byte comparison, no heuristics.
59
73
  */
60
74
  export function staleIssue(target, current, fresh) {
61
- if (current === fresh)
75
+ if (current !== undefined && sameDocument(current, fresh))
62
76
  return undefined;
63
77
  const missing = current === undefined;
64
78
  const why = missing
@@ -1 +1 @@
1
- {"version":3,"file":"render.js","sourceRoot":"","sources":["../../src/core/render.ts"],"names":[],"mappings":"AAAA,2EAA2E;AAC3E,6BAA6B;AAC7B,EAAE;AACF,8EA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IACH,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED;gFACgF;AAChF,KAAK,aAAa,GAAG,WAAW,CAAC,UAAU,CAAC,OAAO,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AAEpE;;;;;;GAMG;AACH,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,oBAAoB,GAAG,aAAa,CAe/E;AAED,wBAAsB,aAAa,CACjC,OAAO,GAAE,oBAAyB,GACjC,OAAO,CAAC,SAAS,CAAC,CAkCpB"}
1
+ {"version":3,"file":"runner.d.ts","sourceRoot":"","sources":["../../src/core/runner.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAE1C,OAAO,KAAK,EAAW,SAAS,EAAE,MAAM,YAAY,CAAC;AAQrD,MAAM,WAAW,oBAAoB;IACnC,sEAAsE;IACtE,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,6CAA6C;IAC7C,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IACnB,kFAAkF;IAClF,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,oDAAoD;IACpD,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IACnB,yEAAyE;IACzE,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IACnB;;;;;OAKG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED;gFACgF;AAChF,KAAK,aAAa,GAAG,WAAW,CAAC,UAAU,CAAC,OAAO,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AAEpE;;;;;;GAMG;AACH,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,oBAAoB,GAAG,aAAa,CAe/E;AAED,wBAAsB,aAAa,CACjC,OAAO,GAAE,oBAAyB,GACjC,OAAO,CAAC,SAAS,CAAC,CA0CpB"}
@@ -38,6 +38,7 @@ export async function runAndCollect(options = {}) {
38
38
  }
39
39
  try {
40
40
  const runtimeCoverage = new Map();
41
+ const outcomes = new Map();
41
42
  // Reconstruct coverage from the task tree (not an in-process singleton).
42
43
  const walk = (task) => {
43
44
  if (task.type === 'suite') {
@@ -45,14 +46,22 @@ export async function runAndCollect(options = {}) {
45
46
  if (m) {
46
47
  const id = m[1];
47
48
  const set = runtimeCoverage.get(id) ?? new Set();
49
+ const byName = outcomes.get(id) ?? new Map();
48
50
  for (const c of task.tasks ?? []) {
49
51
  // A scenario counts as covered only if it actually executed —
50
52
  // skipped/todo scenarios have no run result (enables §8's
51
- // declared-not-run check).
52
- if (c.type === 'test' && isExecuted(c))
53
- set.add(c.name);
53
+ // declared-not-run check). The same test decides whether there is
54
+ // an outcome to record: a skip is not a red (design §6).
55
+ if (c.type !== 'test')
56
+ continue;
57
+ const outcome = executedOutcome(c);
58
+ if (!outcome)
59
+ continue;
60
+ set.add(c.name);
61
+ byName.set(c.name, outcome);
54
62
  }
55
63
  runtimeCoverage.set(id, set);
64
+ outcomes.set(id, byName);
56
65
  }
57
66
  }
58
67
  for (const c of task.tasks ?? [])
@@ -61,14 +70,15 @@ export async function runAndCollect(options = {}) {
61
70
  for (const file of vitest.state.getFiles())
62
71
  walk(file);
63
72
  const passed = (vitest.state.getCountOfFailedTests?.() ?? 0) === 0;
64
- return { passed, runtimeCoverage };
73
+ return { passed, runtimeCoverage, outcomes };
65
74
  }
66
75
  finally {
67
76
  await vitest.close();
68
77
  }
69
78
  }
70
- function isExecuted(task) {
79
+ /** The outcome of a task that ran, or `undefined` when it did not run at all. */
80
+ function executedOutcome(task) {
71
81
  const state = task.result?.state;
72
- return state === 'pass' || state === 'fail';
82
+ return state === 'pass' || state === 'fail' ? state : undefined;
73
83
  }
74
84
  //# sourceMappingURL=runner.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"runner.js","sourceRoot":"","sources":["../../src/core/runner.ts"],"names":[],"mappings":"AAAA,+EAA+E;AAC/E,8EAA8E;AAC9E,4EAA4E;AAC5E,qEAAqE;AAErE,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CA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AI,CAAC,KAAK,IAAI,EAAE;gBAAE,IAAI,CAAC,CAAC,CAAC,CAAC;QAC5C,CAAC,CAAC;QACF,KAAK,MAAM,IAAI,IAAI,MAAM,CAAC,KAAK,CAAC,QAAQ,EAAE;YAAE,IAAI,CAAC,IAA2B,CAAC,CAAC;QAE9E,MAAM,MAAM,GAAG,CAAC,MAAM,CAAC,KAAK,CAAC,qBAAqB,EAAE,EAAE,IAAI,CAAC,CAAC,KAAK,CAAC,CAAC;QACnE,OAAO,EAAE,MAAM,EAAE,eAAe,EAAE,QAAQ,EAAE,CAAC;IAC/C,CAAC;YAAS,CAAC;QACT,MAAM,MAAM,CAAC,KAAK,EAAE,CAAC;IACvB,CAAC;AACH,CAAC;AASD,iFAAiF;AACjF,SAAS,eAAe,CAAC,IAAc;IACrC,MAAM,KAAK,GAAG,IAAI,CAAC,MAAM,EAAE,KAAK,CAAC;IACjC,OAAO,KAAK,KAAK,MAAM,IAAI,KAAK,KAAK,MAAM,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS,CAAC;AAClE,CAAC"}
@@ -0,0 +1,23 @@
1
+ /**
2
+ * The one sentence that decides whether the workflow is ever loaded.
3
+ *
4
+ * Every target puts it in the field its tool reads for that purpose, so it names
5
+ * the artifacts an agent is looking at when it should be reading this: the
6
+ * registry files, a change under `changes/`, a diagnostic from the engine.
7
+ *
8
+ * Deliberately free of `: ` and of leading indicators, because three different
9
+ * YAML frontmatters emit it as a plain scalar.
10
+ */
11
+ export declare const WORKFLOW_DESCRIPTION = "This project's requirements are ID-bound TypeScript objects in *.reqs.ts, verified by tests (@am_shork/attest). Use when changing what the system promises, when drafting or implementing a change under changes/, or when attest check/verify/archive reports an issue.";
12
+ /**
13
+ * The instructions, as a pure function of nothing at all.
14
+ *
15
+ * Takes no argument — not the version, not the project name, not the registry.
16
+ * Every input would be a way for the file to change under a user who changed
17
+ * nothing, and re-running `init` has to be a no-op on an unchanged version or
18
+ * it is not safe to put in a script. That property is what makes "re-run it
19
+ * after upgrading" the whole update mechanism, and it is a property of this
20
+ * function rather than of a test.
21
+ */
22
+ export declare function workflowBody(): string;
23
+ //# sourceMappingURL=skill.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"skill.d.ts","sourceRoot":"","sources":["../../src/core/skill.ts"],"names":[],"mappings":"AAqCA;;;;;;;;;GASG;AACH,eAAO,MAAM,oBAAoB,6QAC2O,CAAC;AAE7Q;;;;;;;;;GASG;AACH,wBAAgB,YAAY,IAAI,MAAM,CAErC"}
@@ -0,0 +1,276 @@
1
+ // The workflow half of the framework, as the document `attest init` writes into
2
+ // a project (design §9).
3
+ //
4
+ // Everything the engine does has been reachable from the CLI since 0.1.0. The
5
+ // *workflow* — agree on intent, write the delta, drive the scenarios red, then
6
+ // implement to green — was only ever a document the user had to find and paste
7
+ // into their agent. This file is that workflow, written where an agent picks it
8
+ // up on its own.
9
+ //
10
+ // **The text lives here; where it goes lives in `targets.ts`.** Each agent
11
+ // target is a path Attest owns plus the frontmatter its tool reads, and every
12
+ // one of them carries *these* bytes as its body. One document rather than one
13
+ // per tool, because a per-tool copy is a place for two agents to be told
14
+ // different things about the same engine — the drift this framework exists to
15
+ // report, in the framework's own output.
16
+ //
17
+ // **Why a skill (or a rule, or an instructions file) rather than a slash
18
+ // command.** A description that sits in the agent's context loads the workflow
19
+ // when the user starts working on a change; a slash command only replaces "find
20
+ // the document" with "know which command to type", which is the same gap one
21
+ // step along. In Claude Code a skill is invocable by name as well, so it is a
22
+ // superset of the command file, not a trade.
23
+ //
24
+ // **Why the instructions are in here and not printed by a command.** They were,
25
+ // briefly. The argument for keeping them in the package was that a committed
26
+ // instruction file is a function of the installed version, so it goes stale on
27
+ // upgrade — but that only *costs* anything if the tool also ships a freshness
28
+ // gate to turn red about it, and there is no reason to ship one. A skill body
29
+ // is loaded on demand, so the whole document costs context only when the agent
30
+ // actually needs it, and one fewer command beats saving an upgrade a diff.
31
+ // `attest init` is idempotent: re-run it after an upgrade.
32
+ //
33
+ // The remaining exposure is honest and small: an old file describes an old
34
+ // workflow to an agent that trusts it. The backstop is that every mistake it
35
+ // could cause is a diagnostic with a fix hint — a registry written the old way
36
+ // is `registry-not-static`, and the agent corrects itself from the report.
37
+ /**
38
+ * The one sentence that decides whether the workflow is ever loaded.
39
+ *
40
+ * Every target puts it in the field its tool reads for that purpose, so it names
41
+ * the artifacts an agent is looking at when it should be reading this: the
42
+ * registry files, a change under `changes/`, a diagnostic from the engine.
43
+ *
44
+ * Deliberately free of `: ` and of leading indicators, because three different
45
+ * YAML frontmatters emit it as a plain scalar.
46
+ */
47
+ export const WORKFLOW_DESCRIPTION = "This project's requirements are ID-bound TypeScript objects in *.reqs.ts, verified by tests (@am_shork/attest). Use when changing what the system promises, when drafting or implementing a change under changes/, or when attest check/verify/archive reports an issue.";
48
+ /**
49
+ * The instructions, as a pure function of nothing at all.
50
+ *
51
+ * Takes no argument — not the version, not the project name, not the registry.
52
+ * Every input would be a way for the file to change under a user who changed
53
+ * nothing, and re-running `init` has to be a no-op on an unchanged version or
54
+ * it is not safe to put in a script. That property is what makes "re-run it
55
+ * after upgrading" the whole update mechanism, and it is a property of this
56
+ * function rather than of a test.
57
+ */
58
+ export function workflowBody() {
59
+ return BODY.trim();
60
+ }
61
+ const BODY = `
62
+ # Working on an Attest project
63
+
64
+ Requirements here are data, not prose: an ID-bound object in a \`*.reqs.ts\`
65
+ registry, bound to the scenarios that attest it. Changing what the system
66
+ promises is a two-stage workflow, and the stages are separate on purpose.
67
+
68
+ ## The model, before you touch anything
69
+
70
+ - **Two sources of truth.** An ID-bound *requirement* is the source of truth for
71
+ intent; an executable *test* is the source of truth for verification. Attest
72
+ binds the two by ID and reports where they disagree.
73
+ - **params are the anti-drift mechanism.** A value that can change — a timeout,
74
+ a limit, a list of names — is written **once**, in the requirement's \`params\`,
75
+ and the scenario reads it from there. The number then cannot drift between the
76
+ spec and the assertion, because there is only one of it.
77
+ - **What that does not buy.** \`attest check\` executes nothing, so editing a
78
+ param value leaves it at \`✓ No issues\` — nothing became unbound or uncovered.
79
+ The single source makes a value impossible to *diverge*; it does not announce
80
+ that it *moved*. Only \`verify\` goes red, and only when a scenario asserts on
81
+ the value it read from params. That is the reason to read params **inside** the
82
+ assertion rather than beside it.
83
+
84
+ ## Rules the engine enforces
85
+
86
+ - ID matches \`^[A-Z]+-\\d+$\` (\`AUTH-3\`, one hyphen). The namespace is flat and
87
+ global: nothing allocates prefixes, so read the existing registry before
88
+ inventing one.
89
+ - \`statement\` must contain the RFC-2119 keyword \`SHALL\` or \`MUST\`.
90
+ - \`rationale\` is at least 10 characters, and should say *why the requirement
91
+ exists*, not restate it.
92
+ - Every \`{placeholder}\` in a statement needs a \`params\` key of the same name,
93
+ or it is an \`unbound-param\` ERROR. A \`{placeholder}\` written into a
94
+ *rationale* is a \`rationale-placeholder\` WARNING — rationales are not
95
+ interpolated, so it would reach the rendered document with its braces intact.
96
+ - **A registry is a literal.** Every value is written in the file: no imported
97
+ constant (\`params: { maxMb: MAX_MB }\`), no computed value, no \`Date.now()\`.
98
+ \`check\`, \`cover\` and \`render\` read \`*.reqs.ts\` with the compiler API and
99
+ never execute it, so anything they cannot read is a \`registry-not-static\`
100
+ ERROR. An imported constant also breaks the single-source rule outright — the
101
+ value's real owner is then somewhere else. Inline it, and have the application
102
+ code read it from the registry.
103
+ - **Write prose as one long single-line string.** A template literal with no
104
+ substitution reads statically and is accepted, but it keeps every newline and
105
+ every space of indentation, and \`render\` copies the statement into the
106
+ Markdown exactly as written.
107
+ - Registries import from \`@am_shork/attest/define\` (no Vitest in its import
108
+ graph). Spec files import \`requirement\` / \`scenario\` from the
109
+ \`@am_shork/attest\` barrel.
110
+
111
+ ## Stage 1 — propose
112
+
113
+ **This stage does not implement anything.** It produces the intent and the
114
+ failing tests that will define "done", and it ends by getting agreement.
115
+
116
+ Read the current state first. If \`attest check\` reports an ERROR, fix that
117
+ before proposing anything — a change drafted on a registry the engine cannot
118
+ read is drafted blind.
119
+
120
+ \`\`\`
121
+ attest render # the whole registry as readable Markdown
122
+ attest check --json # is the project in a reportable state?
123
+ \`\`\`
124
+
125
+ Then write the change folder. \`<name>\` is one directory name inside
126
+ \`changes/\`; it may contain spaces or parentheses, but not a path separator.
127
+
128
+ \`\`\`
129
+ changes/<name>/
130
+ ├── proposal.md # why, and what is out of scope. Prose, for humans.
131
+ ├── requirements.delta.ts # the intent change
132
+ └── specs/*.spec.ts # the scenarios that must pass for it to be done
133
+ \`\`\`
134
+
135
+ \`\`\`ts
136
+ // changes/add-2fa/requirements.delta.ts
137
+ import { delta } from '@am_shork/attest/define';
138
+
139
+ export default delta({
140
+ added: {
141
+ 'AUTH-7': {
142
+ statement: 'The system MUST require a TOTP code within {totpWindowSec} seconds when 2FA is enabled.',
143
+ rationale: 'A password alone no longer meets the account-takeover risk we accept.',
144
+ params: { totpWindowSec: 30 },
145
+ },
146
+ },
147
+ modified: {
148
+ 'AUTH-3': { params: { idleTimeoutMin: 15 } }, // 30 → 15; the assertion follows, because it reads params
149
+ },
150
+ removed: ['AUTH-5'],
151
+ renamed: [{ from: 'AUTH-2', to: 'AUTH-2-login' }],
152
+ });
153
+ \`\`\`
154
+
155
+ The delta applies \`RENAMED → REMOVED → MODIFIED → ADDED\`, idempotently: an
156
+ ADDED id that already exists with identical content is a no-op, with different
157
+ content it is a conflict.
158
+
159
+ **The scenarios must be red.** Every added requirement needs at least one
160
+ scenario under \`changes/<name>/specs/\`, and at this stage they must fail —
161
+ they describe behaviour that does not exist yet. Prove it:
162
+
163
+ \`\`\`
164
+ attest archive <name> --json # expect a failing verdict carrying tests-red
165
+ \`\`\`
166
+
167
+ If it passes at this stage, the scenarios assert nothing real — and this is no
168
+ longer advice. That run writes \`changes/<name>/first-run.json\`, recording how
169
+ each of the change's scenarios ended the first time it was seen, and the archive
170
+ gate later refuses any added requirement whose scenarios have no recorded
171
+ failing run (\`never-red\`). A scenario that was green from the start no longer
172
+ clears the gate.
173
+
174
+ Two consequences worth knowing before you start:
175
+
176
+ - **Run this before you implement anything.** The record is written by the
177
+ command, not by you; skipping the step means the first observation is of
178
+ already-working code, which is a \`never-red\` block.
179
+ - **A recorded failure is permanent, a recorded pass is not.** The green run at
180
+ the end cannot erase the red — that is the point — but a scenario recorded as
181
+ passing can still be fixed: give it an assertion that fails without the change
182
+ and run the gate again, and the real failure replaces it.
183
+
184
+ Commit \`first-run.json\` with the change. It is evidence a reviewer reads, and
185
+ the gate has to reach the same verdict on a CI checkout as on your machine.
186
+
187
+ To see where the change stands at any point, without paying for a run:
188
+
189
+ \`\`\`
190
+ attest status <name> --json # per added requirement: no-scenario / unproven / proven
191
+ \`\`\`
192
+
193
+ It reads the delta, the specs and \`first-run.json\`, and reports what the gate
194
+ will still want. A change in flight is \`ok: true\` with rows to work through —
195
+ this command never fails on unmet obligations, so do not read a clean table as
196
+ "done". The state it cannot see is whether the tests pass; \`attest archive\` is
197
+ the only thing that answers that.
198
+
199
+ Then present the proposal, the ids, and the red output, and **stop**. Wait for
200
+ agreement before implementing.
201
+
202
+ ## Stage 2 — apply
203
+
204
+ A change exists under \`changes/<name>/\` with failing scenarios. Make them pass
205
+ by changing the system, and only by that.
206
+
207
+ \`\`\`
208
+ attest archive <name> --json
209
+ \`\`\`
210
+
211
+ That one command is the definition of done. It applies the delta, runs the base
212
+ suite plus this change's specs, and blocks unless the end state is structurally
213
+ valid, every test is green, every statically declared scenario actually
214
+ executed, and every added requirement's scenarios were recorded failing at least
215
+ once. Branch on \`issues[].code\`, never on \`message\`:
216
+
217
+ | code | What it means |
218
+ | --- | --- |
219
+ | \`tests-red\` | a test is failing — the normal state until you are finished |
220
+ | \`never-red\` | an added requirement's scenario has no recorded failing run |
221
+ | \`uncovered-requirement\` | a requirement in the applied registry has no scenario |
222
+ | \`declared-not-run\` | a scenario was declared but never executed (\`skip\` / \`only\`?) |
223
+ | \`unbound-param\` | a \`{placeholder}\` has no matching \`params\` key |
224
+ | \`registry-not-static\` | a registry file is not a literal the engine can read |
225
+ | \`add-conflict\` | the delta adds an id that already exists with different content |
226
+ | \`change-not-found\` | no \`requirements.delta.ts\` for that name |
227
+
228
+ ### Three things you must not do
229
+
230
+ Each turns the gate green without changing the system, which is the exact
231
+ failure this framework exists to make visible:
232
+
233
+ 1. **Do not edit a scenario to match the implementation.** If the scenario is
234
+ wrong, the *requirement* was wrong — go back to stage 1 and change the intent
235
+ deliberately, in the delta, where a reviewer sees it.
236
+ 2. **Do not delete or weaken a requirement to clear \`uncovered-requirement\`.**
237
+ Write the scenario.
238
+ 3. **Do not hardcode a value that lives in \`params\`.** Read
239
+ \`reqs['AUTH-3'].params.idleTimeoutMin\`. A literal copied into the assertion
240
+ is the drift the single source exists to prevent, and the param is typed at
241
+ the value written in the registry, so a stale expectation stops compiling
242
+ rather than silently passing.
243
+
244
+ ### When the gate passes
245
+
246
+ Then, and not before:
247
+
248
+ 1. Merge \`requirements.delta.ts\` into the main registry, and the change's specs
249
+ into the main suite.
250
+ 2. Move \`changes/<name>/\` to \`archive/<date>-<name>/\`.
251
+ 3. If the project commits a rendering, regenerate it: \`attest render --out
252
+ <file>\`. A committed document that no longer matches the registry is a
253
+ \`stale-spec-doc\` ERROR.
254
+ 4. Run \`attest verify\` on the merged result and report it.
255
+
256
+ ## The commands
257
+
258
+ | Command | What it does |
259
+ | --- | --- |
260
+ | \`attest check\` | static: orphan tests, uncovered requirements, unbound params, drift hints. Runs no project code. |
261
+ | \`attest verify\` | runs the suite, then reports coverage and drift. |
262
+ | \`attest cover\` | which requirements lack a scenario. |
263
+ | \`attest render\` | the registry as Markdown for human readers; \`--check\` gates a committed copy. |
264
+ | \`attest archive <change>\` | the completion gate for a proposed change. |
265
+ | \`attest status <change>\` | what that gate still wants, without running the suite. |
266
+
267
+ \`verify\` starts the child run **isolated** — it does not read \`vitest.config.ts\`,
268
+ so a verdict never depends on ambient configuration. Specs needing transforms, a
269
+ DOM or path aliases: \`attest verify --vitest-config vitest.config.ts\`. The config
270
+ supplies the environment only; Attest keeps the run scope.
271
+
272
+ ---
273
+
274
+ <!-- Written by \`attest init\`. Re-run it after upgrading @am_shork/attest. -->
275
+ `;
276
+ //# sourceMappingURL=skill.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"skill.js","sourceRoot":"","sources":["../../src/core/skill.ts"],"names":[],"mappings":"AAAA,gFAAgF;AAChF,yBAAyB;AACzB,EAAE;AACF,8EAA8E;AAC9E,+EAA+E;AAC/E,+EAA+E;AAC/E,gFAAgF;AAChF,iBAAiB;AACjB,EAAE;AACF,2EAA2E;AAC3E,8EAA8E;AAC9E,8EAA8E;AAC9E,yEAAyE;AACzE,8EAA8E;AAC9E,yCAAyC;AACzC,EAAE;AACF,yEAAyE;AACzE,+EAA+E;AAC/E,gFAAgF;AAChF,6EAA6E;AAC7E,8EAA8E;AAC9E,6CAA6C;AAC7C,EAAE;AACF,gFAAgF;AAChF,6EAA6E;AAC7E,+EAA+E;AAC/E,8EAA8E;AAC9E,8EAA8E;AAC9E,+EAA+E;AAC/E,2EAA2E;AAC3E,2DAA2D;AAC3D,EAAE;AACF,2EAA2E;AAC3E,6EAA6E;AAC7E,+EAA+E;AAC/E,2EAA2E;AAE3E;;;;;;;;;GASG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAC/B,0QAA0Q,CAAC;AAE7Q;;;;;;;;;GASG;AACH,MAAM,UAAU,YAAY;IAC1B,OAAO,IAAI,CAAC,IAAI,EAAE,CAAC;AACrB,CAAC;AAED,MAAM,IAAI,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAsNZ,CAAC"}
@@ -1,3 +1,4 @@
1
+ import type { RegistryDelta } from './registry.js';
1
2
  import type { Registry } from './types.js';
2
3
  /** Codes this reader can produce; each is also produced by the evaluating path. */
3
4
  export type StaticReadCode = 'registry-invalid' | 'registry-no-default' | 'registry-not-static';
@@ -11,4 +12,31 @@ export type StaticReadResult = {
11
12
  line?: number;
12
13
  };
13
14
  export declare function readRegistrySource(file: string, source: string): StaticReadResult;
15
+ /** Codes the delta reader can produce; both are codes `archive` already emits. */
16
+ export type DeltaReadCode = 'change-not-found' | 'registry-not-static';
17
+ export type DeltaReadResult = {
18
+ ok: true;
19
+ delta: RegistryDelta;
20
+ } | {
21
+ ok: false;
22
+ code: DeltaReadCode;
23
+ message: string;
24
+ line?: number;
25
+ };
26
+ /**
27
+ * Read a change's `delta({ … })` from its source (design §7).
28
+ *
29
+ * The delta is deliberately **not** schema-validated here. `delta()` is an
30
+ * identity pass-through with no schema anywhere, so validating only on this path
31
+ * would make the static reader stricter than the evaluating one — a delta that
32
+ * archives today would stop being readable, which is the one thing extraction is
33
+ * not allowed to change.
34
+ *
35
+ * The codes are the ones `archive` already emits for the same two situations, so
36
+ * a consumer branching on `issues[].code` learns no new vocabulary: a file that
37
+ * does not export a delta is `change-not-found`, exactly as an unloadable one
38
+ * is, and a delta that is not a literal is `registry-not-static`, whose fix
39
+ * (write the value inline, or `--eval`) is the same sentence either way.
40
+ */
41
+ export declare function readDeltaSource(file: string, source: string): DeltaReadResult;
14
42
  //# sourceMappingURL=static-registry.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"static-registry.d.ts","sourceRoot":"","sources":["../../src/core/static-registry.ts"],"names":[],"mappings":"AAkBA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAE3C,mFAAmF;AACnF,MAAM,MAAM,cAAc,GAAG,kBAAkB,GAAG,qBAAqB,GAAG,qBAAqB,CAAC;AAEhG,MAAM,MAAM,gBAAgB,GACxB;IAAE,EAAE,EAAE,IAAI,CAAC;IAAC,QAAQ,EAAE,QAAQ,CAAA;CAAE,GAChC;IAAE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