agile-context-engineering 0.3.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 +10 -0
- package/CHANGELOG.md +7 -1
- package/LICENSE +51 -51
- package/README.md +330 -318
- 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-research-synthesizer.md +228 -228
- package/agents/ace-technical-application-architect.md +315 -315
- package/agents/ace-wiki-mapper.md +449 -445
- package/bin/install.js +605 -195
- package/hooks/ace-check-update.js +71 -62
- package/hooks/ace-statusline.js +107 -89
- package/hooks/hooks.json +14 -0
- package/package.json +7 -5
- package/shared/lib/ace-core.js +361 -0
- package/shared/lib/ace-core.test.js +308 -0
- package/shared/lib/ace-github.js +753 -0
- package/shared/lib/ace-story.js +400 -0
- package/shared/lib/ace-story.test.js +250 -0
- package/{agile-context-engineering → shared}/utils/questioning.xml +110 -110
- package/{agile-context-engineering → shared}/utils/ui-formatting.md +299 -299
- package/{commands/ace/execute-story.md → skills/execute-story/SKILL.md} +116 -138
- package/skills/execute-story/script.js +291 -0
- package/skills/execute-story/script.test.js +261 -0
- package/{agile-context-engineering/templates/product/story.xml → skills/execute-story/story-template.xml} +451 -451
- package/skills/execute-story/walkthrough-template.xml +255 -0
- package/{agile-context-engineering/workflows/execute-story.xml → skills/execute-story/workflow.xml} +1221 -1219
- package/skills/help/SKILL.md +71 -0
- package/skills/help/script.js +315 -0
- package/skills/help/script.test.js +183 -0
- package/{agile-context-engineering/workflows/help.xml → skills/help/workflow.xml} +544 -533
- package/{commands/ace/init-coding-standards.md → skills/init-coding-standards/SKILL.md} +91 -83
- package/{agile-context-engineering/templates/wiki/coding-standards.xml → skills/init-coding-standards/coding-standards-template.xml} +531 -531
- package/skills/init-coding-standards/script.js +50 -0
- package/skills/init-coding-standards/script.test.js +70 -0
- package/{agile-context-engineering/workflows/init-coding-standards.xml → skills/init-coding-standards/workflow.xml} +381 -386
- package/skills/map-cross-cutting/SKILL.md +126 -0
- package/{agile-context-engineering/templates/wiki → skills/map-cross-cutting}/system-cross-cutting.xml +197 -197
- package/skills/map-cross-cutting/workflow.xml +330 -0
- package/skills/map-guide/SKILL.md +126 -0
- package/{agile-context-engineering/templates/wiki → skills/map-guide}/guide.xml +137 -137
- package/skills/map-guide/workflow.xml +320 -0
- package/skills/map-pattern/SKILL.md +125 -0
- package/{agile-context-engineering/templates/wiki → skills/map-pattern}/pattern.xml +159 -159
- package/skills/map-pattern/workflow.xml +331 -0
- package/{commands/ace/map-story.md → skills/map-story/SKILL.md} +180 -165
- package/{agile-context-engineering/templates/wiki → skills/map-story/templates}/decizions.xml +115 -115
- package/skills/map-story/templates/guide.xml +137 -0
- package/skills/map-story/templates/pattern.xml +159 -0
- package/skills/map-story/templates/system-cross-cutting.xml +197 -0
- package/{agile-context-engineering/templates/wiki → skills/map-story/templates}/system.xml +381 -381
- package/{agile-context-engineering/templates/wiki → skills/map-story/templates}/tech-debt-index.xml +125 -125
- package/{agile-context-engineering/templates/wiki → skills/map-story/templates}/walkthrough.xml +255 -255
- package/{agile-context-engineering/workflows/map-story.xml → skills/map-story/workflow.xml} +1046 -1046
- package/{commands/ace/map-subsystem.md → skills/map-subsystem/SKILL.md} +155 -140
- package/skills/map-subsystem/script.js +51 -0
- package/skills/map-subsystem/script.test.js +68 -0
- package/skills/map-subsystem/templates/decizions.xml +115 -0
- package/skills/map-subsystem/templates/guide.xml +137 -0
- package/{agile-context-engineering/templates/wiki → skills/map-subsystem/templates}/module-discovery.xml +174 -174
- package/skills/map-subsystem/templates/pattern.xml +159 -0
- package/{agile-context-engineering/templates/wiki → skills/map-subsystem/templates}/subsystem-architecture.xml +343 -343
- package/{agile-context-engineering/templates/wiki → skills/map-subsystem/templates}/subsystem-structure.xml +234 -234
- package/skills/map-subsystem/templates/system-cross-cutting.xml +197 -0
- package/skills/map-subsystem/templates/system.xml +381 -0
- package/skills/map-subsystem/templates/walkthrough.xml +255 -0
- package/{agile-context-engineering/workflows/map-subsystem.xml → skills/map-subsystem/workflow.xml} +1173 -1178
- package/skills/map-sys-doc/SKILL.md +125 -0
- package/skills/map-sys-doc/system.xml +381 -0
- package/skills/map-sys-doc/workflow.xml +336 -0
- package/{commands/ace/map-system.md → skills/map-system/SKILL.md} +103 -92
- package/skills/map-system/script.js +75 -0
- package/skills/map-system/script.test.js +73 -0
- package/{agile-context-engineering/templates/wiki → skills/map-system/templates}/system-architecture.xml +254 -254
- package/{agile-context-engineering/templates/wiki → skills/map-system/templates}/system-structure.xml +177 -177
- package/{agile-context-engineering/templates/wiki → skills/map-system/templates}/testing-framework.xml +283 -283
- package/{agile-context-engineering/templates/wiki → skills/map-system/templates}/wiki-readme.xml +296 -296
- package/{agile-context-engineering/workflows/map-system.xml → skills/map-system/workflow.xml} +667 -672
- package/{commands/ace/map-walkthrough.md → skills/map-walkthrough/SKILL.md} +140 -127
- package/skills/map-walkthrough/walkthrough.xml +255 -0
- package/{agile-context-engineering/workflows/map-walkthrough.xml → skills/map-walkthrough/workflow.xml} +457 -457
- package/{commands/ace/plan-backlog.md → skills/plan-backlog/SKILL.md} +93 -83
- package/{agile-context-engineering/templates/product/product-backlog.xml → skills/plan-backlog/product-backlog-template.xml} +231 -231
- package/skills/plan-backlog/script.js +121 -0
- package/skills/plan-backlog/script.test.js +83 -0
- package/{agile-context-engineering/workflows/plan-backlog.xml → skills/plan-backlog/workflow.xml} +1348 -1356
- package/{commands/ace/plan-feature.md → skills/plan-feature/SKILL.md} +99 -89
- package/{agile-context-engineering/templates/product/feature.xml → skills/plan-feature/feature-template.xml} +361 -361
- package/skills/plan-feature/script.js +131 -0
- package/skills/plan-feature/script.test.js +80 -0
- package/{agile-context-engineering/workflows/plan-feature.xml → skills/plan-feature/workflow.xml} +1487 -1495
- package/{commands/ace/plan-product-vision.md → skills/plan-product-vision/SKILL.md} +91 -81
- package/{agile-context-engineering/templates/product/product-vision.xml → skills/plan-product-vision/product-vision-template.xml} +227 -227
- package/skills/plan-product-vision/script.js +51 -0
- package/skills/plan-product-vision/script.test.js +69 -0
- package/{agile-context-engineering/workflows/plan-product-vision.xml → skills/plan-product-vision/workflow.xml} +337 -342
- package/{commands/ace/plan-story.md → skills/plan-story/SKILL.md} +139 -159
- package/skills/plan-story/script.js +295 -0
- package/skills/plan-story/script.test.js +240 -0
- package/skills/plan-story/story-template.xml +458 -0
- package/{agile-context-engineering/workflows/plan-story.xml → skills/plan-story/workflow.xml} +1301 -944
- package/{commands/ace/research-external-solution.md → skills/research-external-solution/SKILL.md} +120 -138
- package/{agile-context-engineering/templates/product/external-solution.xml → skills/research-external-solution/external-solution-template.xml} +832 -832
- package/skills/research-external-solution/script.js +229 -0
- package/skills/research-external-solution/script.test.js +134 -0
- package/{agile-context-engineering/workflows/research-external-solution.xml → skills/research-external-solution/workflow.xml} +657 -659
- package/{commands/ace/research-integration-solution.md → skills/research-integration-solution/SKILL.md} +121 -135
- package/{agile-context-engineering/templates/product/story-integration-solution.xml → skills/research-integration-solution/integration-solution-template.xml} +1015 -1015
- package/skills/research-integration-solution/script.js +223 -0
- package/skills/research-integration-solution/script.test.js +134 -0
- package/{agile-context-engineering/workflows/research-integration-solution.xml → skills/research-integration-solution/workflow.xml} +711 -713
- package/{commands/ace/research-story-wiki.md → skills/research-story-wiki/SKILL.md} +101 -116
- package/skills/research-story-wiki/script.js +223 -0
- package/skills/research-story-wiki/script.test.js +138 -0
- package/{agile-context-engineering/templates/product/story-wiki.xml → skills/research-story-wiki/story-wiki-template.xml} +194 -194
- package/{agile-context-engineering/workflows/research-story-wiki.xml → skills/research-story-wiki/workflow.xml} +473 -475
- package/{commands/ace/research-technical-solution.md → skills/research-technical-solution/SKILL.md} +131 -147
- package/skills/research-technical-solution/script.js +223 -0
- package/skills/research-technical-solution/script.test.js +134 -0
- package/{agile-context-engineering/templates/product/story-technical-solution.xml → skills/research-technical-solution/technical-solution-template.xml} +1025 -1025
- package/{agile-context-engineering/workflows/research-technical-solution.xml → skills/research-technical-solution/workflow.xml} +761 -763
- package/{commands/ace/review-story.md → skills/review-story/SKILL.md} +99 -109
- package/skills/review-story/script.js +249 -0
- package/skills/review-story/script.test.js +169 -0
- package/skills/review-story/story-template.xml +451 -0
- package/{agile-context-engineering/workflows/review-story.xml → skills/review-story/workflow.xml} +279 -281
- package/{commands/ace/update.md → skills/update/SKILL.md} +65 -56
- package/{agile-context-engineering/workflows/update.xml → skills/update/workflow.xml} +33 -18
- package/agile-context-engineering/src/ace-tools.js +0 -2881
- package/agile-context-engineering/src/ace-tools.test.js +0 -1089
- package/agile-context-engineering/templates/_command.md +0 -54
- package/agile-context-engineering/templates/_workflow.xml +0 -17
- package/agile-context-engineering/templates/config.json +0 -0
- package/agile-context-engineering/templates/product/integration-solution.xml +0 -0
- package/commands/ace/help.md +0 -93
|
@@ -0,0 +1,331 @@
|
|
|
1
|
+
<workflow>
|
|
2
|
+
|
|
3
|
+
<purpose>
|
|
4
|
+
Create or update a pattern document in
|
|
5
|
+
`.docs/wiki/subsystems/[subsystem-name]/patterns/`.
|
|
6
|
+
|
|
7
|
+
A pattern doc describes a reusable structural approach used by 2+ implementations.
|
|
8
|
+
It is the document an AI agent reads to ensure new code follows established
|
|
9
|
+
conventions — structure diagram, how it works, how to apply, current implementations.
|
|
10
|
+
|
|
11
|
+
This workflow is executed directly — NO sub-agents are spawned.
|
|
12
|
+
The executing agent does everything: finding implementations, extracting the
|
|
13
|
+
abstract pattern, and writing the document.
|
|
14
|
+
</purpose>
|
|
15
|
+
|
|
16
|
+
<mandatory-context>
|
|
17
|
+
All supporting resource files are auto-loaded in the skill prompt above. Do NOT re-read them.
|
|
18
|
+
Also read any document or text passed as parameter ($ARGUMENTS) in the invoking command.
|
|
19
|
+
</mandatory-context>
|
|
20
|
+
|
|
21
|
+
<process>
|
|
22
|
+
|
|
23
|
+
<!-- ══════════════════════════════════════════════════════════════════ -->
|
|
24
|
+
<!-- STEP 1: SETUP AND VALIDATE -->
|
|
25
|
+
<!-- ══════════════════════════════════════════════════════════════════ -->
|
|
26
|
+
|
|
27
|
+
<step name="setup" order="1">
|
|
28
|
+
|
|
29
|
+
<substep order="1.1" name="display-banner">
|
|
30
|
+
Display stage banner:
|
|
31
|
+
|
|
32
|
+
```
|
|
33
|
+
╔══════════════════════════════════════════════════╗
|
|
34
|
+
║ ACE > Map Pattern ║
|
|
35
|
+
╚══════════════════════════════════════════════════╝
|
|
36
|
+
```
|
|
37
|
+
</substep>
|
|
38
|
+
|
|
39
|
+
<substep order="1.2" name="parse-and-validate">
|
|
40
|
+
Parse $ARGUMENTS for: `text`, `subsystem`, `story-context`, `commits`.
|
|
41
|
+
|
|
42
|
+
**If `text` is missing:** Ask the user:
|
|
43
|
+
- header: "Pattern"
|
|
44
|
+
- question: "Describe the pattern to document — what structural approach is reused?\nE.g., 'Template Method pattern used by all drawing paths'"
|
|
45
|
+
|
|
46
|
+
**If `subsystem` is missing:** Ask the user:
|
|
47
|
+
- header: "Pattern"
|
|
48
|
+
- question: "Which subsystem does this pattern belong to?"
|
|
49
|
+
</substep>
|
|
50
|
+
|
|
51
|
+
<substep order="1.3" name="resolve-subsystem">
|
|
52
|
+
Resolve the subsystem. Check if `.docs/wiki/subsystems/[subsystem-name]/` exists.
|
|
53
|
+
|
|
54
|
+
**If not found:**
|
|
55
|
+
```
|
|
56
|
+
! No wiki found for subsystem "[subsystem]".
|
|
57
|
+
Run /ace:map-subsystem first to create the subsystem wiki.
|
|
58
|
+
```
|
|
59
|
+
Exit.
|
|
60
|
+
|
|
61
|
+
Ensure patterns directory exists:
|
|
62
|
+
```bash
|
|
63
|
+
mkdir -p .docs/wiki/subsystems/[subsystem_name]/patterns
|
|
64
|
+
```
|
|
65
|
+
</substep>
|
|
66
|
+
|
|
67
|
+
Display:
|
|
68
|
+
```
|
|
69
|
+
i Pattern: [text description]
|
|
70
|
+
Subsystem: [subsystem-name]
|
|
71
|
+
Story context: [path/issue, or "none"]
|
|
72
|
+
Commits: [value, or "search codebase directly"]
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
Continue to step 2.
|
|
76
|
+
</step>
|
|
77
|
+
|
|
78
|
+
<!-- ══════════════════════════════════════════════════════════════════ -->
|
|
79
|
+
<!-- STEP 2: CHECK FOR EXISTING PATTERN DOC -->
|
|
80
|
+
<!-- ══════════════════════════════════════════════════════════════════ -->
|
|
81
|
+
|
|
82
|
+
<step name="check-existing" order="2">
|
|
83
|
+
|
|
84
|
+
Scan for existing pattern docs:
|
|
85
|
+
|
|
86
|
+
```
|
|
87
|
+
Glob(pattern='*.md', path='.docs/wiki/subsystems/[subsystem_name]/patterns')
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
**If existing pattern docs found:**
|
|
91
|
+
Read their titles and "The Pattern" sections. Check if any covers the same
|
|
92
|
+
or overlapping structural approach.
|
|
93
|
+
|
|
94
|
+
**If overlap detected:**
|
|
95
|
+
Use AskUserQuestion:
|
|
96
|
+
- header: "Pattern"
|
|
97
|
+
- question: "An existing pattern doc may cover a similar approach:\n\n- `[existing-file]`: [title]\n\nShould I update the existing doc or create a new one?"
|
|
98
|
+
- options:
|
|
99
|
+
- "Update existing" — set MODE = update, set TARGET_FILE = existing path
|
|
100
|
+
- "Create new" — set MODE = create
|
|
101
|
+
|
|
102
|
+
**If no overlap or no existing pattern docs:** Set MODE = create.
|
|
103
|
+
|
|
104
|
+
**If MODE = create:**
|
|
105
|
+
Derive file name from pattern name in kebab-case.
|
|
106
|
+
Set TARGET_FILE = `.docs/wiki/subsystems/[subsystem_name]/patterns/[pattern-name].md`
|
|
107
|
+
|
|
108
|
+
Continue to step 3.
|
|
109
|
+
</step>
|
|
110
|
+
|
|
111
|
+
<!-- ══════════════════════════════════════════════════════════════════ -->
|
|
112
|
+
<!-- STEP 3: GATHER CODE CONTEXT AND FIND IMPLEMENTATIONS -->
|
|
113
|
+
<!-- ══════════════════════════════════════════════════════════════════ -->
|
|
114
|
+
|
|
115
|
+
<step name="gather-context" order="3">
|
|
116
|
+
|
|
117
|
+
<substep order="3.1" name="read-story-context">
|
|
118
|
+
<variant condition="story-context is a path">
|
|
119
|
+
Read all markdown files in the story artifacts folder.
|
|
120
|
+
Extract: what pattern was used, what was implemented.
|
|
121
|
+
</variant>
|
|
122
|
+
|
|
123
|
+
<variant condition="story-context is a GitHub issue">
|
|
124
|
+
```bash
|
|
125
|
+
gh issue view [issue-number] --json title,body,labels,comments
|
|
126
|
+
```
|
|
127
|
+
Extract context about the pattern.
|
|
128
|
+
</variant>
|
|
129
|
+
|
|
130
|
+
<variant condition="no story-context">
|
|
131
|
+
Skip — discover pattern from codebase only.
|
|
132
|
+
</variant>
|
|
133
|
+
</substep>
|
|
134
|
+
|
|
135
|
+
<substep order="3.2" name="find-all-implementations">
|
|
136
|
+
<variant condition="commits provided as number N">
|
|
137
|
+
```bash
|
|
138
|
+
git diff --name-only HEAD~[N]..HEAD
|
|
139
|
+
```
|
|
140
|
+
Start with changed files. Read them to identify the pattern.
|
|
141
|
+
Then search the full codebase for other implementations of the same pattern.
|
|
142
|
+
</variant>
|
|
143
|
+
|
|
144
|
+
<variant condition="commits provided as SHAs">
|
|
145
|
+
```bash
|
|
146
|
+
git diff --name-only [first-sha]^..[last-sha]
|
|
147
|
+
```
|
|
148
|
+
Start with changed files. Read them to identify the pattern.
|
|
149
|
+
Then search the full codebase for other implementations.
|
|
150
|
+
</variant>
|
|
151
|
+
|
|
152
|
+
<variant condition="no commits — search codebase directly">
|
|
153
|
+
Use the `text` description to find the pattern and its implementations:
|
|
154
|
+
|
|
155
|
+
1. Read the subsystem's structure.md and architecture.md for orientation
|
|
156
|
+
2. Grep for keywords from the text description (base classes, interfaces, etc.)
|
|
157
|
+
3. Find the abstract base/interface that defines the pattern
|
|
158
|
+
4. Find ALL concrete implementations (use Grep for extends/implements)
|
|
159
|
+
5. Read each implementation to understand the pattern mechanics
|
|
160
|
+
</variant>
|
|
161
|
+
|
|
162
|
+
**A pattern requires 2+ implementations.** If only 1 found, ask the user:
|
|
163
|
+
- header: "Pattern"
|
|
164
|
+
- question: "I found only 1 implementation of this pattern. Patterns typically need 2+. Should I continue documenting it as a pattern, or is there another implementation I'm missing?"
|
|
165
|
+
</substep>
|
|
166
|
+
|
|
167
|
+
<substep order="3.3" name="extract-pattern-structure">
|
|
168
|
+
From the implementations, extract the abstract pattern:
|
|
169
|
+
|
|
170
|
+
1. What is the base class / interface contract?
|
|
171
|
+
2. What factory methods / abstract methods must be overridden?
|
|
172
|
+
3. What is the template method / orchestration flow?
|
|
173
|
+
4. What are the extension points?
|
|
174
|
+
5. What registrations/configurations are required?
|
|
175
|
+
6. What are the common gotchas across implementations?
|
|
176
|
+
|
|
177
|
+
Build a complete mental model of the pattern.
|
|
178
|
+
</substep>
|
|
179
|
+
|
|
180
|
+
Continue to step 4.
|
|
181
|
+
</step>
|
|
182
|
+
|
|
183
|
+
<!-- ══════════════════════════════════════════════════════════════════ -->
|
|
184
|
+
<!-- STEP 4: WRITE THE PATTERN DOC -->
|
|
185
|
+
<!-- ══════════════════════════════════════════════════════════════════ -->
|
|
186
|
+
|
|
187
|
+
<step name="write-doc" order="4">
|
|
188
|
+
|
|
189
|
+
Read ALL existing wiki docs under `.docs/wiki/subsystems/[subsystem_name]/`
|
|
190
|
+
for cross-referencing.
|
|
191
|
+
|
|
192
|
+
Follow the pattern template structure exactly.
|
|
193
|
+
|
|
194
|
+
<substep order="4.1" name="write-the-pattern">
|
|
195
|
+
- Title: "# [Pattern Name]"
|
|
196
|
+
- The Pattern: ONE paragraph — what it is, when to use it.
|
|
197
|
+
Name the GoF/industry pattern if applicable, then explain how it
|
|
198
|
+
manifests in THIS codebase. Not a textbook definition.
|
|
199
|
+
</substep>
|
|
200
|
+
|
|
201
|
+
<substep order="4.2" name="write-structure">
|
|
202
|
+
Build a mermaid classDiagram showing the pattern's structure.
|
|
203
|
+
Show the abstract/interface hierarchy with key method signatures.
|
|
204
|
+
Show the pattern skeleton — not every concrete implementation.
|
|
205
|
+
</substep>
|
|
206
|
+
|
|
207
|
+
<substep order="4.3" name="write-how-it-works">
|
|
208
|
+
Numbered steps tracing the pattern's execution flow.
|
|
209
|
+
Every step references actual code with `file:ClassName.method`.
|
|
210
|
+
Focus on mechanics an agent needs to understand.
|
|
211
|
+
</substep>
|
|
212
|
+
|
|
213
|
+
<substep order="4.4" name="write-how-to-apply">
|
|
214
|
+
The MOST ACTIONABLE section. Steps for creating a new instance:
|
|
215
|
+
- Which files to create
|
|
216
|
+
- Which registrations to add
|
|
217
|
+
- Which factories to update
|
|
218
|
+
- Reference existing implementations as "copy from" targets
|
|
219
|
+
</substep>
|
|
220
|
+
|
|
221
|
+
<substep order="4.5" name="write-current-implementations">
|
|
222
|
+
Complete list of ALL known implementations with file paths.
|
|
223
|
+
Agent uses this as a reference gallery.
|
|
224
|
+
</substep>
|
|
225
|
+
|
|
226
|
+
<substep order="4.6" name="write-gotchas">
|
|
227
|
+
Timing issues, naming conventions, registration requirements, common mistakes.
|
|
228
|
+
Anything an agent would get wrong on first attempt.
|
|
229
|
+
</substep>
|
|
230
|
+
|
|
231
|
+
<substep order="4.7" name="write-or-update">
|
|
232
|
+
**If MODE = create:** Write the complete document to TARGET_FILE.
|
|
233
|
+
**If MODE = update:** Read the existing doc, add new implementations,
|
|
234
|
+
update How to Apply if changed, add new gotchas. Write to TARGET_FILE.
|
|
235
|
+
</substep>
|
|
236
|
+
|
|
237
|
+
Continue to step 5.
|
|
238
|
+
</step>
|
|
239
|
+
|
|
240
|
+
<!-- ══════════════════════════════════════════════════════════════════ -->
|
|
241
|
+
<!-- STEP 5: VERIFY, COMMIT, AND REPORT -->
|
|
242
|
+
<!-- ══════════════════════════════════════════════════════════════════ -->
|
|
243
|
+
|
|
244
|
+
<step name="verify-and-report" order="5">
|
|
245
|
+
|
|
246
|
+
<substep order="5.1" name="quality-check">
|
|
247
|
+
Re-read TARGET_FILE and verify:
|
|
248
|
+
|
|
249
|
+
<verification-checklist>
|
|
250
|
+
<check>50+ lines of substantial content</check>
|
|
251
|
+
<check>"The Pattern" section present (ONE paragraph, codebase-specific)</check>
|
|
252
|
+
<check>Mermaid classDiagram present showing pattern structure</check>
|
|
253
|
+
<check>"How It Works" has numbered steps with code references</check>
|
|
254
|
+
<check>"How to Apply" is actionable with concrete steps and "copy from" targets</check>
|
|
255
|
+
<check>"Current Implementations" lists ALL known implementations with file paths</check>
|
|
256
|
+
<check>At least 2 implementations listed (pattern requires 2+)</check>
|
|
257
|
+
<check>"Gotchas" section present</check>
|
|
258
|
+
<check>Code references use `file:Symbol` format, not line numbers</check>
|
|
259
|
+
<check>No textbook definitions — pattern is codebase-specific</check>
|
|
260
|
+
<check>No filler phrases, no generic advice</check>
|
|
261
|
+
</verification-checklist>
|
|
262
|
+
|
|
263
|
+
Fix any failures by editing the document directly.
|
|
264
|
+
</substep>
|
|
265
|
+
|
|
266
|
+
<substep order="5.2" name="security-scan">
|
|
267
|
+
```
|
|
268
|
+
Grep(
|
|
269
|
+
pattern="(sk-[a-zA-Z0-9]{20,}|sk_live_|sk_test_|ghp_[a-zA-Z0-9]{36}|AKIA[A-Z0-9]{16}|-----BEGIN.*PRIVATE KEY)",
|
|
270
|
+
path="[TARGET_FILE]",
|
|
271
|
+
output_mode="content"
|
|
272
|
+
)
|
|
273
|
+
```
|
|
274
|
+
|
|
275
|
+
<variant condition="matches found">SECRETS_FOUND — alert user, do NOT commit.</variant>
|
|
276
|
+
<variant condition="no matches">CLEAN.</variant>
|
|
277
|
+
</substep>
|
|
278
|
+
|
|
279
|
+
<substep order="5.3" name="commit">
|
|
280
|
+
```bash
|
|
281
|
+
git add [TARGET_FILE]
|
|
282
|
+
git commit -m "docs([subsystem_name]): add pattern — [pattern-name]"
|
|
283
|
+
```
|
|
284
|
+
</substep>
|
|
285
|
+
|
|
286
|
+
<substep order="5.4" name="report">
|
|
287
|
+
Display:
|
|
288
|
+
|
|
289
|
+
```
|
|
290
|
+
╔══════════════════════════════════════════════════╗
|
|
291
|
+
║ ACE > Map Pattern > Complete ║
|
|
292
|
+
╚══════════════════════════════════════════════════╝
|
|
293
|
+
|
|
294
|
+
+ [TARGET_FILE] ([line count] lines)
|
|
295
|
+
|
|
296
|
+
Pattern: [text description]
|
|
297
|
+
Implementations found: [count]
|
|
298
|
+
Gotchas: [count]
|
|
299
|
+
|
|
300
|
+
Next > /clear first for a fresh context window, then:
|
|
301
|
+
|
|
302
|
+
/ace:map-pattern — create another pattern document
|
|
303
|
+
/ace:map-guide — create a guide that uses this pattern
|
|
304
|
+
/ace:map-sys-doc — document a system that uses this pattern
|
|
305
|
+
Review file at [TARGET_FILE]
|
|
306
|
+
```
|
|
307
|
+
</substep>
|
|
308
|
+
|
|
309
|
+
End workflow.
|
|
310
|
+
</step>
|
|
311
|
+
|
|
312
|
+
</process>
|
|
313
|
+
|
|
314
|
+
<success_criteria>
|
|
315
|
+
<criterion>Pattern description parsed and subsystem validated</criterion>
|
|
316
|
+
<criterion>All implementations discovered (from commits or codebase search)</criterion>
|
|
317
|
+
<criterion>At least 2 implementations found (pattern requires 2+)</criterion>
|
|
318
|
+
<criterion>Abstract pattern extracted from implementations</criterion>
|
|
319
|
+
<criterion>Existing pattern docs checked to avoid duplication (create vs update)</criterion>
|
|
320
|
+
<criterion>Pattern doc follows template structure from pattern.xml</criterion>
|
|
321
|
+
<criterion>Mermaid classDiagram present showing pattern structure</criterion>
|
|
322
|
+
<criterion>"How to Apply" is actionable with concrete steps and "copy from" targets</criterion>
|
|
323
|
+
<criterion>All current implementations listed with file paths</criterion>
|
|
324
|
+
<criterion>Gotchas section present with practical warnings</criterion>
|
|
325
|
+
<criterion>Code references use file:Symbol format, no line numbers</criterion>
|
|
326
|
+
<criterion>No textbook definitions — pattern is codebase-specific</criterion>
|
|
327
|
+
<criterion>No filler, no generic advice, no pseudocode</criterion>
|
|
328
|
+
<criterion>Security scan passed, document committed</criterion>
|
|
329
|
+
</success_criteria>
|
|
330
|
+
|
|
331
|
+
</workflow>
|