@hegemonart/get-design-done 1.28.8 → 1.30.5

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 (58) hide show
  1. package/.claude-plugin/marketplace.json +2 -2
  2. package/.claude-plugin/plugin.json +1 -1
  3. package/CHANGELOG.md +116 -0
  4. package/README.de.md +25 -0
  5. package/README.fr.md +25 -0
  6. package/README.it.md +25 -0
  7. package/README.ja.md +25 -0
  8. package/README.ko.md +25 -0
  9. package/README.md +30 -0
  10. package/README.zh-CN.md +25 -0
  11. package/SKILL.md +2 -0
  12. package/agents/design-authority-watcher.md +42 -1
  13. package/agents/design-reflector.md +50 -0
  14. package/package.json +1 -1
  15. package/reference/capability-gap-stage-gate.md +261 -0
  16. package/reference/known-failure-modes.md +521 -0
  17. package/reference/pseudonymization-rules.md +189 -0
  18. package/reference/registry.json +22 -1
  19. package/reference/schemas/events.schema.json +158 -3
  20. package/reference/schemas/generated.d.ts +319 -4
  21. package/scripts/cli/gdd-events.mjs +35 -2
  22. package/scripts/gsd-cleanup-incubator.cjs +367 -0
  23. package/scripts/lib/apply-reflections/incubator-proposals.cjs +455 -0
  24. package/scripts/lib/authority-watcher/index.cjs +201 -0
  25. package/scripts/lib/bandit-router.cjs +92 -9
  26. package/scripts/lib/failure-mode-matcher.cjs +460 -0
  27. package/scripts/lib/gsd-health-mirror/index.cjs +37 -1
  28. package/scripts/lib/incubator-author.cjs +845 -0
  29. package/scripts/lib/install/interactive.cjs +27 -2
  30. package/scripts/lib/issue-reporter/cli-flag-report.cjs +153 -0
  31. package/scripts/lib/issue-reporter/consent-prompt.cjs +231 -0
  32. package/scripts/lib/issue-reporter/dedup.cjs +458 -0
  33. package/scripts/lib/issue-reporter/destination.cjs +37 -0
  34. package/scripts/lib/issue-reporter/draft-writer.cjs +157 -0
  35. package/scripts/lib/issue-reporter/gh-absent-fallback.cjs +220 -0
  36. package/scripts/lib/issue-reporter/gh-submit.cjs +114 -0
  37. package/scripts/lib/issue-reporter/kill-switch.cjs +122 -0
  38. package/scripts/lib/issue-reporter/payload-assembly.cjs +367 -0
  39. package/scripts/lib/issue-reporter/privacy-diff.cjs +385 -0
  40. package/scripts/lib/issue-reporter/report-flow.cjs +269 -0
  41. package/scripts/lib/issue-reporter/triage-matcher.cjs +270 -0
  42. package/scripts/lib/pseudonymize.cjs +444 -0
  43. package/scripts/lib/reflections-cycle-writer.cjs +172 -0
  44. package/scripts/lib/reflector/capability-gap-scan.cjs +751 -0
  45. package/scripts/lib/reflector-capability-gap-aggregator.cjs +352 -0
  46. package/scripts/lib/reflector-kfm-proposer.cjs +468 -0
  47. package/scripts/release-smoke-test.cjs +33 -2
  48. package/scripts/validate-incubator-scope.cjs +133 -0
  49. package/skills/apply-reflections/SKILL.md +20 -1
  50. package/skills/apply-reflections/apply-reflections-procedure.md +106 -4
  51. package/skills/fast/SKILL.md +46 -0
  52. package/skills/reflect/SKILL.md +9 -0
  53. package/skills/reflect/procedures/capability-gap-scan.md +120 -0
  54. package/skills/report-issue/SKILL.md +53 -0
  55. package/skills/report-issue/report-issue-procedure.md +120 -0
  56. package/skills/router/SKILL.md +5 -0
  57. package/skills/router/capability-gap-emitter.md +65 -0
  58. package/skills/update/SKILL.md +3 -2
@@ -102,9 +102,11 @@ export type ConfigSchema = DesignConfigJson;
102
102
  /**
103
103
  * One line of .design/telemetry/events.jsonl — the append-only telemetry stream produced by Plan 20-06. Each event is a single JSON object followed by a newline. See .planning/phases/20-gdd-sdk-foundation/20-06-PLAN.md.
104
104
  */
