agile-context-engineering 0.1.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.
Files changed (84) hide show
  1. package/LICENSE +30 -0
  2. package/README.md +272 -78
  3. package/agents/ace-code-discovery-analyst.md +245 -0
  4. package/agents/ace-code-integration-analyst.md +248 -0
  5. package/agents/ace-code-reviewer.md +375 -0
  6. package/agents/ace-product-owner.md +361 -0
  7. package/agents/ace-project-researcher.md +606 -0
  8. package/agents/ace-research-synthesizer.md +228 -0
  9. package/agents/ace-technical-application-architect.md +287 -0
  10. package/agents/ace-wiki-mapper.md +334 -0
  11. package/agile-context-engineering/src/ace-tools.js +2881 -0
  12. package/agile-context-engineering/src/ace-tools.test.js +1089 -0
  13. package/agile-context-engineering/templates/_command.md +54 -0
  14. package/agile-context-engineering/templates/_workflow.xml +17 -0
  15. package/agile-context-engineering/templates/config.json +0 -0
  16. package/agile-context-engineering/templates/product/external-solution.xml +832 -0
  17. package/agile-context-engineering/templates/product/feature.xml +361 -0
  18. package/agile-context-engineering/templates/product/integration-solution.xml +0 -0
  19. package/agile-context-engineering/templates/product/product-backlog.xml +231 -0
  20. package/agile-context-engineering/templates/product/product-vision.xml +227 -0
  21. package/agile-context-engineering/templates/product/story-integration-solution.xml +1014 -0
  22. package/agile-context-engineering/templates/product/story-technical-solution.xml +1025 -0
  23. package/agile-context-engineering/templates/product/story-wiki.xml +190 -0
  24. package/agile-context-engineering/templates/product/story.xml +451 -0
  25. package/agile-context-engineering/templates/wiki/coding-standards.xml +493 -0
  26. package/agile-context-engineering/templates/wiki/decizions.xml +115 -0
  27. package/agile-context-engineering/templates/wiki/guide.xml +137 -0
  28. package/agile-context-engineering/templates/wiki/module-discovery.xml +174 -0
  29. package/agile-context-engineering/templates/wiki/pattern.xml +159 -0
  30. package/agile-context-engineering/templates/wiki/subsystem-architecture.xml +343 -0
  31. package/agile-context-engineering/templates/wiki/subsystem-structure.xml +235 -0
  32. package/agile-context-engineering/templates/wiki/system-architecture.xml +254 -0
  33. package/agile-context-engineering/templates/wiki/system-cross-cutting.xml +197 -0
  34. package/agile-context-engineering/templates/wiki/system-structure.xml +178 -0
  35. package/agile-context-engineering/templates/wiki/system.xml +381 -0
  36. package/agile-context-engineering/templates/wiki/tech-debt-index.xml +125 -0
  37. package/agile-context-engineering/templates/wiki/testing-framework.xml +283 -0
  38. package/agile-context-engineering/templates/wiki/wiki-readme.xml +276 -0
  39. package/agile-context-engineering/utils/questioning.xml +111 -0
  40. package/agile-context-engineering/utils/ui-formatting.md +300 -0
  41. package/agile-context-engineering/workflows/execute-story.xml +1145 -0
  42. package/agile-context-engineering/workflows/help.xml +540 -0
  43. package/agile-context-engineering/workflows/init-coding-standards.xml +386 -0
  44. package/agile-context-engineering/workflows/map-story.xml +797 -0
  45. package/agile-context-engineering/workflows/map-subsystem.xml +1177 -0
  46. package/agile-context-engineering/workflows/map-system.xml +672 -0
  47. package/agile-context-engineering/workflows/plan-backlog.xml +1356 -0
  48. package/agile-context-engineering/workflows/plan-feature.xml +1495 -0
  49. package/agile-context-engineering/workflows/plan-product-vision.xml +342 -0
  50. package/agile-context-engineering/workflows/plan-story.xml +909 -0
  51. package/agile-context-engineering/workflows/research-external-solution.xml +659 -0
  52. package/agile-context-engineering/workflows/research-integration-solution.xml +712 -0
  53. package/agile-context-engineering/workflows/research-story-wiki.xml +474 -0
  54. package/agile-context-engineering/workflows/research-technical-solution.xml +762 -0
  55. package/agile-context-engineering/workflows/review-story.xml +281 -0
  56. package/bin/install.js +102 -166
  57. package/commands/ace/execute-story.md +137 -0
  58. package/commands/ace/help.md +93 -0
  59. package/commands/ace/init-coding-standards.md +83 -0
  60. package/commands/ace/map-story.md +156 -0
  61. package/commands/ace/map-subsystem.md +138 -0
  62. package/commands/ace/map-system.md +92 -0
  63. package/commands/ace/plan-backlog.md +83 -0
  64. package/commands/ace/plan-feature.md +89 -0
  65. package/commands/ace/plan-product-vision.md +81 -0
  66. package/commands/ace/plan-story.md +145 -0
  67. package/commands/ace/research-external-solution.md +138 -0
  68. package/commands/ace/research-integration-solution.md +135 -0
  69. package/commands/ace/research-story-wiki.md +116 -0
  70. package/commands/ace/research-technical-solution.md +147 -0
  71. package/commands/ace/review-story.md +109 -0
  72. package/package.json +5 -8
  73. package/agents/executor.md +0 -88
  74. package/agents/planner.md +0 -78
  75. package/agents/researcher.md +0 -77
  76. package/agents/verifier.md +0 -116
  77. package/commands/ace-execute-story.md +0 -114
  78. package/commands/ace-init.md +0 -254
  79. package/commands/ace-plan-epic.md +0 -79
  80. package/commands/ace-plan-feature.md +0 -78
  81. package/commands/ace-plan-project.md +0 -205
  82. package/commands/ace-plan-story.md +0 -97
  83. package/commands/ace-refine-story.md +0 -90
  84. package/commands/ace-verify-story.md +0 -127
