gsd-antigravity-kit 2.0.1 → 2.1.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/.agent/skills/gsd/SKILL.md +26 -4
- package/.agent/skills/gsd/VERSION +1 -1
- package/.agent/skills/gsd/assets/templates/AI-SPEC.md +246 -0
- package/.agent/skills/gsd/assets/templates/DEBUG.md +7 -2
- package/.agent/skills/gsd/assets/templates/config.json +56 -48
- package/.agent/skills/gsd/assets/templates/research.md +40 -0
- package/.agent/skills/gsd/assets/templates/spec.md +307 -0
- package/.agent/skills/gsd/assets/templates/state.md +8 -0
- package/.agent/skills/gsd/bin/gsd-tools.cjs +212 -11
- package/.agent/skills/gsd/bin/help-manifest.json +8 -2
- package/.agent/skills/gsd/bin/hooks/gsd-check-update-worker.js +108 -0
- package/.agent/skills/gsd/bin/hooks/gsd-check-update.js +14 -89
- package/.agent/skills/gsd/bin/hooks/gsd-context-monitor.js +34 -5
- package/.agent/skills/gsd/bin/hooks/gsd-phase-boundary.sh +1 -0
- package/.agent/skills/gsd/bin/hooks/gsd-prompt-guard.js +1 -1
- package/.agent/skills/gsd/bin/hooks/gsd-read-guard.js +6 -1
- package/.agent/skills/gsd/bin/hooks/gsd-session-state.sh +1 -0
- package/.agent/skills/gsd/bin/hooks/gsd-statusline.js +150 -16
- package/.agent/skills/gsd/bin/hooks/gsd-validate-commit.sh +1 -0
- package/.agent/skills/gsd/bin/hooks/gsd-workflow-guard.js +1 -1
- package/.agent/skills/gsd/bin/lib/audit.cjs +757 -0
- package/.agent/skills/gsd/bin/lib/commands.cjs +17 -7
- package/.agent/skills/gsd/bin/lib/config.cjs +66 -20
- package/.agent/skills/gsd/bin/lib/core.cjs +212 -12
- package/.agent/skills/gsd/bin/lib/frontmatter.cjs +6 -8
- package/.agent/skills/gsd/bin/lib/graphify.cjs +494 -0
- package/.agent/skills/gsd/bin/lib/gsd2-import.cjs +511 -0
- package/.agent/skills/gsd/bin/lib/init.cjs +371 -18
- package/.agent/skills/gsd/bin/lib/intel.cjs +9 -30
- package/.agent/skills/gsd/bin/lib/milestone.cjs +18 -17
- package/.agent/skills/gsd/bin/lib/model-profiles.cjs +1 -0
- package/.agent/skills/gsd/bin/lib/phase.cjs +225 -98
- package/.agent/skills/gsd/bin/lib/profile-output.cjs +17 -5
- package/.agent/skills/gsd/bin/lib/roadmap.cjs +12 -5
- package/.agent/skills/gsd/bin/lib/state.cjs +394 -129
- package/.agent/skills/gsd/bin/lib/template.cjs +8 -4
- package/.agent/skills/gsd/bin/lib/uat.cjs +2 -1
- package/.agent/skills/gsd/bin/lib/verify.cjs +111 -42
- package/.agent/skills/gsd/migration_report.md +2 -2
- package/.agent/skills/gsd/references/agents/gsd-advisor-researcher.md +23 -0
- package/.agent/skills/gsd/references/agents/gsd-ai-researcher.md +133 -0
- package/.agent/skills/gsd/references/agents/gsd-code-fixer.md +11 -10
- package/.agent/skills/gsd/references/agents/gsd-code-reviewer.md +2 -2
- package/.agent/skills/gsd/references/agents/gsd-codebase-mapper.md +13 -2
- package/.agent/skills/gsd/references/agents/gsd-debug-session-manager.md +314 -0
- package/.agent/skills/gsd/references/agents/gsd-debugger.md +147 -76
- package/.agent/skills/gsd/references/agents/gsd-doc-verifier.md +1 -1
- package/.agent/skills/gsd/references/agents/gsd-doc-writer.md +615 -602
- package/.agent/skills/gsd/references/agents/gsd-domain-researcher.md +153 -0
- package/.agent/skills/gsd/references/agents/gsd-eval-auditor.md +175 -0
- package/.agent/skills/gsd/references/agents/gsd-eval-planner.md +154 -0
- package/.agent/skills/gsd/references/agents/gsd-executor.md +108 -38
- package/.agent/skills/gsd/references/agents/gsd-framework-selector.md +160 -0
- package/.agent/skills/gsd/references/agents/gsd-integration-checker.md +454 -443
- package/.agent/skills/gsd/references/agents/gsd-intel-updater.md +40 -20
- package/.agent/skills/gsd/references/agents/gsd-nyquist-auditor.md +187 -176
- package/.agent/skills/gsd/references/agents/gsd-pattern-mapper.md +335 -0
- package/.agent/skills/gsd/references/agents/gsd-phase-researcher.md +112 -13
- package/.agent/skills/gsd/references/agents/gsd-plan-checker.md +104 -10
- package/.agent/skills/gsd/references/agents/gsd-planner.md +125 -167
- package/.agent/skills/gsd/references/agents/gsd-project-researcher.md +25 -2
- package/.agent/skills/gsd/references/agents/gsd-research-synthesizer.md +3 -3
- package/.agent/skills/gsd/references/agents/gsd-roadmapper.md +12 -1
- package/.agent/skills/gsd/references/agents/gsd-security-auditor.md +139 -128
- package/.agent/skills/gsd/references/agents/gsd-ui-auditor.md +3 -3
- package/.agent/skills/gsd/references/agents/gsd-ui-checker.md +11 -2
- package/.agent/skills/gsd/references/agents/gsd-ui-researcher.md +27 -4
- package/.agent/skills/gsd/references/agents/gsd-verifier.md +13 -19
- package/.agent/skills/gsd/references/commands/atomic/add-todo.md +2 -2
- package/.agent/skills/gsd/references/commands/atomic/check-todos.md +2 -2
- package/.agent/skills/gsd/references/commands/atomic/cleanup.md +2 -2
- package/.agent/skills/gsd/references/commands/atomic/do.md +2 -2
- package/.agent/skills/gsd/references/commands/atomic/help.md +2 -2
- package/.agent/skills/gsd/references/commands/atomic/join-discord.md +2 -2
- package/.agent/skills/gsd/references/commands/atomic/note.md +2 -2
- package/.agent/skills/gsd/references/commands/atomic/session-report.md +2 -2
- package/.agent/skills/gsd/references/commands/atomic/ship.md +2 -2
- package/.agent/skills/gsd/references/commands/atomic/stats.md +2 -2
- package/.agent/skills/gsd/references/commands/atomic/thread.md +141 -41
- package/.agent/skills/gsd/references/commands/atomic/undo.md +2 -2
- package/.agent/skills/gsd/references/commands/milestone/add-backlog.md +15 -12
- package/.agent/skills/gsd/references/commands/milestone/audit-milestone.md +2 -2
- package/.agent/skills/gsd/references/commands/milestone/complete-milestone.md +2 -2
- package/.agent/skills/gsd/references/commands/milestone/milestone-summary.md +2 -2
- package/.agent/skills/gsd/references/commands/milestone/new-milestone.md +2 -2
- package/.agent/skills/gsd/references/commands/milestone/plan-milestone-gaps.md +2 -2
- package/.agent/skills/gsd/references/commands/milestone/plant-seed.md +2 -2
- package/.agent/skills/gsd/references/commands/milestone/review-backlog.md +4 -4
- package/.agent/skills/gsd/references/commands/misc/ai-integration-phase.md +38 -0
- package/.agent/skills/gsd/references/commands/misc/audit-fix.md +2 -2
- package/.agent/skills/gsd/references/commands/misc/audit-uat.md +2 -2
- package/.agent/skills/gsd/references/commands/misc/eval-review.md +34 -0
- package/.agent/skills/gsd/references/commands/misc/extract_learnings.md +24 -0
- package/.agent/skills/gsd/references/commands/misc/from-gsd2.md +49 -0
- package/.agent/skills/gsd/references/commands/misc/graphify.md +203 -0
- package/.agent/skills/gsd/references/commands/misc/inbox.md +40 -0
- package/.agent/skills/gsd/references/commands/misc/next.md +5 -3
- package/.agent/skills/gsd/references/commands/misc/progress.md +4 -3
- package/.agent/skills/gsd/references/commands/misc/sketch-wrap-up.md +33 -0
- package/.agent/skills/gsd/references/commands/misc/sketch.md +47 -0
- package/.agent/skills/gsd/references/commands/misc/spec-phase.md +64 -0
- package/.agent/skills/gsd/references/commands/misc/spike-wrap-up.md +33 -0
- package/.agent/skills/gsd/references/commands/misc/spike.md +43 -0
- package/.agent/skills/gsd/references/commands/misc/verify-work.md +2 -2
- package/.agent/skills/gsd/references/commands/phase/add-phase.md +2 -2
- package/.agent/skills/gsd/references/commands/phase/add-tests.md +2 -2
- package/.agent/skills/gsd/references/commands/phase/discuss-phase.md +5 -5
- package/.agent/skills/gsd/references/commands/phase/execute-phase.md +4 -4
- package/.agent/skills/gsd/references/commands/phase/insert-phase.md +2 -2
- package/.agent/skills/gsd/references/commands/phase/list-phase-assumptions.md +2 -2
- package/.agent/skills/gsd/references/commands/phase/plan-phase.md +3 -3
- package/.agent/skills/gsd/references/commands/phase/remove-phase.md +2 -2
- package/.agent/skills/gsd/references/commands/phase/research-phase.md +5 -5
- package/.agent/skills/gsd/references/commands/phase/secure-phase.md +2 -2
- package/.agent/skills/gsd/references/commands/phase/ui-phase.md +2 -2
- package/.agent/skills/gsd/references/commands/phase/ui-review.md +2 -2
- package/.agent/skills/gsd/references/commands/phase/validate-phase.md +2 -2
- package/.agent/skills/gsd/references/commands/phase/workstreams.md +9 -9
- package/.agent/skills/gsd/references/commands/project/analyze-dependencies.md +2 -2
- package/.agent/skills/gsd/references/commands/project/explore.md +2 -2
- package/.agent/skills/gsd/references/commands/project/import.md +2 -2
- package/.agent/skills/gsd/references/commands/project/intel.md +10 -10
- package/.agent/skills/gsd/references/commands/project/list-workspaces.md +2 -2
- package/.agent/skills/gsd/references/commands/project/map-codebase.md +2 -2
- package/.agent/skills/gsd/references/commands/project/new-project.md +2 -2
- package/.agent/skills/gsd/references/commands/project/new-workspace.md +2 -2
- package/.agent/skills/gsd/references/commands/project/remove-workspace.md +2 -2
- package/.agent/skills/gsd/references/commands/project/scan.md +2 -2
- package/.agent/skills/gsd/references/commands/system/autonomous.md +4 -3
- package/.agent/skills/gsd/references/commands/system/code-review-fix.md +3 -3
- package/.agent/skills/gsd/references/commands/system/code-review.md +3 -3
- package/.agent/skills/gsd/references/commands/system/debug.md +177 -100
- package/.agent/skills/gsd/references/commands/system/docs-update.md +2 -2
- package/.agent/skills/gsd/references/commands/system/fast.md +2 -2
- package/.agent/skills/gsd/references/commands/system/forensics.md +2 -2
- package/.agent/skills/gsd/references/commands/system/gsd-tools.md +153 -6
- package/.agent/skills/gsd/references/commands/system/health.md +2 -2
- package/.agent/skills/gsd/references/commands/system/manager.md +3 -3
- package/.agent/skills/gsd/references/commands/system/pause-work.md +2 -2
- package/.agent/skills/gsd/references/commands/system/pr-branch.md +2 -2
- package/.agent/skills/gsd/references/commands/system/profile-user.md +2 -2
- package/.agent/skills/gsd/references/commands/system/quick.md +127 -3
- package/.agent/skills/gsd/references/commands/system/reapply-patches.md +45 -6
- package/.agent/skills/gsd/references/commands/system/resume-work.md +2 -2
- package/.agent/skills/gsd/references/commands/system/review.md +6 -4
- package/.agent/skills/gsd/references/commands/system/set-profile.md +3 -3
- package/.agent/skills/gsd/references/commands/system/settings.md +2 -2
- package/.agent/skills/gsd/references/commands/system/update.md +2 -2
- package/.agent/skills/gsd/references/docs/ai-evals.md +156 -0
- package/.agent/skills/gsd/references/docs/ai-frameworks.md +186 -0
- package/.agent/skills/gsd/references/docs/artifact-types.md +18 -0
- package/.agent/skills/gsd/references/docs/autonomous-smart-discuss.md +277 -0
- package/.agent/skills/gsd/references/docs/checkpoints.md +30 -0
- package/.agent/skills/gsd/references/docs/common-bug-patterns.md +49 -49
- package/.agent/skills/gsd/references/docs/continuation-format.md +11 -7
- package/.agent/skills/gsd/references/docs/debugger-philosophy.md +76 -0
- package/.agent/skills/gsd/references/docs/decimal-phase-calculation.md +64 -64
- package/.agent/skills/gsd/references/docs/executor-examples.md +110 -0
- package/.agent/skills/gsd/references/docs/git-integration.md +4 -4
- package/.agent/skills/gsd/references/docs/git-planning-commit.md +40 -38
- package/.agent/skills/gsd/references/docs/ios-scaffold.md +123 -0
- package/.agent/skills/gsd/references/docs/mandatory-initial-read.md +2 -0
- package/.agent/skills/gsd/references/docs/phase-argument-parsing.md +61 -61
- package/.agent/skills/gsd/references/docs/planner-antipatterns.md +89 -0
- package/.agent/skills/gsd/references/docs/planner-revision.md +87 -87
- package/.agent/skills/gsd/references/docs/planner-source-audit.md +73 -0
- package/.agent/skills/gsd/references/docs/planning-config.md +33 -8
- package/.agent/skills/gsd/references/docs/project-skills-discovery.md +19 -0
- package/.agent/skills/gsd/references/docs/sketch-interactivity.md +41 -0
- package/.agent/skills/gsd/references/docs/sketch-theme-system.md +94 -0
- package/.agent/skills/gsd/references/docs/sketch-tooling.md +45 -0
- package/.agent/skills/gsd/references/docs/sketch-variant-patterns.md +81 -0
- package/.agent/skills/gsd/references/docs/tdd.md +67 -0
- package/.agent/skills/gsd/references/docs/universal-anti-patterns.md +5 -0
- package/.agent/skills/gsd/references/docs/workstream-flag.md +11 -11
- package/.agent/skills/gsd/references/mapping.md +1 -1
- package/.agent/skills/gsd/references/workflows/add-phase.md +112 -112
- package/.agent/skills/gsd/references/workflows/add-tests.md +6 -3
- package/.agent/skills/gsd/references/workflows/add-todo.md +5 -3
- package/.agent/skills/gsd/references/workflows/ai-integration-phase.md +284 -0
- package/.agent/skills/gsd/references/workflows/audit-fix.md +157 -157
- package/.agent/skills/gsd/references/workflows/audit-milestone.md +340 -340
- package/.agent/skills/gsd/references/workflows/audit-uat.md +109 -109
- package/.agent/skills/gsd/references/workflows/autonomous.md +20 -288
- package/.agent/skills/gsd/references/workflows/check-todos.md +4 -2
- package/.agent/skills/gsd/references/workflows/cleanup.md +3 -1
- package/.agent/skills/gsd/references/workflows/code-review-fix.md +497 -497
- package/.agent/skills/gsd/references/workflows/code-review.md +515 -515
- package/.agent/skills/gsd/references/workflows/complete-milestone.md +97 -24
- package/.agent/skills/gsd/references/workflows/diagnose-issues.md +238 -238
- package/.agent/skills/gsd/references/workflows/discovery-phase.md +2 -0
- package/.agent/skills/gsd/references/workflows/discuss-phase-assumptions.md +11 -11
- package/.agent/skills/gsd/references/workflows/discuss-phase.md +143 -19
- package/.agent/skills/gsd/references/workflows/do.md +8 -2
- package/.agent/skills/gsd/references/workflows/docs-update.md +5 -3
- package/.agent/skills/gsd/references/workflows/eval-review.md +155 -0
- package/.agent/skills/gsd/references/workflows/execute-phase.md +338 -54
- package/.agent/skills/gsd/references/workflows/execute-plan.md +80 -104
- package/.agent/skills/gsd/references/workflows/explore.md +3 -1
- package/.agent/skills/gsd/references/workflows/extract_learnings.md +232 -0
- package/.agent/skills/gsd/references/workflows/forensics.md +3 -3
- package/.agent/skills/gsd/references/workflows/health.md +2 -2
- package/.agent/skills/gsd/references/workflows/help.md +59 -1
- package/.agent/skills/gsd/references/workflows/import.md +3 -1
- package/.agent/skills/gsd/references/workflows/inbox.md +387 -384
- package/.agent/skills/gsd/references/workflows/insert-phase.md +130 -130
- package/.agent/skills/gsd/references/workflows/list-workspaces.md +56 -56
- package/.agent/skills/gsd/references/workflows/manager.md +5 -3
- package/.agent/skills/gsd/references/workflows/map-codebase.md +19 -5
- package/.agent/skills/gsd/references/workflows/milestone-summary.md +6 -6
- package/.agent/skills/gsd/references/workflows/new-milestone.md +63 -9
- package/.agent/skills/gsd/references/workflows/new-project.md +126 -22
- package/.agent/skills/gsd/references/workflows/new-workspace.md +6 -4
- package/.agent/skills/gsd/references/workflows/next.md +220 -153
- package/.agent/skills/gsd/references/workflows/note.md +2 -0
- package/.agent/skills/gsd/references/workflows/pause-work.md +11 -7
- package/.agent/skills/gsd/references/workflows/plan-milestone-gaps.md +273 -273
- package/.agent/skills/gsd/references/workflows/plan-phase.md +281 -62
- package/.agent/skills/gsd/references/workflows/plant-seed.md +4 -1
- package/.agent/skills/gsd/references/workflows/pr-branch.md +41 -13
- package/.agent/skills/gsd/references/workflows/profile-user.md +15 -13
- package/.agent/skills/gsd/references/workflows/progress.md +133 -21
- package/.agent/skills/gsd/references/workflows/quick.md +67 -27
- package/.agent/skills/gsd/references/workflows/remove-phase.md +155 -155
- package/.agent/skills/gsd/references/workflows/remove-workspace.md +4 -2
- package/.agent/skills/gsd/references/workflows/research-phase.md +3 -3
- package/.agent/skills/gsd/references/workflows/resume-project.md +3 -3
- package/.agent/skills/gsd/references/workflows/review.md +71 -8
- package/.agent/skills/gsd/references/workflows/scan.md +102 -102
- package/.agent/skills/gsd/references/workflows/secure-phase.md +7 -5
- package/.agent/skills/gsd/references/workflows/settings.md +24 -7
- package/.agent/skills/gsd/references/workflows/ship.md +71 -6
- package/.agent/skills/gsd/references/workflows/sketch-wrap-up.md +283 -0
- package/.agent/skills/gsd/references/workflows/sketch.md +263 -0
- package/.agent/skills/gsd/references/workflows/spec-phase.md +262 -0
- package/.agent/skills/gsd/references/workflows/spike-wrap-up.md +273 -0
- package/.agent/skills/gsd/references/workflows/spike.md +270 -0
- package/.agent/skills/gsd/references/workflows/stats.md +60 -60
- package/.agent/skills/gsd/references/workflows/transition.md +671 -671
- package/.agent/skills/gsd/references/workflows/ui-phase.md +33 -12
- package/.agent/skills/gsd/references/workflows/ui-review.md +6 -4
- package/.agent/skills/gsd/references/workflows/undo.md +3 -1
- package/.agent/skills/gsd/references/workflows/update.md +113 -2
- package/.agent/skills/gsd/references/workflows/validate-phase.md +7 -5
- package/.agent/skills/gsd/references/workflows/verify-phase.md +93 -10
- package/.agent/skills/gsd/references/workflows/verify-work.md +50 -10
- package/.agent/skills/gsd-converter/references/mapping.md +1 -1
- package/.agent/skills/gsd-converter/scripts/convert.py +36 -17
- package/.agent/skills/gsd-converter/scripts/regression_test.py +68 -33
- package/README.md +3 -2
- package/package.json +1 -1
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
const fs = require('fs');
|
|
6
6
|
const path = require('path');
|
|
7
|
-
const { normalizePhaseName, findPhaseInternal, generateSlugInternal, normalizeMd, toPosixPath, output, error } = require('./core.cjs');
|
|
7
|
+
const { normalizePhaseName, findPhaseInternal, generateSlugInternal, normalizeMd, toPosixPath, planningDir, output, error } = require('./core.cjs');
|
|
8
8
|
const { reconstructFrontmatter } = require('./frontmatter.cjs');
|
|
9
9
|
|
|
10
10
|
function cmdTemplateSelect(cwd, planPath, raw) {
|
|
@@ -131,6 +131,10 @@ function cmdTemplateFill(cwd, templateType, options, raw) {
|
|
|
131
131
|
must_haves: { truths: [], artifacts: [], key_links: [] },
|
|
132
132
|
...fields,
|
|
133
133
|
};
|
|
134
|
+
const planBase = planningDir(cwd);
|
|
135
|
+
const projectRef = toPosixPath(path.relative(cwd, path.join(planBase, 'PROJECT.md')));
|
|
136
|
+
const roadmapRef = toPosixPath(path.relative(cwd, path.join(planBase, 'ROADMAP.md')));
|
|
137
|
+
const stateRef = toPosixPath(path.relative(cwd, path.join(planBase, 'STATE.md')));
|
|
134
138
|
body = [
|
|
135
139
|
`# Phase ${options.phase} Plan ${planNum}: [Title]`,
|
|
136
140
|
'',
|
|
@@ -140,9 +144,9 @@ function cmdTemplateFill(cwd, templateType, options, raw) {
|
|
|
140
144
|
'- **Output:** [Concrete deliverable]',
|
|
141
145
|
'',
|
|
142
146
|
'## Context',
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
147
|
+
`@${projectRef}`,
|
|
148
|
+
`@${roadmapRef}`,
|
|
149
|
+
`@${stateRef}`,
|
|
146
150
|
'',
|
|
147
151
|
'## Tasks',
|
|
148
152
|
'',
|
|
@@ -181,7 +181,8 @@ function buildCheckpoint(currentTest) {
|
|
|
181
181
|
function parseUatItems(content) {
|
|
182
182
|
const items = [];
|
|
183
183
|
// Match test blocks: ### N. Name\nexpected: ...\nresult: ...\n
|
|
184
|
-
|
|
184
|
+
// Accept both bare (result: pending) and bracketed (result: [pending]) formats (#2273)
|
|
185
|
+
const testPattern = /###\s*(\d+)\.\s*([^\n]+)\nexpected:\s*([^\n]+)\nresult:\s*\[?(\w+)\]?(?:\n(?:reported|reason|blocked_by):\s*[^\n]*)?/g;
|
|
185
186
|
let match;
|
|
186
187
|
while ((match = testPattern.exec(content)) !== null) {
|
|
187
188
|
const [, num, name, expected, result] = match;
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
const fs = require('fs');
|
|
6
6
|
const path = require('path');
|
|
7
7
|
const os = require('os');
|
|
8
|
-
const { safeReadFile, loadConfig, normalizePhaseName, escapeRegex, execGit, findPhaseInternal, getMilestoneInfo, stripShippedMilestones, extractCurrentMilestone, planningDir,
|
|
8
|
+
const { safeReadFile, loadConfig, normalizePhaseName, escapeRegex, execGit, findPhaseInternal, getMilestoneInfo, stripShippedMilestones, extractCurrentMilestone, planningDir, output, error, checkAgentsInstalled, CONFIG_DEFAULTS } = require('./core.cjs');
|
|
9
9
|
const { extractFrontmatter, parseMustHavesBlock } = require('./frontmatter.cjs');
|
|
10
10
|
const { writeStateMd } = require('./state.cjs');
|
|
11
11
|
|
|
@@ -534,11 +534,10 @@ function cmdValidateHealth(cwd, options, raw) {
|
|
|
534
534
|
}
|
|
535
535
|
|
|
536
536
|
const planBase = planningDir(cwd);
|
|
537
|
-
const
|
|
538
|
-
const projectPath = path.join(planRoot, 'PROJECT.md');
|
|
537
|
+
const projectPath = path.join(planBase, 'PROJECT.md');
|
|
539
538
|
const roadmapPath = path.join(planBase, 'ROADMAP.md');
|
|
540
539
|
const statePath = path.join(planBase, 'STATE.md');
|
|
541
|
-
const configPath = path.join(
|
|
540
|
+
const configPath = path.join(planBase, 'config.json');
|
|
542
541
|
const phasesDir = path.join(planBase, 'phases');
|
|
543
542
|
|
|
544
543
|
const errors = [];
|
|
@@ -649,55 +648,62 @@ function cmdValidateHealth(cwd, options, raw) {
|
|
|
649
648
|
addIssue('warning', 'W008', 'config.json: workflow.nyquist_validation absent (defaults to enabled but agents may skip)', 'Run /gsd-health --repair to add key', true);
|
|
650
649
|
if (!repairs.includes('addNyquistKey')) repairs.push('addNyquistKey');
|
|
651
650
|
}
|
|
651
|
+
if (configParsed.workflow && configParsed.workflow.ai_integration_phase === undefined) {
|
|
652
|
+
addIssue('warning', 'W016', 'config.json: workflow.ai_integration_phase absent (defaults to enabled — run /gsd-ai-integration-phase before planning AI system phases)', 'Run /gsd-health --repair to add key', true);
|
|
653
|
+
if (!repairs.includes('addAiIntegrationPhaseKey')) repairs.push('addAiIntegrationPhaseKey');
|
|
654
|
+
}
|
|
652
655
|
} catch { /* intentionally empty */ }
|
|
653
656
|
}
|
|
654
657
|
|
|
655
|
-
// ───
|
|
658
|
+
// ─── Read phase directories once for checks 6, 7, 7b, and 8 (#1973) ──────
|
|
659
|
+
let phaseDirEntries = [];
|
|
660
|
+
const phaseDirFiles = new Map(); // phase dir name → file list
|
|
656
661
|
try {
|
|
657
|
-
|
|
658
|
-
for (const e of
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
}
|
|
662
|
+
phaseDirEntries = fs.readdirSync(phasesDir, { withFileTypes: true }).filter(e => e.isDirectory());
|
|
663
|
+
for (const e of phaseDirEntries) {
|
|
664
|
+
try {
|
|
665
|
+
phaseDirFiles.set(e.name, fs.readdirSync(path.join(phasesDir, e.name)));
|
|
666
|
+
} catch { phaseDirFiles.set(e.name, []); }
|
|
662
667
|
}
|
|
663
668
|
} catch { /* intentionally empty */ }
|
|
664
669
|
|
|
670
|
+
// ─── Check 6: Phase directory naming (NN-name format) ─────────────────────
|
|
671
|
+
for (const e of phaseDirEntries) {
|
|
672
|
+
if (!e.name.match(/^\d{2}(?:\.\d+)*-[\w-]+$/)) {
|
|
673
|
+
addIssue('warning', 'W005', `Phase directory "${e.name}" doesn't follow NN-name format`, 'Rename to match pattern (e.g., 01-setup)');
|
|
674
|
+
}
|
|
675
|
+
}
|
|
676
|
+
|
|
665
677
|
// ─── Check 7: Orphaned plans (PLAN without SUMMARY) ───────────────────────
|
|
666
|
-
|
|
667
|
-
const
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
const plans = phaseFiles.filter(f => f.endsWith('-PLAN.md') || f === 'PLAN.md');
|
|
672
|
-
const summaries = phaseFiles.filter(f => f.endsWith('-SUMMARY.md') || f === 'SUMMARY.md');
|
|
673
|
-
const summaryBases = new Set(summaries.map(s => s.replace('-SUMMARY.md', '').replace('SUMMARY.md', '')));
|
|
678
|
+
for (const e of phaseDirEntries) {
|
|
679
|
+
const phaseFiles = phaseDirFiles.get(e.name) || [];
|
|
680
|
+
const plans = phaseFiles.filter(f => f.endsWith('-PLAN.md') || f === 'PLAN.md');
|
|
681
|
+
const summaries = phaseFiles.filter(f => f.endsWith('-SUMMARY.md') || f === 'SUMMARY.md');
|
|
682
|
+
const summaryBases = new Set(summaries.map(s => s.replace('-SUMMARY.md', '').replace('SUMMARY.md', '')));
|
|
674
683
|
|
|
675
|
-
|
|
684
|
+
for (const plan of plans) {
|
|
676
685
|
const planBase = plan.replace('-PLAN.md', '').replace('PLAN.md', '');
|
|
677
686
|
if (!summaryBases.has(planBase)) {
|
|
678
|
-
|
|
679
|
-
}
|
|
687
|
+
addIssue('info', 'I001', `${e.name}/${plan} has no SUMMARY.md`, 'May be in progress');
|
|
680
688
|
}
|
|
681
689
|
}
|
|
682
|
-
}
|
|
690
|
+
}
|
|
683
691
|
|
|
684
692
|
// ─── Check 7b: Nyquist VALIDATION.md consistency ────────────────────────
|
|
685
|
-
|
|
686
|
-
const
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
const hasResearch = phaseFiles.some(f => f.endsWith('-RESEARCH.md'));
|
|
691
|
-
const hasValidation = phaseFiles.some(f => f.endsWith('-VALIDATION.md'));
|
|
692
|
-
if (hasResearch && !hasValidation) {
|
|
693
|
+
for (const e of phaseDirEntries) {
|
|
694
|
+
const phaseFiles = phaseDirFiles.get(e.name) || [];
|
|
695
|
+
const hasResearch = phaseFiles.some(f => f.endsWith('-RESEARCH.md'));
|
|
696
|
+
const hasValidation = phaseFiles.some(f => f.endsWith('-VALIDATION.md'));
|
|
697
|
+
if (hasResearch && !hasValidation) {
|
|
693
698
|
const researchFile = phaseFiles.find(f => f.endsWith('-RESEARCH.md'));
|
|
699
|
+
try {
|
|
694
700
|
const researchContent = fs.readFileSync(path.join(phasesDir, e.name, researchFile), 'utf-8');
|
|
695
701
|
if (researchContent.includes('## Validation Architecture')) {
|
|
696
702
|
addIssue('warning', 'W009', `Phase ${e.name}: has Validation Architecture in RESEARCH.md but no VALIDATION.md`, 'Re-run /gsd-plan-phase with --research to regenerate');
|
|
697
703
|
}
|
|
698
|
-
}
|
|
704
|
+
} catch { /* intentionally empty */ }
|
|
705
|
+
}
|
|
699
706
|
}
|
|
700
|
-
} catch { /* intentionally empty */ }
|
|
701
707
|
|
|
702
708
|
// ─── Check 7c: Agent installation (#1371) ──────────────────────────────────
|
|
703
709
|
// Verify GSD agents are installed. Missing agents cause Task(subagent_type=...)
|
|
@@ -730,20 +736,29 @@ function cmdValidateHealth(cwd, options, raw) {
|
|
|
730
736
|
}
|
|
731
737
|
|
|
732
738
|
const diskPhases = new Set();
|
|
733
|
-
|
|
734
|
-
const
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
739
|
+
for (const e of phaseDirEntries) {
|
|
740
|
+
const dm = e.name.match(/^(\d+[A-Z]?(?:\.\d+)*)/i);
|
|
741
|
+
if (dm) diskPhases.add(dm[1]);
|
|
742
|
+
}
|
|
743
|
+
|
|
744
|
+
// Build a set of phases explicitly marked not-yet-started in the ROADMAP
|
|
745
|
+
// summary list (- [ ] **Phase N:**). These phases are intentionally absent
|
|
746
|
+
// from disk -- W006 must not fire for them (#2009).
|
|
747
|
+
const notStartedPhases = new Set();
|
|
748
|
+
const uncheckedPattern = /-\s*\[\s\]\s*\*{0,2}Phase\s+(\d+[A-Z]?(?:\.\d+)*)[:\s*]/gi;
|
|
749
|
+
let um;
|
|
750
|
+
while ((um = uncheckedPattern.exec(roadmapContent)) !== null) {
|
|
751
|
+
notStartedPhases.add(um[1]);
|
|
752
|
+
// Also add zero-padded variant so 1 and 01 both match
|
|
753
|
+
notStartedPhases.add(String(parseInt(um[1], 10)).padStart(2, '0'));
|
|
754
|
+
}
|
|
742
755
|
|
|
743
756
|
// Phases in ROADMAP but not on disk
|
|
744
757
|
for (const p of roadmapPhases) {
|
|
745
758
|
const padded = String(parseInt(p, 10)).padStart(2, '0');
|
|
746
759
|
if (!diskPhases.has(p) && !diskPhases.has(padded)) {
|
|
760
|
+
// Skip phases explicitly flagged as not-yet-started in the summary list
|
|
761
|
+
if (notStartedPhases.has(p) || notStartedPhases.has(padded)) continue;
|
|
747
762
|
addIssue('warning', 'W006', `Phase ${p} in ROADMAP.md but no directory on disk`, 'Create phase directory or remove from roadmap');
|
|
748
763
|
}
|
|
749
764
|
}
|
|
@@ -822,6 +837,40 @@ function cmdValidateHealth(cwd, options, raw) {
|
|
|
822
837
|
} catch { /* parse error already caught in Check 5 */ }
|
|
823
838
|
}
|
|
824
839
|
|
|
840
|
+
// ─── Check 11: Stale / orphan git worktrees (#2167) ────────────────────────
|
|
841
|
+
try {
|
|
842
|
+
const worktreeResult = execGit(cwd, ['worktree', 'list', '--porcelain']);
|
|
843
|
+
if (worktreeResult.exitCode === 0 && worktreeResult.stdout) {
|
|
844
|
+
const blocks = worktreeResult.stdout.split('\n\n').filter(Boolean);
|
|
845
|
+
// Skip the first block — it is always the main worktree
|
|
846
|
+
for (let i = 1; i < blocks.length; i++) {
|
|
847
|
+
const lines = blocks[i].split('\n');
|
|
848
|
+
const wtLine = lines.find(l => l.startsWith('worktree '));
|
|
849
|
+
if (!wtLine) continue;
|
|
850
|
+
const wtPath = wtLine.slice('worktree '.length);
|
|
851
|
+
|
|
852
|
+
if (!fs.existsSync(wtPath)) {
|
|
853
|
+
// Orphan: path no longer exists on disk
|
|
854
|
+
addIssue('warning', 'W017',
|
|
855
|
+
`Orphan git worktree: ${wtPath} (path no longer exists on disk)`,
|
|
856
|
+
'Run: git worktree prune');
|
|
857
|
+
} else {
|
|
858
|
+
// Check if stale (older than 1 hour)
|
|
859
|
+
try {
|
|
860
|
+
const stat = fs.statSync(wtPath);
|
|
861
|
+
const ageMs = Date.now() - stat.mtimeMs;
|
|
862
|
+
const ONE_HOUR = 60 * 60 * 1000;
|
|
863
|
+
if (ageMs > ONE_HOUR) {
|
|
864
|
+
addIssue('warning', 'W017',
|
|
865
|
+
`Stale git worktree: ${wtPath} (last modified ${Math.round(ageMs / 60000)} minutes ago)`,
|
|
866
|
+
`Run: git worktree remove ${wtPath} --force`);
|
|
867
|
+
}
|
|
868
|
+
} catch { /* stat failed — skip */ }
|
|
869
|
+
}
|
|
870
|
+
}
|
|
871
|
+
}
|
|
872
|
+
} catch { /* git worktree not available or not a git repo — skip silently */ }
|
|
873
|
+
|
|
825
874
|
// ─── Perform repairs if requested ─────────────────────────────────────────
|
|
826
875
|
const repairActions = [];
|
|
827
876
|
if (options.repair && repairs.length > 0) {
|
|
@@ -861,9 +910,12 @@ function cmdValidateHealth(cwd, options, raw) {
|
|
|
861
910
|
}
|
|
862
911
|
// Generate minimal STATE.md from ROADMAP.md structure
|
|
863
912
|
const milestone = getMilestoneInfo(cwd);
|
|
913
|
+
const projectRef = path
|
|
914
|
+
.relative(cwd, path.join(planningDir(cwd), 'PROJECT.md'))
|
|
915
|
+
.split(path.sep).join('/');
|
|
864
916
|
let stateContent = `# Session State\n\n`;
|
|
865
917
|
stateContent += `## Project Reference\n\n`;
|
|
866
|
-
stateContent += `See:
|
|
918
|
+
stateContent += `See: ${projectRef}\n\n`;
|
|
867
919
|
stateContent += `## Position\n\n`;
|
|
868
920
|
stateContent += `**Milestone:** ${milestone.version} ${milestone.name}\n`;
|
|
869
921
|
stateContent += `**Current phase:** (determining...)\n`;
|
|
@@ -891,6 +943,23 @@ function cmdValidateHealth(cwd, options, raw) {
|
|
|
891
943
|
}
|
|
892
944
|
break;
|
|
893
945
|
}
|
|
946
|
+
case 'addAiIntegrationPhaseKey': {
|
|
947
|
+
if (fs.existsSync(configPath)) {
|
|
948
|
+
try {
|
|
949
|
+
const configRaw = fs.readFileSync(configPath, 'utf-8');
|
|
950
|
+
const configParsed = JSON.parse(configRaw);
|
|
951
|
+
if (!configParsed.workflow) configParsed.workflow = {};
|
|
952
|
+
if (configParsed.workflow.ai_integration_phase === undefined) {
|
|
953
|
+
configParsed.workflow.ai_integration_phase = true;
|
|
954
|
+
fs.writeFileSync(configPath, JSON.stringify(configParsed, null, 2), 'utf-8');
|
|
955
|
+
}
|
|
956
|
+
repairActions.push({ action: repair, success: true, path: 'config.json' });
|
|
957
|
+
} catch (err) {
|
|
958
|
+
repairActions.push({ action: repair, success: false, error: err.message });
|
|
959
|
+
}
|
|
960
|
+
}
|
|
961
|
+
break;
|
|
962
|
+
}
|
|
894
963
|
}
|
|
895
964
|
} catch (err) {
|
|
896
965
|
repairActions.push({ action: repair, success: false, error: err.message });
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# GSD Migration Report
|
|
2
2
|
|
|
3
|
-
- **Timestamp**: 2026-04-
|
|
4
|
-
- **Version**: 1.
|
|
3
|
+
- **Timestamp**: 2026-04-18T00:54:51.140135
|
|
4
|
+
- **Version**: 1.37.1 -> 1.37.1
|
|
5
5
|
- **Skill Name**: gsd
|
|
6
6
|
|
|
7
7
|
✅ All recognized source directories were successfully mapped and migrated.
|
|
@@ -17,6 +17,29 @@ Spawned by `discuss-phase` via `Task()`. You do NOT present output directly to t
|
|
|
17
17
|
- Return structured markdown output for the main agent to synthesize
|
|
18
18
|
</role>
|
|
19
19
|
|
|
20
|
+
<documentation_lookup>
|
|
21
|
+
When you need library or framework documentation, check in this order:
|
|
22
|
+
|
|
23
|
+
1. If Context7 MCP tools (`mcp__context7__*`) are available in your environment, use them:
|
|
24
|
+
- Resolve library ID: `mcp__context7__resolve-library-id` with `libraryName`
|
|
25
|
+
- Fetch docs: `mcp__context7__get-library-docs` with `context7CompatibleLibraryId` and `topic`
|
|
26
|
+
|
|
27
|
+
2. If Context7 MCP is not available (upstream bug anthropics/antigravity-code#13898 strips MCP
|
|
28
|
+
tools from agents with a `tools:` frontmatter restriction), use the CLI fallback via Bash:
|
|
29
|
+
|
|
30
|
+
Step 1 — Resolve library ID:
|
|
31
|
+
```bash
|
|
32
|
+
npx --yes ctx7@latest library <name> "<query>"
|
|
33
|
+
```
|
|
34
|
+
Step 2 — Fetch documentation:
|
|
35
|
+
```bash
|
|
36
|
+
npx --yes ctx7@latest docs <libraryId> "<query>"
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
Do not skip documentation lookups because MCP tools are unavailable — the CLI fallback
|
|
40
|
+
works via Bash and produces equivalent output.
|
|
41
|
+
</documentation_lookup>
|
|
42
|
+
|
|
20
43
|
<input>
|
|
21
44
|
Agent receives via prompt:
|
|
22
45
|
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: gsd-ai-researcher
|
|
3
|
+
description: Researches a chosen AI framework's official docs to produce implementation-ready guidance — best practices, syntax, core patterns, and pitfalls distilled for the specific use case. Writes the Framework Quick Reference and Implementation Guidance sections of AI-SPEC.md. Spawned by /gsd-ai-integration-phase orchestrator.
|
|
4
|
+
tools: Read, Write, Bash, Grep, Glob, WebFetch, WebSearch, mcp__context7__*
|
|
5
|
+
color: "#34D399"
|
|
6
|
+
# hooks:
|
|
7
|
+
# PostToolUse:
|
|
8
|
+
# - matcher: "Write|Edit"
|
|
9
|
+
# hooks:
|
|
10
|
+
# - type: command
|
|
11
|
+
# command: "echo 'AI-SPEC written' 2>/dev/null || true"
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
<role>
|
|
15
|
+
You are a GSD AI researcher. Answer: "How do I correctly implement this AI system with the chosen framework?"
|
|
16
|
+
Write Sections 3–4b of AI-SPEC.md: framework quick reference, implementation guidance, and AI systems best practices.
|
|
17
|
+
</role>
|
|
18
|
+
|
|
19
|
+
<documentation_lookup>
|
|
20
|
+
When you need library or framework documentation, check in this order:
|
|
21
|
+
|
|
22
|
+
1. If Context7 MCP tools (`mcp__context7__*`) are available in your environment, use them:
|
|
23
|
+
- Resolve library ID: `mcp__context7__resolve-library-id` with `libraryName`
|
|
24
|
+
- Fetch docs: `mcp__context7__get-library-docs` with `context7CompatibleLibraryId` and `topic`
|
|
25
|
+
|
|
26
|
+
2. If Context7 MCP is not available (upstream bug anthropics/antigravity-code#13898 strips MCP
|
|
27
|
+
tools from agents with a `tools:` frontmatter restriction), use the CLI fallback via Bash:
|
|
28
|
+
|
|
29
|
+
Step 1 — Resolve library ID:
|
|
30
|
+
```bash
|
|
31
|
+
npx --yes ctx7@latest library <name> "<query>"
|
|
32
|
+
```
|
|
33
|
+
Step 2 — Fetch documentation:
|
|
34
|
+
```bash
|
|
35
|
+
npx --yes ctx7@latest docs <libraryId> "<query>"
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
Do not skip documentation lookups because MCP tools are unavailable — the CLI fallback
|
|
39
|
+
works via Bash and produces equivalent output.
|
|
40
|
+
</documentation_lookup>
|
|
41
|
+
|
|
42
|
+
<required_reading>
|
|
43
|
+
Read `C:/projects/GSD-Antigravity/.antigravity/get-shit-done/references/ai-frameworks.md` for framework profiles and known pitfalls before fetching docs.
|
|
44
|
+
</required_reading>
|
|
45
|
+
|
|
46
|
+
<input>
|
|
47
|
+
- `framework`: selected framework name and version
|
|
48
|
+
- `system_type`: RAG | Multi-Agent | Conversational | Extraction | Autonomous | Content | Code | Hybrid
|
|
49
|
+
- `model_provider`: OpenAI | Anthropic | Model-agnostic
|
|
50
|
+
- `ai_spec_path`: path to AI-SPEC.md
|
|
51
|
+
- `phase_context`: phase name and goal
|
|
52
|
+
- `context_path`: path to CONTEXT.md if it exists
|
|
53
|
+
|
|
54
|
+
**If prompt contains `<required_reading>`, read every listed file before doing anything else.**
|
|
55
|
+
</input>
|
|
56
|
+
|
|
57
|
+
<documentation_sources>
|
|
58
|
+
Use context7 MCP first (fastest). Fall back to WebFetch.
|
|
59
|
+
|
|
60
|
+
| Framework | Official Docs URL |
|
|
61
|
+
|-----------|------------------|
|
|
62
|
+
| CrewAI | https://docs.crewai.com |
|
|
63
|
+
| LlamaIndex | https://docs.llamaindex.ai |
|
|
64
|
+
| LangChain | https://python.langchain.com/docs |
|
|
65
|
+
| LangGraph | https://langchain-ai.github.io/langgraph |
|
|
66
|
+
| OpenAI Agents SDK | https://openai.github.io/openai-agents-python |
|
|
67
|
+
| Antigravity Agent SDK | https://docs.anthropic.com/en/docs/antigravity-code/sdk |
|
|
68
|
+
| AutoGen / AG2 | https://ag2ai.github.io/ag2 |
|
|
69
|
+
| Google ADK | https://google.github.io/adk-docs |
|
|
70
|
+
| Haystack | https://docs.haystack.deepset.ai |
|
|
71
|
+
</documentation_sources>
|
|
72
|
+
|
|
73
|
+
<execution_flow>
|
|
74
|
+
|
|
75
|
+
<step name="fetch_docs">
|
|
76
|
+
Fetch 2-4 pages maximum — prioritize depth over breadth: quickstart, the `system_type`-specific pattern page, best practices/pitfalls.
|
|
77
|
+
Extract: installation command, key imports, minimal entry point for `system_type`, 3-5 abstractions, 3-5 pitfalls (prefer GitHub issues over docs), folder structure.
|
|
78
|
+
</step>
|
|
79
|
+
|
|
80
|
+
<step name="detect_integrations">
|
|
81
|
+
Based on `system_type` and `model_provider`, identify required supporting libraries: vector DB (RAG), embedding model, tracing tool, eval library.
|
|
82
|
+
Fetch brief setup docs for each.
|
|
83
|
+
</step>
|
|
84
|
+
|
|
85
|
+
<step name="write_sections_3_4">
|
|
86
|
+
**ALWAYS use the Write tool to create files** — never use `Bash(cat << 'EOF')` or heredoc commands for file creation.
|
|
87
|
+
|
|
88
|
+
Update AI-SPEC.md at `ai_spec_path`:
|
|
89
|
+
|
|
90
|
+
**Section 3 — Framework Quick Reference:** real installation command, actual imports, working entry point pattern for `system_type`, abstractions table (3-5 rows), pitfall list with why-it's-a-pitfall notes, folder structure, Sources subsection with URLs.
|
|
91
|
+
|
|
92
|
+
**Section 4 — Implementation Guidance:** specific model (e.g., `antigravity-sonnet-4-6`, `gpt-4o`) with params, core pattern as code snippet with inline comments, tool use config, state management approach, context window strategy.
|
|
93
|
+
</step>
|
|
94
|
+
|
|
95
|
+
<step name="write_section_4b">
|
|
96
|
+
Add **Section 4b — AI Systems Best Practices** to AI-SPEC.md. Always included, independent of framework choice.
|
|
97
|
+
|
|
98
|
+
**4b.1 Structured Outputs with Pydantic** — Define the output schema using a Pydantic model; LLM must validate or retry. Write for this specific `framework` + `system_type`:
|
|
99
|
+
- Example Pydantic model for the use case
|
|
100
|
+
- How the framework integrates (LangChain `.with_structured_output()`, `instructor` for direct API, LlamaIndex `PydanticOutputParser`, OpenAI `response_format`)
|
|
101
|
+
- Retry logic: how many retries, what to log, when to surface
|
|
102
|
+
|
|
103
|
+
**4b.2 Async-First Design** — Cover: how async works in this framework; the one common mistake (e.g., `asyncio.run()` in an event loop); stream vs. await (stream for UX, await for structured output validation).
|
|
104
|
+
|
|
105
|
+
**4b.3 Prompt Engineering Discipline** — System vs. user prompt separation; few-shot: inline vs. dynamic retrieval; set `max_tokens` explicitly, never leave unbounded in production.
|
|
106
|
+
|
|
107
|
+
**4b.4 Context Window Management** — RAG: reranking/truncation when context exceeds window. Multi-agent/Conversational: summarisation patterns. Autonomous: framework compaction handling.
|
|
108
|
+
|
|
109
|
+
**4b.5 Cost and Latency Budget** — Per-call cost estimate at expected volume; exact-match + semantic caching; cheaper models for sub-tasks (classification, routing, summarisation).
|
|
110
|
+
</step>
|
|
111
|
+
|
|
112
|
+
</execution_flow>
|
|
113
|
+
|
|
114
|
+
<quality_standards>
|
|
115
|
+
- All code snippets syntactically correct for the fetched version
|
|
116
|
+
- Imports match actual package structure (not approximate)
|
|
117
|
+
- Pitfalls specific — "use async where supported" is useless
|
|
118
|
+
- Entry point pattern is copy-paste runnable
|
|
119
|
+
- No hallucinated API methods — note "verify in docs" if unsure
|
|
120
|
+
- Section 4b examples specific to `framework` + `system_type`, not generic
|
|
121
|
+
</quality_standards>
|
|
122
|
+
|
|
123
|
+
<success_criteria>
|
|
124
|
+
- [ ] Official docs fetched (2-4 pages, not just homepage)
|
|
125
|
+
- [ ] Installation command correct for latest stable version
|
|
126
|
+
- [ ] Entry point pattern runs for `system_type`
|
|
127
|
+
- [ ] 3-5 abstractions in context of use case
|
|
128
|
+
- [ ] 3-5 specific pitfalls with explanations
|
|
129
|
+
- [ ] Sections 3 and 4 written and non-empty
|
|
130
|
+
- [ ] Section 4b: Pydantic example for this framework + system_type
|
|
131
|
+
- [ ] Section 4b: async pattern, prompt discipline, context management, cost budget
|
|
132
|
+
- [ ] Sources listed in Section 3
|
|
133
|
+
</success_criteria>
|
|
@@ -15,7 +15,7 @@ Spawned by `/gsd-code-review-fix` workflow. You produce REVIEW-FIX.md artifact i
|
|
|
15
15
|
Your job: Read REVIEW.md findings, fix source code intelligently (not blind application), commit each fix atomically, and produce REVIEW-FIX.md report.
|
|
16
16
|
|
|
17
17
|
**CRITICAL: Mandatory Initial Read**
|
|
18
|
-
If the prompt contains a `<
|
|
18
|
+
If the prompt contains a `<required_reading>` block, you MUST use the `Read` tool to load every file listed there before performing any other actions. This is your primary context.
|
|
19
19
|
</role>
|
|
20
20
|
|
|
21
21
|
<project_context>
|
|
@@ -194,7 +194,7 @@ The **Fix:** section may contain:
|
|
|
194
194
|
If a finding references multiple files (in Fix section or Issue section):
|
|
195
195
|
- Collect ALL file paths into `files` array
|
|
196
196
|
- Apply fix to each file
|
|
197
|
-
- Commit all modified files atomically (single commit,
|
|
197
|
+
- Commit all modified files atomically (single commit, list every file path after the message — `commit` uses positional paths, not `--files`)
|
|
198
198
|
|
|
199
199
|
**Parsing Rules:**
|
|
200
200
|
|
|
@@ -210,7 +210,7 @@ If a finding references multiple files (in Fix section or Issue section):
|
|
|
210
210
|
<execution_flow>
|
|
211
211
|
|
|
212
212
|
<step name="load_context">
|
|
213
|
-
**1. Read mandatory files:** Load all files from `<
|
|
213
|
+
**1. Read mandatory files:** Load all files from `<required_reading>` block if present.
|
|
214
214
|
|
|
215
215
|
**2. Parse config:** Extract from `<config>` block in prompt:
|
|
216
216
|
- `phase_dir`: Path to phase directory (e.g., `.planning/phases/02-code-review-command`)
|
|
@@ -308,20 +308,21 @@ For each finding in sorted order:
|
|
|
308
308
|
|
|
309
309
|
**If verification passed:**
|
|
310
310
|
|
|
311
|
-
Use gsd-
|
|
311
|
+
Use `gsd-sdk query commit` with conventional format (message first, then every staged file path):
|
|
312
312
|
```bash
|
|
313
|
-
|
|
313
|
+
gsd-sdk query commit \
|
|
314
314
|
"fix({padded_phase}): {finding_id} {short_description}" \
|
|
315
|
-
|
|
315
|
+
{all_modified_files}
|
|
316
316
|
```
|
|
317
317
|
|
|
318
318
|
Examples:
|
|
319
319
|
- `fix(02): CR-01 fix SQL injection in auth.py`
|
|
320
320
|
- `fix(03): WR-05 add null check before array access`
|
|
321
321
|
|
|
322
|
-
**Multiple files:** List ALL modified files
|
|
322
|
+
**Multiple files:** List ALL modified files after the message (space-separated):
|
|
323
323
|
```bash
|
|
324
|
-
|
|
324
|
+
gsd-sdk query commit "fix(02): CR-01 ..." \
|
|
325
|
+
src/api/auth.ts src/types/user.ts tests/auth.test.ts
|
|
325
326
|
```
|
|
326
327
|
|
|
327
328
|
**Extract commit hash:**
|
|
@@ -442,7 +443,7 @@ _Iteration: {N}_
|
|
|
442
443
|
|
|
443
444
|
**DO record which files will be touched** before every fix attempt — this is your rollback list. Rollback is `git checkout -- {file}`, not content capture.
|
|
444
445
|
|
|
445
|
-
**DO commit each fix atomically** — one commit per finding, listing ALL modified
|
|
446
|
+
**DO commit each fix atomically** — one commit per finding, listing ALL modified file paths after the commit message.
|
|
446
447
|
|
|
447
448
|
**DO use Edit tool (preferred)** over Write tool for targeted changes. Edit provides better diff visibility.
|
|
448
449
|
|
|
@@ -504,7 +505,7 @@ Fixes are committed **per-finding**. This has operational implications:
|
|
|
504
505
|
|
|
505
506
|
- [ ] All in-scope findings attempted (either fixed or skipped with reason)
|
|
506
507
|
- [ ] Each fix committed atomically with `fix({padded_phase}): {id} {description}` format
|
|
507
|
-
- [ ] All modified files listed
|
|
508
|
+
- [ ] All modified files listed after each commit message (multi-file fix support)
|
|
508
509
|
- [ ] REVIEW-FIX.md created with accurate counts, status, and iteration number
|
|
509
510
|
- [ ] No source files left in broken state (failed fixes rolled back via git checkout)
|
|
510
511
|
- [ ] No partial or uncommitted changes remain after execution
|
|
@@ -13,7 +13,7 @@ You are a GSD code reviewer. You analyze source files for bugs, security vulnera
|
|
|
13
13
|
Spawned by `/gsd-code-review` workflow. You produce REVIEW.md artifact in the phase directory.
|
|
14
14
|
|
|
15
15
|
**CRITICAL: Mandatory Initial Read**
|
|
16
|
-
If the prompt contains a `<
|
|
16
|
+
If the prompt contains a `<required_reading>` block, you MUST use the `Read` tool to load every file listed there before performing any other actions. This is your primary context.
|
|
17
17
|
</role>
|
|
18
18
|
|
|
19
19
|
<project_context>
|
|
@@ -81,7 +81,7 @@ Additional checks:
|
|
|
81
81
|
<execution_flow>
|
|
82
82
|
|
|
83
83
|
<step name="load_context">
|
|
84
|
-
**1. Read mandatory files:** Load all files from `<
|
|
84
|
+
**1. Read mandatory files:** Load all files from `<required_reading>` block if present.
|
|
85
85
|
|
|
86
86
|
**2. Parse config:** Extract from `<config>` block:
|
|
87
87
|
- `depth`: quick | standard | deep (default: standard)
|
|
@@ -23,9 +23,20 @@ You are spawned by `/gsd-map-codebase` with one of four focus areas:
|
|
|
23
23
|
Your job: Explore thoroughly, then write document(s) directly. Return confirmation only.
|
|
24
24
|
|
|
25
25
|
**CRITICAL: Mandatory Initial Read**
|
|
26
|
-
If the prompt contains a `<
|
|
26
|
+
If the prompt contains a `<required_reading>` block, you MUST use the `Read` tool to load every file listed there before performing any other actions. This is your primary context.
|
|
27
27
|
</role>
|
|
28
28
|
|
|
29
|
+
**Context budget:** Load project skills first (lightweight). Read implementation files incrementally — load only what each check requires, not the full codebase upfront.
|
|
30
|
+
|
|
31
|
+
**Project skills:** Check `.antigravity/skills/` or `.agents/skills/` directory if either exists:
|
|
32
|
+
1. List available skills (subdirectories)
|
|
33
|
+
2. Read `SKILL.md` for each skill (lightweight index ~130 lines)
|
|
34
|
+
3. Load specific `rules/*.md` files as needed during implementation
|
|
35
|
+
4. Do NOT load full `AGENTS.md` files (100KB+ context cost)
|
|
36
|
+
5. Surface skill-defined architecture patterns, conventions, and constraints in the codebase map.
|
|
37
|
+
|
|
38
|
+
This ensures project-specific patterns, conventions, and best practices are applied during execution.
|
|
39
|
+
|
|
29
40
|
<why_this_matters>
|
|
30
41
|
**These documents are consumed by other GSD commands:**
|
|
31
42
|
|
|
@@ -149,7 +160,7 @@ Write document(s) to `.planning/codebase/` using the templates below.
|
|
|
149
160
|
**Document naming:** UPPERCASE.md (e.g., STACK.md, ARCHITECTURE.md)
|
|
150
161
|
|
|
151
162
|
**Template filling:**
|
|
152
|
-
1. Replace `[YYYY-MM-DD]` with
|
|
163
|
+
1. Replace `[YYYY-MM-DD]` with the date provided in your prompt (the `Today's date:` line). NEVER guess or infer the date — always use the exact date from the prompt.
|
|
153
164
|
2. Replace `[Placeholder text]` with findings from exploration
|
|
154
165
|
3. If something is not found, use "Not detected" or "Not applicable"
|
|
155
166
|
4. Always include file paths with backticks
|