@hegemonart/get-design-done 1.50.0 → 1.51.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude-plugin/marketplace.json +2 -2
- package/.claude-plugin/plugin.json +2 -2
- package/CHANGELOG.md +74 -0
- package/README.md +2 -0
- package/SKILL.md +2 -2
- package/agents/design-reflector.md +33 -0
- package/dist/claude-code/.claude/skills/apply-reflections/SKILL.md +17 -0
- package/dist/claude-code/.claude/skills/audit/SKILL.md +5 -5
- package/dist/claude-code/.claude/skills/extract-learnings/SKILL.md +16 -0
- package/dist/claude-code/.claude/skills/instinct/SKILL.md +111 -0
- package/dist/claude-code/.claude/skills/verify/SKILL.md +1 -1
- package/dist/claude-code/.claude/skills/verify/verify-procedure.md +5 -5
- package/hooks/gdd-decision-injector.js +115 -6
- package/package.json +1 -1
- package/reference/instinct-format.md +120 -0
- package/reference/registry.json +8 -1
- package/reference/schemas/events.schema.json +1 -1
- package/reference/schemas/instinct.schema.json +91 -0
- package/reference/skill-authoring-contract.md +1 -1
- package/reference/skill-graph.md +9 -1
- package/scripts/lib/instinct-store.cjs +677 -0
- package/scripts/lib/manifest/skills.json +33 -7
- package/skills/apply-reflections/SKILL.md +17 -0
- package/skills/audit/SKILL.md +5 -5
- package/skills/extract-learnings/SKILL.md +16 -0
- package/skills/instinct/SKILL.md +111 -0
- package/skills/verify/SKILL.md +1 -1
- package/skills/verify/verify-procedure.md +5 -5
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
},
|
|
23
23
|
{
|
|
24
24
|
"name": "audit",
|
|
25
|
-
"description": "Run a design audit by spawning design-auditor, design-integration-checker, and (optionally) design-verifier + design-reflector agents, then printing a consolidated
|
|
25
|
+
"description": "Run a design audit by spawning design-auditor, design-integration-checker, and (optionally) design-verifier + design-reflector agents, then printing a consolidated 7-pillar score summary. Use when the user wants to score the current design, retroactively verify a completed cycle, or quickly re-check after a fix. Activates for requests involving scoring an existing design, retroactively reviewing quality, or re-checking after a fix.",
|
|
26
26
|
"argument_hint": "[--retroactive] [--quick] [--no-reflect]",
|
|
27
27
|
"tools": "Read, Write, Task, Glob, Bash"
|
|
28
28
|
},
|
|
@@ -49,7 +49,10 @@
|
|
|
49
49
|
"name": "brief",
|
|
50
50
|
"description": "Stage 1 of 5 design intake that captures problem statement, audience, constraints, success metrics, and scope into .design/BRIEF.md, and bootstraps .design/STATE.md if missing. Use when starting a new design cycle and before {{command_prefix}}explore. Activates for requests involving capturing a problem statement, defining audience and constraints, or starting a new design brief.",
|
|
51
51
|
"argument_hint": "[--re-brief to redo intake on existing project]",
|
|
52
|
-
"tools": "Read, Write, AskUserQuestion, mcp__gdd_state__frontmatter_update, mcp__gdd_state__set_status, mcp__gdd_state__update_progress, mcp__gdd_state__get"
|
|
52
|
+
"tools": "Read, Write, AskUserQuestion, mcp__gdd_state__frontmatter_update, mcp__gdd_state__set_status, mcp__gdd_state__update_progress, mcp__gdd_state__get",
|
|
53
|
+
"next_skills": [
|
|
54
|
+
"explore"
|
|
55
|
+
]
|
|
53
56
|
},
|
|
54
57
|
{
|
|
55
58
|
"name": "budget",
|
|
@@ -115,7 +118,10 @@
|
|
|
115
118
|
"description": "Stage 4 of 5 orchestrator that reads DESIGN-PLAN.md, partitions tasks by wave + parallel-safe flag, and spawns design-executor agents with the appropriate isolation (worktree for parallel batches, in-place for sequential tail). Use when DESIGN-PLAN.md is approved and ready for implementation. Activates for requests involving implementing UI, building components, or turning a plan into working interface code.",
|
|
116
119
|
"argument_hint": "[--auto] [--parallel] [--variants N]",
|
|
117
120
|
"user_invocable": true,
|
|
118
|
-
"tools": "Read, Write, Bash, Grep, Glob, Task, AskUserQuestion, mcp__gdd_state__get, mcp__gdd_state__transition_stage, mcp__gdd_state__update_progress, mcp__gdd_state__set_status, mcp__gdd_state__add_blocker, mcp__gdd_state__resolve_blocker, mcp__gdd_state__checkpoint"
|
|
121
|
+
"tools": "Read, Write, Bash, Grep, Glob, Task, AskUserQuestion, mcp__gdd_state__get, mcp__gdd_state__transition_stage, mcp__gdd_state__update_progress, mcp__gdd_state__set_status, mcp__gdd_state__add_blocker, mcp__gdd_state__resolve_blocker, mcp__gdd_state__checkpoint",
|
|
122
|
+
"next_skills": [
|
|
123
|
+
"verify"
|
|
124
|
+
]
|
|
119
125
|
},
|
|
120
126
|
{
|
|
121
127
|
"name": "discover",
|
|
@@ -140,7 +146,10 @@
|
|
|
140
146
|
"name": "explore",
|
|
141
147
|
"description": "Stage 2 of 5 - unified exploration merging inventory grep + design interview. Probes 6 connections, scans the codebase, conducts the AskUserQuestion interview, and writes .design/DESIGN.md + DESIGN-DEBT.md + DESIGN-CONTEXT.md. Use after {{command_prefix}}brief to map the existing system and lock decisions before planning. Activates for requests involving researching design direction, gathering references, or exploring visual options.",
|
|
142
148
|
"argument_hint": "[--skip-interview] [--skip-scan]",
|
|
143
|
-
"tools": "Read, Write, Bash, Grep, Glob, Task, AskUserQuestion, mcp__gdd_state__get, mcp__gdd_state__transition_stage, mcp__gdd_state__probe_connections, mcp__gdd_state__update_progress, mcp__gdd_state__set_status, mcp__gdd_state__add_blocker, mcp__gdd_state__checkpoint, mcp__gdd_state__add_decision"
|
|
149
|
+
"tools": "Read, Write, Bash, Grep, Glob, Task, AskUserQuestion, mcp__gdd_state__get, mcp__gdd_state__transition_stage, mcp__gdd_state__probe_connections, mcp__gdd_state__update_progress, mcp__gdd_state__set_status, mcp__gdd_state__add_blocker, mcp__gdd_state__checkpoint, mcp__gdd_state__add_decision",
|
|
150
|
+
"next_skills": [
|
|
151
|
+
"plan"
|
|
152
|
+
]
|
|
144
153
|
},
|
|
145
154
|
{
|
|
146
155
|
"name": "export",
|
|
@@ -185,6 +194,14 @@
|
|
|
185
194
|
"tools": "Read",
|
|
186
195
|
"disable_model_invocation": true
|
|
187
196
|
},
|
|
197
|
+
{
|
|
198
|
+
"name": "instinct",
|
|
199
|
+
"description": "Inspects and manages atomic instinct learning units - small, scoped, confidence-weighted patterns the pipeline accumulates across cycles. Lists the project and global instinct stores, searches them by keyword, and promotes a vetted project instinct to the global store once it has cleared the cross-project gate. Use when the user wants to see what instincts exist, find an instinct by topic, or promote one to global scope. Activates for requests involving instincts, learned patterns, instinct promotion, instinct search, or the instinct store.",
|
|
200
|
+
"argument_hint": "[list | query <keyword> | promote <id>] [--scope project|global] [--domain <d>]",
|
|
201
|
+
"tools": "Read, Bash",
|
|
202
|
+
"user_invocable": true,
|
|
203
|
+
"registered_in_phase": "51"
|
|
204
|
+
},
|
|
188
205
|
{
|
|
189
206
|
"name": "list-assumptions",
|
|
190
207
|
"description": "Surfaces hidden design assumptions baked into the codebase before planning - pattern-based detection plus user-surfaced items.",
|
|
@@ -237,7 +254,10 @@
|
|
|
237
254
|
"name": "new-project",
|
|
238
255
|
"description": "Initialize a new get-design-done project. Gathers project context, creates PROJECT.md and STATE.md, initializes first cycle. Run once per project before any pipeline stage.",
|
|
239
256
|
"argument_hint": "[--name <project-name>]",
|
|
240
|
-
"tools": "Read, Write, AskUserQuestion, Bash, Glob"
|
|
257
|
+
"tools": "Read, Write, AskUserQuestion, Bash, Glob",
|
|
258
|
+
"next_skills": [
|
|
259
|
+
"brief"
|
|
260
|
+
]
|
|
241
261
|
},
|
|
242
262
|
{
|
|
243
263
|
"name": "new-skill",
|
|
@@ -315,7 +335,10 @@
|
|
|
315
335
|
"description": "Stage 3 of 5 orchestrator that reads DESIGN-CONTEXT.md, runs optional research (phase-researcher / pattern-mapper / assumptions-analyzer / synthesizer), spawns design-planner + design-plan-checker, and writes DESIGN-PLAN.md. Use when DESIGN-CONTEXT.md is locked and you need a wave-ordered execution plan. Activates for requests involving breaking design work into steps, sequencing implementation, or planning a build.",
|
|
316
336
|
"argument_hint": "[--auto] [--parallel]",
|
|
317
337
|
"user_invocable": true,
|
|
318
|
-
"tools": "Read, Write, Bash, Glob, Task, AskUserQuestion, ToolSearch, mcp__gdd_state__get, mcp__gdd_state__transition_stage, mcp__gdd_state__add_decision, mcp__gdd_state__add_must_have, mcp__gdd_state__update_progress, mcp__gdd_state__set_status, mcp__gdd_state__add_blocker, mcp__gdd_state__checkpoint, mcp__gdd_state__probe_connections"
|
|
338
|
+
"tools": "Read, Write, Bash, Glob, Task, AskUserQuestion, ToolSearch, mcp__gdd_state__get, mcp__gdd_state__transition_stage, mcp__gdd_state__add_decision, mcp__gdd_state__add_must_have, mcp__gdd_state__update_progress, mcp__gdd_state__set_status, mcp__gdd_state__add_blocker, mcp__gdd_state__checkpoint, mcp__gdd_state__probe_connections",
|
|
339
|
+
"next_skills": [
|
|
340
|
+
"design"
|
|
341
|
+
]
|
|
319
342
|
},
|
|
320
343
|
{
|
|
321
344
|
"name": "plant-seed",
|
|
@@ -567,7 +590,10 @@
|
|
|
567
590
|
"description": "Stage 5 of 5 orchestrator that spawns design-auditor, design-verifier, and design-integration-checker in sequence, interprets pass/gap result, and drives the gap-response loop (inline fix, save-and-exit, or accept-as-is). Use when implementation is complete and ready for final pre-ship verification. Activates for requests involving checking finished UI against the design system, running a pre-ship review, or final verification.",
|
|
568
591
|
"argument_hint": "[--auto] [--post-handoff]",
|
|
569
592
|
"user_invocable": true,
|
|
570
|
-
"tools": "mcp__gdd_state__get, mcp__gdd_state__transition_stage, mcp__gdd_state__add_must_have, mcp__gdd_state__add_blocker, mcp__gdd_state__resolve_blocker, mcp__gdd_state__update_progress, mcp__gdd_state__set_status, mcp__gdd_state__checkpoint, mcp__gdd_state__probe_connections"
|
|
593
|
+
"tools": "mcp__gdd_state__get, mcp__gdd_state__transition_stage, mcp__gdd_state__add_must_have, mcp__gdd_state__add_blocker, mcp__gdd_state__resolve_blocker, mcp__gdd_state__update_progress, mcp__gdd_state__set_status, mcp__gdd_state__checkpoint, mcp__gdd_state__probe_connections",
|
|
594
|
+
"next_skills": [
|
|
595
|
+
"ship"
|
|
596
|
+
]
|
|
571
597
|
},
|
|
572
598
|
{
|
|
573
599
|
"name": "warm-cache",
|
|
@@ -84,6 +84,23 @@ Incubator drafts authored by `scripts/lib/incubator-author.cjs` (Phase 29-04) ap
|
|
|
84
84
|
|
|
85
85
|
KFM-catalogue proposals authored by `scripts/lib/reflector-kfm-proposer.cjs` (Phase 30.5-03 D-05) appear as a 6th proposal class. Drafts at `.design/reflections/incubator/kfm-<slug>/CATALOGUE-ENTRY.md`; pre-filled 11-field schema with `TODO:` placeholders for `pattern` + `fix`. Two upstream signals share the surface (D-06): `capability_gap` clusters (≥3, no existing match) + `kfm-candidate` events (whitelist-matched articles, 1-shot). User chooses **accept** | **reject** | **defer** | **edit**. `applyAccept` appends to `reference/known-failure-modes.md` + `reference/registry.json` (`origin: incubator-kfm`); `applyReject` removes the incubator subdir; `applyDefer` stamps `deferred_until`; `applyEdit` returns the draft path for `$EDITOR`. Full procedure: `./apply-reflections-procedure.md` §[KFM-CANDIDATE].
|
|
86
86
|
|
|
87
|
+
## [INSTINCT]
|
|
88
|
+
|
|
89
|
+
Atomic instinct units emitted by `design-reflector` (and surfaced from `/gdd:extract-learnings`) appear as a distinct proposal class, alongside `[INCUBATOR]` and `[KFM-CANDIDATE]`. Each unit is a fenced `yaml` block under the reflector's `## Atomic instincts` section, shaped per `reference/instinct-format.md` (`id`, `trigger`, `confidence`, `domain`, `scope`, `project_id`, `source`, `cycles_seen`, `first_seen`, `last_seen`, plus a short body). A unit is a proposal, never a stored fact - nothing lands until the user accepts it.
|
|
90
|
+
|
|
91
|
+
Mirror the `[INCUBATOR]` flow:
|
|
92
|
+
|
|
93
|
+
1. Discover the units: parse every `yaml` block under `## Atomic instincts` in the reflections file. Skip malformed blocks (warn on stderr, keep going).
|
|
94
|
+
2. For each unit: show the parsed `trigger`, `domain`, `confidence`, and body so the user sees what would be stored.
|
|
95
|
+
3. Prompt: `(a) accept (r) reject (d) defer (e) edit (q) quit`.
|
|
96
|
+
|
|
97
|
+
**Per-action behavior:**
|
|
98
|
+
|
|
99
|
+
1. **accept** - call `scripts/lib/instinct-store.cjs` `add(unit, { scope, baseDir })` with the unit at its emitted `confidence`. The store owns de-duplication and `cycles_seen` bookkeeping. On success print `Stored instinct <id> (<domain>, confidence <n>).` and append `**Applied**: <date>` to the proposal block.
|
|
100
|
+
2. **reject** - do not store the unit. Append `**Reviewed: rejected**` to the reflections file.
|
|
101
|
+
3. **defer** - no-op; the unit re-surfaces next run. Append `**Reviewed: deferred**`.
|
|
102
|
+
4. **edit** - let the user adjust `trigger`, `confidence`, or `domain`, then accept the edited unit through the same `add(...)` call. Default `scope: 'project'` (write `global` only when the unit's frontmatter says so); never edit `.design/instincts/instincts.json` directly, and promote to global via the separate gated `/gdd:instinct promote`.
|
|
103
|
+
|
|
87
104
|
## Do Not
|
|
88
105
|
|
|
89
106
|
- Do not apply any proposal without the user explicitly choosing `a` or `e`.
|
package/skills/audit/SKILL.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: gdd-audit
|
|
3
|
-
description: "Run a design audit by spawning design-auditor, design-integration-checker, and (optionally) design-verifier + design-reflector agents, then printing a consolidated
|
|
3
|
+
description: "Run a design audit by spawning design-auditor, design-integration-checker, and (optionally) design-verifier + design-reflector agents, then printing a consolidated 7-pillar score summary. Use when the user wants to score the current design, retroactively verify a completed cycle, or quickly re-check after a fix. Activates for requests involving scoring an existing design, retroactively reviewing quality, or re-checking after a fix."
|
|
4
4
|
argument-hint: "[--retroactive] [--quick] [--no-reflect]"
|
|
5
5
|
tools: Read, Write, Task, Glob, Bash
|
|
6
6
|
---
|
|
@@ -9,12 +9,12 @@ tools: Read, Write, Task, Glob, Bash
|
|
|
9
9
|
|
|
10
10
|
Wraps the existing `design-auditor`, `design-verifier`, and `design-integration-checker` agents - no new auditor logic here. Parses flags, spawns the right combination, prints summary.
|
|
11
11
|
|
|
12
|
-
For the
|
|
12
|
+
For the 7-pillar scoring rubric this skill aggregates, see `../../reference/audit-scoring.md`. For the shared design-quality pillar set that frames the score categories, see `../../reference/shared-preamble.md`.
|
|
13
13
|
|
|
14
14
|
## Modes
|
|
15
15
|
|
|
16
16
|
### Default
|
|
17
|
-
Spawn `design-auditor` (
|
|
17
|
+
Spawn `design-auditor` (7-pillar scoring 1–4) in parallel with `design-integration-checker`. After both finish, read `.design/DESIGN-AUDIT.md` and `.design/DESIGN-INTEGRATION.md` and print a consolidated summary (scores + top 3 findings each).
|
|
18
18
|
|
|
19
19
|
After the auditor and integration checker complete, check if `.design/learnings/` exists and contains at least one `.md` file. If so - and unless `--no-reflect` is passed - spawn `design-reflector` for the current cycle. Append the reflection proposal count to the audit summary: "Reflection: N proposals → review with `/gdd:apply-reflections`".
|
|
20
20
|
|
|
@@ -70,8 +70,8 @@ The excuses an agent reaches for to skip or thin out an audit, and the drift eac
|
|
|
70
70
|
| Thought | Reality |
|
|
71
71
|
|---------|---------|
|
|
72
72
|
| "The audit passed last cycle, I can skip it this cycle." | Per-cycle audit catches drift the prior pass couldn't see; a skipped review is exactly where regressions accumulate unnoticed. |
|
|
73
|
-
| "`--quick` is fine, integration isn't the concern here." | Dropping the integration-checker hides orphaned decisions - wiring breaks even when the
|
|
74
|
-
| "I can eyeball the scores instead of spawning the auditor." | The auditor's rubric scores
|
|
73
|
+
| "`--quick` is fine, integration isn't the concern here." | Dropping the integration-checker hides orphaned decisions - wiring breaks even when the 7-pillar score looks healthy. |
|
|
74
|
+
| "I can eyeball the scores instead of spawning the auditor." | The auditor's rubric scores seven pillars consistently; an eyeballed review drifts toward whatever the agent already believes. |
|
|
75
75
|
| "Reflection proposals are optional polish, skip the reflector." | The reflector turns this cycle's learnings into next-cycle improvements; skipping it lets the same mistakes repeat. |
|
|
76
76
|
| "I'll modify the source while I'm in here fixing findings." | Audit is read-only by contract; editing source mid-audit invalidates the very scores you're producing. |
|
|
77
77
|
| "Retroactive mode is overkill for a finished cycle." | Retroactive verification is the only check on tasks that shipped without per-task verify - skipping it leaves a completed cycle unaudited. |
|
|
@@ -53,6 +53,22 @@ Layout of `.design/learnings/LEARNINGS.md`:
|
|
|
53
53
|
---
|
|
54
54
|
```
|
|
55
55
|
|
|
56
|
+
### Step 3b - Dual-emit atomic instinct units (Phase 51)
|
|
57
|
+
|
|
58
|
+
Alongside the prose `LEARNINGS.md`, emit atomic instinct units for every learning the extractor tags as an `instinct-candidate`. A learning is an `instinct-candidate` when it states a single trigger plus a one-line response - the same shape the reflector emits. Broader narrative learnings stay prose-only.
|
|
59
|
+
|
|
60
|
+
For each `instinct-candidate`, build a unit per `reference/instinct-format.md` (frontmatter: `id`, `trigger`, `confidence` from 0.3 to 0.9, `domain`, `scope`, `project_id`, `source`, `cycles_seen`, `first_seen`, `last_seen`, plus a short body). Set `source: extract-learnings`. Carry the learning's confidence (high / medium / low) into the numeric field (roughly 0.8 / 0.55 / 0.35), capped at 0.9.
|
|
61
|
+
|
|
62
|
+
Write each unit through the store engine `scripts/lib/instinct-store.cjs` rather than by hand:
|
|
63
|
+
|
|
64
|
+
```bash
|
|
65
|
+
node "${CLAUDE_PLUGIN_ROOT}/scripts/lib/instinct-store.cjs" add --scope project
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
If the engine exposes a module API only, drive `add(unit, { scope: 'project', baseDir })` from a short `node -e` script. The engine owns de-duplication and `cycles_seen` bookkeeping; do not pre-merge.
|
|
69
|
+
|
|
70
|
+
The prose `LEARNINGS.md` is **retained read-only for one minor version** so existing readers keep working while tooling migrates to the units. Keep writing it; do not drop the prose path in this version.
|
|
71
|
+
|
|
56
72
|
### Step 4 - Reference file proposal (optional)
|
|
57
73
|
|
|
58
74
|
After writing LEARNINGS.md, check each learning entry with `Proposed reference update: yes`.
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: gdd-instinct
|
|
3
|
+
description: "Inspects and manages atomic instinct learning units - small, scoped, confidence-weighted patterns the pipeline accumulates across cycles. Lists the project and global instinct stores, searches them by keyword, and promotes a vetted project instinct to the global store once it has cleared the cross-project gate. Use when the user wants to see what instincts exist, find an instinct by topic, or promote one to global scope. Activates for requests involving instincts, learned patterns, instinct promotion, instinct search, or the instinct store."
|
|
4
|
+
argument-hint: "[list | query <keyword> | promote <id>] [--scope project|global] [--domain <d>]"
|
|
5
|
+
tools: Read, Bash
|
|
6
|
+
user-invocable: true
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# /gdd:instinct
|
|
10
|
+
|
|
11
|
+
**Role:** Front end for the atomic instinct store. An instinct is a single learned pattern with a trigger, a confidence between 0.3 and 0.9, a domain, and a scope. This skill lists, searches, and promotes instincts. It never edits stored units by hand and never invents new ones - the reflector and `/gdd:extract-learnings` author them.
|
|
12
|
+
|
|
13
|
+
The store engine ships at `scripts/lib/instinct-store.cjs` (authored elsewhere - this skill only calls it). Unit shape (YAML frontmatter plus a short body) is specified in `reference/instinct-format.md`. The project store lives at `.design/instincts/instincts.json`; the global store at `~/.claude/gdd/global-instincts.json`.
|
|
14
|
+
|
|
15
|
+
Invoke the engine with `node`, the same way other skills call a `scripts/lib` helper:
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
node "${CLAUDE_PLUGIN_ROOT}/scripts/lib/instinct-store.cjs" <subcommand> [args]
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
If the engine exposes only a module API rather than a CLI, drive it from a short `node -e` script:
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
node -e "const s=require('${CLAUDE_PLUGIN_ROOT}/scripts/lib/instinct-store.cjs'); console.log(JSON.stringify(s.list({scope:process.env.SCOPE})))"
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
## Invocation Modes
|
|
28
|
+
|
|
29
|
+
| Command | Behavior |
|
|
30
|
+
|---|---|
|
|
31
|
+
| `/gdd:instinct list` | Compact table of stored instincts (default mode). |
|
|
32
|
+
| `/gdd:instinct query "<keyword>"` | Search instincts by keyword; show the top matches. |
|
|
33
|
+
| `/gdd:instinct promote <id>` | Promote one project instinct to the global store (gated). |
|
|
34
|
+
|
|
35
|
+
Flags apply across modes:
|
|
36
|
+
|
|
37
|
+
- `--scope project|global` selects which store to read. Default is `project`.
|
|
38
|
+
- `--domain <d>` filters to one domain (the domain enum is defined in `reference/instinct-format.md`).
|
|
39
|
+
|
|
40
|
+
## list
|
|
41
|
+
|
|
42
|
+
Read the requested store and print a compact table. Call `instinct-store.list({ scope, domain, baseDir })`:
|
|
43
|
+
|
|
44
|
+
```bash
|
|
45
|
+
node -e "const s=require('${CLAUDE_PLUGIN_ROOT}/scripts/lib/instinct-store.cjs'); \
|
|
46
|
+
const rows=s.list({ scope: process.env.SCOPE || 'project', domain: process.env.DOMAIN || undefined }); \
|
|
47
|
+
console.log(JSON.stringify(rows));"
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
Render one row per instinct. Keep it scannable:
|
|
51
|
+
|
|
52
|
+
```
|
|
53
|
+
ID DOMAIN CONF CYCLES TRIGGER
|
|
54
|
+
in-7f3a tokens 0.72 3 palette has no neutral ramp
|
|
55
|
+
in-91bc layout 0.55 2 cards overflow on the 320px breakpoint
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
- `CONF` is the stored confidence (0.3 to 0.9).
|
|
59
|
+
- `CYCLES` is `cycles_seen`.
|
|
60
|
+
- Truncate `TRIGGER` to keep each line on one row.
|
|
61
|
+
|
|
62
|
+
If the store is empty, print: `No instincts in the <scope> store yet. Run /gdd:reflect or /gdd:extract-learnings to accumulate some.`
|
|
63
|
+
|
|
64
|
+
## query
|
|
65
|
+
|
|
66
|
+
Search by keyword and show the closest matches. Call `instinct-store.query(keyword, { scope, baseDir, limit })`. The engine uses an FTS5 index when one is present and falls back to a plain scan otherwise; either path returns the same row shape.
|
|
67
|
+
|
|
68
|
+
```bash
|
|
69
|
+
node -e "const s=require('${CLAUDE_PLUGIN_ROOT}/scripts/lib/instinct-store.cjs'); \
|
|
70
|
+
const hits=s.query(process.env.KW, { scope: process.env.SCOPE || 'project', limit: 10 }); \
|
|
71
|
+
console.log(JSON.stringify(hits));"
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
Print the top matches in the same table shape as `list`, ordered by the engine's relevance ranking. If there are no matches, say so plainly and suggest a broader keyword. Quote multi-word keywords so the shell passes one argument.
|
|
75
|
+
|
|
76
|
+
## promote
|
|
77
|
+
|
|
78
|
+
Promote a single project instinct into the global store so it applies across every project. Promotion is **gated**: `instinct-store.promote(id, { baseDir })` only succeeds when the instinct has been seen across at least K cycles (K=2) spanning at least M distinct project ids (M=2). The engine enforces the gate; this skill surfaces the outcome and asks the user to confirm before the write.
|
|
79
|
+
|
|
80
|
+
Confirm first. Prefer `@clack/prompts`, and fall back to `AskUserQuestion` when it is absent (mirror the probe in `/gdd:new-skill`):
|
|
81
|
+
|
|
82
|
+
```bash
|
|
83
|
+
node -e "try { require.resolve('@clack/prompts'); console.log('clack'); } catch { console.log('fallback'); }"
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
- `clack`: drive `clack.confirm({ message: 'Promote <id> to the global store?' })` from a short Node script.
|
|
87
|
+
- `fallback`: ask the same yes or no question with `AskUserQuestion`.
|
|
88
|
+
|
|
89
|
+
On a confirmed yes, run the promotion:
|
|
90
|
+
|
|
91
|
+
```bash
|
|
92
|
+
node -e "const s=require('${CLAUDE_PLUGIN_ROOT}/scripts/lib/instinct-store.cjs'); \
|
|
93
|
+
console.log(JSON.stringify(s.promote(process.env.ID, {})));"
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
Branch on the engine result:
|
|
97
|
+
|
|
98
|
+
- Promotion succeeded: print `Promoted <id> to the global store.` and show the new global row.
|
|
99
|
+
- Gate not met: the engine reports how far the instinct is from the K=2 / M=2 bar. Print that plainly, for example `<id> needs 2 cycles across 2 projects; seen 1 cycle in 1 project so far. Not promoted.` Do not retry and do not force the write.
|
|
100
|
+
- Unknown id: print `No instinct <id> in the project store.` and suggest `/gdd:instinct list`.
|
|
101
|
+
|
|
102
|
+
If the user answers no at the confirm step, print `Promotion cancelled.` and exit without writing.
|
|
103
|
+
|
|
104
|
+
## Do Not
|
|
105
|
+
|
|
106
|
+
- Do not edit `.design/instincts/instincts.json` or the global store by hand. All writes go through `scripts/lib/instinct-store.cjs`.
|
|
107
|
+
- Do not author new instincts here. The reflector and `/gdd:extract-learnings` emit units; this skill reads and promotes them.
|
|
108
|
+
- Do not bypass the promotion gate. If the K=2 / M=2 bar is not met, report it and stop.
|
|
109
|
+
- Do not modify `reference/instinct-format.md` or the store engine.
|
|
110
|
+
|
|
111
|
+
## INSTINCT COMPLETE
|
package/skills/verify/SKILL.md
CHANGED
|
@@ -49,7 +49,7 @@ Run preview / storybook / chromatic probes at stage entry, then issue ONE batche
|
|
|
49
49
|
|
|
50
50
|
Initialize the fix-loop iteration counter to 0. Each full checker is preceded by a cheap Haiku gate that may return `{spawn: false}` to short-circuit (lazy-gate pattern from Plan 10.1-04 / D-21); skipped agents append `lazy_skipped: true` to `.design/telemetry/costs.jsonl`.
|
|
51
51
|
|
|
52
|
-
**1a. design-auditor** (retrospective
|
|
52
|
+
**1a. design-auditor** (retrospective 7-pillar audit) -> `.design/DESIGN-AUDIT.md`. Wait for `## AUDIT COMPLETE`, then `mcp__gdd_state__update_progress` `task_progress: "1/3"`.
|
|
53
53
|
|
|
54
54
|
**1b-gate -> 1b. design-verifier** (5-phase verification, reads auditor output) -> `.design/DESIGN-VERIFICATION.md`. Wait for `## VERIFICATION COMPLETE`, then `task_progress: "2/3"`.
|
|
55
55
|
|
|
@@ -204,7 +204,7 @@ Three agents run in sequence. Each waits for its completion marker before the ne
|
|
|
204
204
|
|
|
205
205
|
**Note on lazy gates (Plan 10.1-04 / D-21):** Each full checker is preceded by a cheap Haiku gate that reads the diff and may return `{spawn: false}` to short-circuit. When gated out, `lazy_skipped: true` is appended to `.design/telemetry/costs.jsonl`. Gates: `design-verifier-gate` (before 1b), `design-integration-checker-gate` (before 1c). `design-context-checker-gate` is wired into `skills/discover/SKILL.md` Step 1.75.
|
|
206
206
|
|
|
207
|
-
### 1a. Run design-auditor first (retrospective
|
|
207
|
+
### 1a. Run design-auditor first (retrospective 7-pillar audit)
|
|
208
208
|
|
|
209
209
|
```
|
|
210
210
|
Task("design-auditor", """
|
|
@@ -216,7 +216,7 @@ Task("design-auditor", """
|
|
|
216
216
|
@reference/audit-scoring.md
|
|
217
217
|
</required_reading>
|
|
218
218
|
|
|
219
|
-
You are the design-auditor agent. Run the
|
|
219
|
+
You are the design-auditor agent. Run the 7-pillar retrospective audit (copy, visual hierarchy,
|
|
220
220
|
color, typography, layout/spacing, experience design) against the completed design work.
|
|
221
221
|
|
|
222
222
|
Score each pillar 1-4. Write your findings to .design/DESIGN-AUDIT.md.
|
|
@@ -273,7 +273,7 @@ Task("design-verifier", """
|
|
|
273
273
|
|
|
274
274
|
You are the design-verifier agent. Run the 5-phase verification against completed design work.
|
|
275
275
|
|
|
276
|
-
DESIGN-AUDIT.md (above) contains a retrospective
|
|
276
|
+
DESIGN-AUDIT.md (above) contains a retrospective 7-pillar qualitative audit from design-auditor.
|
|
277
277
|
Read it as supplementary signal — incorporate the priority fix list into your Phase 5 gap analysis
|
|
278
278
|
where relevant. The auditor's 1-4 scores complement your 0-10 category scores; they do not
|
|
279
279
|
replace your Phase 1 category scoring.
|
|
@@ -463,7 +463,7 @@ Task("design-verifier", """
|
|
|
463
463
|
|
|
464
464
|
You are the design-verifier agent. This is a re-verification run after inline fixes.
|
|
465
465
|
|
|
466
|
-
DESIGN-AUDIT.md contains the retrospective
|
|
466
|
+
DESIGN-AUDIT.md contains the retrospective 7-pillar audit from design-auditor (read as supplementary context).
|
|
467
467
|
|
|
468
468
|
Context:
|
|
469
469
|
auto_mode: <true|false>
|
|
@@ -496,7 +496,7 @@ Status: PASS | FAIL | ACCEPTED-WITH-GAPS
|
|
|
496
496
|
Gaps: X blockers, Y majors, Z minors, W cosmetics
|
|
497
497
|
|
|
498
498
|
Agents run:
|
|
499
|
-
design-auditor -> .design/DESIGN-AUDIT.md (
|
|
499
|
+
design-auditor -> .design/DESIGN-AUDIT.md (7-pillar qualitative)
|
|
500
500
|
design-verifier-gate -> JSON gate decision (may skip design-verifier)
|
|
501
501
|
design-verifier -> .design/DESIGN-VERIFICATION.md (7-category + heuristics + UAT)
|
|
502
502
|
design-integration-checker-gate -> JSON gate decision (may skip design-integration-checker)
|