specdacular 0.2.0 → 0.2.1
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/package.json
CHANGED
|
@@ -33,22 +33,75 @@ ls -la .specd/codebase/ 2>/dev/null
|
|
|
33
33
|
|
|
34
34
|
**If exists:**
|
|
35
35
|
|
|
36
|
+
Use the AskUserQuestion tool:
|
|
37
|
+
|
|
38
|
+
```json
|
|
39
|
+
{
|
|
40
|
+
"questions": [{
|
|
41
|
+
"question": "Codebase map already exists. What would you like to do?",
|
|
42
|
+
"header": "Existing map",
|
|
43
|
+
"options": [
|
|
44
|
+
{
|
|
45
|
+
"label": "Refresh - remap codebase",
|
|
46
|
+
"description": "Delete existing docs and generate fresh analysis"
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
"label": "Skip - use existing",
|
|
50
|
+
"description": "Keep current codebase map, no changes"
|
|
51
|
+
}
|
|
52
|
+
],
|
|
53
|
+
"multiSelect": false
|
|
54
|
+
}]
|
|
55
|
+
}
|
|
36
56
|
```
|
|
37
|
-
.specd/codebase/ already exists with these documents:
|
|
38
|
-
[List files found]
|
|
39
57
|
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
58
|
+
If "Refresh": Delete .specd/codebase/, continue to check_existing_docs
|
|
59
|
+
If "Skip": Exit workflow
|
|
60
|
+
|
|
61
|
+
**If doesn't exist:**
|
|
62
|
+
Continue to check_existing_docs.
|
|
63
|
+
</step>
|
|
64
|
+
|
|
65
|
+
<step name="check_existing_docs">
|
|
66
|
+
Check for existing documentation in the codebase:
|
|
67
|
+
|
|
68
|
+
```bash
|
|
69
|
+
# Find common documentation files
|
|
70
|
+
ls README* CONTRIBUTING* ARCHITECTURE* docs/ doc/ wiki/ 2>/dev/null
|
|
71
|
+
find . -maxdepth 2 -name "*.md" -not -path "./node_modules/*" -not -path "./.git/*" 2>/dev/null | head -20
|
|
43
72
|
```
|
|
44
73
|
|
|
45
|
-
|
|
74
|
+
**Always read and incorporate any docs found.** This is automatic - existing documentation contains tribal knowledge we want to capture.
|
|
75
|
+
|
|
76
|
+
**Then ask user if there's more we missed:**
|
|
77
|
+
|
|
78
|
+
Use the AskUserQuestion tool:
|
|
79
|
+
|
|
80
|
+
```json
|
|
81
|
+
{
|
|
82
|
+
"questions": [{
|
|
83
|
+
"question": "Do you have any other documentation I should incorporate? (wiki, Notion, external docs, etc.)",
|
|
84
|
+
"header": "More docs?",
|
|
85
|
+
"options": [
|
|
86
|
+
{
|
|
87
|
+
"label": "No - that's everything",
|
|
88
|
+
"description": "Proceed with what was found in the repo"
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
"label": "Yes - I have more",
|
|
92
|
+
"description": "I'll share additional documentation or context"
|
|
93
|
+
}
|
|
94
|
+
],
|
|
95
|
+
"multiSelect": false
|
|
96
|
+
}]
|
|
97
|
+
}
|
|
98
|
+
```
|
|
46
99
|
|
|
47
|
-
If "
|
|
48
|
-
|
|
100
|
+
**If user selects "Yes - I have more":**
|
|
101
|
+
Wait for user to provide additional context (paste docs, share links, explain architecture).
|
|
102
|
+
Incorporate this into the context for mapper agents.
|
|
49
103
|
|
|
50
|
-
**
|
|
51
|
-
Continue to create_structure.
|
|
104
|
+
**Then continue to create_structure.**
|
|
52
105
|
</step>
|
|
53
106
|
|
|
54
107
|
<step name="create_structure">
|
|
@@ -74,6 +127,15 @@ Use Task tool with `subagent_type="specd-codebase-mapper"` and `run_in_backgroun
|
|
|
74
127
|
|
|
75
128
|
**CRITICAL:** Use the dedicated `specd-codebase-mapper` agent, NOT `Explore`.
|
|
76
129
|
|
|
130
|
+
**If existing documentation was found and user said to incorporate it:**
|
|
131
|
+
Include a summary of the existing docs in each agent's prompt:
|
|
132
|
+
```
|
|
133
|
+
Existing documentation context:
|
|
134
|
+
{summary of README, ARCHITECTURE, CONTRIBUTING, etc.}
|
|
135
|
+
|
|
136
|
+
Use this context to inform your analysis. Incorporate relevant architectural decisions, gotchas, and conventions mentioned in the docs.
|
|
137
|
+
```
|
|
138
|
+
|
|
77
139
|
**Agent 1: Map Focus**
|
|
78
140
|
|
|
79
141
|
Task tool parameters:
|