agile-context-engineering 0.5.0 → 0.5.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/.claude-plugin/marketplace.json +18 -0
- package/.claude-plugin/plugin.json +1 -1
- package/CHANGELOG.md +7 -1
- package/README.md +16 -12
- package/agents/ace-code-discovery-analyst.md +245 -245
- package/agents/ace-code-integration-analyst.md +248 -248
- package/agents/ace-code-reviewer.md +375 -375
- package/agents/ace-product-owner.md +365 -361
- package/agents/ace-project-researcher.md +606 -606
- package/agents/ace-technical-application-architect.md +315 -315
- package/bin/install.js +587 -173
- package/hooks/ace-check-update.js +15 -14
- package/hooks/ace-statusline.js +30 -12
- package/hooks/hooks.json +14 -0
- package/package.json +3 -2
- package/shared/lib/ace-core.js +53 -0
- package/shared/lib/ace-core.test.js +308 -308
- package/shared/lib/ace-story.test.js +250 -250
- package/skills/execute-story/SKILL.md +116 -110
- package/skills/execute-story/script.js +13 -27
- package/skills/execute-story/script.test.js +261 -261
- package/skills/execute-story/story-template.xml +451 -451
- package/skills/execute-story/workflow.xml +3 -1
- package/skills/help/SKILL.md +71 -69
- package/skills/help/script.js +32 -35
- package/skills/help/script.test.js +183 -183
- package/skills/help/workflow.xml +14 -3
- package/skills/init-coding-standards/SKILL.md +91 -72
- package/skills/init-coding-standards/coding-standards-template.xml +531 -531
- package/skills/init-coding-standards/script.js +50 -59
- package/skills/init-coding-standards/script.test.js +70 -70
- package/skills/init-coding-standards/workflow.xml +1 -1
- package/skills/map-cross-cutting/SKILL.md +126 -89
- package/skills/map-cross-cutting/workflow.xml +1 -1
- package/skills/map-guide/SKILL.md +126 -89
- package/skills/map-guide/workflow.xml +1 -1
- package/skills/map-pattern/SKILL.md +125 -89
- package/skills/map-pattern/workflow.xml +1 -1
- package/skills/map-story/SKILL.md +180 -127
- package/skills/map-story/templates/tech-debt-index.xml +125 -125
- package/skills/map-story/workflow.xml +2 -2
- package/skills/map-subsystem/SKILL.md +155 -111
- package/skills/map-subsystem/script.js +51 -60
- package/skills/map-subsystem/script.test.js +68 -68
- package/skills/map-subsystem/templates/subsystem-architecture.xml +343 -343
- package/skills/map-subsystem/templates/subsystem-structure.xml +234 -234
- package/skills/map-subsystem/workflow.xml +1173 -1173
- package/skills/map-sys-doc/SKILL.md +125 -90
- package/skills/map-sys-doc/workflow.xml +1 -1
- package/skills/map-system/SKILL.md +103 -85
- package/skills/map-system/script.js +75 -84
- package/skills/map-system/script.test.js +73 -73
- package/skills/map-system/templates/system-structure.xml +177 -177
- package/skills/map-system/templates/testing-framework.xml +283 -283
- package/skills/map-system/workflow.xml +667 -667
- package/skills/map-walkthrough/SKILL.md +140 -92
- package/skills/map-walkthrough/workflow.xml +457 -457
- package/skills/plan-backlog/SKILL.md +93 -75
- package/skills/plan-backlog/script.js +121 -136
- package/skills/plan-backlog/script.test.js +83 -83
- package/skills/plan-backlog/workflow.xml +1348 -1348
- package/skills/plan-feature/SKILL.md +99 -76
- package/skills/plan-feature/feature-template.xml +361 -361
- package/skills/plan-feature/script.js +131 -148
- package/skills/plan-feature/script.test.js +80 -80
- package/skills/plan-feature/workflow.xml +1 -1
- package/skills/plan-product-vision/SKILL.md +91 -75
- package/skills/plan-product-vision/product-vision-template.xml +227 -227
- package/skills/plan-product-vision/script.js +51 -60
- package/skills/plan-product-vision/script.test.js +69 -69
- package/skills/plan-product-vision/workflow.xml +337 -337
- package/skills/plan-story/SKILL.md +125 -102
- package/skills/plan-story/script.js +18 -49
- package/skills/plan-story/story-template.xml +8 -1
- package/skills/plan-story/workflow.xml +17 -1
- package/skills/research-external-solution/SKILL.md +120 -107
- package/skills/research-external-solution/external-solution-template.xml +832 -832
- package/skills/research-external-solution/script.js +229 -238
- package/skills/research-external-solution/script.test.js +134 -134
- package/skills/research-external-solution/workflow.xml +657 -657
- package/skills/research-integration-solution/SKILL.md +121 -98
- package/skills/research-integration-solution/integration-solution-template.xml +1015 -1015
- package/skills/research-integration-solution/script.js +223 -231
- package/skills/research-integration-solution/script.test.js +134 -134
- package/skills/research-integration-solution/workflow.xml +711 -711
- package/skills/research-story-wiki/SKILL.md +101 -92
- package/skills/research-story-wiki/script.js +223 -231
- package/skills/research-story-wiki/script.test.js +138 -138
- package/skills/research-story-wiki/story-wiki-template.xml +194 -194
- package/skills/research-story-wiki/workflow.xml +473 -473
- package/skills/research-technical-solution/SKILL.md +131 -103
- package/skills/research-technical-solution/script.js +223 -231
- package/skills/research-technical-solution/script.test.js +134 -134
- package/skills/research-technical-solution/technical-solution-template.xml +1025 -1025
- package/skills/research-technical-solution/workflow.xml +761 -761
- package/skills/review-story/SKILL.md +99 -100
- package/skills/review-story/script.js +8 -16
- package/skills/review-story/script.test.js +169 -169
- package/skills/review-story/story-template.xml +451 -451
- package/skills/review-story/workflow.xml +1 -1
- package/skills/update/SKILL.md +65 -53
- package/skills/update/workflow.xml +21 -5
|
@@ -1,90 +1,125 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: map-sys-doc
|
|
3
|
-
description: Create or update a system document in .docs/wiki/subsystems/[name]/systems/ — describes WHAT exists, HOW it works, WHERE things live
|
|
4
|
-
argument-hint: "text='Drawing system - manages all drawing tools on chart' subsystem='qarc-charts-v2' commits=3"
|
|
5
|
-
disable-model-invocation:
|
|
6
|
-
allowed-tools:
|
|
7
|
-
- Read
|
|
8
|
-
- Bash
|
|
9
|
-
- Glob
|
|
10
|
-
- Grep
|
|
11
|
-
- Write
|
|
12
|
-
- Edit
|
|
13
|
-
- AskUserQuestion
|
|
14
|
-
model: opus
|
|
15
|
-
effort: max
|
|
16
|
-
context: fork
|
|
17
|
-
agent: ace-wiki-mapper
|
|
18
|
-
---
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
-
|
|
90
|
-
|
|
1
|
+
---
|
|
2
|
+
name: map-sys-doc
|
|
3
|
+
description: Create or update a system document in .docs/wiki/subsystems/[name]/systems/ — describes WHAT exists, HOW it works, WHERE things live
|
|
4
|
+
argument-hint: "text='Drawing system - manages all drawing tools on chart' subsystem='qarc-charts-v2' commits=3"
|
|
5
|
+
disable-model-invocation: false
|
|
6
|
+
allowed-tools:
|
|
7
|
+
- Read
|
|
8
|
+
- Bash
|
|
9
|
+
- Glob
|
|
10
|
+
- Grep
|
|
11
|
+
- Write
|
|
12
|
+
- Edit
|
|
13
|
+
- AskUserQuestion
|
|
14
|
+
model: opus
|
|
15
|
+
effort: max
|
|
16
|
+
context: fork
|
|
17
|
+
agent: ace-wiki-mapper
|
|
18
|
+
---
|
|
19
|
+
|
|
20
|
+
## Supporting Resources (auto-loaded)
|
|
21
|
+
|
|
22
|
+
!`cat "${CLAUDE_SKILL_DIR}/workflow.xml"`
|
|
23
|
+
|
|
24
|
+
!`cat "${CLAUDE_SKILL_DIR}/system.xml"`
|
|
25
|
+
|
|
26
|
+
!`cat "${CLAUDE_SKILL_DIR}/../../shared/utils/questioning.xml"`
|
|
27
|
+
|
|
28
|
+
!`cat "${CLAUDE_SKILL_DIR}/../../shared/utils/ui-formatting.md"`
|
|
29
|
+
|
|
30
|
+
```xml
|
|
31
|
+
<command>
|
|
32
|
+
|
|
33
|
+
<execution-time>
|
|
34
|
+
<runs-after>
|
|
35
|
+
<trigger>When a coherent domain system needs dedicated documentation</trigger>
|
|
36
|
+
<trigger>After implementing a new system or significantly changing an existing one</trigger>
|
|
37
|
+
<trigger>When an AI agent needs a reference doc for a domain system before implementing stories</trigger>
|
|
38
|
+
</runs-after>
|
|
39
|
+
<use-when>
|
|
40
|
+
<condition>A logical grouping of components delivers one domain capability</condition>
|
|
41
|
+
<condition>The system spans multiple files with entry points, data flow, and state</condition>
|
|
42
|
+
<condition>A system doc would benefit from dedicated focused analysis outside map-story</condition>
|
|
43
|
+
</use-when>
|
|
44
|
+
</execution-time>
|
|
45
|
+
|
|
46
|
+
<input>
|
|
47
|
+
<flags>
|
|
48
|
+
</flags>
|
|
49
|
+
|
|
50
|
+
<parameters>
|
|
51
|
+
<required>
|
|
52
|
+
<param name="text" type="text">
|
|
53
|
+
Natural language description of the system to document. Describes WHAT
|
|
54
|
+
the system does, its domain concern, and key components.
|
|
55
|
+
|
|
56
|
+
E.g.:
|
|
57
|
+
- "Drawing system - manages all drawing tools on the chart"
|
|
58
|
+
- "User authentication and authorization system"
|
|
59
|
+
- "Order processing pipeline from cart to confirmation"
|
|
60
|
+
|
|
61
|
+
If not provided, pause and ask the user.
|
|
62
|
+
</param>
|
|
63
|
+
<param name="subsystem" type="path | text">
|
|
64
|
+
Subsystem where this system doc belongs.
|
|
65
|
+
Wiki location: `.docs/wiki/subsystems/[subsystem]/systems/`.
|
|
66
|
+
If not provided, pause and ask the user.
|
|
67
|
+
</param>
|
|
68
|
+
</required>
|
|
69
|
+
|
|
70
|
+
<optional>
|
|
71
|
+
<param name="story-context" type="path | GitHub issue">
|
|
72
|
+
Path to story artifacts folder (in `.ace/artifacts/`) OR GitHub issue
|
|
73
|
+
number/URL. Provides intent context for WHY the system was built/changed.
|
|
74
|
+
When not provided, the agent relies solely on code analysis.
|
|
75
|
+
</param>
|
|
76
|
+
<param name="commits" type="number | comma-separated commit SHAs">
|
|
77
|
+
Specifies which commits to analyze for understanding what was built/changed.
|
|
78
|
+
As a number: analyze the N most recent commits (e.g., commits=3).
|
|
79
|
+
As commit SHAs: analyze specific commits (e.g., commits='abc123,def456').
|
|
80
|
+
When not provided: search the codebase directly using the text description.
|
|
81
|
+
</param>
|
|
82
|
+
</optional>
|
|
83
|
+
</parameters>
|
|
84
|
+
</input>
|
|
85
|
+
|
|
86
|
+
<execution-context>
|
|
87
|
+
<!-- All supporting files are auto-loaded in the Supporting Resources section above.
|
|
88
|
+
The model does NOT need to Read these files — they are already in context. -->
|
|
89
|
+
</execution-context>
|
|
90
|
+
|
|
91
|
+
<output>
|
|
92
|
+
<objective>
|
|
93
|
+
Create or update a system document that describes a coherent domain system —
|
|
94
|
+
WHAT exists, HOW it works, WHERE things live. Includes file tree, system boundary
|
|
95
|
+
diagram, class hierarchy, entry points, data flow sequence diagrams (mandatory),
|
|
96
|
+
components, key behaviors, state management, error propagation, and constants/enums.
|
|
97
|
+
|
|
98
|
+
The primary document an AI agent reads before implementing a related story.
|
|
99
|
+
</objective>
|
|
100
|
+
|
|
101
|
+
<artifacts>
|
|
102
|
+
.docs/wiki/subsystems/[subsystem-name]/systems/[system-name].md
|
|
103
|
+
</artifacts>
|
|
104
|
+
</output>
|
|
105
|
+
|
|
106
|
+
<process>
|
|
107
|
+
For this command use the `ace-wiki-mapper` agent
|
|
108
|
+
that's specialized in wiki exploration and documentation writing.
|
|
109
|
+
|
|
110
|
+
Execute the map-sys-doc workflow from
|
|
111
|
+
`workflow.xml` end-to-end.
|
|
112
|
+
Preserve all workflow gates (validation, user questions, commits).
|
|
113
|
+
</process>
|
|
114
|
+
|
|
115
|
+
<next-steps>
|
|
116
|
+
<step>/clear first for a fresh context window</step>
|
|
117
|
+
<step>/ace:map-sys-doc — create another system document</step>
|
|
118
|
+
<step>/ace:map-pattern — document a pattern used by this system</step>
|
|
119
|
+
<step>/ace:map-guide — create a how-to guide for this system</step>
|
|
120
|
+
<step>/ace:map-cross-cutting — document a cross-cutting concern</step>
|
|
121
|
+
<step>Review file at .docs/wiki/subsystems/[subsystem-name]/systems/</step>
|
|
122
|
+
</next-steps>
|
|
123
|
+
|
|
124
|
+
</command>
|
|
125
|
+
```
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
</purpose>
|
|
15
15
|
|
|
16
16
|
<mandatory-context>
|
|
17
|
-
|
|
17
|
+
All supporting resource files are auto-loaded in the skill prompt above. Do NOT re-read them.
|
|
18
18
|
Also read any document or text passed as parameter ($ARGUMENTS) in the invoking command.
|
|
19
19
|
</mandatory-context>
|
|
20
20
|
|
|
@@ -1,85 +1,103 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: map-system
|
|
3
|
-
description: Map system-wide codebase structure, architecture, and testing framework into .docs/wiki/system-wide/
|
|
4
|
-
argument-hint: "[optional: references='existing artifacts and documents to be considered alongside the codebase']"
|
|
5
|
-
disable-model-invocation: true
|
|
6
|
-
allowed-tools: Read, Bash, Glob, Grep, Write, Task, AskUserQuestion
|
|
7
|
-
model: opus
|
|
8
|
-
effort: max
|
|
9
|
-
---
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
##
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
-
|
|
22
|
-
|
|
23
|
-
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
-
|
|
40
|
-
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
-
|
|
44
|
-
|
|
45
|
-
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
.
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
/
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
-
|
|
83
|
-
-
|
|
84
|
-
-
|
|
85
|
-
|
|
1
|
+
---
|
|
2
|
+
name: map-system
|
|
3
|
+
description: Map system-wide codebase structure, architecture, and testing framework into .docs/wiki/system-wide/
|
|
4
|
+
argument-hint: "[optional: references='existing artifacts and documents to be considered alongside the codebase']"
|
|
5
|
+
disable-model-invocation: true
|
|
6
|
+
allowed-tools: Read, Bash, Glob, Grep, Write, Task, AskUserQuestion
|
|
7
|
+
model: opus
|
|
8
|
+
effort: max
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
## Environment Context (preprocessed)
|
|
12
|
+
|
|
13
|
+
!`node "${CLAUDE_SKILL_DIR}/script.js" init 2>/dev/null`
|
|
14
|
+
|
|
15
|
+
## Supporting Resources (auto-loaded)
|
|
16
|
+
|
|
17
|
+
!`cat "${CLAUDE_SKILL_DIR}/workflow.xml"`
|
|
18
|
+
|
|
19
|
+
!`cat "${CLAUDE_SKILL_DIR}/templates/system-structure.xml"`
|
|
20
|
+
|
|
21
|
+
!`cat "${CLAUDE_SKILL_DIR}/templates/system-architecture.xml"`
|
|
22
|
+
|
|
23
|
+
!`cat "${CLAUDE_SKILL_DIR}/templates/testing-framework.xml"`
|
|
24
|
+
|
|
25
|
+
!`cat "${CLAUDE_SKILL_DIR}/templates/wiki-readme.xml"`
|
|
26
|
+
|
|
27
|
+
!`cat "${CLAUDE_SKILL_DIR}/../../shared/utils/questioning.xml"`
|
|
28
|
+
|
|
29
|
+
!`cat "${CLAUDE_SKILL_DIR}/../../shared/utils/ui-formatting.md"`
|
|
30
|
+
|
|
31
|
+
```xml
|
|
32
|
+
<command>
|
|
33
|
+
|
|
34
|
+
<execution-time>
|
|
35
|
+
<runs-after>
|
|
36
|
+
<trigger>Before /ace:help (brownfield codebases) — understand existing code first</trigger>
|
|
37
|
+
<trigger>After /ace:help (greenfield codebases) — document architecture decisions</trigger>
|
|
38
|
+
<trigger>Anytime to refresh system-wide wiki documents</trigger>
|
|
39
|
+
</runs-after>
|
|
40
|
+
<use-when>
|
|
41
|
+
<condition>Onboarding to an existing codebase (brownfield — analyzes code automatically)</condition>
|
|
42
|
+
<condition>Starting a new project and need to document architecture decisions (greenfield — interviews you)</condition>
|
|
43
|
+
<condition>System-wide documents are stale or missing</condition>
|
|
44
|
+
<condition>After major refactoring that changed subsystem boundaries or tech stack</condition>
|
|
45
|
+
</use-when>
|
|
46
|
+
</execution-time>
|
|
47
|
+
|
|
48
|
+
<input>
|
|
49
|
+
<flags>
|
|
50
|
+
</flags>
|
|
51
|
+
|
|
52
|
+
<parameters>
|
|
53
|
+
<required>
|
|
54
|
+
</required>
|
|
55
|
+
|
|
56
|
+
<optional>
|
|
57
|
+
<param name="references" type="file | text">
|
|
58
|
+
Existing architecture docs, ADRs, or design notes
|
|
59
|
+
to consider alongside the codebase analysis. Absorbed before analysis begins.
|
|
60
|
+
</param>
|
|
61
|
+
</optional>
|
|
62
|
+
</parameters>
|
|
63
|
+
</input>
|
|
64
|
+
|
|
65
|
+
<execution-context>
|
|
66
|
+
<!-- All supporting files are auto-loaded in the Supporting Resources section above.
|
|
67
|
+
The model does NOT need to Read these files — they are already in context. -->
|
|
68
|
+
</execution-context>
|
|
69
|
+
|
|
70
|
+
<output>
|
|
71
|
+
<objective>
|
|
72
|
+
Detect brownfield/greenfield status and existing wiki state. For each system-wide
|
|
73
|
+
document (structure, architecture, testing), determine whether to create, update,
|
|
74
|
+
recreate, scaffold, or skip. Spawn ace-wiki-mapper agents to produce documents.
|
|
75
|
+
For greenfield architecture, conduct deep questioning before generating.
|
|
76
|
+
Add CLAUDE.md instructions to keep wiki current with future code changes.
|
|
77
|
+
</objective>
|
|
78
|
+
|
|
79
|
+
<artifacts>
|
|
80
|
+
- .docs/wiki/wiki-readme.md (created if not already present)
|
|
81
|
+
- .docs/wiki/system-wide/system-structure.md
|
|
82
|
+
- .docs/wiki/system-wide/system-architecture.md
|
|
83
|
+
- .docs/wiki/system-wide/testing-framework.md
|
|
84
|
+
- CLAUDE.md (wiki maintenance instructions appended)
|
|
85
|
+
</artifacts>
|
|
86
|
+
</output>
|
|
87
|
+
|
|
88
|
+
<process>
|
|
89
|
+
Execute the map-system workflow from
|
|
90
|
+
`workflow.xml` end-to-end.
|
|
91
|
+
Preserve all workflow gates (validation, user questions, commits).
|
|
92
|
+
</process>
|
|
93
|
+
|
|
94
|
+
<next-steps>
|
|
95
|
+
**After this command, `/clear` first for a fresh context window, then:**
|
|
96
|
+
- `/ace:map-subsystems` — Map individual subsystem internals (structure, dependencies)
|
|
97
|
+
- `/ace:init-coding-standards` — Define prescriptive coding standards
|
|
98
|
+
- `/ace:help` — Check project initialization status and next steps
|
|
99
|
+
- Review and edit files in `.docs/wiki/system-wide/` anytime
|
|
100
|
+
</next-steps>
|
|
101
|
+
|
|
102
|
+
</command>
|
|
103
|
+
```
|
|
@@ -1,84 +1,75 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* map-system skill script — Entry point for ace-tools operations
|
|
5
|
-
* needed by the map-system skill.
|
|
6
|
-
*
|
|
7
|
-
* Subcommands:
|
|
8
|
-
* init [args] Environment detection for map-system workflow
|
|
9
|
-
*
|
|
10
|
-
* Usage: node script.js <subcommand> [args] [--raw]
|
|
11
|
-
*/
|
|
12
|
-
|
|
13
|
-
const fs = require('fs');
|
|
14
|
-
const path = require('path');
|
|
15
|
-
|
|
16
|
-
const {
|
|
17
|
-
loadConfig, pathExists, resolveModel,
|
|
18
|
-
detectBrownfieldStatus, output, error,
|
|
19
|
-
} = require('../../shared/lib/ace-core');
|
|
20
|
-
|
|
21
|
-
// ─── CLI Dispatch ────────────────────────────────────────────────────────────
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
const
|
|
40
|
-
const
|
|
41
|
-
|
|
42
|
-
//
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
//
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
has_testing_framework,
|
|
77
|
-
has_coding_standards,
|
|
78
|
-
|
|
79
|
-
// Git state
|
|
80
|
-
has_git: pathExists(cwd, '.git'),
|
|
81
|
-
};
|
|
82
|
-
|
|
83
|
-
output(result, raw);
|
|
84
|
-
}
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* map-system skill script — Entry point for ace-tools operations
|
|
5
|
+
* needed by the map-system skill.
|
|
6
|
+
*
|
|
7
|
+
* Subcommands:
|
|
8
|
+
* init [args] Environment detection for map-system workflow
|
|
9
|
+
*
|
|
10
|
+
* Usage: node script.js <subcommand> [args] [--raw]
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
const fs = require('fs');
|
|
14
|
+
const path = require('path');
|
|
15
|
+
|
|
16
|
+
const {
|
|
17
|
+
loadConfig, pathExists, resolveModel,
|
|
18
|
+
detectBrownfieldStatus, output, error, runSkillScript,
|
|
19
|
+
} = require('../../shared/lib/ace-core');
|
|
20
|
+
|
|
21
|
+
// ─── CLI Dispatch ────────────────────────────────────────────────────────────
|
|
22
|
+
|
|
23
|
+
runSkillScript({
|
|
24
|
+
init: cmdInit,
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
// ─── Init: Map System ───────────────────────────────────────────────────────
|
|
28
|
+
|
|
29
|
+
function cmdInit(cwd, raw, args, parsed) {
|
|
30
|
+
const config = loadConfig(cwd);
|
|
31
|
+
const brownfield = detectBrownfieldStatus(cwd);
|
|
32
|
+
|
|
33
|
+
// Check existing wiki documents
|
|
34
|
+
const wikiDir = '.docs/wiki/system-wide';
|
|
35
|
+
const wikiDirExists = pathExists(cwd, wikiDir);
|
|
36
|
+
|
|
37
|
+
const has_system_structure = pathExists(cwd, path.join(wikiDir, 'system-structure.md'));
|
|
38
|
+
const has_system_architecture = pathExists(cwd, path.join(wikiDir, 'system-architecture.md'));
|
|
39
|
+
const has_testing_framework = pathExists(cwd, path.join(wikiDir, 'testing-framework.md'));
|
|
40
|
+
const has_coding_standards = pathExists(cwd, path.join(wikiDir, 'coding-standards.md'));
|
|
41
|
+
|
|
42
|
+
// List existing wiki files if directory exists
|
|
43
|
+
let existing_wiki_files = [];
|
|
44
|
+
if (wikiDirExists) {
|
|
45
|
+
try {
|
|
46
|
+
existing_wiki_files = fs.readdirSync(path.join(cwd, wikiDir)).filter(f => f.endsWith('.md'));
|
|
47
|
+
} catch {}
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
const result = {
|
|
51
|
+
// Models
|
|
52
|
+
mapper_model: resolveModel(cwd, 'ace-wiki-mapper'),
|
|
53
|
+
|
|
54
|
+
// Config
|
|
55
|
+
commit_docs: config.commit_docs,
|
|
56
|
+
|
|
57
|
+
// Brownfield detection
|
|
58
|
+
...brownfield,
|
|
59
|
+
|
|
60
|
+
// Wiki directory state
|
|
61
|
+
wiki_dir_exists: wikiDirExists,
|
|
62
|
+
existing_wiki_files,
|
|
63
|
+
|
|
64
|
+
// Per-document existence
|
|
65
|
+
has_system_structure,
|
|
66
|
+
has_system_architecture,
|
|
67
|
+
has_testing_framework,
|
|
68
|
+
has_coding_standards,
|
|
69
|
+
|
|
70
|
+
// Git state
|
|
71
|
+
has_git: pathExists(cwd, '.git'),
|
|
72
|
+
};
|
|
73
|
+
|
|
74
|
+
output(result, raw);
|
|
75
|
+
}
|