@tekyzinc/gsd-t 5.9.10 → 5.10.11
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 +28 -0
- package/README.md +1 -1
- package/bin/gsd-t-claude-md-changelog.cjs +360 -0
- package/bin/gsd-t-project-history.cjs +374 -0
- package/bin/gsd-t-rule-mine.cjs +467 -0
- package/bin/gsd-t.js +8 -0
- package/commands/gsd-t-init.md +13 -0
- package/commands/gsd-t-setup.md +108 -74
- package/package.json +1 -1
- package/scripts/gsd-t-changelog-check.js +67 -0
- package/scripts/gsd-t-changelog-post-edit.js +73 -0
- package/templates/CLAUDE-project.md +50 -107
package/commands/gsd-t-setup.md
CHANGED
|
@@ -72,109 +72,133 @@ CLAUDE.md Analysis:
|
|
|
72
72
|
|
|
73
73
|
Note: "No existing CLAUDE.md — will generate from scratch."
|
|
74
74
|
|
|
75
|
-
## Step
|
|
75
|
+
## Step 3.5: Read what actually happened here
|
|
76
76
|
|
|
77
|
-
|
|
77
|
+
Before writing anything, read the project's own history. A rule that keeps
|
|
78
|
+
getting broken is the rule that most needs writing down, and nobody remembers
|
|
79
|
+
those on request — they have to be found.
|
|
78
80
|
|
|
79
|
-
|
|
81
|
+
```bash
|
|
82
|
+
node bin/gsd-t-project-history.cjs --project . --json
|
|
83
|
+
```
|
|
80
84
|
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
3. **Workflow Preferences**: "Any overrides to the global defaults? (Research Policy, Phase Flow)" (skip if user has no overrides)
|
|
84
|
-
4. **Deployed URLs**: "Production, staging, and local URLs?" (skip if found in .env or existing docs)
|
|
85
|
-
5. **Project-specific rules**: "Any 'never do' rules specific to this project?" (skip if existing CLAUDE.md already has them)
|
|
85
|
+
Three sources, cheapest first. Each reports whether it was there; a missing one
|
|
86
|
+
is **named**, never skipped in silence:
|
|
86
87
|
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
- Anything already covered by the global CLAUDE.md
|
|
88
|
+
| Source | What it gives |
|
|
89
|
+
|---|---|
|
|
90
|
+
| Git | Files fixed the same way repeatedly, and real reverts |
|
|
91
|
+
| Decision log | Directives already recorded, with dates |
|
|
92
|
+
| Past sessions | What the user typed when something kept going wrong |
|
|
93
93
|
|
|
94
|
-
|
|
94
|
+
Session history is large — one project holds 315 MB — so the tool funnels it:
|
|
95
|
+
keep only the user's own turns, drop pasted logs, keep only complaint-shaped
|
|
96
|
+
lines. Under a second, and the result fits in context.
|
|
95
97
|
|
|
96
|
-
|
|
98
|
+
**If it exits 4, there is no history at all.** Do not carry on and write a
|
|
99
|
+
thinner file. Stop and ask:
|
|
97
100
|
|
|
98
|
-
```
|
|
99
|
-
|
|
101
|
+
```
|
|
102
|
+
Sources found: git 67 commits | decision log 1 line | sessions 0 | contracts 0
|
|
100
103
|
|
|
101
|
-
|
|
102
|
-
**Expected branch**: {branch}
|
|
104
|
+
I can mine 0 rules from this project's history.
|
|
103
105
|
|
|
104
|
-
|
|
105
|
-
|
|
106
|
+
a) Write stack and commands only — the rules section left out, with the
|
|
107
|
+
reason written into the file. Not a normal CLAUDE.md.
|
|
108
|
+
b) You dictate the rules now.
|
|
109
|
+
c) Stop.
|
|
110
|
+
```
|
|
106
111
|
|
|
107
|
-
|
|
108
|
-
|
|
112
|
+
Whichever they pick, the gap goes **into the generated file** — "Rules: none
|
|
113
|
+
derivable, no project history" — so thinness stays visible rather than reading
|
|
114
|
+
as "this project has no rules."
|
|
109
115
|
|
|
110
|
-
##
|
|
116
|
+
## Step 4: Show the rules found, and let the user tick them
|
|
111
117
|
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
| {component} | {path} |
|
|
118
|
+
Do **not** ask the user to recall rules. Mine every rule the project already
|
|
119
|
+
states, and let them confirm:
|
|
115
120
|
|
|
116
|
-
|
|
117
|
-
|
|
121
|
+
```bash
|
|
122
|
+
node bin/gsd-t-rule-mine.cjs --project . --top 12
|
|
123
|
+
```
|
|
118
124
|
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
- Architecture: docs/architecture.md
|
|
122
|
-
- Workflows: docs/workflows.md
|
|
123
|
-
- Infrastructure: docs/infrastructure.md
|
|
125
|
+
Six sources, ranked by how many agree — a rule found in three places ranks top,
|
|
126
|
+
because repetition is the evidence. The output is a tick-list:
|
|
124
127
|
|
|
125
|
-
|
|
126
|
-
|
|
128
|
+
```
|
|
129
|
+
12 candidate rules for binvoice. Tick the ones that must NEVER be broken.
|
|
127
130
|
|
|
128
|
-
|
|
129
|
-
|
|
131
|
+
RULE SEEN IN
|
|
132
|
+
1 [ ] NEVER contact the buyer directly CLAUDE.md (HC-003)
|
|
133
|
+
2 [ ] TEXT-FIRST capture (enforced by a pre-write gate) CLAUDE.md (HC-004)
|
|
134
|
+
3 [ ] NEVER scan the whole page CLAUDE.md (HC-005)
|
|
130
135
|
|
|
131
|
-
|
|
132
|
-
|
|
136
|
+
Tick numbers (e.g. 1,3,4) or 'all':
|
|
137
|
+
```
|
|
133
138
|
|
|
134
|
-
|
|
135
|
-
|
|
139
|
+
The right-hand column is what makes this fast — the user is confirming
|
|
140
|
+
something they already said, not recalling it. **Cap the screen at 12.**
|
|
141
|
+
Anything below goes to `.gsd-t/setup-rules-full.md`; nothing is dropped.
|
|
136
142
|
|
|
137
|
-
|
|
138
|
-
|
|
143
|
+
**Never invent a rule.** Every one comes from somewhere in the project, and the
|
|
144
|
+
tick-list shows where. A rule the user did not tick is not inviolable — it may
|
|
145
|
+
still belong elsewhere in the file, but not in that section.
|
|
139
146
|
|
|
140
|
-
|
|
141
|
-
{Project-specific conventions that differ from or extend global defaults}
|
|
147
|
+
**Determine these by reading, never by asking:**
|
|
142
148
|
|
|
143
|
-
|
|
144
|
-
|
|
149
|
+
| | How |
|
|
150
|
+
|---|---|
|
|
151
|
+
| Which branch | `git branch --show-current` |
|
|
152
|
+
| Where the repo misleads | Two version fields disagreeing, a legacy path that still looks live |
|
|
153
|
+
| Which files are dangerous | Fixed 5+ times in the git history |
|
|
154
|
+
| Stack, build, test | The manifest |
|
|
145
155
|
|
|
146
|
-
|
|
147
|
-
|
|
156
|
+
**Ask only if genuinely unresolvable:** the autonomy level when no existing
|
|
157
|
+
CLAUDE.md declares one, and deployed URLs when nothing records them.
|
|
148
158
|
|
|
149
|
-
##
|
|
150
|
-
| Variable | Purpose | Default |
|
|
151
|
-
|----------|---------|---------|
|
|
152
|
-
| {VAR} | {purpose} | {default} |
|
|
159
|
+
## Step 5: Generate CLAUDE.md
|
|
153
160
|
|
|
154
|
-
|
|
155
|
-
-
|
|
156
|
-
- **Staging**: {url}
|
|
157
|
-
- **Local**: http://localhost:{port}
|
|
161
|
+
Use the mold at `templates/CLAUDE-project.md`. It is a real mold — do NOT copy
|
|
162
|
+
any existing project's file, and never GSD-T's own.
|
|
158
163
|
|
|
159
|
-
|
|
160
|
-
{Project-specific rules only — don't repeat global rules}
|
|
164
|
+
**Every section may be left out, with the reason stated. None may be padded.**
|
|
161
165
|
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
-
|
|
165
|
-
-
|
|
166
|
-
|
|
166
|
+
| Section | Include when | Fill from |
|
|
167
|
+
|---|---|---|
|
|
168
|
+
| Title + one-line what-this-is | Always | The manifest, the README |
|
|
169
|
+
| **Rules that can never be broken** | The user ticked at least one | Step 4's tick-list, verbatim |
|
|
170
|
+
| Where the repo misleads you | Reading the code gives a confident wrong answer | Determined, never asked |
|
|
171
|
+
| Files riskier than they look | Some file was fixed 5+ times | Git history |
|
|
172
|
+
| Where this differs from global | A genuine difference exists | Compared against `~/.claude/CLAUDE.md` |
|
|
173
|
+
| Stack and commands | Always | The manifest |
|
|
174
|
+
| Where things are written down | Always | Fixed pointers |
|
|
167
175
|
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
176
|
+
**Target 40–70 lines.** If it is longer, something in it is either restating a
|
|
177
|
+
global rule or repeating what the repo already says.
|
|
178
|
+
|
|
179
|
+
### What must never appear
|
|
171
180
|
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
181
|
+
| Never | Why |
|
|
182
|
+
|---|---|
|
|
183
|
+
| Anything the global file already says | Three projects each paste the entire Destructive Action Guard verbatim — 15 wasted lines apiece |
|
|
184
|
+
| Anything a hook or gate enforces | The machine does not read this file |
|
|
185
|
+
| A version number, a line count, "currently in progress" | Wrong within a week. It belongs in `progress.md` |
|
|
186
|
+
| A file listing, a dependency list, a command count | The repo answers it, and answers it currently |
|
|
187
|
+
| A rule nobody stated | Every rule comes from the tick-list, and the tick-list shows its source |
|
|
177
188
|
|
|
189
|
+
### The line that matters most
|
|
190
|
+
|
|
191
|
+
A rule states **what must never happen and what breaks if it does**. If it is
|
|
192
|
+
enforced by a hook or a gate, say so — the reader should know a machine is
|
|
193
|
+
watching:
|
|
194
|
+
|
|
195
|
+
```
|
|
196
|
+
- **Never touch facebook.com** — no permissions, no requests, no DOM writes.
|
|
197
|
+
A single write turns a read-only observer into an actor on someone else's
|
|
198
|
+
account. Enforced by a pre-write gate.
|
|
199
|
+
```
|
|
200
|
+
|
|
201
|
+
Not: *"Be careful with Facebook interactions."*
|
|
178
202
|
## Step 5.5: Quality North Star Configuration
|
|
179
203
|
|
|
180
204
|
After generating the CLAUDE.md content (Step 5) and before presenting it to the user, offer a Quality North Star section if one is not already present.
|
|
@@ -275,6 +299,16 @@ Wait for user confirmation before writing.
|
|
|
275
299
|
2. Verify it's valid markdown (no broken tables, unclosed code blocks)
|
|
276
300
|
3. If `.gsd-t/progress.md` exists, log the setup in the Decision Log
|
|
277
301
|
|
|
302
|
+
## Step 7.5: Update CLAUDE.md Changelog (M110)
|
|
303
|
+
|
|
304
|
+
After writing the project CLAUDE.md, update the changelog:
|
|
305
|
+
|
|
306
|
+
```bash
|
|
307
|
+
node bin/gsd-t-claude-md-changelog.cjs append . rewritten "Generated via /gsd-t-setup"
|
|
308
|
+
```
|
|
309
|
+
|
|
310
|
+
If the changelog file doesn't exist, the command scaffolds it first.
|
|
311
|
+
|
|
278
312
|
## Document Ripple
|
|
279
313
|
|
|
280
314
|
### Always update:
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tekyzinc/gsd-t",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.10.11",
|
|
4
4
|
"description": "GSD-T: Contract-Driven Development for Claude Code — 54 slash commands with headless-by-default workflow spawning, unattended supervisor relay with event stream, graph-powered code analysis, real-time agent dashboard, task telemetry, doc-ripple enforcement, backlog management, impact analysis, test sync, milestone archival, and PRD generation",
|
|
5
5
|
"author": "Tekyz, Inc.",
|
|
6
6
|
"license": "MIT",
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* gsd-t-changelog-check.js
|
|
4
|
+
*
|
|
5
|
+
* SessionStart hook: checks if CLAUDE.md was modified outside GSD-T since the
|
|
6
|
+
* last tracked changelog entry. If so, appends an "External update detected" entry.
|
|
7
|
+
*
|
|
8
|
+
* Runs once at session start, not on every prompt.
|
|
9
|
+
* Exit codes:
|
|
10
|
+
* 0 — success (up to date, or external update logged)
|
|
11
|
+
* 1 — not a GSD-T project (no .gsd-t/), or no CLI found — silent skip, not an error
|
|
12
|
+
* 2 — changelog CLI failed unexpectedly
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
const { execSync } = require('child_process');
|
|
16
|
+
const path = require('path');
|
|
17
|
+
const fs = require('fs');
|
|
18
|
+
|
|
19
|
+
function findCli() {
|
|
20
|
+
const globalRoot = execSync('npm root -g', { encoding: 'utf8' }).trim();
|
|
21
|
+
const globalCli = path.join(globalRoot, '@tekyzinc', 'gsd-t', 'bin', 'gsd-t-claude-md-changelog.cjs');
|
|
22
|
+
if (fs.existsSync(globalCli)) return globalCli;
|
|
23
|
+
|
|
24
|
+
const localCli = path.join(process.cwd(), 'bin', 'gsd-t-claude-md-changelog.cjs');
|
|
25
|
+
if (fs.existsSync(localCli)) return localCli;
|
|
26
|
+
|
|
27
|
+
return null;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
function main() {
|
|
31
|
+
const cwd = process.cwd();
|
|
32
|
+
|
|
33
|
+
// Only run in GSD-T projects — silent exit if not
|
|
34
|
+
if (!fs.existsSync(path.join(cwd, '.gsd-t'))) {
|
|
35
|
+
process.exit(0);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
const cli = findCli();
|
|
39
|
+
if (!cli) {
|
|
40
|
+
// CLI not installed — silent exit (GSD-T may not be fully set up yet)
|
|
41
|
+
process.exit(0);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
let checkResult;
|
|
45
|
+
try {
|
|
46
|
+
checkResult = execSync(`node "${cli}" check-external "${cwd}"`, { encoding: 'utf8' });
|
|
47
|
+
// Exit code 0 = up to date
|
|
48
|
+
process.exit(0);
|
|
49
|
+
} catch (e) {
|
|
50
|
+
if (e.status === 1) {
|
|
51
|
+
// External update detected — append entry
|
|
52
|
+
execSync(`node "${cli}" append "${cwd}" external`, { encoding: 'utf8' });
|
|
53
|
+
process.stdout.write('CLAUDE.md changelog: external update detected and logged.\n');
|
|
54
|
+
process.exit(0);
|
|
55
|
+
}
|
|
56
|
+
if (e.status === 2) {
|
|
57
|
+
// Corrupt changelog — report but don't block session
|
|
58
|
+
process.stderr.write('CLAUDE.md changelog is corrupt. Run: node bin/gsd-t-claude-md-changelog.cjs get-last-entry-time .\n');
|
|
59
|
+
process.exit(0);
|
|
60
|
+
}
|
|
61
|
+
// Unexpected error — report it
|
|
62
|
+
process.stderr.write('CLAUDE.md changelog check failed: ' + (e.message || 'unknown error') + '\n');
|
|
63
|
+
process.exit(2);
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
main();
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* gsd-t-changelog-post-edit.js
|
|
4
|
+
*
|
|
5
|
+
* PostToolUse hook for Write|Edit: after a successful write to CLAUDE.md,
|
|
6
|
+
* reminds Claude to update the changelog.
|
|
7
|
+
*
|
|
8
|
+
* Receives JSON on stdin with tool_input containing file_path.
|
|
9
|
+
* Outputs reminder text to stdout if the target was CLAUDE.md.
|
|
10
|
+
*
|
|
11
|
+
* Does NOT auto-append — Claude should consciously decide what changed and
|
|
12
|
+
* call the append command with appropriate bullets.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
const fs = require('fs');
|
|
16
|
+
const path = require('path');
|
|
17
|
+
|
|
18
|
+
let input = '';
|
|
19
|
+
process.stdin.setEncoding('utf8');
|
|
20
|
+
process.stdin.on('data', (chunk) => { input += chunk; });
|
|
21
|
+
process.stdin.on('end', () => {
|
|
22
|
+
let data;
|
|
23
|
+
try {
|
|
24
|
+
data = JSON.parse(input);
|
|
25
|
+
} catch {
|
|
26
|
+
process.exit(0);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
// Get the file path from tool_input
|
|
30
|
+
const toolInput = data.tool_input;
|
|
31
|
+
if (!toolInput) {
|
|
32
|
+
process.exit(0);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
let filePath;
|
|
36
|
+
if (typeof toolInput === 'string') {
|
|
37
|
+
try {
|
|
38
|
+
const parsed = JSON.parse(toolInput);
|
|
39
|
+
filePath = parsed.file_path;
|
|
40
|
+
} catch {
|
|
41
|
+
process.exit(0);
|
|
42
|
+
}
|
|
43
|
+
} else if (typeof toolInput === 'object') {
|
|
44
|
+
filePath = toolInput.file_path;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
if (!filePath) {
|
|
48
|
+
process.exit(0);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
// Check if it's CLAUDE.md (root or .claude/)
|
|
52
|
+
const basename = path.basename(filePath);
|
|
53
|
+
if (basename !== 'CLAUDE.md') {
|
|
54
|
+
process.exit(0);
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
// Check if it's NOT the global ~/.claude/CLAUDE.md (only track project CLAUDE.md)
|
|
58
|
+
const homeClaudeMd = path.join(process.env.HOME || '', '.claude', 'CLAUDE.md');
|
|
59
|
+
if (path.resolve(filePath) === path.resolve(homeClaudeMd)) {
|
|
60
|
+
process.exit(0);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
// It's a project CLAUDE.md — remind to update changelog
|
|
64
|
+
const projectDir = data.cwd || process.cwd();
|
|
65
|
+
const changelogPath = path.join(projectDir, 'CLAUDE.md updates.md');
|
|
66
|
+
|
|
67
|
+
process.stdout.write(
|
|
68
|
+
`[M110] You just modified CLAUDE.md. Update the changelog:\n` +
|
|
69
|
+
` node bin/gsd-t-claude-md-changelog.cjs append "${projectDir}" updated "" '["<describe what changed>"]'\n`
|
|
70
|
+
);
|
|
71
|
+
|
|
72
|
+
process.exit(0);
|
|
73
|
+
});
|
|
@@ -1,127 +1,70 @@
|
|
|
1
|
-
#
|
|
1
|
+
# {PROJECT_NAME}
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
{ONE_LINE_WHAT_THIS_IS}
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
> Everything general lives in `~/.claude/CLAUDE.md` and applies here. This file
|
|
6
|
+
> holds only what is true of this project and nothing else.
|
|
6
7
|
|
|
7
|
-
|
|
8
|
+
## Rules that can never be broken
|
|
8
9
|
|
|
9
|
-
|
|
10
|
+
<!--
|
|
11
|
+
Ticked by David from what the project already says. Nothing invented, nothing
|
|
12
|
+
copied from the global file. If a rule is enforced by a hook or a gate, say so
|
|
13
|
+
— the reader should know a machine is watching.
|
|
10
14
|
|
|
11
|
-
|
|
15
|
+
Leave this section out entirely if none were found, and say why.
|
|
16
|
+
-->
|
|
17
|
+
{RULES}
|
|
12
18
|
|
|
13
|
-
|
|
19
|
+
## Where the repo misleads you
|
|
14
20
|
|
|
15
|
-
|
|
21
|
+
<!--
|
|
22
|
+
Only where reading the code gives a confident WRONG answer — two version
|
|
23
|
+
fields disagreeing, a legacy path that still looks live, a config that is not
|
|
24
|
+
the one in use. Leave out if none.
|
|
25
|
+
-->
|
|
26
|
+
{MISLEADS}
|
|
16
27
|
|
|
17
|
-
|
|
18
|
-
- **Distribution**: npm package `@tekyzinc/gsd-t`
|
|
19
|
-
- **CLI**: `bin/gsd-t.js` (install, update, init, status, uninstall, doctor, graph, headless, …)
|
|
20
|
-
- **Testing**: `npm test` (Node built-in test runner) + manual CLI testing
|
|
28
|
+
## Files that are riskier than they look
|
|
21
29
|
|
|
22
|
-
|
|
30
|
+
<!--
|
|
31
|
+
Determined by reading, never asked. A file fixed the same way five times is a
|
|
32
|
+
rule nobody wrote down. Say what breaks, not just which file. Leave out if none.
|
|
33
|
+
-->
|
|
34
|
+
{DANGER_MAP}
|
|
23
35
|
|
|
24
|
-
|
|
25
|
-
bin/ — CLI entry (gsd-t.js) + orchestrators (orchestrator.js, design-orchestrator.js)
|
|
26
|
-
+ support modules (gsd-t-context-brief.cjs, cli-preflight.cjs, gsd-t-verify-gate.cjs, gsd-t-model-tier-policy.cjs, …)
|
|
27
|
-
commands/ — slash commands for Claude Code (GSD-T workflow + utility)
|
|
28
|
-
templates/ — document + prompt + stack templates
|
|
29
|
-
CLAUDE-{global,project}.md, requirements.md, architecture.md, workflows.md,
|
|
30
|
-
infrastructure.md, progress.md, backlog.md, backlog-settings.md, design-contract.md
|
|
31
|
-
prompts/ — validation subagent protocols (qa, red-team, design-verify)
|
|
32
|
-
stacks/ — Stack Rules Engine templates (injected at spawn time)
|
|
33
|
-
scripts/ — runtime scripts (design review, context meter hook, event writer)
|
|
34
|
-
examples/ — example project structure + settings
|
|
35
|
-
docs/methodology.md — GSD → GSD-T evolution and concepts
|
|
36
|
-
package.json, README.md, GSD-T-README.md, CHANGELOG.md
|
|
37
|
-
```
|
|
36
|
+
## Where this differs from the global rules
|
|
38
37
|
|
|
39
|
-
|
|
38
|
+
<!-- ONLY genuine differences. An empty table means there are none — leave it out. -->
|
|
40
39
|
|
|
41
|
-
|
|
40
|
+
| Global default | Here | Why |
|
|
41
|
+
|---|---|---|
|
|
42
|
+
{OVERRIDES}
|
|
42
43
|
|
|
43
|
-
|
|
44
|
-
- Changes to command files change the methodology itself — treat them as code; verify by running the workflow.
|
|
45
|
-
- The `.gsd-t/` state dir coexists with the commands that *define* `.gsd-t/` — intentional.
|
|
46
|
-
- `bin/gsd-t.js` is the primary testable surface; command files are validated by use.
|
|
44
|
+
## Stack and commands
|
|
47
45
|
|
|
48
|
-
|
|
46
|
+
{STACK}
|
|
49
47
|
|
|
50
|
-
|
|
48
|
+
| | |
|
|
49
|
+
|---|---|
|
|
50
|
+
| Build | `{BUILD_CMD}` |
|
|
51
|
+
| Test | `{TEST_CMD}` |
|
|
52
|
+
| Branch | `{BRANCH}` |
|
|
51
53
|
|
|
52
|
-
|
|
54
|
+
## Where things are written down
|
|
53
55
|
|
|
54
|
-
|
|
56
|
+
| | |
|
|
57
|
+
|---|---|
|
|
58
|
+
| State and decisions | `.gsd-t/progress.md` |
|
|
59
|
+
| Interfaces between parts | `.gsd-t/contracts/` |
|
|
60
|
+
| How to reach environments | `docs/infrastructure.md` |
|
|
55
61
|
|
|
56
|
-
|
|
62
|
+
<!--
|
|
63
|
+
Written {GENERATED_DATE} from this project's own history.
|
|
57
64
|
|
|
58
|
-
|
|
65
|
+
Nothing above should carry a number that changes on its own — no version, no
|
|
66
|
+
line count, no "currently in progress". Those belong in progress.md, and a
|
|
67
|
+
file that repeats them is wrong within a week.
|
|
59
68
|
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
Phase orchestration lives in `templates/workflows/`. Each command file (`commands/gsd-t-*.md`) is a thin invoker that calls `Workflow({scriptPath, args})`. Canonical scripts:
|
|
63
|
-
|
|
64
|
-
- `gsd-t-execute.workflow.js` — preflight → brief → file-disjointness → parallel(domain workers) → integrate → verify-gate
|
|
65
|
-
- `gsd-t-verify.workflow.js` — orthogonal triad with M57 CI-parity + M58 test-data purge as FAIL-blocking gates
|
|
66
|
-
- `gsd-t-wave.workflow.js`, `-integrate`, `-debug`, `-quick`, `-phase` (generic upper-stage runner)
|
|
67
|
-
|
|
68
|
-
Shared helpers: `templates/workflows/_lib.js`. Each helper prefers project-local `bin/<tool>.cjs` and falls back to global `gsd-t` PATH binary.
|
|
69
|
-
|
|
70
|
-
The brains stay in `bin/`: `gsd-t-file-disjointness.cjs`, `gsd-t-task-graph.cjs`, `gsd-t-context-brief.cjs`, `cli-preflight.cjs`, `gsd-t-verify-gate.cjs`, `gsd-t-verify-gate-judge.cjs`, `gsd-t-build-coverage.cjs`, `gsd-t-ci-parity.cjs`, `gsd-t-test-data-ledger.cjs`, `journey-coverage.cjs`. Workflows invoke them via `lib.*` helpers.
|
|
71
|
-
|
|
72
|
-
## Validation Protocols (KEPT — methodology layer)
|
|
73
|
-
|
|
74
|
-
Three validation protocol bodies stay at `templates/prompts/`:
|
|
75
|
-
- `qa-subagent.md` — test mechanics + shallow-test detection + contract compliance
|
|
76
|
-
- `red-team-subagent.md` — adversarial / security / boundaries; verdict `FAIL` / `GRUDGING-PASS`
|
|
77
|
-
- `design-verify-subagent.md` — visual MATCH/DEVIATION against the design contract
|
|
78
|
-
|
|
79
|
-
These are invoked as Workflow `agent()` stages with schema-validated output. The methodology body is unchanged; only the invocation context (Workflow stage vs. Task subagent) updated. Per `.gsd-t/contracts/orthogonal-validation-contract.md` v1.0.0 STABLE.
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
# Destructive Action Guard (MANDATORY)
|
|
83
|
-
|
|
84
|
-
**NEVER perform destructive or structural changes without explicit user approval.** This applies at ALL autonomy levels.
|
|
85
|
-
|
|
86
|
-
Before any of these actions, STOP and ask the user:
|
|
87
|
-
- DROP TABLE, DROP COLUMN, DROP INDEX, TRUNCATE, DELETE without WHERE
|
|
88
|
-
- Renaming or removing database tables or columns
|
|
89
|
-
- Schema migrations that lose data or break existing queries
|
|
90
|
-
- Replacing an existing architecture pattern (e.g., normalized → denormalized)
|
|
91
|
-
- Removing or replacing existing files/modules that contain working functionality
|
|
92
|
-
- Changing ORM models in ways that conflict with the existing database schema
|
|
93
|
-
- Removing API endpoints or changing response shapes that existing clients depend on
|
|
94
|
-
- Any change that would require other parts of the system to be rewritten
|
|
95
|
-
|
|
96
|
-
**Rule: "Adapt new code to existing structures, not the other way around."**
|
|
97
|
-
|
|
98
|
-
## Pre-Commit Gate (project-specific additions)
|
|
99
|
-
|
|
100
|
-
The global gate applies first (see `~/.claude/CLAUDE.md`). Additionally for this repo:
|
|
101
|
-
|
|
102
|
-
- **Command file interface/behavior changed** → update `GSD-T-README.md` + `README.md` commands table + `templates/CLAUDE-global.md` + `commands/gsd-t-help.md`.
|
|
103
|
-
- **Command added/removed** → update all 4 files above, bump `package.json`, update any command-counting logic in `bin/gsd-t.js`.
|
|
104
|
-
- **New command invokes a Workflow** → verify `scriptPath` resolves to `templates/workflows/<name>.workflow.js` and `args` shape matches the script's `meta.phases`.
|
|
105
|
-
- **CLI installer changed** → smoke test `install`, `update`, `status`, `doctor`, `init`, `uninstall`.
|
|
106
|
-
- **Template changed** → verify `gsd-t-init` still produces correct output.
|
|
107
|
-
- **Wave flow changed (phases added/removed/reordered)** → update `gsd-t-wave.md`, `GSD-T-README.md` wave diagram, `README.md` workflow section.
|
|
108
|
-
- **Contract or domain boundary changed** → update `.gsd-t/contracts/` and owning `scope.md`.
|
|
109
|
-
|
|
110
|
-
## Don't
|
|
111
|
-
|
|
112
|
-
- NEVER add external npm runtime dependencies to the installer — zero-dep invariant.
|
|
113
|
-
- NEVER rename a command without updating all 4 reference files above.
|
|
114
|
-
- NEVER modify wave phase sequence without updating wave, README, GSD-T-README in the same commit.
|
|
115
|
-
- NEVER let installer's command count diverge from `commands/` directory reality.
|
|
116
|
-
- NEVER inline validation-subagent protocol bodies into Workflow scripts — `_lib.loadProtocol("qa"|"red-team"|"design-verify")` reads the methodology body from `templates/prompts/`.
|
|
117
|
-
|
|
118
|
-
## Recovery After Interruption
|
|
119
|
-
|
|
120
|
-
1. Read `.gsd-t/progress.md`
|
|
121
|
-
2. Read `README.md` for what the package delivers
|
|
122
|
-
3. Check `commands/` and `package.json` for current state
|
|
123
|
-
4. Continue from current task; don't restart the phase
|
|
124
|
-
|
|
125
|
-
## Current Status
|
|
126
|
-
|
|
127
|
-
See `.gsd-t/progress.md`.
|
|
69
|
+
Regenerate with /gsd-t-setup.
|
|
70
|
+
-->
|