@rsaglobaltech/specgate 0.17.10 → 0.18.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 +56 -0
- package/README.md +4 -4
- package/bin/specgate.ts +1 -0
- package/dist/bin/specgate.js +1 -0
- package/dist/bin/specgate.js.map +1 -1
- package/dist/packages/core/src/application/ArchiveChangeUseCase.js +5 -1
- package/dist/packages/core/src/application/ArchiveChangeUseCase.js.map +1 -1
- package/dist/packages/core/src/domain/DraftChecklist.js +35 -3
- package/dist/packages/core/src/domain/DraftChecklist.js.map +1 -1
- package/dist/packages/core/src/domain/PackSpec.js +21 -2
- package/dist/packages/core/src/domain/PackSpec.js.map +1 -1
- package/dist/scripts/agents/commands.js +18 -0
- package/dist/scripts/agents/commands.js.map +1 -1
- package/dist/scripts/agents/init.js +9 -1
- package/dist/scripts/agents/init.js.map +1 -1
- package/dist/scripts/cli/commands/change/ChangeCommand.js +8 -4
- package/dist/scripts/cli/commands/change/ChangeCommand.js.map +1 -1
- package/dist/scripts/cli/commands/project/AdoptCommand.js +8 -1
- package/dist/scripts/cli/commands/project/AdoptCommand.js.map +1 -1
- package/dist/scripts/cli/commands/spec/DraftCommand.js +637 -24
- package/dist/scripts/cli/commands/spec/DraftCommand.js.map +1 -1
- package/dist/scripts/cli/commands/spec/StatusCommand.js +41 -2
- package/dist/scripts/cli/commands/spec/StatusCommand.js.map +1 -1
- package/dist/scripts/docs/build-site.js +1 -1
- package/dist/scripts/docs/journey-storyboard.js +358 -0
- package/dist/scripts/docs/journey-storyboard.js.map +1 -0
- package/dist/scripts/docs/nav.js +112 -5
- package/dist/scripts/docs/nav.js.map +1 -1
- package/dist/scripts/docs/record-journey.js +376 -0
- package/dist/scripts/docs/record-journey.js.map +1 -0
- package/dist/scripts/docs/record-terminal.js +252 -35
- package/dist/scripts/docs/record-terminal.js.map +1 -1
- package/dist/scripts/docs/terminal-storyboard.js +151 -2
- package/dist/scripts/docs/terminal-storyboard.js.map +1 -1
- package/dist/scripts/draft/brief-setup.js +363 -0
- package/dist/scripts/draft/brief-setup.js.map +1 -0
- package/dist/scripts/draft/confined-agent.js +175 -0
- package/dist/scripts/draft/confined-agent.js.map +1 -0
- package/dist/scripts/draft/drafting-guide.js +145 -0
- package/dist/scripts/draft/drafting-guide.js.map +1 -0
- package/dist/scripts/lib/surface.js +8 -1
- package/dist/scripts/lib/surface.js.map +1 -1
- package/package.json +3 -1
- package/templates/base/AGENTS.md.tpl +6 -0
package/dist/scripts/docs/nav.js
CHANGED
|
@@ -19,7 +19,7 @@ exports.navSlugs = navSlugs;
|
|
|
19
19
|
exports.navEntry = navEntry;
|
|
20
20
|
exports.neighbours = neighbours;
|
|
21
21
|
/**
|
|
22
|
-
* Simplification plan, phase 6:
|
|
22
|
+
* Simplification plan, phase 6: the places a reader goes, in the order they
|
|
23
23
|
* need them — start, every day, the gate, existing code, reference,
|
|
24
24
|
* extensions — and everything else under "Advanced". Every shipped document
|
|
25
25
|
* is still in exactly one section.
|
|
@@ -28,12 +28,67 @@ exports.NAV = [
|
|
|
28
28
|
{
|
|
29
29
|
title: "Start",
|
|
30
30
|
icon: "rocket",
|
|
31
|
-
summary: "
|
|
31
|
+
summary: "Two journeys of five phases — from scratch, or on code you already have — every output recorded from the CLI.",
|
|
32
32
|
entries: [
|
|
33
33
|
{
|
|
34
34
|
slug: "getting-started",
|
|
35
|
-
label: "
|
|
36
|
-
blurb: "
|
|
35
|
+
label: "Start here — pick your path",
|
|
36
|
+
blurb: "Starting from scratch, or bringing code you already have? Both journeys at a glance.",
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
slug: "start/write-the-brief",
|
|
40
|
+
label: "Write the brief",
|
|
41
|
+
blurb: "Your plan as docs/brief.md, the four fields on top — or let your agent propose them.",
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
slug: "start/scratch-1-install",
|
|
45
|
+
label: "From scratch · 1 Install",
|
|
46
|
+
blurb: "Create the project with your own tools, set Specgate up, run the gate once.",
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
slug: "start/scratch-2-specify",
|
|
50
|
+
label: "From scratch · 2 Specify",
|
|
51
|
+
blurb: "The brief becomes a draft per module, checked by `draft --check`, then archived.",
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
slug: "start/scratch-3-build",
|
|
55
|
+
label: "From scratch · 3 Build",
|
|
56
|
+
blurb: "The first requirement, test first — by hand or handed to the harness.",
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
slug: "start/scratch-4-prove",
|
|
60
|
+
label: "From scratch · 4 Prove",
|
|
61
|
+
blurb: "`done` closes it only through the gate; `check` and `report` show where it stands.",
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
slug: "start/scratch-5-every-day",
|
|
65
|
+
label: "From scratch · 5 Every day",
|
|
66
|
+
blurb: "The gate in CI and the five-command loop.",
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
slug: "start/existing-1-adopt",
|
|
70
|
+
label: "Existing project · 1 Adopt",
|
|
71
|
+
blurb: "`onboard` and `init` on a working codebase, touching no code.",
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
slug: "start/existing-2-specify",
|
|
75
|
+
label: "Existing project · 2 Specify",
|
|
76
|
+
blurb: "One behaviour you rely on, written as a requirement with a real example.",
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
slug: "start/existing-3-first-requirement",
|
|
80
|
+
label: "Existing project · 3 First requirement",
|
|
81
|
+
blurb: "The test you already have names it; `done` closes it.",
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
slug: "start/existing-4-ci",
|
|
85
|
+
label: "Existing project · 4 CI",
|
|
86
|
+
blurb: "The gate on every pull request, without fixing the past first.",
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
slug: "start/existing-5-every-day",
|
|
90
|
+
label: "Existing project · 5 Every day",
|
|
91
|
+
blurb: "One behaviour per bug fix, one module at a time.",
|
|
37
92
|
},
|
|
38
93
|
{
|
|
39
94
|
slug: "quickstart",
|
|
@@ -74,6 +129,48 @@ exports.NAV = [
|
|
|
74
129
|
},
|
|
75
130
|
],
|
|
76
131
|
},
|
|
132
|
+
{
|
|
133
|
+
title: "Proven on real products",
|
|
134
|
+
icon: "check",
|
|
135
|
+
summary: "Six products built from real client briefs — what worked, and what Specgate got wrong.",
|
|
136
|
+
entries: [
|
|
137
|
+
{
|
|
138
|
+
slug: "projects/index",
|
|
139
|
+
label: "All six, compared",
|
|
140
|
+
blurb: "Brief, stack, requirements and tests for each pilot, side by side.",
|
|
141
|
+
},
|
|
142
|
+
{
|
|
143
|
+
slug: "projects/rebar-crew",
|
|
144
|
+
label: "Rebar Crew — field app",
|
|
145
|
+
blurb: "Expo + Next.js: 47 of 47, after a first round that was done and unusable.",
|
|
146
|
+
},
|
|
147
|
+
{
|
|
148
|
+
slug: "projects/bookings",
|
|
149
|
+
label: "Bookings — appointments",
|
|
150
|
+
blurb: "Next.js from a detailed brief: 38 of 38 in five cycles.",
|
|
151
|
+
},
|
|
152
|
+
{
|
|
153
|
+
slug: "projects/credit-shop",
|
|
154
|
+
label: "Credit shop — e-commerce",
|
|
155
|
+
blurb: "A five-line brief became 24 requirements, nearly every value an assumption.",
|
|
156
|
+
},
|
|
157
|
+
{
|
|
158
|
+
slug: "projects/fincore",
|
|
159
|
+
label: "FinCore — core banking",
|
|
160
|
+
blurb: "Spring Boot: 59 of 60, one legal question left to the client.",
|
|
161
|
+
},
|
|
162
|
+
{
|
|
163
|
+
slug: "projects/eventtech",
|
|
164
|
+
label: "EventTech — event operations",
|
|
165
|
+
blurb: "Quarkus with event sourcing and real time: 38 of 38.",
|
|
166
|
+
},
|
|
167
|
+
{
|
|
168
|
+
slug: "projects/healthtech",
|
|
169
|
+
label: "HealthTech — clinical cases",
|
|
170
|
+
blurb: "Quarkus in a regulated domain: 23 of 24, no clinical rule invented.",
|
|
171
|
+
},
|
|
172
|
+
],
|
|
173
|
+
},
|
|
77
174
|
{
|
|
78
175
|
title: "The gate in CI",
|
|
79
176
|
icon: "server",
|
|
@@ -101,6 +198,11 @@ exports.NAV = [
|
|
|
101
198
|
label: "Worked example: brownfield adoption",
|
|
102
199
|
blurb: "An illustration — invented company, constructed numbers — of the workflow end to end.",
|
|
103
200
|
},
|
|
201
|
+
{
|
|
202
|
+
slug: "vs-openspec",
|
|
203
|
+
label: "Specgate or OpenSpec",
|
|
204
|
+
blurb: "Where they differ, where OpenSpec is ahead, and how to use both.",
|
|
205
|
+
},
|
|
104
206
|
{
|
|
105
207
|
slug: "openspec",
|
|
106
208
|
label: "Already on OpenSpec",
|
|
@@ -160,10 +262,15 @@ exports.NAV = [
|
|
|
160
262
|
label: "The harness",
|
|
161
263
|
blurb: "Unattended delivery: plan → agent → gate → done, one worktree per requirement.",
|
|
162
264
|
},
|
|
265
|
+
{
|
|
266
|
+
slug: "harness-report",
|
|
267
|
+
label: "What the harness has cost",
|
|
268
|
+
blurb: "First-attempt rate and cost per delivered requirement, from the run ledger.",
|
|
269
|
+
},
|
|
163
270
|
{
|
|
164
271
|
slug: "domain-packs",
|
|
165
272
|
label: "Domain packs",
|
|
166
|
-
blurb: "Install a
|
|
273
|
+
blurb: "Install requirements a pilot already proved, or package your own.",
|
|
167
274
|
},
|
|
168
275
|
{
|
|
169
276
|
slug: "alm",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nav.js","sourceRoot":"","sources":["../../../scripts/docs/nav.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;GAaG;;;
|
|
1
|
+
{"version":3,"file":"nav.js","sourceRoot":"","sources":["../../../scripts/docs/nav.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;GAaG;;;AAyVH,4BAEC;AAGD,4BAMC;AAGD,gCAKC;AAtVD;;;;;GAKG;AACU,QAAA,GAAG,GAA0B;IACxC;QACE,KAAK,EAAE,OAAO;QACd,IAAI,EAAE,QAAQ;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CAAC,KAAK,CAAC,IAAI,KAAK,IAAI,CAAC,CAAC;IACzD,IAAI,EAAE,KAAK,CAAC,CAAC;QAAE,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;IACjD,OAAO,EAAE,IAAI,EAAE,GAAG,CAAC,EAAE,GAAG,CAAC,CAAC,IAAI,IAAI,EAAE,IAAI,EAAE,GAAG,CAAC,EAAE,GAAG,CAAC,CAAC,IAAI,IAAI,EAAE,CAAC;AAClE,CAAC"}
|
|
@@ -0,0 +1,376 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* The getting-started journeys, recorded from the real CLI into the pages.
|
|
4
|
+
*
|
|
5
|
+
* `docs/start/*.md` shows what each command prints. Typed by hand, that output
|
|
6
|
+
* would be wrong by the next release — and a newcomer comparing their terminal
|
|
7
|
+
* with the page is exactly the reader who notices. So every output block is
|
|
8
|
+
* generated: this script builds the two projects in a scratch home, runs each
|
|
9
|
+
* step of `journey-storyboard.ts`, flattens what varies (paths, dates, SHAs)
|
|
10
|
+
* with the landing recording's own rules, and writes the result between the
|
|
11
|
+
* page's `out-<id>` sentinels.
|
|
12
|
+
*
|
|
13
|
+
* npm run docs:journey rewrite the blocks
|
|
14
|
+
* npm run docs:journey:check fail if a page no longer matches the CLI
|
|
15
|
+
*
|
|
16
|
+
* What a person or their agent writes between commands — the brief, the
|
|
17
|
+
* draft, the test, the code — is written here too, off the record, and every
|
|
18
|
+
* page says who wrote it. Nothing shown is staged: the commands are real.
|
|
19
|
+
*/
|
|
20
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
21
|
+
if (k2 === undefined) k2 = k;
|
|
22
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
23
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
24
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
25
|
+
}
|
|
26
|
+
Object.defineProperty(o, k2, desc);
|
|
27
|
+
}) : (function(o, m, k, k2) {
|
|
28
|
+
if (k2 === undefined) k2 = k;
|
|
29
|
+
o[k2] = m[k];
|
|
30
|
+
}));
|
|
31
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
32
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
33
|
+
}) : function(o, v) {
|
|
34
|
+
o["default"] = v;
|
|
35
|
+
});
|
|
36
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
37
|
+
var ownKeys = function(o) {
|
|
38
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
39
|
+
var ar = [];
|
|
40
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
41
|
+
return ar;
|
|
42
|
+
};
|
|
43
|
+
return ownKeys(o);
|
|
44
|
+
};
|
|
45
|
+
return function (mod) {
|
|
46
|
+
if (mod && mod.__esModule) return mod;
|
|
47
|
+
var result = {};
|
|
48
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
49
|
+
__setModuleDefault(result, mod);
|
|
50
|
+
return result;
|
|
51
|
+
};
|
|
52
|
+
})();
|
|
53
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
54
|
+
exports.LINGO_BRIEF = void 0;
|
|
55
|
+
exports.renderBlock = renderBlock;
|
|
56
|
+
exports.recordJourney = recordJourney;
|
|
57
|
+
exports.pagePath = pagePath;
|
|
58
|
+
const node_child_process_1 = require("node:child_process");
|
|
59
|
+
const fs = __importStar(require("node:fs"));
|
|
60
|
+
const os = __importStar(require("node:os"));
|
|
61
|
+
const path = __importStar(require("node:path"));
|
|
62
|
+
const record_terminal_1 = require("./record-terminal");
|
|
63
|
+
const blocks_1 = require("./blocks");
|
|
64
|
+
const journey_storyboard_1 = require("./journey-storyboard");
|
|
65
|
+
const ROOT = path.resolve(__dirname, "../../..");
|
|
66
|
+
const DOCS = path.join(ROOT, "docs");
|
|
67
|
+
const CHANGE = path.join("docs", "specs", "changes", "draft-bookings");
|
|
68
|
+
function commit(project, env, message) {
|
|
69
|
+
(0, record_terminal_1.run)(project, env, ["git", "add", "-A"]);
|
|
70
|
+
(0, record_terminal_1.run)(project, env, ["git", "commit", "-qm", message]);
|
|
71
|
+
}
|
|
72
|
+
// ── Writing the brief: Lingo ─────────────────────────────────────────────────
|
|
73
|
+
/** Lingo's brief as its owner wrote it: plain notes, no front matter. */
|
|
74
|
+
exports.LINGO_BRIEF = `# Lingo
|
|
75
|
+
|
|
76
|
+
Lingo is an online language school. A teacher runs small groups of adult
|
|
77
|
+
students.
|
|
78
|
+
|
|
79
|
+
The teacher creates courses by level and publishes lessons with their
|
|
80
|
+
material. Students follow their course on the web or on their phone, do the
|
|
81
|
+
exercises of each lesson and see their progress. The teacher sees each
|
|
82
|
+
student's progress and corrects written exercises.
|
|
83
|
+
|
|
84
|
+
We don't know yet whether students pay per course or per month.
|
|
85
|
+
`;
|
|
86
|
+
/** What the stand-in for Claude proposes. The real agent reads the same guide. */
|
|
87
|
+
const LINGO_FRONT_MATTER = `---
|
|
88
|
+
product: Lingo — online lessons for a language school
|
|
89
|
+
surfaces: [web, mobile]
|
|
90
|
+
actors:
|
|
91
|
+
- { name: Teacher, surfaces: [web] }
|
|
92
|
+
# check: the brief says students use "the web or their phone"
|
|
93
|
+
- { name: Student, surfaces: [web, mobile] }
|
|
94
|
+
modules: [courses, lessons, exercises, progress]
|
|
95
|
+
---
|
|
96
|
+
|
|
97
|
+
`;
|
|
98
|
+
function lingoProject(scratch, name, env) {
|
|
99
|
+
const project = path.join(scratch, name);
|
|
100
|
+
(0, record_terminal_1.write)(path.join(project, "package.json"), `${JSON.stringify({ name, version: "1.0.0", scripts: { test: "node --test" } }, null, 2)}\n`);
|
|
101
|
+
(0, record_terminal_1.gitInit)(project, env);
|
|
102
|
+
(0, record_terminal_1.run)(project, env, ["specgate", "init", "--no-capabilities"]);
|
|
103
|
+
commit(project, env, "npm init, specgate init");
|
|
104
|
+
return project;
|
|
105
|
+
}
|
|
106
|
+
const BRIEF_HOOKS = {
|
|
107
|
+
"brief-none": (project, env) => {
|
|
108
|
+
lingoProject(path.dirname(project), "lingo", env);
|
|
109
|
+
lingoProject(path.dirname(project), "lingo-new", env);
|
|
110
|
+
},
|
|
111
|
+
// You: your notes, saved as they are.
|
|
112
|
+
"brief-plain": (project, env) => {
|
|
113
|
+
const lingo = path.join(path.dirname(project), "lingo");
|
|
114
|
+
(0, record_terminal_1.write)(path.join(lingo, "docs", "brief.md"), exports.LINGO_BRIEF);
|
|
115
|
+
commit(lingo, env, "the brief");
|
|
116
|
+
},
|
|
117
|
+
// A stand-in for `claude -p` on PATH: it reads the prompt and does what
|
|
118
|
+
// BRIEF-SETUP.md asks — a front matter on top, the notes untouched.
|
|
119
|
+
"brief-agent": (project) => {
|
|
120
|
+
const scratch = path.dirname(project);
|
|
121
|
+
const fmFile = path.join(scratch, "tmp", "lingo-front-matter.md");
|
|
122
|
+
(0, record_terminal_1.write)(fmFile, LINGO_FRONT_MATTER);
|
|
123
|
+
const claude = path.join(scratch, "bin", "claude");
|
|
124
|
+
fs.writeFileSync(claude, [
|
|
125
|
+
"#!/usr/bin/env bash",
|
|
126
|
+
"cat > /dev/null",
|
|
127
|
+
`cat "${fmFile}" docs/brief.md > docs/brief.md.new && mv docs/brief.md.new docs/brief.md`,
|
|
128
|
+
'echo "Added a front matter to docs/brief.md: 2 actors, 4 modules; one line marked to check."',
|
|
129
|
+
"",
|
|
130
|
+
].join("\n"), { mode: 0o755 });
|
|
131
|
+
},
|
|
132
|
+
// You, reviewing: a tablet, an admin, a module written as a title.
|
|
133
|
+
"brief-error": (project) => {
|
|
134
|
+
const brief = path.join(path.dirname(project), "lingo", "docs", "brief.md");
|
|
135
|
+
const text = fs
|
|
136
|
+
.readFileSync(brief, "utf8")
|
|
137
|
+
.replace(" - { name: Teacher, surfaces: [web] }", " - { name: Teacher, surfaces: [web, tablet] }\n - { name: Admin }")
|
|
138
|
+
.replace("modules: [courses, lessons, exercises, progress]", "modules: [courses, lessons, Live classes, progress]");
|
|
139
|
+
(0, record_terminal_1.write)(brief, text);
|
|
140
|
+
},
|
|
141
|
+
// You: fixed — the front matter the agent proposed, reviewed.
|
|
142
|
+
"brief-ready": (project) => {
|
|
143
|
+
const brief = path.join(path.dirname(project), "lingo", "docs", "brief.md");
|
|
144
|
+
(0, record_terminal_1.write)(brief, LINGO_FRONT_MATTER + exports.LINGO_BRIEF);
|
|
145
|
+
},
|
|
146
|
+
};
|
|
147
|
+
// ── From scratch: court bookings ────────────────────────────────────────────
|
|
148
|
+
const SCRATCH_SETUP = {
|
|
149
|
+
// What `npm init -y` writes, minus what changes between npm versions.
|
|
150
|
+
before: (project, env) => {
|
|
151
|
+
(0, record_terminal_1.write)(path.join(project, "package.json"), `${JSON.stringify({ name: "court-bookings", version: "1.0.0", scripts: { test: "node --test" } }, null, 2)}\n`);
|
|
152
|
+
(0, record_terminal_1.gitInit)(project, env);
|
|
153
|
+
commit(project, env, "npm init");
|
|
154
|
+
},
|
|
155
|
+
steps: {
|
|
156
|
+
...BRIEF_HOOKS,
|
|
157
|
+
// You: the brief, as the client sent it.
|
|
158
|
+
"scratch-draft-list": (project, env) => {
|
|
159
|
+
(0, record_terminal_1.write)(path.join(project, "docs", "brief.md"), record_terminal_1.BRIEF_MD);
|
|
160
|
+
commit(project, env, "the specification setup and the brief");
|
|
161
|
+
},
|
|
162
|
+
// Your agent: the first draft, with the fee the brief never states.
|
|
163
|
+
"scratch-draft-check": (project) => {
|
|
164
|
+
(0, record_terminal_1.write)(path.join(project, CHANGE, "specs", "bookings", "spec.md"), (0, record_terminal_1.draftSpec)(false));
|
|
165
|
+
},
|
|
166
|
+
// You: the fee becomes a question; the HTTP codes an assumption.
|
|
167
|
+
"scratch-draft-check-again": (project) => {
|
|
168
|
+
(0, record_terminal_1.write)(path.join(project, CHANGE, "specs", "bookings", "spec.md"), (0, record_terminal_1.draftSpec)(true));
|
|
169
|
+
(0, record_terminal_1.write)(path.join(project, CHANGE, "assumptions.md"), record_terminal_1.ASSUMPTIONS_MD);
|
|
170
|
+
(0, record_terminal_1.write)(path.join(project, CHANGE, "questions.md"), record_terminal_1.QUESTIONS_MD);
|
|
171
|
+
},
|
|
172
|
+
// You or your agent: the test first, then the code.
|
|
173
|
+
"scratch-node-test": (project, env) => {
|
|
174
|
+
commit(project, env, "the specification");
|
|
175
|
+
(0, record_terminal_1.write)(path.join(project, "test", "bookings.test.js"), record_terminal_1.BOOKINGS_TEST_JS);
|
|
176
|
+
(0, record_terminal_1.write)(path.join(project, "src", "bookings.js"), record_terminal_1.BOOKINGS_JS);
|
|
177
|
+
},
|
|
178
|
+
"scratch-harness-prompt": (project, env) => commit(project, env, "REQ-002: book a court"),
|
|
179
|
+
"scratch-ci": (project, env) => commit(project, env, "REQ-002 done"),
|
|
180
|
+
},
|
|
181
|
+
};
|
|
182
|
+
// ── An existing project: invoicing ──────────────────────────────────────────
|
|
183
|
+
const TOTAL_JS = `/** Sum of the lines, VAT included, rounded to the cent. */
|
|
184
|
+
function total(lines, vatRate) {
|
|
185
|
+
const net = lines.reduce((sum, l) => sum + l.quantity * l.unitPrice, 0);
|
|
186
|
+
return Math.round(net * (1 + vatRate) * 100) / 100;
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
module.exports = { total };
|
|
190
|
+
`;
|
|
191
|
+
const NUMBERING_JS = `/** Invoice numbers run per year and never repeat: 2026-0001, 2026-0002, … */
|
|
192
|
+
const last = new Map();
|
|
193
|
+
|
|
194
|
+
function next(year) {
|
|
195
|
+
const n = (last.get(year) || 0) + 1;
|
|
196
|
+
last.set(year, n);
|
|
197
|
+
return \`\${year}-\${String(n).padStart(4, "0")}\`;
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
module.exports = { next };
|
|
201
|
+
`;
|
|
202
|
+
const CUSTOMERS_JS = `const customers = new Map();
|
|
203
|
+
|
|
204
|
+
function register(id, name, taxId) {
|
|
205
|
+
if (customers.has(id)) throw new Error("customer already registered");
|
|
206
|
+
customers.set(id, { id, name, taxId });
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
module.exports = { register, find: (id) => customers.get(id) };
|
|
210
|
+
`;
|
|
211
|
+
function totalTest(named) {
|
|
212
|
+
const tag = named ? "REQ-004: " : "";
|
|
213
|
+
return `const test = require("node:test");
|
|
214
|
+
const assert = require("node:assert");
|
|
215
|
+
const { total } = require("../src/invoices/total");
|
|
216
|
+
|
|
217
|
+
test("${tag}three lines at 21% VAT are rounded to the cent", () => {
|
|
218
|
+
const lines = [
|
|
219
|
+
{ quantity: 3, unitPrice: 0.1 },
|
|
220
|
+
{ quantity: 1, unitPrice: 19.99 },
|
|
221
|
+
{ quantity: 2, unitPrice: 4.55 },
|
|
222
|
+
];
|
|
223
|
+
assert.equal(total(lines, 0.21), 35.56);
|
|
224
|
+
});
|
|
225
|
+
`;
|
|
226
|
+
}
|
|
227
|
+
const NUMBERING_TEST_JS = `const test = require("node:test");
|
|
228
|
+
const assert = require("node:assert");
|
|
229
|
+
const { next } = require("../src/invoices/numbering");
|
|
230
|
+
|
|
231
|
+
test("numbers run per year", () => {
|
|
232
|
+
assert.equal(next(2026), "2026-0001");
|
|
233
|
+
assert.equal(next(2026), "2026-0002");
|
|
234
|
+
});
|
|
235
|
+
`;
|
|
236
|
+
const ROUNDING_FEATURE = (req, scn) => `Feature: An invoice total is rounded to the cent
|
|
237
|
+
|
|
238
|
+
@${req} @${scn}
|
|
239
|
+
Scenario: Three lines at 21% VAT
|
|
240
|
+
Given an invoice with lines of 3 × 0.10, 1 × 19.99 and 2 × 4.55
|
|
241
|
+
When its total is computed at 21% VAT
|
|
242
|
+
Then the total is 35.56
|
|
243
|
+
`;
|
|
244
|
+
const EXISTING_SETUP = {
|
|
245
|
+
before: (project, env) => {
|
|
246
|
+
(0, record_terminal_1.write)(path.join(project, "package.json"), `${JSON.stringify({ name: "invoicing", version: "2.3.0", scripts: { test: "node --test" } }, null, 2)}\n`);
|
|
247
|
+
(0, record_terminal_1.write)(path.join(project, "src", "invoices", "total.js"), TOTAL_JS);
|
|
248
|
+
(0, record_terminal_1.write)(path.join(project, "src", "invoices", "numbering.js"), NUMBERING_JS);
|
|
249
|
+
(0, record_terminal_1.write)(path.join(project, "src", "customers", "customers.js"), CUSTOMERS_JS);
|
|
250
|
+
(0, record_terminal_1.write)(path.join(project, "test", "total.test.js"), totalTest(false));
|
|
251
|
+
(0, record_terminal_1.write)(path.join(project, "test", "numbering.test.js"), NUMBERING_TEST_JS);
|
|
252
|
+
(0, record_terminal_1.gitInit)(project, env);
|
|
253
|
+
commit(project, env, "invoicing 2.3.0");
|
|
254
|
+
},
|
|
255
|
+
steps: {
|
|
256
|
+
"existing-status": (project, env) => commit(project, env, "adopt specgate"),
|
|
257
|
+
// You: the placeholders `new` wrote, replaced with the real example.
|
|
258
|
+
"existing-feature": (project) => {
|
|
259
|
+
const file = path.join(project, "features", "an-invoice-total-is-rounded-to.feature");
|
|
260
|
+
const tags = /@(REQ-\d+) @(SCN-\d+)/.exec(fs.readFileSync(file, "utf8"));
|
|
261
|
+
if (!tags)
|
|
262
|
+
throw new Error("`new` wrote no tags — the journey's scenario cannot be filled in");
|
|
263
|
+
fs.writeFileSync(file, ROUNDING_FEATURE(tags[1], tags[2]), "utf8");
|
|
264
|
+
const spec = path.join(project, "spec.md");
|
|
265
|
+
fs.writeFileSync(spec, fs
|
|
266
|
+
.readFileSync(spec, "utf8")
|
|
267
|
+
.replace(/(## REQ-004[^\n]*\n)([\s\S]*?)(?=\n## |\n---|$)/, (_m, head) => `${head}\n<!-- csda:trace kind=business-rule -->\n\nThe system SHALL round an invoice total, VAT included, to the cent.\n`), "utf8");
|
|
268
|
+
},
|
|
269
|
+
// You: the test you already had, now naming the requirement.
|
|
270
|
+
"existing-test": (project) => (0, record_terminal_1.write)(path.join(project, "test", "total.test.js"), totalTest(true)),
|
|
271
|
+
"existing-ci": (project, env) => commit(project, env, "REQ-004 done"),
|
|
272
|
+
},
|
|
273
|
+
};
|
|
274
|
+
const SETUP = {
|
|
275
|
+
scratch: SCRATCH_SETUP,
|
|
276
|
+
existing: EXISTING_SETUP,
|
|
277
|
+
};
|
|
278
|
+
function renderBlock(step, lines, omitted) {
|
|
279
|
+
const body = [`$ ${(0, journey_storyboard_1.displayCommand)(step)}`, ...lines];
|
|
280
|
+
if (omitted > 0)
|
|
281
|
+
body.push(`… ${omitted} more line${omitted === 1 ? "" : "s"}`);
|
|
282
|
+
return ["```text", ...body, "```"].join("\n");
|
|
283
|
+
}
|
|
284
|
+
function recordJourney(journey, keep = false) {
|
|
285
|
+
const scratch = fs.mkdtempSync(path.join(os.tmpdir(), "csda-journey-"));
|
|
286
|
+
const env = (0, record_terminal_1.buildEnv)(scratch);
|
|
287
|
+
const ctx = {
|
|
288
|
+
scratch: [...new Set([fs.realpathSync(scratch), scratch])].sort((a, b) => b.length - a.length),
|
|
289
|
+
repoRoot: ROOT,
|
|
290
|
+
home: os.homedir(),
|
|
291
|
+
hostname: os.hostname(),
|
|
292
|
+
shas: new Map(),
|
|
293
|
+
};
|
|
294
|
+
const project = path.join(scratch, journey.project);
|
|
295
|
+
const setup = SETUP[journey.id];
|
|
296
|
+
const out = [];
|
|
297
|
+
try {
|
|
298
|
+
(0, record_terminal_1.prepareBin)(scratch);
|
|
299
|
+
fs.mkdirSync(project, { recursive: true });
|
|
300
|
+
setup.before(project, env);
|
|
301
|
+
for (const step of journey.steps) {
|
|
302
|
+
setup.steps[step.id]?.(project, env);
|
|
303
|
+
const argv = step.shell ? ["bash", "-c", step.shell] : [...(step.argv || [])];
|
|
304
|
+
const r = (0, node_child_process_1.spawnSync)(argv[0], argv.slice(1), {
|
|
305
|
+
cwd: path.join(scratch, step.cwd),
|
|
306
|
+
env,
|
|
307
|
+
encoding: "utf8",
|
|
308
|
+
stdio: ["ignore", "pipe", "pipe"],
|
|
309
|
+
maxBuffer: 16 * 1024 * 1024,
|
|
310
|
+
});
|
|
311
|
+
if (r.error)
|
|
312
|
+
throw new Error(`${step.id}: ${r.error.message}`);
|
|
313
|
+
const lines = `${r.stdout || ""}${r.stderr || ""}`
|
|
314
|
+
.replace(/\r\n/g, "\n")
|
|
315
|
+
.split("\n")
|
|
316
|
+
.map((l) => (0, record_terminal_1.normalise)(l, ctx));
|
|
317
|
+
lines.forEach((l) => (0, record_terminal_1.assertNoSecrets)(l, step.id));
|
|
318
|
+
while (lines.length && lines[lines.length - 1].trim() === "")
|
|
319
|
+
lines.pop();
|
|
320
|
+
while (lines.length && lines[0].trim() === "")
|
|
321
|
+
lines.shift();
|
|
322
|
+
const kept = lines.slice(0, step.maxLines);
|
|
323
|
+
out.push({
|
|
324
|
+
step,
|
|
325
|
+
exit: r.status === null ? -1 : r.status,
|
|
326
|
+
block: renderBlock(step, kept, lines.length - kept.length),
|
|
327
|
+
});
|
|
328
|
+
}
|
|
329
|
+
return out;
|
|
330
|
+
}
|
|
331
|
+
finally {
|
|
332
|
+
if (keep)
|
|
333
|
+
process.stderr.write(`kept ${scratch}\n`);
|
|
334
|
+
else
|
|
335
|
+
fs.rmSync(scratch, { recursive: true, force: true });
|
|
336
|
+
}
|
|
337
|
+
}
|
|
338
|
+
function pagePath(step) {
|
|
339
|
+
return path.join(DOCS, `${step.page}.md`);
|
|
340
|
+
}
|
|
341
|
+
function main() {
|
|
342
|
+
const check = process.argv.includes("--check");
|
|
343
|
+
const keep = process.argv.includes("--keep");
|
|
344
|
+
const problems = [];
|
|
345
|
+
for (const journey of journey_storyboard_1.JOURNEYS) {
|
|
346
|
+
for (const { step, exit, block } of recordJourney(journey, keep)) {
|
|
347
|
+
const expected = step.expectExit ?? 0;
|
|
348
|
+
if (exit !== expected)
|
|
349
|
+
problems.push(`${step.id} exited ${exit}, expected ${expected}`);
|
|
350
|
+
const file = pagePath(step);
|
|
351
|
+
const source = fs.existsSync(file) ? fs.readFileSync(file, "utf8") : "";
|
|
352
|
+
if (check) {
|
|
353
|
+
if (((0, blocks_1.readBlock)(source, (0, journey_storyboard_1.blockName)(step)) || "") !== block.trim()) {
|
|
354
|
+
problems.push(`${step.page}.md: ${(0, journey_storyboard_1.blockName)(step)} no longer matches the CLI`);
|
|
355
|
+
}
|
|
356
|
+
}
|
|
357
|
+
else if (source) {
|
|
358
|
+
fs.writeFileSync(file, (0, blocks_1.replaceBlock)(source, (0, journey_storyboard_1.blockName)(step), block), "utf8");
|
|
359
|
+
}
|
|
360
|
+
else {
|
|
361
|
+
problems.push(`${step.page}.md does not exist`);
|
|
362
|
+
}
|
|
363
|
+
}
|
|
364
|
+
}
|
|
365
|
+
if (problems.length > 0) {
|
|
366
|
+
process.stderr.write(`${problems.join("\n")}\n`);
|
|
367
|
+
if (check)
|
|
368
|
+
process.stderr.write("run `npm run docs:journey`\n");
|
|
369
|
+
process.exitCode = 1;
|
|
370
|
+
return;
|
|
371
|
+
}
|
|
372
|
+
process.stdout.write(check ? "the journey pages are current\n" : "recorded the journey pages\n");
|
|
373
|
+
}
|
|
374
|
+
if (require.main === module)
|
|
375
|
+
main();
|
|
376
|
+
//# sourceMappingURL=record-journey.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"record-journey.js","sourceRoot":"","sources":["../../../scripts/docs/record-journey.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;GAiBG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkTH,kCAIC;AAED,sCA+CC;AAED,4BAEC;AAzWD,2DAA+C;AAC/C,4CAA8B;AAC9B,4CAA8B;AAC9B,gDAAkC;AAElC,uDAe2B;AAC3B,qCAAmD;AACnD,6DAM8B;AAE9B,MAAM,IAAI,GAAG,IAAI,CAAC,OAAO,CAAC,SAAS,EAAE,UAAU,CAAC,CAAC;AACjD,MAAM,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;AA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