@@ -0,0 +1,83 @@
1
+ ---
2
+ name: ace:init-coding-standards
3
+ description: Generate a tailored coding-standards.md through codebase detection and user interview
4
+ argument-hint: "[optional: context='existing standards doc or notes to build on']"
5
+ allowed-tools:
6
+ - Read
7
+ - Bash
8
+ - Glob
9
+ - Grep
10
+ - Write
11
+ - Task
12
+ - AskUserQuestion
13
+ ---
14
+
15
+ ```xml
16
+ <command>
17
+
18
+ <execution-time>
19
+ <runs-after>
20
+ <trigger>During /ace:help — as part of initial project setup</trigger>
21
+ <trigger>After /ace:map-system — once codebase is mapped, add prescriptive standards</trigger>
22
+ <trigger>Anytime — to create or refresh coding standards for a project</trigger>
23
+ </runs-after>
24
+ <use-when>
25
+ <condition>Starting a new project and want to establish coding standards upfront (greenfield or brownfield)</condition>
26
+ <condition>Onboarding AI agents to an existing codebase (prevents common AI mistakes)</condition>
27
+ <condition>Current coding standards are outdated or missing</condition>
28
+ <condition>Team has pain points with AI-generated code quality</condition>
29
+ </use-when>
30
+ </execution-time>
31
+
32
+ <input>
33
+ <flags>
34
+ </flags>
35
+
36
+ <parameters>
37
+ <required>
38
+ </required>
39
+
40
+ <optional>
41
+ <param name="context" type="file | text">
42
+ Existing coding standards document, style guide, or notes
43
+ to use as a starting point. Will be refined through the interview process.
44
+ </param>
45
+ </optional>
46
+ </parameters>
47
+ </input>
48
+
49
+ <execution-context>
50
+ <init-coding-standards-workflow>@~/.claude/agile-context-engineering/workflows/init-coding-standards.xml</init-coding-standards-workflow>
51
+ <coding-standards-template>@~/.claude/agile-context-engineering/templates/wiki/coding-standards.xml</coding-standards-template>
52
+ <questioning>@~/.claude/agile-context-engineering/utils/questioning.xml</questioning>
53
+ <ui-formatting>@~/.claude/agile-context-engineering/utils/ui-formatting.md</ui-formatting>
54
+ </execution-context>
55
+
56
+ <output>
57
+ <objective>
58
+ Detect the project's language, paradigm, and frameworks (brownfield) or gather
59
+ this from the user (greenfield). Interview the user about their coding philosophy
60
+ and pain points. Generate a tailored, prescriptive coding-standards.md that prevents
61
+ common AI and developer mistakes.
62
+ </objective>
63
+
64
+ <artifacts>
65
+ .docs/wiki/system-wide/coding-standards.md
66
+ </artifacts>
67
+ </output>
68
+
69
+ <process>
70
+ Execute the init-coding-standards workflow from
71
+ `@~/.claude/agile-context-engineering/workflows/init-coding-standards.xml` end-to-end.
72
+ Preserve all workflow gates (validation, approvals, commits).
73
+ </process>
74
+
75
+ <next-steps>
76
+ **After this command:**
77
+ - `/ace:map-system` — Map codebase structure and architecture
78
+ - `/ace:help` — Check project initialization status and next steps
79
+ - Review and edit `.docs/wiki/system-wide/coding-standards.md` anytime
80
+ </next-steps>
81
+
82
+ </command>
83
+ ```
@@ -0,0 +1,156 @@
1
+ ---
2
+ name: ace:map-story
3
+ description: Update living knowledge docs — either after a story implementation (git-based) or for existing undocumented code (file-based, called by map-subsystem)
4
+ argument-hint: "story-context='.ace/artifacts/...' commits=3 | files='a.ts,b.ts' module-name='User Management' subsystem-name='api'"
5
+ allowed-tools:
6
+ - Read
7
+ - Bash
8
+ - Glob
9
+ - Grep
10
+ - Write
11
+ - Edit
12
+ - Task
13
+ - AskUserQuestion
14
+ ---
15
+
16
+ ```xml
17
+ <command>
18
+
19
+ <execution-time>
20
+ <mode name="story" invoked-by="user">
21
+ <trigger>After a story is implemented and tested</trigger>
22
+ <trigger>Analyzes git changes (diff) to determine what was built</trigger>
23
+ <trigger>Reads story artifacts for intent context</trigger>
24
+ <trigger>Detects affected subsystem(s) from changed file paths</trigger>
25
+ <trigger>Creates or updates living knowledge docs to reflect the CURRENT system state</trigger>
26
+ </mode>
27
+ <mode name="file" invoked-by="map-subsystem Step 8.7">
28
+ <trigger>Called automatically during subsystem mapping</trigger>
29
+ <trigger>Receives a curated file list + module metadata from module-discovery</trigger>
30
+ <trigger>Documents existing undocumented code — no git diff needed</trigger>
31
+ <trigger>Receives pre-curated existing documentation as additional context</trigger>
32
+ </mode>
33
+ <use-when mode="story">
34
+ <condition>You just finished implementing and testing a story</condition>
35
+ <condition>You want to update docs to reflect recent code changes</condition>
36
+ <condition>You want to capture decisions and patterns from a recent implementation</condition>
37
+ </use-when>
38
+ <use-when mode="file">
39
+ <condition>/ace:map-subsystem — for each module row in module-discovery.md</condition>
40
+ </use-when>
41
+ </execution-time>
42
+
43
+ <input>
44
+ <flags>
45
+ </flags>
46
+
47
+ <parameters>
48
+ <mode-detection>
49
+ <rule>If `files` is provided -> file mode</rule>
50
+ <rule>If `story-context` is provided -> story mode</rule>
51
+ <rule>If neither is provided -> story mode (staged + unstaged changes)</rule>
52
+ </mode-detection>
53
+
54
+ <story-mode>
55
+ <required></required>
56
+ <optional>
57
+ <param name="story-context" type="path">
58
+ Path to story artifacts folder (in `.ace/artifacts/` or legacy `documentation/features/`).
59
+ Used to understand WHAT the story intended to build.
60
+ If not provided, the agent relies solely on git changes.
61
+ </param>
62
+ <param name="commits" type="number | comma-separated commit SHAs">
63
+ Specifies which commits to analyze.
64
+ As a number: analyze the N most recent commits (e.g., commits=3).
65
+ As commit SHAs: analyze specific commits (e.g., commits='abc123,def456').
66
+ When not provided: analyze staged + unstaged changes (git diff + git diff --cached).
67
+ </param>
68
+ <param name="tech-debt" type="text | path">
69
+ Tech debt items discovered during code review.
70
+ Can be plain text, YAML, or a path to a file containing the items.
71
+ When provided, the wiki mapper integrates these items into the
72
+ relevant subsystem wiki docs (## Tech Debt sections) AND updates
73
+ the system-wide tech-debt-index.md.
74
+ </param>
75
+ </optional>
76
+ </story-mode>
77
+
78
+ <file-mode>
79
+ <required>
80
+ <param name="files" type="comma-separated paths">
81
+ Source code files to document. These are the files discovered by
82
+ module-discovery (Step 8.5) that together form one coherent module.
83
+ </param>
84
+ <param name="module-name" type="text">
85
+ Human-readable name of the module (e.g., "User Management", "Repository Pattern").
86
+ </param>
87
+ <param name="subsystem-name" type="text">
88
+ Name of the subsystem this module belongs to.
89
+ </param>
90
+ </required>
91
+ <optional>
92
+ <param name="existing-docs" type="comma-separated paths or directories">
93
+ Pre-existing documentation relevant to this module. Accepts file paths,
94
+ directory paths, or a mix of both. When a directory is provided,
95
+ recursively discover all files within it (including nested subdirectories).
96
+ Typically curated by module-discovery's synthesis agent or passed through
97
+ from map-subsystem. Read these FIRST for additional context about intent,
98
+ decisions, and history. The actual source code remains the source of truth;
99
+ existing docs provide the WHY.
100
+ </param>
101
+ </optional>
102
+ </file-mode>
103
+ </parameters>
104
+ </input>
105
+
106
+ <execution-context>
107
+ <map-story-workflow>@~/.claude/agile-context-engineering/workflows/map-story.xml</map-story-workflow>
108
+
109
+ <system>@~/.claude/agile-context-engineering/templates/wiki/system.xml</system>
110
+ <system-cross-cutting>@~/.claude/agile-context-engineering/templates/wiki/system-cross-cutting.xml</system-cross-cutting>
111
+ <pattern>@~/.claude/agile-context-engineering/templates/wiki/pattern.xml</pattern>
112
+ <guide>@~/.claude/agile-context-engineering/templates/wiki/guide.xml</guide>
113
+ <decizions>@~/.claude/agile-context-engineering/templates/wiki/decizions.xml</decizions>
114
+ <tech-debt-index>@~/.claude/agile-context-engineering/templates/wiki/tech-debt-index.xml</tech-debt-index>
115
+
116
+ <questioning>@~/.claude/agile-context-engineering/utils/questioning.xml</questioning>
117
+ <ui-formatting>@~/.claude/agile-context-engineering/utils/ui-formatting.md</ui-formatting>
118
+ </execution-context>
119
+
120
+ <output>
121
+ <objective>
122
+ Read the provided source code files (and any existing docs for context),
123
+ then autonomously create or update living knowledge documents.
124
+ One call may produce multiple docs across different categories
125
+ (systems/, patterns/, cross-cutting/, guides/, decisions/).
126
+
127
+ In story mode: analyze git changes to determine what was built, detect
128
+ affected subsystem(s), and update/create docs to reflect the CURRENT system state.
129
+
130
+ In file mode: document existing undocumented code from the provided file list.
131
+ </objective>
132
+
133
+ <artifacts>
134
+ .docs/wiki/subsystems/[subsystem-name]/systems/[system-name].md
135
+ .docs/wiki/subsystems/[subsystem-name]/patterns/[pattern-name].md
136
+ .docs/wiki/subsystems/[subsystem-name]/cross-cutting/[concern-name].md
137
+ .docs/wiki/subsystems/[subsystem-name]/guides/[guide-name].md
138
+ .docs/wiki/subsystems/[subsystem-name]/decisions/[decision-name].md
139
+ </artifacts>
140
+ </output>
141
+
142
+ <process>
143
+ Execute the map-story workflow from
144
+ `@~/.claude/agile-context-engineering/workflows/map-story.xml` end-to-end.
145
+ Preserve all workflow gates (validation, user questions, commits).
146
+ </process>
147
+
148
+ <next-steps>
149
+ <step>/clear first for a fresh context window</step>
150
+ <step>/ace:map-story — document another story or module</step>
151
+ <step>/ace:map-subsystem [subsystem] — map or refresh an entire subsystem</step>
152
+ <step>Review and edit files in .docs/wiki/subsystems/[subsystem-name]/</step>
153
+ </next-steps>
154
+
155
+ </command>
156
+ ```
@@ -0,0 +1,138 @@
1
+ ---
2
+ name: ace:map-subsystem
3
+ description: Map a subsystem's structure, architecture, and knowledge docs into .docs/wiki/subsystems/[name]/
4
+ argument-hint: "subsystem='src/api' (or subsystem name) existing-docs=comma separated paths | directory"
5
+ allowed-tools:
6
+ - Read
7
+ - Bash
8
+ - Glob
9
+ - Grep
10
+ - Write
11
+ - Task
12
+ - AskUserQuestion
13
+ ---
14
+
15
+ ```xml
16
+ <command>
17
+
18
+ <execution-time>
19
+ <runs-after>
20
+ <trigger>After /ace:map-system — drill into individual subsystems</trigger>
21
+ <trigger>Anytime to refresh an existing subsystem's wiki documents</trigger>
22
+ <trigger>When a new subsystem is added and needs to be documented</trigger>
23
+ </runs-after>
24
+ <use-when>
25
+ <condition>A subsystem has not yet been documented in `.docs/wiki/subsystems/`</condition>
26
+ <condition>An existing subsystem's docs are stale after a significant refactor</condition>
27
+ <condition>You want a deep-dive view of a specific subsystem's internals (components, flows, data)</condition>
28
+ </use-when>
29
+ </execution-time>
30
+
31
+ <input>
32
+ <flags>
33
+ </flags>
34
+
35
+ <parameters>
36
+ <required>
37
+ <param name="subsystem" type="path | text">
38
+ Path to the subsystem (e.g., `src/api`) or its name.
39
+ If not provided, pause execution and ask the user for it.
40
+ If provided but ambiguous, or not found in the codebase, ask clarifying questions.
41
+ </param>
42
+ </required>
43
+
44
+ <optional>
45
+ <param name="existing-docs" type="comma-separated paths or directories">
46
+ Pre-existing documentation relevant to this subsystem. Accepts file paths,
47
+ directory paths, or a mix of both. When a directory is provided, recursively
48
+ discover all files within it (including nested subdirectories).
49
+ All resolved file paths are passed through to every map-story invocation
50
+ (file mode) alongside any per-module docs discovered during module-discovery.
51
+ Use this when the caller already knows about documentation that should
52
+ inform knowledge-doc generation.
53
+ </param>
54
+ </optional>
55
+ </parameters>
56
+ </input>
57
+
58
+ <execution-context>
59
+ <map-subsystem-workflow>@~/.claude/agile-context-engineering/workflows/map-subsystem.xml</map-subsystem-workflow>
60
+ <subsystem-structure-template>@~/.claude/agile-context-engineering/templates/wiki/subsystem-structure.xml</subsystem-structure-template>
61
+ <subsystem-architecture-template>@~/.claude/agile-context-engineering/templates/wiki/subsystem-architecture.xml</subsystem-architecture-template>
62
+ <module-discovery-template>@~/.claude/agile-context-engineering/templates/wiki/module-discovery.xml</module-discovery-template>
63
+ <map-story-workflow>@~/.claude/agile-context-engineering/workflows/map-story.xml</map-story-workflow>
64
+ <system-template>@~/.claude/agile-context-engineering/templates/wiki/system.xml</system-template>
65
+ <pattern-template>@~/.claude/agile-context-engineering/templates/wiki/pattern.xml</pattern-template>
66
+ <cross-cutting-template>@~/.claude/agile-context-engineering/templates/wiki/system-cross-cutting.xml</cross-cutting-template>
67
+ <guide-template>@~/.claude/agile-context-engineering/templates/wiki/guide.xml</guide-template>
68
+ <decisions-template>@~/.claude/agile-context-engineering/templates/wiki/decizions.xml</decisions-template>
69
+ <questioning>@~/.claude/agile-context-engineering/utils/questioning.xml</questioning>
70
+ <ui-formatting>@~/.claude/agile-context-engineering/utils/ui-formatting.md</ui-formatting>
71
+ </execution-context>
72
+
73
+ <output>
74
+ <objective>
75
+ Resolve the target subsystem, load system-wide wiki context, and determine whether
76
+ to create, update, or recreate per-subsystem wiki documents. Then:
77
+
78
+ 1. Spawn ace-wiki-mapper agents to produce structure and architecture documents.
79
+ 2. Update system-structure.md if this subsystem was not previously listed there.
80
+ 3. Update the subsystem responsibility matrix in system-architecture.md if missing.
81
+ 4. Run module discovery — trace E2E flows, identify patterns, find cross-cutting
82
+ concerns by reading actual source code. Produce module-discovery.md artifact.
83
+ 5. For EACH discovered module, run map-story in file mode to create or update
84
+ knowledge documentation (systems/, patterns/, cross-cutting/, guides/, decisions/).
85
+ </objective>
86
+
87
+ <artifacts>
88
+ - .docs/wiki/subsystems/[subsystem-name]/structure.md
89
+ - .docs/wiki/subsystems/[subsystem-name]/architecture.md
90
+ - .docs/wiki/subsystems/[subsystem-name]/systems/*.md (created/updated by map-story)
91
+ - .docs/wiki/subsystems/[subsystem-name]/patterns/*.md (created/updated by map-story)
92
+ - .docs/wiki/subsystems/[subsystem-name]/cross-cutting/*.md (created/updated by map-story)
93
+ - .docs/wiki/subsystems/[subsystem-name]/guides/*.md (created/updated by map-story)
94
+ - .docs/wiki/subsystems/[subsystem-name]/decisions/*.md (created/updated by map-story)
95
+ - .ace/artifacts/subsystems/[subsystem-name]/module-discovery/module-discovery.md
96
+ - .ace/artifacts/subsystems/[subsystem-name]/module-discovery/existing-docs-inventory.md (if existing-docs directory provided)
97
+ - .docs/wiki/system-wide/system-structure.md (subsystem entry added if new)
98
+ - .docs/wiki/system-wide/system-architecture.md (subsystem responsibility matrix updated if missing)
99
+ </artifacts>
100
+ </output>
101
+
102
+ <process>
103
+ Execute the map-subsystem workflow from
104
+ `@~/.claude/agile-context-engineering/workflows/map-subsystem.xml` end-to-end.
105
+ Preserve all workflow gates (validation, user questions, commits).
106
+
107
+ The workflow has 13 steps:
108
+ 1-5: Setup, context loading, subsystem resolution, document triage, directory creation
109
+ 6-8: Structure + architecture agents (parallel) + collect results
110
+ 9: Update system-wide docs (system-structure.md, system-architecture.md)
111
+ 10: Module discovery (3 parallel discovery agents + 1 synthesis agent)
112
+ 11: Knowledge documentation — run map-story for EACH discovered module (sequential)
113
+ 12: Verify and commit all documents
114
+ 13: Completion report
115
+
116
+ Steps 10-11 are CRITICAL — they produce the knowledge docs (systems/, patterns/,
117
+ cross-cutting/, guides/, decisions/) that AI agents need for future implementations.
118
+ Do NOT skip them.
119
+ </process>
120
+
121
+ <next-steps>
122
+ **After this command, `/clear` first for a fresh context window, then:**
123
+
124
+ For each subsystem found and defined in the Subsystem Responsibility Matrix,
125
+ suggest a `/ace:map-subsystem` command. Example:
126
+ - `/ace:map-subsystem subsystem="src/api"` — Map the API subsystem
127
+ - `/ace:map-subsystem subsystem="src/auth"` — Map the Auth subsystem
128
+ - `/ace:map-subsystem subsystem="src/db"` — Map the DB subsystem
129
+ (list one per subsystem discovered during this command's execution)
130
+
131
+ Also suggest:
132
+ - `/ace:init-coding-standards` — Define prescriptive coding standards
133
+ - `/ace:help` — Check project initialization status and next steps
134
+ - Review and edit files in `.docs/wiki/system-wide/` anytime
135
+ </next-steps>
136
+
137
+ </command>
138
+ ```
@@ -0,0 +1,92 @@
1
+ ---
2
+ name: ace: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
+ allowed-tools:
6
+ - Read
7
+ - Bash
8
+ - Glob
9
+ - Grep
10
+ - Write
11
+ - Task
12
+ - AskUserQuestion
13
+ ---
14
+
15
+ ```xml
16
+ <command>
17
+
18
+ <execution-time>
19
+ <runs-after>
20
+ <trigger>Before /ace:help (brownfield codebases) — understand existing code first</trigger>
21
+ <trigger>After /ace:help (greenfield codebases) — document architecture decisions</trigger>
22
+ <trigger>Anytime to refresh system-wide wiki documents</trigger>
23
+ </runs-after>
24
+ <use-when>
25
+ <condition>Onboarding to an existing codebase (brownfield — analyzes code automatically)</condition>
26
+ <condition>Starting a new project and need to document architecture decisions (greenfield — interviews you)</condition>
27
+ <condition>System-wide documents are stale or missing</condition>
28
+ <condition>After major refactoring that changed subsystem boundaries or tech stack</condition>
29
+ </use-when>
30
+ </execution-time>
31
+
32
+ <input>
33
+ <flags>
34
+ </flags>
35
+
36
+ <parameters>
37
+ <required>
38
+ </required>
39
+
40
+ <optional>
41
+ <param name="references" type="file | text">
42
+ Existing architecture docs, ADRs, or design notes
43
+ to consider alongside the codebase analysis. Absorbed before analysis begins.
44
+ </param>
45
+ </optional>
46
+ </parameters>
47
+ </input>
48
+
49
+ <execution-context>
50
+ <map-system-workflow>@~/.claude/agile-context-engineering/workflows/map-system.xml</map-system-workflow>
51
+ <system-structure-template>@~/.claude/agile-context-engineering/templates/wiki/system-structure.xml</system-structure-template>
52
+ <system-architecture-template>@~/.claude/agile-context-engineering/templates/wiki/system-architecture.xml</system-architecture-template>
53
+ <testing-framework-template>@~/.claude/agile-context-engineering/templates/wiki/testing-framework.xml</testing-framework-template>
54
+ <wiki-readme-template>@~/.claude/agile-context-engineering/templates/wiki/wiki-readme.xml</wiki-readme-template>
55
+ <questioning>@~/.claude/agile-context-engineering/utils/questioning.xml</questioning>
56
+ <ui-formatting>@~/.claude/agile-context-engineering/utils/ui-formatting.md</ui-formatting>
57
+ </execution-context>
58
+
59
+ <output>
60
+ <objective>
61
+ Detect brownfield/greenfield status and existing wiki state. For each system-wide
62
+ document (structure, architecture, testing), determine whether to create, update,
63
+ recreate, scaffold, or skip. Spawn ace-wiki-mapper agents to produce documents.
64
+ For greenfield architecture, conduct deep questioning before generating.
65
+ Add CLAUDE.md instructions to keep wiki current with future code changes.
66
+ </objective>
67
+
68
+ <artifacts>
69
+ - .docs/wiki/wiki-readme.md (created if not already present)
70
+ - .docs/wiki/system-wide/system-structure.md
71
+ - .docs/wiki/system-wide/system-architecture.md
72
+ - .docs/wiki/system-wide/testing-framework.md
73
+ - CLAUDE.md (wiki maintenance instructions appended)
74
+ </artifacts>
75
+ </output>
76
+
77
+ <process>
78
+ Execute the map-system workflow from
79
+ `@~/.claude/agile-context-engineering/workflows/map-system.xml` end-to-end.
80
+ Preserve all workflow gates (validation, user questions, commits).
81
+ </process>
82
+
83
+ <next-steps>
84
+ **After this command, `/clear` first for a fresh context window, then:**
85
+ - `/ace:map-subsystems` — Map individual subsystem internals (structure, dependencies)
86
+ - `/ace:init-coding-standards` — Define prescriptive coding standards
87
+ - `/ace:help` — Check project initialization status and next steps
88
+ - Review and edit files in `.docs/wiki/system-wide/` anytime
89
+ </next-steps>
90
+
91
+ </command>
92
+ ```
@@ -0,0 +1,83 @@
1
+ ---
2
+ name: ace:plan-backlog
3
+ description: Create or refine the product backlog through vision-aware questioning, wiki analysis, and guided epic/feature planning
4
+ argument-hint: "[optional: context='text, file, or URL with product description and suggested epics/features']"
5
+ allowed-tools:
6
+ - Read
7
+ - Bash
8
+ - Write
9
+ - Task
10
+ - AskUserQuestion
11
+ ---
12
+
13
+ ```xml
14
+ <command>
15
+
16
+ <execution-time>
17
+ <runs-after>
18
+ <trigger>After /ace:plan-product-vision — once the vision exists, plan what to build</trigger>
19
+ <trigger>After /ace:map-system — once architecture is mapped, leverage wiki context for richer backlog</trigger>
20
+ <trigger>Anytime — to create or refresh the product backlog</trigger>
21
+ </runs-after>
22
+ <use-when>
23
+ <condition>Product vision exists and you want to break it into epics and features</condition>
24
+ <condition>Starting implementation planning and need a structured backlog</condition>
25
+ <condition>Brownfield project where features need to be inventoried from existing code</condition>
26
+ <condition>Updating the backlog after scope changes or new discoveries</condition>
27
+ </use-when>
28
+ </execution-time>
29
+
30
+ <input>
31
+ <flags>
32
+ </flags>
33
+
34
+ <parameters>
35
+ <required>
36
+ </required>
37
+
38
+ <optional>
39
+ <param name="context" type="file | text">
40
+ Product description, suggested epics/features, PRD excerpts, or any
41
+ context to seed the backlog planning process. Will be absorbed and
42
+ refined through questioning, not used as-is.
43
+ </param>
44
+ </optional>
45
+ </parameters>
46
+ </input>
47
+
48
+ <execution-context>
49
+ <plan-backlog-workflow>@~/.claude/agile-context-engineering/workflows/plan-backlog.xml</plan-backlog-workflow>
50
+ <product-backlog-template>@~/.claude/agile-context-engineering/templates/product/product-backlog.xml</product-backlog-template>
51
+ <questioning>@~/.claude/agile-context-engineering/utils/questioning.xml</questioning>
52
+ <ui-formatting>@~/.claude/agile-context-engineering/utils/ui-formatting.md</ui-formatting>
53
+ </execution-context>
54
+
55
+ <output>
56
+ <objective>
57
+ Detect the project environment, load the product vision as the north-star input,
58
+ optionally analyze the wiki for existing capabilities and feature status,
59
+ optionally research the domain ecosystem for standard features,
60
+ absorb any user-provided context, conduct deep questioning to discover all
61
+ epics and features, and generate a comprehensive product-backlog.md.
62
+ </objective>
63
+
64
+ <artifacts>
65
+ .ace/artifacts/product/product-backlog.md
66
+ </artifacts>
67
+ </output>
68
+
69
+ <process>
70
+ Execute the plan-backlog workflow from
71
+ `@~/.claude/agile-context-engineering/workflows/plan-backlog.xml` end-to-end.
72
+ Preserve all workflow gates (validation, approvals, commits).
73
+ </process>
74
+
75
+ <next-steps>
76
+ **After this command:**
77
+ - `/ace:plan-feature E1` — Break an feature into detailed stories
78
+ - `/ace:help` — Check project initialization status
79
+ - `/ace:plan-product-vision` — Update the product vision if priorities shifted
80
+ </next-steps>
81
+
82
+ </command>
83
+ ```
@@ -0,0 +1,89 @@
1
+ ---
2
+ name: ace:plan-feature
3
+ description: Plan a feature through backlog-aware questioning, story decomposition, and guided feature specification
4
+ argument-hint: "[feature-id] [optional: context='text or file with feature description prompt']"
5
+ allowed-tools:
6
+ - Read
7
+ - Bash
8
+ - Write
9
+ - Task
10
+ - AskUserQuestion
11
+ ---
12
+
13
+ ```xml
14
+ <command>
15
+
16
+ <execution-time>
17
+ <runs-after>
18
+ <trigger>After /ace:plan-backlog — once the backlog exists, plan individual features</trigger>
19
+ <trigger>Anytime — to create or refine a feature and its story breakdown</trigger>
20
+ </runs-after>
21
+ <use-when>
22
+ <condition>Product backlog exists and you want to break a feature into stories</condition>
23
+ <condition>Starting feature-level planning and need to decompose into stories</condition>
24
+ <condition>Refining an existing feature with updated acceptance criteria or scope</condition>
25
+ <condition>Adding a new feature to an existing epic</condition>
26
+ </use-when>
27
+ </execution-time>
28
+
29
+ <input>
30
+ <flags>
31
+ </flags>
32
+
33
+ <parameters>
34
+ <required>
35
+ </required>
36
+
37
+ <optional>
38
+ <param name="feature-id" type="text">
39
+ Feature identifier from the product backlog (e.g., F3, #78).
40
+ If provided, locates existing feature for planning or refinement.
41
+ If omitted, presents the backlog for selection or allows creating
42
+ a new feature.
43
+ </param>
44
+ <param name="context" type="file | text">
45
+ Feature description, acceptance criteria, user stories, or any
46
+ context to seed the feature planning process. Will be absorbed and
47
+ refined through questioning, not used as-is.
48
+ </param>
49
+ </optional>
50
+ </parameters>
51
+ </input>
52
+
53
+ <execution-context>
54
+ <plan-feature-workflow>@~/.claude/agile-context-engineering/workflows/plan-feature.xml</plan-feature-workflow>
55
+ <feature-template>@~/.claude/agile-context-engineering/templates/product/feature.xml</feature-template>
56
+ <questioning>@~/.claude/agile-context-engineering/utils/questioning.xml</questioning>
57
+ <ui-formatting>@~/.claude/agile-context-engineering/utils/ui-formatting.md</ui-formatting>
58
+ </execution-context>
59
+
60
+ <output>
61
+ <objective>
62
+ Detect the project environment, load the product backlog and epic context,
63
+ absorb any user-provided feature description, conduct deep questioning to
64
+ define feature scope and acceptance criteria, decompose the feature into
65
+ stories, and generate feature and story artifact files.
66
+ Optionally create GitHub issues if github-project.enabled=true.
67
+ </objective>
68
+
69
+ <artifacts>
70
+ .ace/artifacts/product/<id-epic_name>/<id-feature_name>/<id-feature_name>.md
71
+ .ace/artifacts/product/<id-epic_name>/<id-feature_name>/<id-story_name>/<id-story_name>.md
72
+ </artifacts>
73
+ </output>
74
+
75
+ <process>
76
+ Execute the plan-feature workflow from
77
+ `@~/.claude/agile-context-engineering/workflows/plan-feature.xml` end-to-end.
78
+ Preserve all workflow gates (validation, approvals, commits).
79
+ </process>
80
+
81
+ <next-steps>
82
+ **After this command:**
83
+ - `/ace:plan-story story-id` — Plan a story
84
+ - `/ace:plan-feature feature-id` — Plan another feature
85
+ - `/ace:help` — Check project initialization status
86
+ </next-steps>
87
+
88
+ </command>
89
+ ```