@hegemonart/get-design-done 1.0.7
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 +63 -0
- package/.claude-plugin/plugin.json +54 -0
- package/CHANGELOG.md +221 -0
- package/LICENSE +21 -0
- package/README.md +724 -0
- package/SKILL.md +232 -0
- package/agents/README.md +226 -0
- package/agents/a11y-mapper.md +118 -0
- package/agents/component-taxonomy-mapper.md +88 -0
- package/agents/design-advisor.md +139 -0
- package/agents/design-assumptions-analyzer.md +171 -0
- package/agents/design-auditor.md +383 -0
- package/agents/design-context-builder.md +544 -0
- package/agents/design-context-checker-gate.md +90 -0
- package/agents/design-context-checker.md +260 -0
- package/agents/design-discussant.md +98 -0
- package/agents/design-doc-writer.md +229 -0
- package/agents/design-executor.md +452 -0
- package/agents/design-figma-writer.md +302 -0
- package/agents/design-fixer.md +180 -0
- package/agents/design-integration-checker-gate.md +93 -0
- package/agents/design-integration-checker.md +326 -0
- package/agents/design-pattern-mapper.md +206 -0
- package/agents/design-phase-researcher.md +229 -0
- package/agents/design-plan-checker.md +164 -0
- package/agents/design-planner.md +352 -0
- package/agents/design-reflector.md +175 -0
- package/agents/design-research-synthesizer.md +127 -0
- package/agents/design-verifier-gate.md +97 -0
- package/agents/design-verifier.md +605 -0
- package/agents/gdd-graphify-sync.md +100 -0
- package/agents/gdd-intel-updater.md +88 -0
- package/agents/gdd-learnings-extractor.md +85 -0
- package/agents/motion-mapper.md +103 -0
- package/agents/token-mapper.md +103 -0
- package/agents/visual-hierarchy-mapper.md +95 -0
- package/connections/chromatic.md +247 -0
- package/connections/claude-design.md +190 -0
- package/connections/connections.md +218 -0
- package/connections/figma-writer.md +139 -0
- package/connections/figma.md +146 -0
- package/connections/graphify.md +197 -0
- package/connections/pinterest.md +153 -0
- package/connections/preview.md +173 -0
- package/connections/refero.md +189 -0
- package/connections/storybook.md +280 -0
- package/hooks/budget-enforcer.js +318 -0
- package/hooks/context-exhaustion.js +127 -0
- package/hooks/gdd-read-injection-scanner.js +44 -0
- package/hooks/hooks.json +44 -0
- package/package.json +60 -0
- package/reference/BRANCH-PROTECTION.md +65 -0
- package/reference/DEPRECATIONS.md +41 -0
- package/reference/STATE-TEMPLATE.md +200 -0
- package/reference/accessibility.md +190 -0
- package/reference/anti-patterns.md +336 -0
- package/reference/audit-scoring.md +205 -0
- package/reference/checklists.md +137 -0
- package/reference/config-schema.md +319 -0
- package/reference/debugger-philosophy.md +32 -0
- package/reference/heuristics.md +201 -0
- package/reference/intel-schema.md +266 -0
- package/reference/model-prices.md +37 -0
- package/reference/model-tiers.md +118 -0
- package/reference/motion.md +285 -0
- package/reference/parallelism-rules.md +108 -0
- package/reference/priority-matrix.md +31 -0
- package/reference/project-skills-guide.md +42 -0
- package/reference/review-format.md +107 -0
- package/reference/schemas/config.schema.json +41 -0
- package/reference/schemas/hooks.schema.json +55 -0
- package/reference/schemas/intel.schema.json +191 -0
- package/reference/schemas/marketplace.schema.json +72 -0
- package/reference/schemas/plugin.schema.json +59 -0
- package/reference/shared-preamble.md +82 -0
- package/reference/typography.md +229 -0
- package/scripts/aggregate-agent-metrics.js +144 -0
- package/scripts/apply-branch-protection.sh +75 -0
- package/scripts/bootstrap-manifest.txt +3 -0
- package/scripts/bootstrap.sh +80 -0
- package/scripts/build-intel.cjs +458 -0
- package/scripts/detect-stale-refs.cjs +101 -0
- package/scripts/extract-changelog-section.cjs +57 -0
- package/scripts/release-smoke-test.cjs +169 -0
- package/scripts/rollback-release.sh +42 -0
- package/scripts/run-injection-scanner-ci.cjs +92 -0
- package/scripts/validate-frontmatter.cjs +68 -0
- package/scripts/validate-schemas.cjs +225 -0
- package/scripts/verify-version-sync.cjs +30 -0
- package/skills/add-backlog/SKILL.md +47 -0
- package/skills/analyze-dependencies/SKILL.md +184 -0
- package/skills/apply-reflections/SKILL.md +112 -0
- package/skills/audit/SKILL.md +54 -0
- package/skills/brief/SKILL.md +75 -0
- package/skills/cache-manager/SKILL.md +120 -0
- package/skills/compare/SKILL.md +322 -0
- package/skills/complete-cycle/SKILL.md +33 -0
- package/skills/darkmode/SKILL.md +331 -0
- package/skills/debug/SKILL.md +38 -0
- package/skills/design/SKILL.md +281 -0
- package/skills/discover/SKILL.md +172 -0
- package/skills/discuss/SKILL.md +67 -0
- package/skills/do/SKILL.md +45 -0
- package/skills/explore/SKILL.md +109 -0
- package/skills/extract-learnings/SKILL.md +98 -0
- package/skills/fast/SKILL.md +44 -0
- package/skills/figma-write/SKILL.md +40 -0
- package/skills/graphify/SKILL.md +48 -0
- package/skills/health/SKILL.md +48 -0
- package/skills/help/SKILL.md +76 -0
- package/skills/list-assumptions/SKILL.md +60 -0
- package/skills/map/SKILL.md +112 -0
- package/skills/new-cycle/SKILL.md +35 -0
- package/skills/new-project/SKILL.md +53 -0
- package/skills/next/SKILL.md +42 -0
- package/skills/note/SKILL.md +47 -0
- package/skills/optimize/SKILL.md +120 -0
- package/skills/pause/SKILL.md +41 -0
- package/skills/plan/SKILL.md +251 -0
- package/skills/plant-seed/SKILL.md +47 -0
- package/skills/pr-branch/SKILL.md +31 -0
- package/skills/progress/SKILL.md +60 -0
- package/skills/quick/SKILL.md +43 -0
- package/skills/reapply-patches/SKILL.md +31 -0
- package/skills/reflect/SKILL.md +73 -0
- package/skills/resume/SKILL.md +37 -0
- package/skills/review-backlog/SKILL.md +45 -0
- package/skills/router/SKILL.md +67 -0
- package/skills/scan/SKILL.md +721 -0
- package/skills/settings/SKILL.md +78 -0
- package/skills/ship/SKILL.md +31 -0
- package/skills/sketch/SKILL.md +78 -0
- package/skills/sketch-wrap-up/SKILL.md +88 -0
- package/skills/skill-manifest/SKILL.md +79 -0
- package/skills/spike/SKILL.md +67 -0
- package/skills/spike-wrap-up/SKILL.md +81 -0
- package/skills/stats/SKILL.md +50 -0
- package/skills/style/SKILL.md +193 -0
- package/skills/synthesize/SKILL.md +93 -0
- package/skills/todo/SKILL.md +54 -0
- package/skills/undo/SKILL.md +30 -0
- package/skills/update/SKILL.md +36 -0
- package/skills/verify/SKILL.md +452 -0
- package/skills/warm-cache/SKILL.md +113 -0
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* aggregate-agent-metrics.js — Incremental per-agent aggregator.
|
|
4
|
+
*
|
|
5
|
+
* Reads: .design/telemetry/costs.jsonl (append-only ledger from hooks/budget-enforcer.js)
|
|
6
|
+
* agents/{agent}.md (frontmatter source for default-tier, parallel-safe, reads-only,
|
|
7
|
+
* typical-duration-seconds)
|
|
8
|
+
* Writes: .design/agent-metrics.json (atomic overwrite via tmp-file + rename)
|
|
9
|
+
*
|
|
10
|
+
* Invoked:
|
|
11
|
+
* 1. Detached child of hooks/budget-enforcer.js after every telemetry write.
|
|
12
|
+
* 2. Directly by /gdd:optimize skill as an explicit refresh step.
|
|
13
|
+
* 3. Manually: `node scripts/aggregate-agent-metrics.js`
|
|
14
|
+
*
|
|
15
|
+
* OPT-09 contract: fields must match Phase 11 reflector's expectations
|
|
16
|
+
* (see .planning/phases/11-self-improvement/11-02-PLAN.md).
|
|
17
|
+
*/
|
|
18
|
+
|
|
19
|
+
'use strict';
|
|
20
|
+
|
|
21
|
+
const fs = require('fs');
|
|
22
|
+
const path = require('path');
|
|
23
|
+
const os = require('os');
|
|
24
|
+
|
|
25
|
+
const CWD = process.cwd();
|
|
26
|
+
const TELEMETRY_PATH = path.join(CWD, '.design', 'telemetry', 'costs.jsonl');
|
|
27
|
+
const METRICS_PATH = path.join(CWD, '.design', 'agent-metrics.json');
|
|
28
|
+
const AGENTS_DIR = path.join(CWD, 'agents');
|
|
29
|
+
|
|
30
|
+
// ---- frontmatter reader (no YAML dep) ----
|
|
31
|
+
function readAgentFrontmatter(agentName) {
|
|
32
|
+
const p = path.join(AGENTS_DIR, `${agentName}.md`);
|
|
33
|
+
if (!fs.existsSync(p)) return {};
|
|
34
|
+
try {
|
|
35
|
+
const content = fs.readFileSync(p, 'utf8');
|
|
36
|
+
const fm = content.match(/^---\s*\n([\s\S]*?)\n---/);
|
|
37
|
+
if (!fm) return {};
|
|
38
|
+
const body = fm[1];
|
|
39
|
+
const get = (key) => {
|
|
40
|
+
const m = body.match(new RegExp(`^${key}:\\s*"?([^"\\n]+)"?`, 'm'));
|
|
41
|
+
return m ? m[1].trim() : null;
|
|
42
|
+
};
|
|
43
|
+
const defaultTier = get('default-tier');
|
|
44
|
+
const parallelSafe = get('parallel-safe');
|
|
45
|
+
const readsOnly = get('reads-only');
|
|
46
|
+
const typicalDuration = get('typical-duration-seconds');
|
|
47
|
+
return {
|
|
48
|
+
default_tier: defaultTier || null,
|
|
49
|
+
parallel_safe: parallelSafe === null ? null : /^(true|yes)$/i.test(parallelSafe),
|
|
50
|
+
reads_only: readsOnly === null ? null : /^(true|yes)$/i.test(readsOnly),
|
|
51
|
+
typical_duration_seconds: typicalDuration === null ? null : Number(typicalDuration) || null,
|
|
52
|
+
};
|
|
53
|
+
} catch {
|
|
54
|
+
return {};
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
// ---- telemetry reader ----
|
|
59
|
+
function readTelemetryRows() {
|
|
60
|
+
if (!fs.existsSync(TELEMETRY_PATH)) return [];
|
|
61
|
+
const raw = fs.readFileSync(TELEMETRY_PATH, 'utf8');
|
|
62
|
+
const out = [];
|
|
63
|
+
for (const line of raw.split(/\r?\n/)) {
|
|
64
|
+
if (!line.trim()) continue;
|
|
65
|
+
try {
|
|
66
|
+
out.push(JSON.parse(line));
|
|
67
|
+
} catch {
|
|
68
|
+
// tolerant: skip malformed lines (partial write, truncation)
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
return out;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
// ---- aggregator ----
|
|
75
|
+
function aggregate(rows) {
|
|
76
|
+
const byAgent = new Map();
|
|
77
|
+
for (const r of rows) {
|
|
78
|
+
const agent = r.agent || 'unknown';
|
|
79
|
+
if (!byAgent.has(agent)) {
|
|
80
|
+
byAgent.set(agent, {
|
|
81
|
+
total_spawns: 0,
|
|
82
|
+
total_cost_usd: 0,
|
|
83
|
+
total_tokens_in: 0,
|
|
84
|
+
total_tokens_out: 0,
|
|
85
|
+
cache_hits: 0,
|
|
86
|
+
lazy_skips: 0,
|
|
87
|
+
});
|
|
88
|
+
}
|
|
89
|
+
const a = byAgent.get(agent);
|
|
90
|
+
a.total_spawns += 1;
|
|
91
|
+
a.total_cost_usd += Number(r.est_cost_usd || 0);
|
|
92
|
+
a.total_tokens_in += Number(r.tokens_in || 0);
|
|
93
|
+
a.total_tokens_out += Number(r.tokens_out || 0);
|
|
94
|
+
if (r.cache_hit === true) a.cache_hits += 1;
|
|
95
|
+
if (r.lazy_skipped === true) a.lazy_skips += 1;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
const out = {};
|
|
99
|
+
for (const [agent, a] of byAgent.entries()) {
|
|
100
|
+
const fm = readAgentFrontmatter(agent);
|
|
101
|
+
const spawns = a.total_spawns || 1; // guard div-by-zero
|
|
102
|
+
out[agent] = {
|
|
103
|
+
typical_duration_seconds: fm.typical_duration_seconds,
|
|
104
|
+
default_tier: fm.default_tier,
|
|
105
|
+
parallel_safe: fm.parallel_safe,
|
|
106
|
+
reads_only: fm.reads_only,
|
|
107
|
+
total_spawns: a.total_spawns,
|
|
108
|
+
total_cost_usd: Number(a.total_cost_usd.toFixed(6)),
|
|
109
|
+
total_tokens_in: a.total_tokens_in,
|
|
110
|
+
total_tokens_out: a.total_tokens_out,
|
|
111
|
+
cache_hit_rate: Number((a.cache_hits / spawns).toFixed(4)),
|
|
112
|
+
lazy_skip_rate: Number((a.lazy_skips / spawns).toFixed(4)),
|
|
113
|
+
};
|
|
114
|
+
}
|
|
115
|
+
return out;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
// ---- atomic write ----
|
|
119
|
+
function writeAtomic(filePath, content) {
|
|
120
|
+
const dir = path.dirname(filePath);
|
|
121
|
+
if (!fs.existsSync(dir)) fs.mkdirSync(dir, { recursive: true });
|
|
122
|
+
const tmp = path.join(dir, `.${path.basename(filePath)}.${process.pid}.${Date.now()}.tmp`);
|
|
123
|
+
fs.writeFileSync(tmp, content, 'utf8');
|
|
124
|
+
fs.renameSync(tmp, filePath);
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
// ---- main ----
|
|
128
|
+
function main() {
|
|
129
|
+
const rows = readTelemetryRows();
|
|
130
|
+
const agents = aggregate(rows);
|
|
131
|
+
const payload = {
|
|
132
|
+
generated_at: new Date().toISOString(),
|
|
133
|
+
agents,
|
|
134
|
+
};
|
|
135
|
+
writeAtomic(METRICS_PATH, JSON.stringify(payload, null, 2) + '\n');
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
try {
|
|
139
|
+
main();
|
|
140
|
+
} catch (err) {
|
|
141
|
+
// Fail open: aggregator must never block the hook or /gdd:optimize flow.
|
|
142
|
+
process.stderr.write(`aggregate-agent-metrics: ${err.message}\n`);
|
|
143
|
+
process.exit(0);
|
|
144
|
+
}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# apply-branch-protection.sh — manually apply branch protection to `main`.
|
|
3
|
+
# Per D-16: this script is run by the repo admin locally, NOT from CI.
|
|
4
|
+
# Usage:
|
|
5
|
+
# bash scripts/apply-branch-protection.sh --advisory
|
|
6
|
+
# bash scripts/apply-branch-protection.sh --enforcing
|
|
7
|
+
# bash scripts/apply-branch-protection.sh --disable
|
|
8
|
+
|
|
9
|
+
set -euo pipefail
|
|
10
|
+
|
|
11
|
+
MODE="${1:-}"
|
|
12
|
+
REPO="${GITHUB_REPOSITORY:-hegemonart/get-design-done}"
|
|
13
|
+
|
|
14
|
+
if ! command -v gh >/dev/null 2>&1; then
|
|
15
|
+
echo "ERROR: gh CLI not found. Install from https://cli.github.com/"
|
|
16
|
+
exit 1
|
|
17
|
+
fi
|
|
18
|
+
|
|
19
|
+
case "$MODE" in
|
|
20
|
+
--advisory)
|
|
21
|
+
echo "Applying ADVISORY branch protection to $REPO main..."
|
|
22
|
+
gh api -X PUT "repos/${REPO}/branches/main/protection" \
|
|
23
|
+
-H "Accept: application/vnd.github+json" \
|
|
24
|
+
-f "required_status_checks=null" \
|
|
25
|
+
-F "enforce_admins=false" \
|
|
26
|
+
-f "required_pull_request_reviews=null" \
|
|
27
|
+
-F "restrictions=null" \
|
|
28
|
+
-F "required_linear_history=false" \
|
|
29
|
+
-F "allow_force_pushes=true" \
|
|
30
|
+
-F "allow_deletions=false"
|
|
31
|
+
echo "Advisory mode applied. CI checks will run but not block merges."
|
|
32
|
+
;;
|
|
33
|
+
--enforcing)
|
|
34
|
+
echo "Applying ENFORCING branch protection to $REPO main..."
|
|
35
|
+
# Status check names must match the `name:` field of each job exactly.
|
|
36
|
+
# See reference/BRANCH-PROTECTION.md §Phase B for the authoritative list.
|
|
37
|
+
gh api -X PUT "repos/${REPO}/branches/main/protection" \
|
|
38
|
+
-H "Accept: application/vnd.github+json" \
|
|
39
|
+
--input - <<'JSON'
|
|
40
|
+
{
|
|
41
|
+
"required_status_checks": {
|
|
42
|
+
"strict": true,
|
|
43
|
+
"contexts": [
|
|
44
|
+
"Lint (markdown + frontmatter + stale-refs)",
|
|
45
|
+
"Validate (schemas + plugin + shellcheck)",
|
|
46
|
+
"Test (Node 22 / ubuntu-latest)",
|
|
47
|
+
"Test (Node 22 / macos-latest)",
|
|
48
|
+
"Test (Node 22 / windows-latest)",
|
|
49
|
+
"Test (Node 24 / ubuntu-latest)",
|
|
50
|
+
"Test (Node 24 / macos-latest)",
|
|
51
|
+
"Test (Node 24 / windows-latest)",
|
|
52
|
+
"Security (secrets + injection scan)",
|
|
53
|
+
"Size budget (blocking)"
|
|
54
|
+
]
|
|
55
|
+
},
|
|
56
|
+
"enforce_admins": false,
|
|
57
|
+
"required_pull_request_reviews": null,
|
|
58
|
+
"restrictions": null,
|
|
59
|
+
"required_linear_history": true,
|
|
60
|
+
"allow_force_pushes": false,
|
|
61
|
+
"allow_deletions": false
|
|
62
|
+
}
|
|
63
|
+
JSON
|
|
64
|
+
echo "Enforcing mode applied. CI must pass before merge; linear history required."
|
|
65
|
+
;;
|
|
66
|
+
--disable)
|
|
67
|
+
echo "Removing branch protection from $REPO main..."
|
|
68
|
+
gh api -X DELETE "repos/${REPO}/branches/main/protection" || true
|
|
69
|
+
echo "Protection removed."
|
|
70
|
+
;;
|
|
71
|
+
*)
|
|
72
|
+
echo "Usage: $0 --advisory | --enforcing | --disable"
|
|
73
|
+
exit 1
|
|
74
|
+
;;
|
|
75
|
+
esac
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# get-design-done bootstrap
|
|
3
|
+
# Auto-provisions companion resources that get-design-done references but which
|
|
4
|
+
# are not Claude Code plugins (so they cannot be listed in `dependencies`).
|
|
5
|
+
#
|
|
6
|
+
# Runs on SessionStart. Idempotent: uses a marker in ${CLAUDE_PLUGIN_DATA} so it
|
|
7
|
+
# only performs network work on first install or when the bundled manifest changes.
|
|
8
|
+
#
|
|
9
|
+
# Resources provisioned:
|
|
10
|
+
# - ~/.claude/libs/awesome-design-md (VoltAgent/awesome-design-md)
|
|
11
|
+
#
|
|
12
|
+
# Resources NOT provisioned (install separately, see README):
|
|
13
|
+
# - emil-design-eng skill — no canonical upstream
|
|
14
|
+
# - refero MCP — optional, add to your Claude config if you have access
|
|
15
|
+
|
|
16
|
+
set -u
|
|
17
|
+
|
|
18
|
+
PLUGIN_DATA="${CLAUDE_PLUGIN_DATA:-$HOME/.claude/plugins/data/get-design-done}"
|
|
19
|
+
PLUGIN_DATA="${PLUGIN_DATA//\\//}" # Normalize Windows backslashes to forward slashes
|
|
20
|
+
PLUGIN_ROOT="${CLAUDE_PLUGIN_ROOT:-$(cd "$(dirname "$0")/.." && pwd)}"
|
|
21
|
+
PLUGIN_ROOT="${PLUGIN_ROOT//\\//}" # Normalize Windows backslashes to forward slashes
|
|
22
|
+
MANIFEST="${PLUGIN_ROOT}/scripts/bootstrap-manifest.txt"
|
|
23
|
+
MARKER="${PLUGIN_DATA}/bootstrap-manifest.txt"
|
|
24
|
+
|
|
25
|
+
mkdir -p "${PLUGIN_DATA}" "${HOME}/.claude/libs" "${HOME}/.claude/skills"
|
|
26
|
+
|
|
27
|
+
# Skip if bundled manifest matches the last-run marker (no-op on every other session).
|
|
28
|
+
if [[ -f "${MANIFEST}" && -f "${MARKER}" ]] && diff -q "${MANIFEST}" "${MARKER}" >/dev/null 2>&1; then
|
|
29
|
+
exit 0
|
|
30
|
+
fi
|
|
31
|
+
|
|
32
|
+
log() { printf '[get-design-done bootstrap] %s\n' "$*" >&2; }
|
|
33
|
+
|
|
34
|
+
clone_or_update() {
|
|
35
|
+
local repo_url="$1"
|
|
36
|
+
local target="$2"
|
|
37
|
+
if [[ -d "${target}/.git" ]]; then
|
|
38
|
+
log "updating ${target}"
|
|
39
|
+
git -C "${target}" pull --quiet --ff-only 2>/dev/null || log "pull failed for ${target} (continuing)"
|
|
40
|
+
elif [[ -d "${target}" ]]; then
|
|
41
|
+
log "${target} exists and is not a git checkout — skipping"
|
|
42
|
+
else
|
|
43
|
+
log "cloning ${repo_url} -> ${target}"
|
|
44
|
+
git clone --quiet --depth 1 "${repo_url}" "${target}" || log "clone failed for ${repo_url}"
|
|
45
|
+
fi
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
# Required library: awesome-design-md
|
|
49
|
+
clone_or_update "https://github.com/VoltAgent/awesome-design-md.git" "${HOME}/.claude/libs/awesome-design-md"
|
|
50
|
+
|
|
51
|
+
# Soft notice for companion skills we cannot auto-install.
|
|
52
|
+
if [[ ! -d "${HOME}/.claude/skills/emil-design-eng" ]]; then
|
|
53
|
+
log "optional: emil-design-eng skill not found in ~/.claude/skills. See get-design-done README for install options."
|
|
54
|
+
fi
|
|
55
|
+
|
|
56
|
+
# Phase 10.1: ensure .design/budget.json exists with defaults (D-12)
|
|
57
|
+
DESIGN_DIR="$(pwd)/.design"
|
|
58
|
+
mkdir -p "${DESIGN_DIR}"
|
|
59
|
+
if [ ! -f "${DESIGN_DIR}/budget.json" ]; then
|
|
60
|
+
cat > "${DESIGN_DIR}/budget.json" <<'BUDGET_EOF'
|
|
61
|
+
{
|
|
62
|
+
"per_task_cap_usd": 2.00,
|
|
63
|
+
"per_phase_cap_usd": 20.00,
|
|
64
|
+
"tier_overrides": {},
|
|
65
|
+
"auto_downgrade_on_cap": true,
|
|
66
|
+
"cache_ttl_seconds": 3600,
|
|
67
|
+
"enforcement_mode": "enforce"
|
|
68
|
+
}
|
|
69
|
+
BUDGET_EOF
|
|
70
|
+
fi
|
|
71
|
+
|
|
72
|
+
# Phase 10.1: ensure .design/telemetry/ directory is writable
|
|
73
|
+
mkdir -p "${DESIGN_DIR}/telemetry"
|
|
74
|
+
|
|
75
|
+
# Record success so we don't re-run until the bundled manifest changes.
|
|
76
|
+
if [[ -f "${MANIFEST}" ]]; then
|
|
77
|
+
cp "${MANIFEST}" "${MARKER}"
|
|
78
|
+
fi
|
|
79
|
+
|
|
80
|
+
exit 0
|