105
- export interface Event {
105
+ export type Event = {
106
+ [k: string]: unknown;
107
+ } & {
106
108
  /**
107
- * Free-form event type identifier. Pre-registered seeds: state.mutation, state.transition, stage.entered, stage.exited, hook.fired, error.
109
+ * Free-form event type identifier. Pre-registered seeds: state.mutation, state.transition, stage.entered, stage.exited, hook.fired, error, capability_gap.
108
110
  */
109
111
  type: string;
110
112
  /**
@@ -124,7 +126,7 @@ export interface Event {
124
126
  */
125
127
  cycle?: string;
126
128
  /**
127
- * Event-type-specific payload. Opaque at the envelope level.
129
+ * Event-type-specific payload. Opaque at the envelope level. When type === 'capability_gap', the payload is narrowed by the conditional schema in allOf[0] to the 7-field CapabilityGapPayload (Phase 29 D-02).
128
130
  */
129
131
  payload: {};
130
132
  /**
@@ -139,7 +141,7 @@ export interface Event {
139
141
  * Writer-set flag indicating the payload exceeded maxLineBytes and has been replaced by a placeholder.
140
142
  */
141
143
  _truncated?: boolean;
142
- }
144
+ };
143
145
 
144
146
  export type EventsSchema = Event;
145
147
 
