@hegemonart/get-design-done 1.19.6 → 1.20.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 +4 -4
- package/.claude-plugin/plugin.json +2 -2
- package/CHANGELOG.md +60 -0
- package/README.md +12 -0
- package/agents/design-reflector.md +13 -0
- package/connections/connections.md +3 -0
- package/connections/figma.md +2 -0
- package/connections/gdd-state.md +186 -0
- package/hooks/budget-enforcer.ts +716 -0
- package/hooks/context-exhaustion.ts +251 -0
- package/hooks/gdd-read-injection-scanner.ts +172 -0
- package/hooks/hooks.json +3 -3
- package/package.json +19 -6
- package/reference/config-schema.md +2 -2
- package/reference/error-recovery.md +58 -0
- package/reference/registry.json +7 -0
- package/reference/schemas/budget.schema.json +42 -0
- package/reference/schemas/events.schema.json +55 -0
- package/reference/schemas/generated.d.ts +419 -0
- package/reference/schemas/iteration-budget.schema.json +36 -0
- package/reference/schemas/mcp-gdd-state-tools.schema.json +89 -0
- package/reference/schemas/rate-limits.schema.json +31 -0
- package/scripts/aggregate-agent-metrics.ts +282 -0
- package/scripts/codegen-schema-types.ts +149 -0
- package/scripts/lib/error-classifier.cjs +232 -0
- package/scripts/lib/error-classifier.d.cts +44 -0
- package/scripts/lib/event-stream/emitter.ts +88 -0
- package/scripts/lib/event-stream/index.ts +154 -0
- package/scripts/lib/event-stream/types.ts +127 -0
- package/scripts/lib/event-stream/writer.ts +154 -0
- package/scripts/lib/gdd-errors/classification.ts +124 -0
- package/scripts/lib/gdd-errors/index.ts +218 -0
- package/scripts/lib/gdd-state/gates.ts +216 -0
- package/scripts/lib/gdd-state/index.ts +167 -0
- package/scripts/lib/gdd-state/lockfile.ts +232 -0
- package/scripts/lib/gdd-state/mutator.ts +574 -0
- package/scripts/lib/gdd-state/parser.ts +523 -0
- package/scripts/lib/gdd-state/types.ts +179 -0
- package/scripts/lib/iteration-budget.cjs +205 -0
- package/scripts/lib/iteration-budget.d.cts +32 -0
- package/scripts/lib/jittered-backoff.cjs +112 -0
- package/scripts/lib/jittered-backoff.d.cts +38 -0
- package/scripts/lib/lockfile.cjs +177 -0
- package/scripts/lib/lockfile.d.cts +21 -0
- package/scripts/lib/prompt-sanitizer/index.ts +435 -0
- package/scripts/lib/prompt-sanitizer/patterns.ts +173 -0
- package/scripts/lib/rate-guard.cjs +365 -0
- package/scripts/lib/rate-guard.d.cts +38 -0
- package/scripts/mcp-servers/gdd-state/schemas/add_blocker.schema.json +67 -0
- package/scripts/mcp-servers/gdd-state/schemas/add_decision.schema.json +68 -0
- package/scripts/mcp-servers/gdd-state/schemas/add_must_have.schema.json +68 -0
- package/scripts/mcp-servers/gdd-state/schemas/checkpoint.schema.json +51 -0
- package/scripts/mcp-servers/gdd-state/schemas/frontmatter_update.schema.json +62 -0
- package/scripts/mcp-servers/gdd-state/schemas/get.schema.json +51 -0
- package/scripts/mcp-servers/gdd-state/schemas/probe_connections.schema.json +75 -0
- package/scripts/mcp-servers/gdd-state/schemas/resolve_blocker.schema.json +66 -0
- package/scripts/mcp-servers/gdd-state/schemas/set_status.schema.json +47 -0
- package/scripts/mcp-servers/gdd-state/schemas/transition_stage.schema.json +70 -0
- package/scripts/mcp-servers/gdd-state/schemas/update_progress.schema.json +58 -0
- package/scripts/mcp-servers/gdd-state/server.ts +288 -0
- package/scripts/mcp-servers/gdd-state/tools/add_blocker.ts +72 -0
- package/scripts/mcp-servers/gdd-state/tools/add_decision.ts +89 -0
- package/scripts/mcp-servers/gdd-state/tools/add_must_have.ts +113 -0
- package/scripts/mcp-servers/gdd-state/tools/checkpoint.ts +60 -0
- package/scripts/mcp-servers/gdd-state/tools/frontmatter_update.ts +91 -0
- package/scripts/mcp-servers/gdd-state/tools/get.ts +51 -0
- package/scripts/mcp-servers/gdd-state/tools/index.ts +51 -0
- package/scripts/mcp-servers/gdd-state/tools/probe_connections.ts +73 -0
- package/scripts/mcp-servers/gdd-state/tools/resolve_blocker.ts +84 -0
- package/scripts/mcp-servers/gdd-state/tools/set_status.ts +54 -0
- package/scripts/mcp-servers/gdd-state/tools/shared.ts +194 -0
- package/scripts/mcp-servers/gdd-state/tools/transition_stage.ts +80 -0
- package/scripts/mcp-servers/gdd-state/tools/update_progress.ts +81 -0
- package/scripts/validate-frontmatter.ts +114 -0
- package/scripts/validate-schemas.ts +401 -0
- package/skills/brief/SKILL.md +15 -6
- package/skills/design/SKILL.md +31 -13
- package/skills/explore/SKILL.md +41 -17
- package/skills/health/SKILL.md +15 -4
- package/skills/optimize/SKILL.md +3 -3
- package/skills/pause/SKILL.md +16 -10
- package/skills/plan/SKILL.md +33 -17
- package/skills/progress/SKILL.md +15 -11
- package/skills/resume/SKILL.md +19 -10
- package/skills/settings/SKILL.md +11 -3
- package/skills/todo/SKILL.md +12 -3
- package/skills/verify/SKILL.md +65 -29
- package/hooks/budget-enforcer.js +0 -329
- package/hooks/context-exhaustion.js +0 -127
- package/hooks/gdd-read-injection-scanner.js +0 -39
- package/scripts/aggregate-agent-metrics.js +0 -173
- package/scripts/validate-frontmatter.cjs +0 -68
- package/scripts/validate-schemas.cjs +0 -242
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"$id": "https://raw.githubusercontent.com/hegemonart/get-design-done/main/reference/schemas/events.schema.json",
|
|
4
|
+
"title": "Event",
|
|
5
|
+
"description": "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.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"additionalProperties": false,
|
|
8
|
+
"required": ["type", "timestamp", "sessionId", "payload"],
|
|
9
|
+
"properties": {
|
|
10
|
+
"type": {
|
|
11
|
+
"type": "string",
|
|
12
|
+
"minLength": 1,
|
|
13
|
+
"description": "Free-form event type identifier. Pre-registered seeds: state.mutation, state.transition, stage.entered, stage.exited, hook.fired, error."
|
|
14
|
+
},
|
|
15
|
+
"timestamp": {
|
|
16
|
+
"type": "string",
|
|
17
|
+
"format": "date-time",
|
|
18
|
+
"description": "ISO-8601 timestamp of event emission."
|
|
19
|
+
},
|
|
20
|
+
"sessionId": {
|
|
21
|
+
"type": "string",
|
|
22
|
+
"minLength": 1,
|
|
23
|
+
"description": "Stable identifier per GDD pipeline run; correlates events across stages."
|
|
24
|
+
},
|
|
25
|
+
"stage": {
|
|
26
|
+
"type": "string",
|
|
27
|
+
"enum": ["brief", "explore", "plan", "design", "verify"],
|
|
28
|
+
"description": "Optional — present when the event is scoped to a pipeline stage."
|
|
29
|
+
},
|
|
30
|
+
"cycle": {
|
|
31
|
+
"type": "string",
|
|
32
|
+
"minLength": 1,
|
|
33
|
+
"description": "Optional — present when the event is scoped to a cycle identifier."
|
|
34
|
+
},
|
|
35
|
+
"payload": {
|
|
36
|
+
"type": "object",
|
|
37
|
+
"description": "Event-type-specific payload. Opaque at the envelope level."
|
|
38
|
+
},
|
|
39
|
+
"_meta": {
|
|
40
|
+
"type": "object",
|
|
41
|
+
"additionalProperties": false,
|
|
42
|
+
"required": ["pid", "host", "source"],
|
|
43
|
+
"properties": {
|
|
44
|
+
"pid": { "type": "integer", "minimum": 0 },
|
|
45
|
+
"host": { "type": "string" },
|
|
46
|
+
"source": { "type": "string" }
|
|
47
|
+
},
|
|
48
|
+
"description": "Writer-injected provenance. Never set by callers."
|
|
49
|
+
},
|
|
50
|
+
"_truncated": {
|
|
51
|
+
"type": "boolean",
|
|
52
|
+
"description": "Writer-set flag indicating the payload exceeded maxLineBytes and has been replaced by a placeholder."
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
}
|
|
@@ -0,0 +1,419 @@
|
|
|
1
|
+
// AUTO-GENERATED from reference/schemas/*.schema.json — DO NOT EDIT.
|
|
2
|
+
// Regenerate: npm run codegen:schemas
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
// ---- authority-snapshot.schema.json ----
|
|
5
|
+
/**
|
|
6
|
+
* Structure of .design/authority-snapshot.json produced by agents/design-authority-watcher.md. See .planning/phases/13.2-external-authority-watcher/13.2-CONTEXT.md §D-12.
|
|
7
|
+
*/
|
|
8
|
+
export interface AuthoritySnapshot {
|
|
9
|
+
version: 1;
|
|
10
|
+
generated_at: string;
|
|
11
|
+
feeds: {
|
|
12
|
+
[k: string]: FeedState;
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
export interface FeedState {
|
|
16
|
+
last_fetched_at: string;
|
|
17
|
+
etag?: string;
|
|
18
|
+
/**
|
|
19
|
+
* @maxItems 200
|
|
20
|
+
*/
|
|
21
|
+
entries: Entry[];
|
|
22
|
+
}
|
|
23
|
+
export interface Entry {
|
|
24
|
+
id: string;
|
|
25
|
+
hash: string;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export type AuthoritySnapshotSchema = AuthoritySnapshot;
|
|
29
|
+
|
|
30
|
+
// ---- budget.schema.json ----
|
|
31
|
+
/**
|
|
32
|
+
* Shape of .design/budget.json — the Phase 10.1 optimization-layer budget governance file. Consumed by hooks/budget-enforcer.ts on every PreToolUse:Agent spawn. Bootstrap writes the Default Config from reference/config-schema.md if the file is missing.
|
|
33
|
+
*/
|
|
34
|
+
export interface DesignBudgetJson {
|
|
35
|
+
/**
|
|
36
|
+
* Hard ceiling per agent spawn (USD). Breach under enforcement_mode=enforce triggers D-02 block.
|
|
37
|
+
*/
|
|
38
|
+
per_task_cap_usd?: number;
|
|
39
|
+
/**
|
|
40
|
+
* Cumulative ceiling across all spawns within the current phase (USD). Read from .design/STATE.md frontmatter `phase:` field.
|
|
41
|
+
*/
|
|
42
|
+
per_phase_cap_usd?: number;
|
|
43
|
+
/**
|
|
44
|
+
* Per-agent tier override map (agent-name -> tier). Wins over agent frontmatter default-tier per D-04.
|
|
45
|
+
*/
|
|
46
|
+
tier_overrides?: {
|
|
47
|
+
[k: string]: 'haiku' | 'sonnet' | 'opus';
|
|
48
|
+
};
|
|
49
|
+
/**
|
|
50
|
+
* When true, hook silently rewrites tier -> haiku at 80% of per_task_cap_usd per D-03; logged as tier_downgraded: true in telemetry.
|
|
51
|
+
*/
|
|
52
|
+
auto_downgrade_on_cap?: boolean;
|
|
53
|
+
/**
|
|
54
|
+
* TTL (seconds) driving .design/cache-manifest.json entry expiry per D-08 Layer B. Default 3600.
|
|
55
|
+
*/
|
|
56
|
+
cache_ttl_seconds?: number;
|
|
57
|
+
/**
|
|
58
|
+
* D-11 enforcement policy. enforce = block + auto-downgrade; warn = print warnings but allow spawn; log = advisory-only telemetry without gating.
|
|
59
|
+
*/
|
|
60
|
+
enforcement_mode?: 'enforce' | 'warn' | 'log';
|
|
61
|
+
[k: string]: unknown;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
export type BudgetSchema = DesignBudgetJson;
|
|
65
|
+
|
|
66
|
+
// ---- config.schema.json ----
|
|
67
|
+
/**
|
|
68
|
+
* Shape of .design/config.json — model profile and parallelism settings per reference/config-schema.md.
|
|
69
|
+
*/
|
|
70
|
+
export interface DesignConfigJson {
|
|
71
|
+
model_profile?: 'quality' | 'balanced' | 'budget';
|
|
72
|
+
parallelism?: {
|
|
73
|
+
enabled?: boolean;
|
|
74
|
+
max_parallel_agents?: number;
|
|
75
|
+
min_tasks_to_parallelize?: number;
|
|
76
|
+
min_estimated_savings_seconds?: number;
|
|
77
|
+
require_disjoint_touches?: boolean;
|
|
78
|
+
worktree_isolation?: boolean;
|
|
79
|
+
per_stage_override?: {
|
|
80
|
+
[k: string]: {
|
|
81
|
+
enabled?: boolean;
|
|
82
|
+
max_parallel_agents?: number;
|
|
83
|
+
min_tasks_to_parallelize?: number;
|
|
84
|
+
min_estimated_savings_seconds?: number;
|
|
85
|
+
require_disjoint_touches?: boolean;
|
|
86
|
+
worktree_isolation?: boolean;
|
|
87
|
+
[k: string]: unknown;
|
|
88
|
+
};
|
|
89
|
+
};
|
|
90
|
+
[k: string]: unknown;
|
|
91
|
+
};
|
|
92
|
+
/**
|
|
93
|
+
* Latest plugin tag (e.g. "v1.0.7.3") whose update nudge the user has dismissed. Set by /gdd:check-update --dismiss and by hooks/update-check.sh on the --dismiss code path. When a newer tag ships, the nudge reappears.
|
|
94
|
+
*/
|
|
95
|
+
update_dismissed?: string;
|
|
96
|
+
[k: string]: unknown;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
export type ConfigSchema = DesignConfigJson;
|
|
100
|
+
|
|
101
|
+
// ---- events.schema.json ----
|
|
102
|
+
/**
|
|
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
|
+
*/
|
|
105
|
+
export interface Event {
|
|
106
|
+
/**
|
|
107
|
+
* Free-form event type identifier. Pre-registered seeds: state.mutation, state.transition, stage.entered, stage.exited, hook.fired, error.
|
|
108
|
+
*/
|
|
109
|
+
type: string;
|
|
110
|
+
/**
|
|
111
|
+
* ISO-8601 timestamp of event emission.
|
|
112
|
+
*/
|
|
113
|
+
timestamp: string;
|
|
114
|
+
/**
|
|
115
|
+
* Stable identifier per GDD pipeline run; correlates events across stages.
|
|
116
|
+
*/
|
|
117
|
+
sessionId: string;
|
|
118
|
+
/**
|
|
119
|
+
* Optional — present when the event is scoped to a pipeline stage.
|
|
120
|
+
*/
|
|
121
|
+
stage?: 'brief' | 'explore' | 'plan' | 'design' | 'verify';
|
|
122
|
+
/**
|
|
123
|
+
* Optional — present when the event is scoped to a cycle identifier.
|
|
124
|
+
*/
|
|
125
|
+
cycle?: string;
|
|
126
|
+
/**
|
|
127
|
+
* Event-type-specific payload. Opaque at the envelope level.
|
|
128
|
+
*/
|
|
129
|
+
payload: {};
|
|
130
|
+
/**
|
|
131
|
+
* Writer-injected provenance. Never set by callers.
|
|
132
|
+
*/
|
|
133
|
+
_meta?: {
|
|
134
|
+
pid: number;
|
|
135
|
+
host: string;
|
|
136
|
+
source: string;
|
|
137
|
+
};
|
|
138
|
+
/**
|
|
139
|
+
* Writer-set flag indicating the payload exceeded maxLineBytes and has been replaced by a placeholder.
|
|
140
|
+
*/
|
|
141
|
+
_truncated?: boolean;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
export type EventsSchema = Event;
|
|
145
|
+
|
|
146
|
+
// ---- hooks.schema.json ----
|
|
147
|
+
/**
|
|
148
|
+
* Shape of hooks/hooks.json — event-triggered commands registered by the plugin.
|
|
149
|
+
*/
|
|
150
|
+
export interface ClaudeHooksJson {
|
|
151
|
+
hooks: {
|
|
152
|
+
SessionStart?: HookGroup[];
|
|
153
|
+
SessionEnd?: HookGroup[];
|
|
154
|
+
PreToolUse?: HookGroup[];
|
|
155
|
+
PostToolUse?: HookGroup[];
|
|
156
|
+
[k: string]: unknown;
|
|
157
|
+
};
|
|
158
|
+
[k: string]: unknown;
|
|
159
|
+
}
|
|
160
|
+
export interface HookGroup {
|
|
161
|
+
matcher?: string;
|
|
162
|
+
hooks: {
|
|
163
|
+
type: 'command';
|
|
164
|
+
command: string;
|
|
165
|
+
[k: string]: unknown;
|
|
166
|
+
}[];
|
|
167
|
+
[k: string]: unknown;
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
export type HooksSchema = ClaudeHooksJson;
|
|
171
|
+
|
|
172
|
+
// ---- intel.schema.json ----
|
|
173
|
+
/**
|
|
174
|
+
* 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.
|
|
175
|
+
*/
|
|
176
|
+
export interface DesignIntelJson {
|
|
177
|
+
generated: string;
|
|
178
|
+
git_hash?: string;
|
|
179
|
+
files?: {
|
|
180
|
+
path: string;
|
|
181
|
+
type: 'skill' | 'agent' | 'reference' | 'connection' | 'script' | 'hook' | 'config' | 'test' | 'other';
|
|
182
|
+
mtime?: string;
|
|
183
|
+
size_bytes?: number;
|
|
184
|
+
git_hash?: string;
|
|
185
|
+
[k: string]: unknown;
|
|
186
|
+
}[];
|
|
187
|
+
exports?: {
|
|
188
|
+
file: string;
|
|
189
|
+
kind: 'skill' | 'agent' | 'reference' | 'other';
|
|
190
|
+
name: string;
|
|
191
|
+
command?: string;
|
|
192
|
+
[k: string]: unknown;
|
|
193
|
+
}[];
|
|
194
|
+
symbols?: {
|
|
195
|
+
file: string;
|
|
196
|
+
heading: string;
|
|
197
|
+
level?: number;
|
|
198
|
+
anchor?: string;
|
|
199
|
+
line?: number;
|
|
200
|
+
[k: string]: unknown;
|
|
201
|
+
}[];
|
|
202
|
+
tokens?: {
|
|
203
|
+
file: string;
|
|
204
|
+
token: string;
|
|
205
|
+
category?: 'color' | 'spacing' | 'typography' | 'radius' | 'shadow' | 'motion' | 'other';
|
|
206
|
+
line?: number;
|
|
207
|
+
context?: string;
|
|
208
|
+
[k: string]: unknown;
|
|
209
|
+
}[];
|
|
210
|
+
components?: {
|
|
211
|
+
file: string;
|
|
212
|
+
component: string;
|
|
213
|
+
role?: 'definition' | 'reference' | 'example';
|
|
214
|
+
line?: number;
|
|
215
|
+
[k: string]: unknown;
|
|
216
|
+
}[];
|
|
217
|
+
patterns?: {
|
|
218
|
+
name: string;
|
|
219
|
+
category?:
|
|
220
|
+
| 'color-system'
|
|
221
|
+
| 'spacing-system'
|
|
222
|
+
| 'typography-system'
|
|
223
|
+
| 'component-styling'
|
|
224
|
+
| 'layout'
|
|
225
|
+
| 'interaction'
|
|
226
|
+
| 'other';
|
|
227
|
+
source_file?: string;
|
|
228
|
+
description?: string;
|
|
229
|
+
[k: string]: unknown;
|
|
230
|
+
}[];
|
|
231
|
+
dependencies?: {
|
|
232
|
+
from: string;
|
|
233
|
+
to: string;
|
|
234
|
+
kind?: 'at-reference' | 'reads-from' | 'skill-calls-agent' | 'agent-calls-agent';
|
|
235
|
+
line?: number;
|
|
236
|
+
[k: string]: unknown;
|
|
237
|
+
}[];
|
|
238
|
+
decisions?: {
|
|
239
|
+
id: string;
|
|
240
|
+
summary: string;
|
|
241
|
+
source_file?: string;
|
|
242
|
+
line?: number;
|
|
243
|
+
date?: string;
|
|
244
|
+
[k: string]: unknown;
|
|
245
|
+
}[];
|
|
246
|
+
debt?: {
|
|
247
|
+
id: string;
|
|
248
|
+
summary: string;
|
|
249
|
+
severity?: 'high' | 'medium' | 'low';
|
|
250
|
+
source_file?: string;
|
|
251
|
+
line?: number;
|
|
252
|
+
[k: string]: unknown;
|
|
253
|
+
}[];
|
|
254
|
+
nodes?: {
|
|
255
|
+
id: string;
|
|
256
|
+
type?: string;
|
|
257
|
+
name?: string;
|
|
258
|
+
[k: string]: unknown;
|
|
259
|
+
}[];
|
|
260
|
+
edges?: {
|
|
261
|
+
from: string;
|
|
262
|
+
to: string;
|
|
263
|
+
kind?: string;
|
|
264
|
+
[k: string]: unknown;
|
|
265
|
+
}[];
|
|
266
|
+
[k: string]: unknown;
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
export type IntelSchema = DesignIntelJson;
|
|
270
|
+
|
|
271
|
+
// ---- iteration-budget.schema.json ----
|
|
272
|
+
/**
|
|
273
|
+
* Shape of .design/iteration-budget.json produced by scripts/lib/iteration-budget.cjs. Caps the number of fix-loop iterations that can consume context before the pipeline halts for user input. All mutations are coordinated by scripts/lib/lockfile.cjs and written via temp+rename. See .planning/phases/20-gdd-sdk-foundation/20-14-PLAN.md §Task 4.
|
|
274
|
+
*/
|
|
275
|
+
export interface IterationBudget {
|
|
276
|
+
/**
|
|
277
|
+
* The configured ceiling. Initialized by reset(). `remaining` never exceeds this value after refund().
|
|
278
|
+
*/
|
|
279
|
+
budget: number;
|
|
280
|
+
/**
|
|
281
|
+
* Iterations still available for consume() calls. Starts at `budget`, drops on consume, climbs (capped at `budget`) on refund.
|
|
282
|
+
*/
|
|
283
|
+
remaining: number;
|
|
284
|
+
/**
|
|
285
|
+
* Running total of successful consume() calls since last reset().
|
|
286
|
+
*/
|
|
287
|
+
consumed: number;
|
|
288
|
+
/**
|
|
289
|
+
* Running total of refund amount since last reset() (useful for auditing the cache-hit refund path from budget-enforcer.ts).
|
|
290
|
+
*/
|
|
291
|
+
refunded: number;
|
|
292
|
+
/**
|
|
293
|
+
* ISO-8601 timestamp of the last mutation.
|
|
294
|
+
*/
|
|
295
|
+
updatedAt: string;
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
export type IterationBudgetSchema = IterationBudget;
|
|
299
|
+
|
|
300
|
+
// ---- marketplace.schema.json ----
|
|
301
|
+
/**
|
|
302
|
+
* Shape of .claude-plugin/marketplace.json — the plugin marketplace descriptor.
|
|
303
|
+
*/
|
|
304
|
+
export interface ClaudeMarketplaceJson {
|
|
305
|
+
name: string;
|
|
306
|
+
owner: {
|
|
307
|
+
name: string;
|
|
308
|
+
[k: string]: unknown;
|
|
309
|
+
};
|
|
310
|
+
metadata: {
|
|
311
|
+
description: string;
|
|
312
|
+
version: string;
|
|
313
|
+
[k: string]: unknown;
|
|
314
|
+
};
|
|
315
|
+
plugins: {
|
|
316
|
+
name: string;
|
|
317
|
+
source: string;
|
|
318
|
+
description: string;
|
|
319
|
+
version: string;
|
|
320
|
+
author: {
|
|
321
|
+
name: string;
|
|
322
|
+
[k: string]: unknown;
|
|
323
|
+
};
|
|
324
|
+
homepage?: string;
|
|
325
|
+
repository: string;
|
|
326
|
+
license: string;
|
|
327
|
+
category: string;
|
|
328
|
+
keywords: string[];
|
|
329
|
+
[k: string]: unknown;
|
|
330
|
+
}[];
|
|
331
|
+
[k: string]: unknown;
|
|
332
|
+
}
|
|
333
|
+
|
|
334
|
+
export type MarketplaceSchema = ClaudeMarketplaceJson;
|
|
335
|
+
|
|
336
|
+
// ---- mcp-gdd-state-tools.schema.json ----
|
|
337
|
+
/**
|
|
338
|
+
* 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.
|
|
339
|
+
*/
|
|
340
|
+
export interface McpGddStateTools {
|
|
341
|
+
tools: {
|
|
342
|
+
gdd_state__get: ToolSchemaEntry;
|
|
343
|
+
gdd_state__update_progress: ToolSchemaEntry;
|
|
344
|
+
gdd_state__transition_stage: ToolSchemaEntry;
|
|
345
|
+
gdd_state__add_blocker: ToolSchemaEntry;
|
|
346
|
+
gdd_state__resolve_blocker: ToolSchemaEntry;
|
|
347
|
+
gdd_state__add_decision: ToolSchemaEntry;
|
|
348
|
+
gdd_state__add_must_have: ToolSchemaEntry;
|
|
349
|
+
gdd_state__set_status: ToolSchemaEntry;
|
|
350
|
+
gdd_state__checkpoint: ToolSchemaEntry;
|
|
351
|
+
gdd_state__probe_connections: ToolSchemaEntry;
|
|
352
|
+
gdd_state__frontmatter_update: ToolSchemaEntry;
|
|
353
|
+
};
|
|
354
|
+
}
|
|
355
|
+
export interface ToolSchemaEntry {
|
|
356
|
+
/**
|
|
357
|
+
* JSON Schema fragment describing the tool's input parameters.
|
|
358
|
+
*/
|
|
359
|
+
input: {};
|
|
360
|
+
/**
|
|
361
|
+
* JSON Schema fragment describing the tool's response envelope.
|
|
362
|
+
*/
|
|
363
|
+
output: {
|
|
364
|
+
type: 'object';
|
|
365
|
+
};
|
|
366
|
+
}
|
|
367
|
+
|
|
368
|
+
export type McpGddStateToolsSchema = McpGddStateTools;
|
|
369
|
+
|
|
370
|
+
// ---- plugin.schema.json ----
|
|
371
|
+
/**
|
|
372
|
+
* Shape of .claude-plugin/plugin.json — the plugin manifest consumed by Claude Code.
|
|
373
|
+
*/
|
|
374
|
+
export interface ClaudePluginJson {
|
|
375
|
+
name: string;
|
|
376
|
+
short_name: string;
|
|
377
|
+
version: string;
|
|
378
|
+
description: string;
|
|
379
|
+
author: {
|
|
380
|
+
name: string;
|
|
381
|
+
url?: string;
|
|
382
|
+
[k: string]: unknown;
|
|
383
|
+
};
|
|
384
|
+
homepage?: string;
|
|
385
|
+
repository: string;
|
|
386
|
+
license: string;
|
|
387
|
+
keywords: string[];
|
|
388
|
+
skills: string[];
|
|
389
|
+
hooks?: string;
|
|
390
|
+
[k: string]: unknown;
|
|
391
|
+
}
|
|
392
|
+
|
|
393
|
+
export type PluginSchema = ClaudePluginJson;
|
|
394
|
+
|
|
395
|
+
// ---- rate-limits.schema.json ----
|
|
396
|
+
/**
|
|
397
|
+
* 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.
|
|
398
|
+
*/
|
|
399
|
+
export interface RateLimits {
|
|
400
|
+
/**
|
|
401
|
+
* Provider identifier (e.g. 'anthropic', 'openai', 'figma'). Matches the state file basename.
|
|
402
|
+
*/
|
|
403
|
+
provider: string;
|
|
404
|
+
/**
|
|
405
|
+
* Number of API calls the provider says are still allowed before the next reset. When ingestion sees both requests-remaining and tokens-remaining, the lower value wins (most-restrictive).
|
|
406
|
+
*/
|
|
407
|
+
remaining: number;
|
|
408
|
+
/**
|
|
409
|
+
* ISO-8601 timestamp when the rate-limit window resets. Synthesized from whichever header is present: retry-after (seconds or HTTP date), x-ratelimit-reset-requests / -tokens (Unix seconds), anthropic-ratelimit-requests-reset (ISO string). When multiple candidates are present, the latest resetAt wins.
|
|
410
|
+
*/
|
|
411
|
+
resetAt: string;
|
|
412
|
+
/**
|
|
413
|
+
* ISO-8601 timestamp when this state file was last written (ingestHeaders call time).
|
|
414
|
+
*/
|
|
415
|
+
updatedAt: string;
|
|
416
|
+
}
|
|
417
|
+
|
|
418
|
+
export type RateLimitsSchema = RateLimits;
|
|
419
|
+
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"$id": "https://raw.githubusercontent.com/hegemonart/get-design-done/main/reference/schemas/iteration-budget.schema.json",
|
|
4
|
+
"title": "IterationBudget",
|
|
5
|
+
"description": "Shape of .design/iteration-budget.json produced by scripts/lib/iteration-budget.cjs. Caps the number of fix-loop iterations that can consume context before the pipeline halts for user input. All mutations are coordinated by scripts/lib/lockfile.cjs and written via temp+rename. See .planning/phases/20-gdd-sdk-foundation/20-14-PLAN.md §Task 4.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"additionalProperties": false,
|
|
8
|
+
"required": ["budget", "remaining", "consumed", "refunded", "updatedAt"],
|
|
9
|
+
"properties": {
|
|
10
|
+
"budget": {
|
|
11
|
+
"type": "integer",
|
|
12
|
+
"minimum": 0,
|
|
13
|
+
"description": "The configured ceiling. Initialized by reset(). `remaining` never exceeds this value after refund()."
|
|
14
|
+
},
|
|
15
|
+
"remaining": {
|
|
16
|
+
"type": "integer",
|
|
17
|
+
"minimum": 0,
|
|
18
|
+
"description": "Iterations still available for consume() calls. Starts at `budget`, drops on consume, climbs (capped at `budget`) on refund."
|
|
19
|
+
},
|
|
20
|
+
"consumed": {
|
|
21
|
+
"type": "integer",
|
|
22
|
+
"minimum": 0,
|
|
23
|
+
"description": "Running total of successful consume() calls since last reset()."
|
|
24
|
+
},
|
|
25
|
+
"refunded": {
|
|
26
|
+
"type": "integer",
|
|
27
|
+
"minimum": 0,
|
|
28
|
+
"description": "Running total of refund amount since last reset() (useful for auditing the cache-hit refund path from budget-enforcer.ts)."
|
|
29
|
+
},
|
|
30
|
+
"updatedAt": {
|
|
31
|
+
"type": "string",
|
|
32
|
+
"format": "date-time",
|
|
33
|
+
"description": "ISO-8601 timestamp of the last mutation."
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
}
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"$id": "https://raw.githubusercontent.com/hegemonart/get-design-done/main/reference/schemas/mcp-gdd-state-tools.schema.json",
|
|
4
|
+
"title": "McpGddStateTools",
|
|
5
|
+
"description": "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.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"additionalProperties": false,
|
|
8
|
+
"required": ["tools"],
|
|
9
|
+
"properties": {
|
|
10
|
+
"tools": {
|
|
11
|
+
"type": "object",
|
|
12
|
+
"additionalProperties": false,
|
|
13
|
+
"required": [
|
|
14
|
+
"gdd_state__get",
|
|
15
|
+
"gdd_state__update_progress",
|
|
16
|
+
"gdd_state__transition_stage",
|
|
17
|
+
"gdd_state__add_blocker",
|
|
18
|
+
"gdd_state__resolve_blocker",
|
|
19
|
+
"gdd_state__add_decision",
|
|
20
|
+
"gdd_state__add_must_have",
|
|
21
|
+
"gdd_state__set_status",
|
|
22
|
+
"gdd_state__checkpoint",
|
|
23
|
+
"gdd_state__probe_connections",
|
|
24
|
+
"gdd_state__frontmatter_update"
|
|
25
|
+
],
|
|
26
|
+
"properties": {
|
|
27
|
+
"gdd_state__get": { "$ref": "#/definitions/ToolSchemaEntry" },
|
|
28
|
+
"gdd_state__update_progress": { "$ref": "#/definitions/ToolSchemaEntry" },
|
|
29
|
+
"gdd_state__transition_stage": { "$ref": "#/definitions/ToolSchemaEntry" },
|
|
30
|
+
"gdd_state__add_blocker": { "$ref": "#/definitions/ToolSchemaEntry" },
|
|
31
|
+
"gdd_state__resolve_blocker": { "$ref": "#/definitions/ToolSchemaEntry" },
|
|
32
|
+
"gdd_state__add_decision": { "$ref": "#/definitions/ToolSchemaEntry" },
|
|
33
|
+
"gdd_state__add_must_have": { "$ref": "#/definitions/ToolSchemaEntry" },
|
|
34
|
+
"gdd_state__set_status": { "$ref": "#/definitions/ToolSchemaEntry" },
|
|
35
|
+
"gdd_state__checkpoint": { "$ref": "#/definitions/ToolSchemaEntry" },
|
|
36
|
+
"gdd_state__probe_connections": { "$ref": "#/definitions/ToolSchemaEntry" },
|
|
37
|
+
"gdd_state__frontmatter_update": { "$ref": "#/definitions/ToolSchemaEntry" }
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
"definitions": {
|
|
42
|
+
"ToolSchemaEntry": {
|
|
43
|
+
"type": "object",
|
|
44
|
+
"additionalProperties": false,
|
|
45
|
+
"required": ["input", "output"],
|
|
46
|
+
"properties": {
|
|
47
|
+
"input": {
|
|
48
|
+
"type": "object",
|
|
49
|
+
"description": "JSON Schema fragment describing the tool's input parameters."
|
|
50
|
+
},
|
|
51
|
+
"output": {
|
|
52
|
+
"type": "object",
|
|
53
|
+
"description": "JSON Schema fragment describing the tool's response envelope.",
|
|
54
|
+
"required": ["type"],
|
|
55
|
+
"properties": {
|
|
56
|
+
"type": { "type": "string", "enum": ["object"] }
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
},
|
|
61
|
+
"ToolError": {
|
|
62
|
+
"type": "object",
|
|
63
|
+
"additionalProperties": false,
|
|
64
|
+
"required": ["code", "message", "kind"],
|
|
65
|
+
"properties": {
|
|
66
|
+
"code": { "type": "string", "minLength": 1 },
|
|
67
|
+
"message": { "type": "string", "minLength": 1 },
|
|
68
|
+
"kind": {
|
|
69
|
+
"type": "string",
|
|
70
|
+
"enum": ["validation", "state_conflict", "operation_failed", "unknown"]
|
|
71
|
+
},
|
|
72
|
+
"context": {
|
|
73
|
+
"type": "object",
|
|
74
|
+
"additionalProperties": true
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
},
|
|
78
|
+
"ToolResponseEnvelope": {
|
|
79
|
+
"type": "object",
|
|
80
|
+
"additionalProperties": false,
|
|
81
|
+
"required": ["success"],
|
|
82
|
+
"properties": {
|
|
83
|
+
"success": { "type": "boolean" },
|
|
84
|
+
"data": { "type": "object" },
|
|
85
|
+
"error": { "$ref": "#/definitions/ToolError" }
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"$id": "https://raw.githubusercontent.com/hegemonart/get-design-done/main/reference/schemas/rate-limits.schema.json",
|
|
4
|
+
"title": "RateLimits",
|
|
5
|
+
"description": "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.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"additionalProperties": false,
|
|
8
|
+
"required": ["provider", "remaining", "resetAt", "updatedAt"],
|
|
9
|
+
"properties": {
|
|
10
|
+
"provider": {
|
|
11
|
+
"type": "string",
|
|
12
|
+
"minLength": 1,
|
|
13
|
+
"description": "Provider identifier (e.g. 'anthropic', 'openai', 'figma'). Matches the state file basename."
|
|
14
|
+
},
|
|
15
|
+
"remaining": {
|
|
16
|
+
"type": "integer",
|
|
17
|
+
"minimum": 0,
|
|
18
|
+
"description": "Number of API calls the provider says are still allowed before the next reset. When ingestion sees both requests-remaining and tokens-remaining, the lower value wins (most-restrictive)."
|
|
19
|
+
},
|
|
20
|
+
"resetAt": {
|
|
21
|
+
"type": "string",
|
|
22
|
+
"format": "date-time",
|
|
23
|
+
"description": "ISO-8601 timestamp when the rate-limit window resets. Synthesized from whichever header is present: retry-after (seconds or HTTP date), x-ratelimit-reset-requests / -tokens (Unix seconds), anthropic-ratelimit-requests-reset (ISO string). When multiple candidates are present, the latest resetAt wins."
|
|
24
|
+
},
|
|
25
|
+
"updatedAt": {
|
|
26
|
+
"type": "string",
|
|
27
|
+
"format": "date-time",
|
|
28
|
+
"description": "ISO-8601 timestamp when this state file was last written (ingestHeaders call time)."
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
}
|