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.
Files changed (102) hide show
  1. package/.claude-plugin/marketplace.json +18 -0
  2. package/.claude-plugin/plugin.json +1 -1
  3. package/CHANGELOG.md +7 -1
  4. package/README.md +16 -12
  5. package/agents/ace-code-discovery-analyst.md +245 -245
  6. package/agents/ace-code-integration-analyst.md +248 -248
  7. package/agents/ace-code-reviewer.md +375 -375
  8. package/agents/ace-product-owner.md +365 -361
  9. package/agents/ace-project-researcher.md +606 -606
  10. package/agents/ace-technical-application-architect.md +315 -315
  11. package/bin/install.js +587 -173
  12. package/hooks/ace-check-update.js +15 -14
  13. package/hooks/ace-statusline.js +30 -12
  14. package/hooks/hooks.json +14 -0
  15. package/package.json +3 -2
  16. package/shared/lib/ace-core.js +53 -0
  17. package/shared/lib/ace-core.test.js +308 -308
  18. package/shared/lib/ace-story.test.js +250 -250
  19. package/skills/execute-story/SKILL.md +116 -110
  20. package/skills/execute-story/script.js +13 -27
  21. package/skills/execute-story/script.test.js +261 -261
  22. package/skills/execute-story/story-template.xml +451 -451
  23. package/skills/execute-story/workflow.xml +3 -1
  24. package/skills/help/SKILL.md +71 -69
  25. package/skills/help/script.js +32 -35
  26. package/skills/help/script.test.js +183 -183
  27. package/skills/help/workflow.xml +14 -3
  28. package/skills/init-coding-standards/SKILL.md +91 -72
  29. package/skills/init-coding-standards/coding-standards-template.xml +531 -531
  30. package/skills/init-coding-standards/script.js +50 -59
  31. package/skills/init-coding-standards/script.test.js +70 -70
  32. package/skills/init-coding-standards/workflow.xml +1 -1
  33. package/skills/map-cross-cutting/SKILL.md +126 -89
  34. package/skills/map-cross-cutting/workflow.xml +1 -1
  35. package/skills/map-guide/SKILL.md +126 -89
  36. package/skills/map-guide/workflow.xml +1 -1
  37. package/skills/map-pattern/SKILL.md +125 -89
  38. package/skills/map-pattern/workflow.xml +1 -1
  39. package/skills/map-story/SKILL.md +180 -127
  40. package/skills/map-story/templates/tech-debt-index.xml +125 -125
  41. package/skills/map-story/workflow.xml +2 -2
  42. package/skills/map-subsystem/SKILL.md +155 -111
  43. package/skills/map-subsystem/script.js +51 -60
  44. package/skills/map-subsystem/script.test.js +68 -68
  45. package/skills/map-subsystem/templates/subsystem-architecture.xml +343 -343
  46. package/skills/map-subsystem/templates/subsystem-structure.xml +234 -234
  47. package/skills/map-subsystem/workflow.xml +1173 -1173
  48. package/skills/map-sys-doc/SKILL.md +125 -90
  49. package/skills/map-sys-doc/workflow.xml +1 -1
  50. package/skills/map-system/SKILL.md +103 -85
  51. package/skills/map-system/script.js +75 -84
  52. package/skills/map-system/script.test.js +73 -73
  53. package/skills/map-system/templates/system-structure.xml +177 -177
  54. package/skills/map-system/templates/testing-framework.xml +283 -283
  55. package/skills/map-system/workflow.xml +667 -667
  56. package/skills/map-walkthrough/SKILL.md +140 -92
  57. package/skills/map-walkthrough/workflow.xml +457 -457
  58. package/skills/plan-backlog/SKILL.md +93 -75
  59. package/skills/plan-backlog/script.js +121 -136
  60. package/skills/plan-backlog/script.test.js +83 -83
  61. package/skills/plan-backlog/workflow.xml +1348 -1348
  62. package/skills/plan-feature/SKILL.md +99 -76
  63. package/skills/plan-feature/feature-template.xml +361 -361
  64. package/skills/plan-feature/script.js +131 -148
  65. package/skills/plan-feature/script.test.js +80 -80
  66. package/skills/plan-feature/workflow.xml +1 -1
  67. package/skills/plan-product-vision/SKILL.md +91 -75
  68. package/skills/plan-product-vision/product-vision-template.xml +227 -227
  69. package/skills/plan-product-vision/script.js +51 -60
  70. package/skills/plan-product-vision/script.test.js +69 -69
  71. package/skills/plan-product-vision/workflow.xml +337 -337
  72. package/skills/plan-story/SKILL.md +125 -102
  73. package/skills/plan-story/script.js +18 -49
  74. package/skills/plan-story/story-template.xml +8 -1
  75. package/skills/plan-story/workflow.xml +17 -1
  76. package/skills/research-external-solution/SKILL.md +120 -107
  77. package/skills/research-external-solution/external-solution-template.xml +832 -832
  78. package/skills/research-external-solution/script.js +229 -238
  79. package/skills/research-external-solution/script.test.js +134 -134
  80. package/skills/research-external-solution/workflow.xml +657 -657
  81. package/skills/research-integration-solution/SKILL.md +121 -98
  82. package/skills/research-integration-solution/integration-solution-template.xml +1015 -1015
  83. package/skills/research-integration-solution/script.js +223 -231
  84. package/skills/research-integration-solution/script.test.js +134 -134
  85. package/skills/research-integration-solution/workflow.xml +711 -711
  86. package/skills/research-story-wiki/SKILL.md +101 -92
  87. package/skills/research-story-wiki/script.js +223 -231
  88. package/skills/research-story-wiki/script.test.js +138 -138
  89. package/skills/research-story-wiki/story-wiki-template.xml +194 -194
  90. package/skills/research-story-wiki/workflow.xml +473 -473
  91. package/skills/research-technical-solution/SKILL.md +131 -103
  92. package/skills/research-technical-solution/script.js +223 -231
  93. package/skills/research-technical-solution/script.test.js +134 -134
  94. package/skills/research-technical-solution/technical-solution-template.xml +1025 -1025
  95. package/skills/research-technical-solution/workflow.xml +761 -761
  96. package/skills/review-story/SKILL.md +99 -100
  97. package/skills/review-story/script.js +8 -16
  98. package/skills/review-story/script.test.js +169 -169
  99. package/skills/review-story/story-template.xml +451 -451
  100. package/skills/review-story/workflow.xml +1 -1
  101. package/skills/update/SKILL.md +65 -53
  102. 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: true
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
- # Map Sys Doc
21
-
22
- Create or update a system document describing WHAT exists, HOW it works, WHERE things live.
23
-
24
- ## When to Use
25
-
26
- - When a coherent domain system needs dedicated documentation
27
- - After implementing a new system or significantly changing an existing one
28
- - When an AI agent needs a reference doc for a domain system before implementing stories
29
- - A logical grouping of components delivers one domain capability
30
- - The system spans multiple files with entry points, data flow, and state
31
- - A system doc would benefit from dedicated focused analysis outside map-story
32
-
33
- ## Input
34
-
35
- ### Required
36
-
37
- - **`text`** (text) Natural language description of the system to document. Describes WHAT the system does, its domain concern, and key components. E.g.: "Drawing system - manages all drawing tools on the chart", "User authentication and authorization system", "Order processing pipeline from cart to confirmation". If not provided, pause and ask the user.
38
-
39
- - **`subsystem`** (path | text) — Subsystem where this system doc belongs. Wiki location: `.docs/wiki/subsystems/[subsystem]/systems/`. If not provided, pause and ask the user.
40
-
41
- ### Optional
42
-
43
- - **`story-context`** (path | GitHub issue) — Path to story artifacts folder (in `.ace/artifacts/`) OR GitHub issue number/URL. Provides intent context for WHY the system was built/changed. When not provided, the agent relies solely on code analysis.
44
-
45
- - **`commits`** (number | comma-separated commit SHAs) — Specifies which commits to analyze for understanding what was built/changed. As a number: analyze the N most recent commits (e.g., commits=3). As commit SHAs: analyze specific commits (e.g., commits='abc123,def456'). When not provided: search the codebase directly using the text description.
46
-
47
- ## Supporting Resources
48
-
49
- Read ALL of these before starting the workflow:
50
-
51
- - **Workflow**: Read [workflow.xml](workflow.xml) — complete orchestration process with all steps
52
- - **System template**: Read [system.xml](system.xml) — output format for the system document
53
- - **Questioning guide**: Read `${CLAUDE_SKILL_DIR}/../../shared/utils/questioning.xml` deep questioning techniques
54
- - **UI formatting**: Read `${CLAUDE_SKILL_DIR}/../../shared/utils/ui-formatting.md` ACE output formatting rules
55
-
56
- ## Process
57
-
58
- Use the `ace-wiki-mapper` agent that's specialized in wiki exploration and documentation writing.
59
-
60
- Read all supporting resources listed above, then execute the workflow defined in [workflow.xml](workflow.xml) end-to-end. Preserve all workflow gates (validation, user questions, commits).
61
-
62
- **Objective:** Create or update a system document that describes a coherent domain system — WHAT exists, HOW it works, WHERE things live. Includes file tree, system boundary diagram, class hierarchy, entry points, data flow sequence diagrams (mandatory), components, key behaviors, state management, error propagation, and constants/enums. The primary document an AI agent reads before implementing a related story.
63
-
64
- ## Artifacts
65
-
66
- ```
67
- .docs/wiki/subsystems/[subsystem-name]/systems/[system-name].md
68
- ```
69
-
70
- ## Example Usage
71
-
72
- ```
73
- # Basic system doc
74
- /ace:map-sys-doc text='Drawing system - manages all drawing tools on chart' subsystem='qarc-charts-v2'
75
-
76
- # With recent commits
77
- /ace:map-sys-doc text='User authentication and authorization system' subsystem='api' commits=3
78
-
79
- # With story context
80
- /ace:map-sys-doc text='Order processing pipeline' subsystem='commerce' story-context='.ace/artifacts/product/e1-orders/f1-pipeline/s1-cart/s1-cart.md'
81
- ```
82
-
83
- ## Next Steps
84
-
85
- - `/clear` first for a fresh context window
86
- - `/ace:map-sys-doc` — create another system document
87
- - `/ace:map-pattern` document a pattern used by this system
88
- - `/ace:map-guide` create a how-to guide for this system
89
- - `/ace:map-cross-cutting` — document a cross-cutting concern
90
- - Review file at `.docs/wiki/subsystems/[subsystem-name]/systems/`
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
- Read all files referenced by the invoking command's execution-context before starting.
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
- # Map System
12
-
13
- Map system-wide codebase structure, architecture, and testing framework into .docs/wiki/system-wide/.
14
-
15
- ## When to Use
16
-
17
- - Before `/ace:help` (brownfield codebases) — understand existing code first
18
- - After `/ace:help` (greenfield codebases) — document architecture decisions
19
- - Anytime to refresh system-wide wiki documents
20
- - Onboarding to an existing codebase (brownfield — analyzes code automatically)
21
- - Starting a new project and need to document architecture decisions (greenfield — interviews you)
22
- - System-wide documents are stale or missing
23
- - After major refactoring that changed subsystem boundaries or tech stack
24
-
25
- ## Input
26
-
27
- ### Optional
28
-
29
- - **`references`** — Existing architecture docs, ADRs, or design notes to consider alongside the codebase analysis. Absorbed before analysis begins.
30
-
31
- ## Environment Context (preprocessed)
32
-
33
- !`node "${CLAUDE_SKILL_DIR}/script.js" init "$ARGUMENTS" 2>/dev/null`
34
-
35
- ## Supporting Resources
36
-
37
- Read ALL of these before starting the workflow:
38
-
39
- - **Workflow**: Read [workflow.xml](workflow.xml) — complete orchestration process with all steps
40
- - **System structure template**: Read [templates/system-structure.xml](templates/system-structure.xml) — output format for system structure
41
- - **System architecture template**: Read [templates/system-architecture.xml](templates/system-architecture.xml)output format for system architecture
42
- - **Testing framework template**: Read [templates/testing-framework.xml](templates/testing-framework.xml) output format for testing framework
43
- - **Wiki readme template**: Read [templates/wiki-readme.xml](templates/wiki-readme.xml) — output format for wiki readme
44
- - **Questioning guide**: Read `${CLAUDE_SKILL_DIR}/../../shared/utils/questioning.xml` deep questioning techniques
45
- - **UI formatting**: Read `${CLAUDE_SKILL_DIR}/../../shared/utils/ui-formatting.md` — ACE output formatting rules
46
-
47
- ## Process
48
-
49
- Use the `ace-wiki-mapper` agent for codebase analysis and document generation.
50
-
51
- The Environment Context above contains the preprocessed INIT JSON — use it directly instead of running the init script manually. The workflow's step 1 setup can skip the init bash call since that data is already available.
52
-
53
- Read all supporting resources listed above, then execute the workflow defined in [workflow.xml](workflow.xml) end-to-end. Preserve all workflow gates (validation, user questions, commits).
54
-
55
- ## Artifacts
56
-
57
- ```
58
- .docs/wiki/wiki-readme.md (created if not already present)
59
- .docs/wiki/system-wide/system-structure.md
60
- .docs/wiki/system-wide/system-architecture.md
61
- .docs/wiki/system-wide/testing-framework.md
62
- CLAUDE.md (wiki maintenance instructions appended)
63
- ```
64
-
65
- ## Example Usage
66
-
67
- ```
68
- # Map system from codebase analysis (brownfield)
69
- /ace:map-system
70
-
71
- # Map system with reference docs
72
- /ace:map-system references="docs/architecture-decisions/"
73
-
74
- # Refresh system-wide wiki after refactoring
75
- /ace:map-system
76
- ```
77
-
78
- ## Next Steps
79
-
80
- After this command, `/clear` first for a fresh context window, then:
81
-
82
- - `/ace:map-subsystem subsystem="src/api"` — Map individual subsystem internals
83
- - `/ace:init-coding-standards` — Define prescriptive coding standards
84
- - `/ace:help` Check project initialization status and next steps
85
- - Review and edit files in `.docs/wiki/system-wide/` anytime
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 (brownfieldanalyzes 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
- const cwd = process.cwd();
24
- const args = process.argv.slice(2);
25
- const raw = args.includes('--raw');
26
- const cmd = args[0];
27
-
28
- switch (cmd) {
29
- case 'init':
30
- cmdInit(cwd, raw, args.slice(1).filter(a => a !== '--raw'));
31
- break;
32
- default:
33
- error(`Unknown command: ${cmd}\nAvailable: init`);
34
- }
35
-
36
- // ─── Init: Map System ───────────────────────────────────────────────────────
37
-
38
- function cmdInit(cwd, raw) {
39
- const config = loadConfig(cwd);
40
- const brownfield = detectBrownfieldStatus(cwd);
41
-
42
- // Check existing wiki documents
43
- const wikiDir = '.docs/wiki/system-wide';
44
- const wikiDirExists = pathExists(cwd, wikiDir);
45
-
46
- const has_system_structure = pathExists(cwd, path.join(wikiDir, 'system-structure.md'));
47
- const has_system_architecture = pathExists(cwd, path.join(wikiDir, 'system-architecture.md'));
48
- const has_testing_framework = pathExists(cwd, path.join(wikiDir, 'testing-framework.md'));
49
- const has_coding_standards = pathExists(cwd, path.join(wikiDir, 'coding-standards.md'));
50
-
51
- // List existing wiki files if directory exists
52
- let existing_wiki_files = [];
53
- if (wikiDirExists) {
54
- try {
55
- existing_wiki_files = fs.readdirSync(path.join(cwd, wikiDir)).filter(f => f.endsWith('.md'));
56
- } catch {}
57
- }
58
-
59
- const result = {
60
- // Models
61
- mapper_model: resolveModel(cwd, 'ace-wiki-mapper'),
62
-
63
- // Config
64
- commit_docs: config.commit_docs,
65
-
66
- // Brownfield detection
67
- ...brownfield,
68
-
69
- // Wiki directory state
70
- wiki_dir_exists: wikiDirExists,
71
- existing_wiki_files,
72
-
73
- // Per-document existence
74
- has_system_structure,
75
- has_system_architecture,
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
+ }