@@ -169,6 +171,39 @@ export interface HookGroup {
169
171
 
170
172
  export type HooksSchema = ClaudeHooksJson;
171
173
 
174
+ // ---- insight-line.schema.json ----
175
+ /**
176
+ * One JSONL line appended by an agent to .design/intel/insights.jsonl at run-end.
177
+ */
178
+ export interface AgentInsightLine {
179
+ /**
180
+ * ISO 8601 timestamp of the agent run completion.
181
+ */
182
+ ts: string;
183
+ /**
184
+ * Agent name matching the frontmatter 'name' field (e.g. 'design-planner').
185
+ */
186
+ agent: string;
187
+ /**
188
+ * Active cycle ID from STATE.md (e.g. 'cycle-1'). Empty string if not in a cycle.
189
+ */
190
+ cycle: string;
191
+ /**
192
+ * Pipeline stage from STATE.md (e.g. 'plan', 'design', 'verify').
193
+ */
194
+ stage: string;
195
+ /**
196
+ * One declarative sentence: what this agent produced or learned this run.
197
+ */
198
+ one_line_insight: string;
199
+ /**
200
+ * Relative paths of files written during this run. Empty array for read-only agents.
201
+ */
202
+ artifacts_written: string[];
203
+ }
204
+
205
+ export type InsightLineSchema = AgentInsightLine;
206
+
172
207
  // ---- intel.schema.json ----
173
208
  /**
174
209
  * Shape of intel-store slice files per reference/intel-schema.md. Each slice has a generated timestamp and one array-valued payload key matching the slice name.
@@ -333,6 +368,22 @@ export interface ClaudeMarketplaceJson {
333
368
 
334
369
  export type MarketplaceSchema = ClaudeMarketplaceJson;
335
370
 
371
+ // ---- mcp-budget.schema.json ----
372
+ /**
373
+ * Thresholds for the MCP circuit-breaker hook. Applies to use_figma / use_paper / use_pencil and any tracked_tools entry the user extends.
374
+ */
375
+ export interface MCPBudget {
376
+ $schema?: string;
377
+ version: 1;
378
+ description?: string;
379
+ max_calls_per_task: number;
380
+ max_consecutive_timeouts: number;
381
+ reset_on_success?: boolean;
382
+ tracked_tools?: string[];
383
+ }
384
+
385
+ export type McpBudgetSchema = MCPBudget;
386
+
336
387
  // ---- mcp-gdd-state-tools.schema.json ----
337
388
  /**
338
389
  * Combined manifest of all 11 gdd-state MCP tool input+output schemas (Plan 20-05). Individual tool schemas live under scripts/mcp-servers/gdd-state/schemas/ and the tool handlers reference them; this combined schema exists so downstream validators and codegen can compile a single surface.
@@ -367,6 +418,144 @@ export interface ToolSchemaEntry {
367
418
 
368
419
  export type McpGddStateToolsSchema = McpGddStateTools;
369
420
 
421
+ // ---- mcp-gdd-tools.schema.json ----
422
+ /**
423
+ * Combined manifest of all gdd-mcp tool input+output schemas (Plan 27.7-02). Individual tool schemas live under scripts/mcp-servers/gdd-mcp/schemas/ and the tool handlers reference them; this combined schema exists so downstream validators and codegen can compile a single surface (D-11).
424
+ */
425
+ export interface McpGddTools {
426
+ /**
427
+ * Per-tool input/output schemas keyed by tool name. Exactly 12 entries (D-03 hard cap).
428
+ */
429
+ tools?: {
430
+ gdd_status?: {
431
+ input: {};
432
+ output: {
433
+ phase: string | null;
434
+ branch: string | null;
435
+ last_decisions: {}[];
436
+ last_completed_plans: {}[];
437
+ blocker_count: number;
438
+ };
439
+ };
440
+ gdd_phase_current?: {
441
+ input: {};
442
+ output: {
443
+ phase: string | null;
444
+ stage: string | null;
445
+ task_progress: string | null;
446
+ status: string | null;
447
+ };
448
+ };
449
+ gdd_phases_list?: {
450
+ input: {};
451
+ output: {
452
+ phases: {
453
+ number: string;
454
+ name: string;
455
+ version: string;
456
+ checkbox_status: 'shipped' | 'planned' | 'unknown';
457
+ }[];
458
+ };
459
+ };
460
+ gdd_plans_list?: {
461
+ input: {
462
+ phase?: string;
463
+ };
464
+ output: {
465
+ phase: string | null;
466
+ plans: {
467
+ id: string;
468
+ name: string;
469
+ status: string;
470
+ }[];
471
+ };
472
+ };
473
+ gdd_decisions_list?: {
474
+ input: {
475
+ status?: 'locked' | 'tentative';
476
+ };
477
+ output: {
478
+ decisions: {
479
+ id: string;
480
+ text: string;
481
+ status: string;
482
+ }[];
483
+ };
484
+ };
485
+ gdd_intel_get?: {
486
+ input: {
487
+ slice_id: string;
488
+ shape?: string[];
489
+ };
490
+ output: {
491
+ slice_id: string;
492
+ data: {};
493
+ };
494
+ };
495
+ gdd_telemetry_query?: {
496
+ input: {
497
+ type?: string;
498
+ since?: string;
499
+ limit?: number;
500
+ };
501
+ output: {
502
+ events: {}[];
503
+ };
504
+ };
505
+ gdd_cycle_recap?: {
506
+ input: {
507
+ since_snapshot?: string;
508
+ };
509
+ output: {
510
+ since: string | null;
511
+ diff: {
512
+ state_sections: string[];
513
+ decisions_delta: number;
514
+ completed_plans_delta: number;
515
+ };
516
+ };
517
+ };
518
+ gdd_reflections_latest?: {
519
+ input: {};
520
+ output: {
521
+ cycle: string | null;
522
+ path: string | null;
523
+ content_excerpt: string;
524
+ };
525
+ };
526
+ gdd_learnings_digest?: {
527
+ input: {
528
+ cycles?: number;
529
+ };
530
+ output: {
531
+ digest: string;
532
+ cycles_included: number;
533
+ };
534
+ };
535
+ gdd_events_tail?: {
536
+ input: {
537
+ type?: string;
538
+ limit?: number;
539
+ };
540
+ output: {
541
+ events: {}[];
542
+ };
543
+ };
544
+ gdd_health?: {
545
+ input: {};
546
+ output: {
547
+ checks: {
548
+ name: string;
549
+ status: 'ok' | 'warn' | 'fail';
550
+ detail: string;
551
+ }[];
552
+ };
553
+ };
554
+ };
555
+ }
556
+
557
+ export type McpGddToolsSchema = McpGddTools;
558
+
370
559
  // ---- plugin.schema.json ----
371
560
  /**
372
561
  * Shape of .claude-plugin/plugin.json — the plugin manifest consumed by Claude Code.
@@ -392,6 +581,22 @@ export interface ClaudePluginJson {
392
581
 
393
582
  export type PluginSchema = ClaudePluginJson;
394
583
 
584
+ // ---- protected-paths.schema.json ----
585
+ /**
586
+ * Glob list describing paths the plugin refuses to Edit/Write or mutate via destructive Bash. User additions MERGE with this default list; users cannot reduce the default set.
587
+ */
588
+ export interface ProtectedPaths {
589
+ $schema?: string;
590
+ version: 1;
591
+ description?: string;
592
+ /**
593
+ * @minItems 1
594
+ */
595
+ protected_paths: [string, ...string[]];
596
+ }
597
+
598
+ export type ProtectedPathsSchema = ProtectedPaths;
599
+
395
600
  // ---- rate-limits.schema.json ----
396
601
  /**
397
602
  * Shape of .design/rate-limits/<provider>.json produced by scripts/lib/rate-guard.cjs. One file per provider (anthropic, openai, figma, ...) — header ingestion overwrites atomically via tmp+rename under scripts/lib/lockfile.cjs protection. See .planning/phases/20-gdd-sdk-foundation/20-14-PLAN.md §Task 2.
@@ -417,3 +622,113 @@ export interface RateLimits {
417
622
 
418
623
  export type RateLimitsSchema = RateLimits;
419
624
 
625
+ // ---- runtime-models.schema.json ----
626
+ /**
627
+ * Parsed shape of reference/runtime-models.md — the per-runtime tier→model adapter source-of-truth shipped in Phase 26 (D-01..D-03). Consumed by scripts/lib/install/parse-runtime-models.cjs at install time and scripts/lib/tier-resolver.cjs at runtime. Strict enums catch typos at install time, not at runtime. Schema versioned via $schema_version for forward-compat (D-03).
628
+ */
629
+ export interface RuntimeModelsTierToModelMap {
630
+ /**
631
+ * Top-level schema version (D-03). Bump on breaking changes; downstream consumers must check before parsing.
632
+ */
633
+ $schema_version: 1;
634
+ /**
635
+ * @minItems 1
636
+ */
637
+ runtimes: [RuntimeEntry, ...RuntimeEntry[]];
638
+ }
639
+ export interface RuntimeEntry {
640
+ /**
641
+ * Runtime ID. MUST match one of the 14 runtime IDs exported from scripts/lib/install/runtimes.cjs (Phase 24 D-02 lock).
642
+ */
643
+ id:
644
+ | 'claude'
645
+ | 'codex'
646
+ | 'gemini'
647
+ | 'qwen'
648
+ | 'kilo'
649
+ | 'copilot'
650
+ | 'cursor'
651
+ | 'windsurf'
652
+ | 'antigravity'
653
+ | 'augment'
654
+ | 'trae'
655
+ | 'codebuddy'
656
+ | 'cline'
657
+ | 'opencode';
658
+ /**
659
+ * When true, the runtime exposes a single model that maps to all three tiers (D-02). Downstream consumers (router, budget-enforcer) may render a UI affordance noting tier-selection has no cost effect for this runtime.
660
+ */
661
+ single_tier?: boolean;
662
+ /**
663
+ * Map of canonical Anthropic tier names (D-03) to the runtime's concrete model identifier. All three keys are required even when single_tier=true (assign the same model three times).
664
+ */
665
+ tier_to_model: {
666
+ opus: ModelRow;
667
+ sonnet: ModelRow;
668
+ haiku: ModelRow;
669
+ };
670
+ /**
671
+ * Map of runtime-neutral reasoning-class names (D-10 alias) to the runtime's concrete model identifier. Equivalence with tier_to_model is enforced by Phase 26-08 frontmatter validator (high↔opus, medium↔sonnet, low↔haiku).
672
+ */
673
+ reasoning_class_to_model: {
674
+ high: ModelRow;
675
+ medium: ModelRow;
676
+ low: ModelRow;
677
+ };
678
+ /**
679
+ * Source citations for this runtime's tier map. At minimum one entry pointing at the runtime-author docs URL plus retrieval timestamp + last-validated cycle. Phase 13.2 authority-watcher uses this to flag drift.
680
+ *
681
+ * @minItems 1
682
+ */
683
+ provenance: [
684
+ {
685
+ /**
686
+ * URL of the runtime-author documentation that authoritatively names the tier→model mapping. Placeholder URLs prefixed with `<TODO: confirm at ...>` are acceptable for v1.26 ship and flag the row as researcher-fill-needed.
687
+ */
688
+ source_url: string;
689
+ /**
690
+ * ISO 8601 timestamp when the source URL was retrieved.
691
+ */
692
+ retrieved_at: string;
693
+ /**
694
+ * GDD cycle ID that last validated this row (e.g. '2026-04-29-v1.26').
695
+ */
696
+ last_validated_cycle: string;
697
+ /**
698
+ * Optional inline note (e.g. 'TODO: confirm at runtime-author docs', 'single-tier runtime — same model x3').
699
+ */
700
+ note?: string;
701
+ },
702
+ ...{
703
+ /**
704
+ * URL of the runtime-author documentation that authoritatively names the tier→model mapping. Placeholder URLs prefixed with `<TODO: confirm at ...>` are acceptable for v1.26 ship and flag the row as researcher-fill-needed.
705
+ */
706
+ source_url: string;
707
+ /**
708
+ * ISO 8601 timestamp when the source URL was retrieved.
709
+ */
710
+ retrieved_at: string;
711
+ /**
712
+ * GDD cycle ID that last validated this row (e.g. '2026-04-29-v1.26').
713
+ */
714
+ last_validated_cycle: string;
715
+ /**
716
+ * Optional inline note (e.g. 'TODO: confirm at runtime-author docs', 'single-tier runtime — same model x3').
717
+ */
718
+ note?: string;
719
+ }[],
720
+ ];
721
+ }
722
+ export interface ModelRow {
723
+ /**
724
+ * Public model name as documented by the runtime author.
725
+ */
726
+ model: string;
727
+ /**
728
+ * Optional internal/provider model ID for runtimes whose API identifiers differ from the public name (D-03).
729
+ */
730
+ provider_model_id?: string;
731
+ }
732
+
733
+ export type RuntimeModelsSchema = RuntimeModelsTierToModelMap;
734
+
@@ -50,6 +50,7 @@ function usage() {
50
50
  ' gdd-events cat [--path=<p>]',
51
51
  ' gdd-events list-types',
52
52
  ' gdd-events serve [--port=<n>] [--token=<t>] [--tail=<file>]',
53
+ ' gdd-events --type <typename> [--path=<p>] (Plan 29-03 ergonomic alias for `grep type=<typename>`)',
53
54
  '',
54
55
  'Filter language (grep): type=<s> payload.<dotted.path>=<s> !type=<s>',
55
56
  '',
@@ -59,11 +60,22 @@ function usage() {
59
60
 
60
61
  function parseArgs(args) {
61
62
  const out = { _: [], flags: {} };
62
- for (const a of args) {
63
+ // Flags that take a value via the space-separated form `--flag <value>`.
64
+ // Without this set, `--type capability_gap` would be parsed as
65
+ // { flags: { type: true } } and the value would land in positional args.
66
+ const VALUE_FLAGS = new Set(['type', 'path', 'port', 'token', 'tail']);
67
+ for (let i = 0; i < args.length; i++) {
68
+ const a = args[i];
63
69
  if (a.startsWith('--')) {
64
70
  const eq = a.indexOf('=');
65
71
  if (eq === -1) {
66
- out.flags[a.slice(2)] = true;
72
+ const name = a.slice(2);
73
+ if (VALUE_FLAGS.has(name) && i + 1 < args.length && !args[i + 1].startsWith('--')) {
74
+ out.flags[name] = args[i + 1];
75
+ i += 1;
76
+ } else {
77
+ out.flags[name] = true;
78
+ }
67
79
  } else {
68
80
  out.flags[a.slice(2, eq)] = a.slice(eq + 1);
69
81
  }
@@ -242,6 +254,27 @@ async function cmdServe(parsed) {
242
254
 
243
255
  async function main() {
244
256
  const parsed = parseArgs(argv.slice(2));
257
+
258
+ // Plan 29-03: `--type <typename>` (and `--type=<typename>`) is an ergonomic
259
+ // alias for `grep type=<typename>`. Desugar BEFORE shifting the subcommand
260
+ // so the flag can be used without a subcommand prefix:
261
+ // gdd-events --type capability_gap --path=…
262
+ // Equivalent to:
263
+ // gdd-events grep type=capability_gap --path=…
264
+ if (typeof parsed.flags.type === 'string' && parsed.flags.type.length > 0) {
265
+ const typeValue = parsed.flags.type;
266
+ delete parsed.flags.type;
267
+ // Inject the filter term and force the grep code path. Preserve any
268
+ // additional positional terms the user already supplied.
269
+ parsed._ = [`type=${typeValue}`, ...parsed._];
270
+ try {
271
+ return await cmdGrep(parsed);
272
+ } catch (err) {
273
+ stderr.write(`gdd-events: ${err && err.message ? err.message : String(err)}\n`);
274
+ return 1;
275
+ }
276
+ }
277
+
245
278
  const sub = parsed._.shift();
246
279
  try {
247
280
  switch (sub) {