gsd-ag 1.0.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/codebase-mapper/SKILL.md +226 -0
- package/.agent/skills/context-compressor/SKILL.md +201 -0
- package/.agent/skills/context-fetch/SKILL.md +184 -0
- package/.agent/skills/context-health-monitor/SKILL.md +105 -0
- package/.agent/skills/debugger/SKILL.md +273 -0
- package/.agent/skills/empirical-validation/SKILL.md +97 -0
- package/.agent/skills/executor/SKILL.md +465 -0
- package/.agent/skills/plan-checker/SKILL.md +283 -0
- package/.agent/skills/planner/SKILL.md +485 -0
- package/.agent/skills/token-budget/SKILL.md +166 -0
- package/.agent/skills/verifier/SKILL.md +421 -0
- package/.agent/workflows/add-phase.md +96 -0
- package/.agent/workflows/add-todo.md +69 -0
- package/.agent/workflows/audit-milestone.md +107 -0
- package/.agent/workflows/check-todos.md +80 -0
- package/.agent/workflows/complete-milestone.md +135 -0
- package/.agent/workflows/debug.md +235 -0
- package/.agent/workflows/discuss-phase.md +103 -0
- package/.agent/workflows/execute.md +325 -0
- package/.agent/workflows/health.md +122 -0
- package/.agent/workflows/help.md +96 -0
- package/.agent/workflows/insert-phase.md +109 -0
- package/.agent/workflows/install.md +152 -0
- package/.agent/workflows/list-phase-assumptions.md +82 -0
- package/.agent/workflows/map.md +394 -0
- package/.agent/workflows/new-milestone.md +126 -0
- package/.agent/workflows/new-project.md +368 -0
- package/.agent/workflows/pause.md +176 -0
- package/.agent/workflows/plan-milestone-gaps.md +116 -0
- package/.agent/workflows/plan.md +380 -0
- package/.agent/workflows/progress.md +90 -0
- package/.agent/workflows/quick.md +128 -0
- package/.agent/workflows/remove-phase.md +139 -0
- package/.agent/workflows/research-phase.md +160 -0
- package/.agent/workflows/resume.md +131 -0
- package/.agent/workflows/update.md +203 -0
- package/.agent/workflows/verify.md +263 -0
- package/.agent/workflows/web-search.md +121 -0
- package/.agent/workflows/whats-new.md +80 -0
- package/.gemini/GEMINI.md +67 -0
- package/.gsd/GSD-STYLE.md +272 -0
- package/.gsd/PROJECT_RULES.md +256 -0
- package/.gsd/adapters/CLAUDE.md +77 -0
- package/.gsd/adapters/GEMINI.md +92 -0
- package/.gsd/adapters/GPT_OSS.md +130 -0
- package/.gsd/docs/model-selection-playbook.md +128 -0
- package/.gsd/docs/runbook.md +296 -0
- package/.gsd/docs/token-optimization-guide.md +207 -0
- package/.gsd/examples/cross-platform.md +99 -0
- package/.gsd/examples/multi-wave-workflow.md +256 -0
- package/.gsd/examples/quick-reference.md +73 -0
- package/.gsd/examples/workflow-example.md +139 -0
- package/.gsd/model_capabilities.yaml +108 -0
- package/.gsd/templates/DEBUG.md +123 -0
- package/.gsd/templates/PLAN.md +90 -0
- package/.gsd/templates/RESEARCH.md +75 -0
- package/.gsd/templates/SUMMARY.md +103 -0
- package/.gsd/templates/UAT.md +168 -0
- package/.gsd/templates/VERIFICATION.md +70 -0
- package/.gsd/templates/architecture.md +67 -0
- package/.gsd/templates/context.md +91 -0
- package/.gsd/templates/decisions.md +37 -0
- package/.gsd/templates/discovery.md +122 -0
- package/.gsd/templates/journal.md +46 -0
- package/.gsd/templates/milestone.md +91 -0
- package/.gsd/templates/phase-summary.md +52 -0
- package/.gsd/templates/project.md +124 -0
- package/.gsd/templates/requirements.md +92 -0
- package/.gsd/templates/roadmap.md +103 -0
- package/.gsd/templates/spec.md +51 -0
- package/.gsd/templates/sprint.md +57 -0
- package/.gsd/templates/stack.md +62 -0
- package/.gsd/templates/state.md +92 -0
- package/.gsd/templates/state_snapshot.md +132 -0
- package/.gsd/templates/todo.md +32 -0
- package/.gsd/templates/token_report.md +79 -0
- package/.gsd/templates/user-setup.md +116 -0
- package/LICENSE +21 -0
- package/README.md +523 -0
- package/bin/init.js +117 -0
- package/package.json +35 -0
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Install GSD into the current project from GitHub
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# /install Workflow
|
|
6
|
+
|
|
7
|
+
<objective>
|
|
8
|
+
Install GSD for Antigravity into the current project from GitHub.
|
|
9
|
+
</objective>
|
|
10
|
+
|
|
11
|
+
<process>
|
|
12
|
+
|
|
13
|
+
## 1. Check for Existing Installation
|
|
14
|
+
|
|
15
|
+
Look for GSD marker directories:
|
|
16
|
+
|
|
17
|
+
**PowerShell:**
|
|
18
|
+
```powershell
|
|
19
|
+
$alreadyInstalled = (Test-Path ".agent") -or (Test-Path ".gsd")
|
|
20
|
+
if ($alreadyInstalled) {
|
|
21
|
+
Write-Output "GSD files detected in this project."
|
|
22
|
+
}
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
**Bash:**
|
|
26
|
+
```bash
|
|
27
|
+
if [ -d ".agent" ] || [ -d ".gsd" ]; then
|
|
28
|
+
echo "GSD files detected in this project."
|
|
29
|
+
fi
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
**If already installed:**
|
|
33
|
+
```
|
|
34
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
35
|
+
GSD ► ALREADY INSTALLED
|
|
36
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
37
|
+
|
|
38
|
+
GSD files already exist in this project.
|
|
39
|
+
|
|
40
|
+
───────────────────────────────────────────────────────
|
|
41
|
+
|
|
42
|
+
A) Reinstall — Overwrite with latest version
|
|
43
|
+
B) Cancel — Keep current installation
|
|
44
|
+
|
|
45
|
+
If you want to update instead: /update
|
|
46
|
+
|
|
47
|
+
───────────────────────────────────────────────────────
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
If user chooses Cancel, exit.
|
|
51
|
+
If user chooses Reinstall, continue to Step 2.
|
|
52
|
+
|
|
53
|
+
---
|
|
54
|
+
|
|
55
|
+
## 2. Clone from GitHub
|
|
56
|
+
|
|
57
|
+
```bash
|
|
58
|
+
git clone --depth 1 https://github.com/toonight/get-shit-done-for-antigravity.git .gsd-install-temp
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
---
|
|
62
|
+
|
|
63
|
+
## 3. Copy Files
|
|
64
|
+
|
|
65
|
+
**PowerShell:**
|
|
66
|
+
```powershell
|
|
67
|
+
# Core directories
|
|
68
|
+
Copy-Item -Recurse ".gsd-install-temp\.agent" ".\"
|
|
69
|
+
Copy-Item -Recurse ".gsd-install-temp\.gemini" ".\"
|
|
70
|
+
Copy-Item -Recurse ".gsd-install-temp\.gsd" ".\"
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
**Bash:**
|
|
74
|
+
```bash
|
|
75
|
+
# Core directories
|
|
76
|
+
cp -r .gsd-install-temp/.agent ./
|
|
77
|
+
cp -r .gsd-install-temp/.gemini ./
|
|
78
|
+
cp -r .gsd-install-temp/.gsd ./
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
---
|
|
82
|
+
|
|
83
|
+
## 4. Cleanup
|
|
84
|
+
|
|
85
|
+
**PowerShell:**
|
|
86
|
+
```powershell
|
|
87
|
+
Remove-Item -Recurse -Force ".gsd-install-temp"
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
**Bash:**
|
|
91
|
+
```bash
|
|
92
|
+
rm -rf .gsd-install-temp
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
---
|
|
96
|
+
|
|
97
|
+
## 5. Add to .gitignore (Optional)
|
|
98
|
+
|
|
99
|
+
Check if `.gsd/STATE.md` and other session files should be gitignored:
|
|
100
|
+
|
|
101
|
+
```
|
|
102
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
103
|
+
GSD ► ADD TO .gitignore?
|
|
104
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
105
|
+
|
|
106
|
+
Recommended .gitignore additions for session-specific files:
|
|
107
|
+
|
|
108
|
+
.gsd/STATE.md
|
|
109
|
+
.gsd/JOURNAL.md
|
|
110
|
+
.gsd/TODO.md
|
|
111
|
+
|
|
112
|
+
───────────────────────────────────────────────────────
|
|
113
|
+
|
|
114
|
+
A) Yes — Add recommended entries
|
|
115
|
+
B) No — Skip
|
|
116
|
+
|
|
117
|
+
───────────────────────────────────────────────────────
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
---
|
|
121
|
+
|
|
122
|
+
## 6. Confirm Installation
|
|
123
|
+
|
|
124
|
+
```
|
|
125
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
126
|
+
GSD ► INSTALLED ✓
|
|
127
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
128
|
+
|
|
129
|
+
GSD for Antigravity has been installed.
|
|
130
|
+
|
|
131
|
+
Files installed:
|
|
132
|
+
• .agent/ (workflows + skills)
|
|
133
|
+
• .gemini/ (Gemini integration)
|
|
134
|
+
• .gsd/ (project methodology and docs)
|
|
135
|
+
|
|
136
|
+
───────────────────────────────────────────────────────
|
|
137
|
+
|
|
138
|
+
Next step:
|
|
139
|
+
|
|
140
|
+
/new-project — Initialize your project with GSD
|
|
141
|
+
|
|
142
|
+
───────────────────────────────────────────────────────
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
</process>
|
|
146
|
+
|
|
147
|
+
<notes>
|
|
148
|
+
- This workflow is designed to work from a clean project (no prior GSD installation)
|
|
149
|
+
- It copies ALL necessary files, unlike manual installation which may miss some
|
|
150
|
+
- For updates to an existing installation, use /update instead
|
|
151
|
+
- The /new-project command should be run after installation to set up SPEC.md
|
|
152
|
+
</notes>
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: List assumptions made during phase planning
|
|
3
|
+
argument-hint: "<phase-number>"
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# /list-phase-assumptions Workflow
|
|
7
|
+
|
|
8
|
+
<objective>
|
|
9
|
+
Surface and document assumptions made during phase planning that should be validated.
|
|
10
|
+
</objective>
|
|
11
|
+
|
|
12
|
+
<process>
|
|
13
|
+
|
|
14
|
+
## 1. Load Phase Plans
|
|
15
|
+
|
|
16
|
+
```powershell
|
|
17
|
+
Get-ChildItem ".gsd/phases/{N}/*-PLAN.md"
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
## 2. Extract Assumptions
|
|
23
|
+
|
|
24
|
+
Scan plans for:
|
|
25
|
+
- Technology choices without justification
|
|
26
|
+
- Implied dependencies
|
|
27
|
+
- Expected behaviors not verified
|
|
28
|
+
- Time estimates
|
|
29
|
+
- Scope boundaries
|
|
30
|
+
|
|
31
|
+
---
|
|
32
|
+
|
|
33
|
+
## 3. Categorize Assumptions
|
|
34
|
+
|
|
35
|
+
| Category | Risk Level |
|
|
36
|
+
|----------|------------|
|
|
37
|
+
| Technical | API exists, library works, syntax correct |
|
|
38
|
+
| Integration | Services compatible, auth works |
|
|
39
|
+
| Scope | Feature boundaries, what's excluded |
|
|
40
|
+
| Performance | Will handle load, fast enough |
|
|
41
|
+
| Timeline | Estimates accurate |
|
|
42
|
+
|
|
43
|
+
---
|
|
44
|
+
|
|
45
|
+
## 4. Display Assumptions
|
|
46
|
+
|
|
47
|
+
```
|
|
48
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
49
|
+
GSD ► PHASE {N} ASSUMPTIONS
|
|
50
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
51
|
+
|
|
52
|
+
TECHNICAL
|
|
53
|
+
🟡 {assumption 1} — Validate before execution
|
|
54
|
+
🟢 {assumption 2} — Low risk
|
|
55
|
+
|
|
56
|
+
INTEGRATION
|
|
57
|
+
🔴 {assumption 3} — High risk, verify first
|
|
58
|
+
|
|
59
|
+
SCOPE
|
|
60
|
+
🟡 {assumption 4} — Confirm with user
|
|
61
|
+
|
|
62
|
+
───────────────────────────────────────────────────────
|
|
63
|
+
|
|
64
|
+
▶ ACTIONS
|
|
65
|
+
|
|
66
|
+
• Validate high-risk assumptions before /execute
|
|
67
|
+
• Add verified assumptions to RESEARCH.md
|
|
68
|
+
• Flag for user review if scope-related
|
|
69
|
+
|
|
70
|
+
───────────────────────────────────────────────────────
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
---
|
|
74
|
+
|
|
75
|
+
## 5. Offer Validation
|
|
76
|
+
|
|
77
|
+
Ask if user wants to:
|
|
78
|
+
- Validate specific assumptions now
|
|
79
|
+
- Add to TODO.md for later
|
|
80
|
+
- Accept and proceed
|
|
81
|
+
|
|
82
|
+
</process>
|
|
@@ -0,0 +1,394 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: The Architect — Analyze codebase and update ARCHITECTURE.md and STACK.md
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# /map Workflow
|
|
6
|
+
|
|
7
|
+
<role>
|
|
8
|
+
You are a GSD codebase mapper. You analyze existing codebases to understand structure, patterns, and technical debt.
|
|
9
|
+
|
|
10
|
+
**Core responsibilities:**
|
|
11
|
+
- Scan project structure and identify components
|
|
12
|
+
- Analyze dependencies and versions
|
|
13
|
+
- Map data flow and integration points
|
|
14
|
+
- Identify technical debt and patterns
|
|
15
|
+
- Document findings for planning context
|
|
16
|
+
</role>
|
|
17
|
+
|
|
18
|
+
<objective>
|
|
19
|
+
Analyze the existing codebase and produce documentation that enables informed planning.
|
|
20
|
+
|
|
21
|
+
This workflow should be run BEFORE `/plan` on brownfield projects to give the planner full context.
|
|
22
|
+
</objective>
|
|
23
|
+
|
|
24
|
+
<context>
|
|
25
|
+
**No arguments required.** Operates on current project directory.
|
|
26
|
+
|
|
27
|
+
**Outputs:**
|
|
28
|
+
- `.gsd/ARCHITECTURE.md` — System design documentation
|
|
29
|
+
- `.gsd/STACK.md` — Technology inventory
|
|
30
|
+
</context>
|
|
31
|
+
|
|
32
|
+
<process>
|
|
33
|
+
|
|
34
|
+
## 1. Validate Project
|
|
35
|
+
|
|
36
|
+
Check this is a valid project:
|
|
37
|
+
|
|
38
|
+
**PowerShell:**
|
|
39
|
+
```powershell
|
|
40
|
+
# Look for common project indicators
|
|
41
|
+
$indicators = @(
|
|
42
|
+
"package.json", "requirements.txt", "Cargo.toml",
|
|
43
|
+
"go.mod", "pom.xml", "*.csproj", "Gemfile"
|
|
44
|
+
)
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
**Bash:**
|
|
48
|
+
```bash
|
|
49
|
+
# Look for common project indicators
|
|
50
|
+
indicators=("package.json" "requirements.txt" "Cargo.toml"
|
|
51
|
+
"go.mod" "pom.xml" "*.csproj" "Gemfile")
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
Display banner:
|
|
55
|
+
```
|
|
56
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
57
|
+
GSD ► MAPPING CODEBASE
|
|
58
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
---
|
|
62
|
+
|
|
63
|
+
## 2. Analyze Project Structure
|
|
64
|
+
|
|
65
|
+
### 2a. Directory Analysis
|
|
66
|
+
|
|
67
|
+
**PowerShell:**
|
|
68
|
+
```powershell
|
|
69
|
+
Get-ChildItem -Recurse -Directory |
|
|
70
|
+
Where-Object { $_.Name -notmatch "node_modules|\.git|__pycache__|dist|build" }
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
**Bash:**
|
|
74
|
+
```bash
|
|
75
|
+
find . -type d -not -path '*/node_modules/*' -not -path '*/.git/*' \
|
|
76
|
+
-not -path '*/__pycache__/*' -not -path '*/dist/*' -not -path '*/build/*'
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
Identify:
|
|
80
|
+
- Source directories (`src/`, `lib/`, `app/`)
|
|
81
|
+
- Test directories (`tests/`, `__tests__/`, `spec/`)
|
|
82
|
+
- Configuration locations
|
|
83
|
+
- Asset directories
|
|
84
|
+
|
|
85
|
+
### 2b. Entry Points
|
|
86
|
+
|
|
87
|
+
Find main files:
|
|
88
|
+
**PowerShell:**
|
|
89
|
+
```powershell
|
|
90
|
+
# Example for Node.js
|
|
91
|
+
Get-Content "package.json" | ConvertFrom-Json | Select-Object -ExpandProperty main
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
**Bash:**
|
|
95
|
+
```bash
|
|
96
|
+
# Example for Node.js (requires jq)
|
|
97
|
+
cat package.json | jq -r '.main'
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
### 2c. Component Detection
|
|
101
|
+
|
|
102
|
+
Scan for common patterns:
|
|
103
|
+
- React components (`*.tsx`, `*.jsx`)
|
|
104
|
+
- API routes (`routes/`, `api/`)
|
|
105
|
+
- Database models (`models/`, `entities/`)
|
|
106
|
+
- Services (`services/`, `lib/`)
|
|
107
|
+
- Utilities (`utils/`, `helpers/`)
|
|
108
|
+
|
|
109
|
+
---
|
|
110
|
+
|
|
111
|
+
## 3. Analyze Dependencies
|
|
112
|
+
|
|
113
|
+
### 3a. Production Dependencies
|
|
114
|
+
|
|
115
|
+
**PowerShell:**
|
|
116
|
+
```powershell
|
|
117
|
+
# Node.js example
|
|
118
|
+
Get-Content "package.json" | ConvertFrom-Json |
|
|
119
|
+
Select-Object -ExpandProperty dependencies
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
**Bash:**
|
|
123
|
+
```bash
|
|
124
|
+
# Node.js example (requires jq)
|
|
125
|
+
cat package.json | jq '.dependencies'
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
For each dependency, note:
|
|
129
|
+
- Name and version
|
|
130
|
+
- Purpose (infer from name/usage)
|
|
131
|
+
- Is it actively used?
|
|
132
|
+
|
|
133
|
+
### 3b. Development Dependencies
|
|
134
|
+
|
|
135
|
+
Same for devDependencies, noting:
|
|
136
|
+
- Build tools
|
|
137
|
+
- Test frameworks
|
|
138
|
+
- Linters/formatters
|
|
139
|
+
|
|
140
|
+
### 3c. Outdated Packages
|
|
141
|
+
|
|
142
|
+
```bash
|
|
143
|
+
npm outdated
|
|
144
|
+
# or
|
|
145
|
+
pip list --outdated
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
---
|
|
149
|
+
|
|
150
|
+
## 4. Map Data Flow
|
|
151
|
+
|
|
152
|
+
### 4a. External Integrations
|
|
153
|
+
|
|
154
|
+
Search for:
|
|
155
|
+
**PowerShell:**
|
|
156
|
+
```powershell
|
|
157
|
+
# API calls
|
|
158
|
+
Select-String -Path "src/**/*" -Pattern "fetch\(|axios\.|http\."
|
|
159
|
+
|
|
160
|
+
# Database connections
|
|
161
|
+
Select-String -Path "**/*" -Pattern "DATABASE_URL|mongodb|postgres|mysql"
|
|
162
|
+
|
|
163
|
+
# Third-party services
|
|
164
|
+
Select-String -Path "**/*" -Pattern "stripe|sendgrid|twilio|aws-sdk"
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
**Bash:**
|
|
168
|
+
```bash
|
|
169
|
+
# API calls
|
|
170
|
+
grep -rE 'fetch\(|axios\.|http\.' src/
|
|
171
|
+
|
|
172
|
+
# Database connections
|
|
173
|
+
grep -rE 'DATABASE_URL|mongodb|postgres|mysql' .
|
|
174
|
+
|
|
175
|
+
# Third-party services
|
|
176
|
+
grep -rE 'stripe|sendgrid|twilio|aws-sdk' .
|
|
177
|
+
```
|
|
178
|
+
|
|
179
|
+
### 4b. Internal Flow
|
|
180
|
+
|
|
181
|
+
Trace how data moves:
|
|
182
|
+
- Entry point → Business logic → Data layer → Output
|
|
183
|
+
- Identify shared state (context, stores, singletons)
|
|
184
|
+
|
|
185
|
+
---
|
|
186
|
+
|
|
187
|
+
## 5. Identify Technical Debt
|
|
188
|
+
|
|
189
|
+
### 5a. Code Smells
|
|
190
|
+
|
|
191
|
+
Search for indicators:
|
|
192
|
+
**PowerShell:**
|
|
193
|
+
```powershell
|
|
194
|
+
# TODOs and FIXMEs
|
|
195
|
+
Select-String -Path "src/**/*" -Pattern "TODO|FIXME|HACK|XXX"
|
|
196
|
+
|
|
197
|
+
# Deprecated markers
|
|
198
|
+
Select-String -Path "**/*" -Pattern "@deprecated|DEPRECATED"
|
|
199
|
+
```
|
|
200
|
+
|
|
201
|
+
**Bash:**
|
|
202
|
+
```bash
|
|
203
|
+
# TODOs and FIXMEs
|
|
204
|
+
grep -rE 'TODO|FIXME|HACK|XXX' src/
|
|
205
|
+
|
|
206
|
+
# Deprecated markers
|
|
207
|
+
grep -rE '@deprecated|DEPRECATED' .
|
|
208
|
+
```
|
|
209
|
+
|
|
210
|
+
### 5b. Pattern Inconsistencies
|
|
211
|
+
|
|
212
|
+
Note where patterns differ:
|
|
213
|
+
- Naming conventions
|
|
214
|
+
- File organization
|
|
215
|
+
- Error handling approaches
|
|
216
|
+
|
|
217
|
+
### 5c. Missing Elements
|
|
218
|
+
|
|
219
|
+
Identify gaps:
|
|
220
|
+
- No tests for critical paths
|
|
221
|
+
- Missing error boundaries
|
|
222
|
+
- No input validation
|
|
223
|
+
- No logging/monitoring
|
|
224
|
+
|
|
225
|
+
---
|
|
226
|
+
|
|
227
|
+
## 6. Write ARCHITECTURE.md
|
|
228
|
+
|
|
229
|
+
```markdown
|
|
230
|
+
# Architecture
|
|
231
|
+
|
|
232
|
+
> Auto-generated by /map on {date}
|
|
233
|
+
|
|
234
|
+
## Overview
|
|
235
|
+
|
|
236
|
+
{High-level description of what this system does}
|
|
237
|
+
|
|
238
|
+
```
|
|
239
|
+
┌─────────────────────────────────────────┐
|
|
240
|
+
│ [Entry Point] │
|
|
241
|
+
├─────────────────────────────────────────┤
|
|
242
|
+
│ [Business Logic Layer] │
|
|
243
|
+
├─────────────────────────────────────────┤
|
|
244
|
+
│ [Data Layer] │
|
|
245
|
+
└─────────────────────────────────────────┘
|
|
246
|
+
```
|
|
247
|
+
|
|
248
|
+
## Components
|
|
249
|
+
|
|
250
|
+
### {Component 1}
|
|
251
|
+
- **Purpose:** {what it does}
|
|
252
|
+
- **Location:** `{path}`
|
|
253
|
+
- **Dependencies:** {what it imports}
|
|
254
|
+
|
|
255
|
+
### {Component 2}
|
|
256
|
+
...
|
|
257
|
+
|
|
258
|
+
## Data Flow
|
|
259
|
+
|
|
260
|
+
1. {Step 1}
|
|
261
|
+
2. {Step 2}
|
|
262
|
+
3. {Step 3}
|
|
263
|
+
|
|
264
|
+
## Integration Points
|
|
265
|
+
|
|
266
|
+
| Service | Type | Purpose |
|
|
267
|
+
|---------|------|---------|
|
|
268
|
+
| {name} | API | {purpose} |
|
|
269
|
+
|
|
270
|
+
## Technical Debt
|
|
271
|
+
|
|
272
|
+
- [ ] {Debt item 1}
|
|
273
|
+
- [ ] {Debt item 2}
|
|
274
|
+
|
|
275
|
+
## Conventions
|
|
276
|
+
|
|
277
|
+
**Naming:** {patterns observed}
|
|
278
|
+
**Structure:** {organization patterns}
|
|
279
|
+
**Testing:** {test patterns}
|
|
280
|
+
```
|
|
281
|
+
|
|
282
|
+
---
|
|
283
|
+
|
|
284
|
+
## 7. Write STACK.md
|
|
285
|
+
|
|
286
|
+
```markdown
|
|
287
|
+
# Technology Stack
|
|
288
|
+
|
|
289
|
+
> Auto-generated by /map on {date}
|
|
290
|
+
|
|
291
|
+
## Runtime
|
|
292
|
+
|
|
293
|
+
| Technology | Version | Purpose |
|
|
294
|
+
|------------|---------|---------|
|
|
295
|
+
| {runtime} | {version} | Core runtime |
|
|
296
|
+
|
|
297
|
+
## Dependencies
|
|
298
|
+
|
|
299
|
+
### Production
|
|
300
|
+
| Package | Version | Purpose |
|
|
301
|
+
|---------|---------|---------|
|
|
302
|
+
| {pkg} | {ver} | {purpose} |
|
|
303
|
+
|
|
304
|
+
### Development
|
|
305
|
+
| Package | Version | Purpose |
|
|
306
|
+
|---------|---------|---------|
|
|
307
|
+
| {pkg} | {ver} | {purpose} |
|
|
308
|
+
|
|
309
|
+
## Infrastructure
|
|
310
|
+
|
|
311
|
+
| Service | Provider | Purpose |
|
|
312
|
+
|---------|----------|---------|
|
|
313
|
+
| {service} | {provider} | {purpose} |
|
|
314
|
+
|
|
315
|
+
## Configuration
|
|
316
|
+
|
|
317
|
+
| Variable | Purpose | Location |
|
|
318
|
+
|----------|---------|----------|
|
|
319
|
+
| {var} | {purpose} | {file} |
|
|
320
|
+
|
|
321
|
+
## Outdated Packages
|
|
322
|
+
|
|
323
|
+
| Package | Current | Latest | Risk |
|
|
324
|
+
|---------|---------|--------|------|
|
|
325
|
+
| {pkg} | {cur} | {new} | {risk} |
|
|
326
|
+
```
|
|
327
|
+
|
|
328
|
+
---
|
|
329
|
+
|
|
330
|
+
## 8. Update State
|
|
331
|
+
|
|
332
|
+
Update `.gsd/STATE.md`:
|
|
333
|
+
```markdown
|
|
334
|
+
## Last Session Summary
|
|
335
|
+
Codebase mapping complete.
|
|
336
|
+
- {N} components identified
|
|
337
|
+
- {M} dependencies analyzed
|
|
338
|
+
- {K} technical debt items found
|
|
339
|
+
```
|
|
340
|
+
|
|
341
|
+
---
|
|
342
|
+
|
|
343
|
+
## 9. Commit Documentation
|
|
344
|
+
|
|
345
|
+
```bash
|
|
346
|
+
git add .gsd/ARCHITECTURE.md .gsd/STACK.md .gsd/STATE.md
|
|
347
|
+
git commit -m "docs: map existing codebase"
|
|
348
|
+
```
|
|
349
|
+
|
|
350
|
+
---
|
|
351
|
+
|
|
352
|
+
## 10. Offer Next Steps
|
|
353
|
+
|
|
354
|
+
</process>
|
|
355
|
+
|
|
356
|
+
<offer_next>
|
|
357
|
+
|
|
358
|
+
```
|
|
359
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
360
|
+
GSD ► CODEBASE MAPPED ✓
|
|
361
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
362
|
+
|
|
363
|
+
Components: {N}
|
|
364
|
+
Dependencies: {M} production, {K} dev
|
|
365
|
+
Technical debt: {J} items
|
|
366
|
+
|
|
367
|
+
───────────────────────────────────────────────────────
|
|
368
|
+
|
|
369
|
+
▶ Next Up
|
|
370
|
+
|
|
371
|
+
/plan — create execution plans with full context
|
|
372
|
+
|
|
373
|
+
Files updated:
|
|
374
|
+
• .gsd/ARCHITECTURE.md
|
|
375
|
+
• .gsd/STACK.md
|
|
376
|
+
|
|
377
|
+
───────────────────────────────────────────────────────
|
|
378
|
+
```
|
|
379
|
+
|
|
380
|
+
</offer_next>
|
|
381
|
+
|
|
382
|
+
<related>
|
|
383
|
+
## Related
|
|
384
|
+
|
|
385
|
+
### Workflows
|
|
386
|
+
| Command | Relationship |
|
|
387
|
+
|---------|--------------|
|
|
388
|
+
| `/plan` | Use ARCHITECTURE.md from /map for planning context |
|
|
389
|
+
|
|
390
|
+
### Skills
|
|
391
|
+
| Skill | Purpose |
|
|
392
|
+
|-------|---------|
|
|
393
|
+
| `codebase-mapper` | Detailed mapping methodology |
|
|
394
|
+
</related>
|