@jakkrichm/create-nexus-devflow 2.0.11 → 2.0.13
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/bin/create-nexus-devflow.js +15 -3
- package/lib/update.js +15 -1
- package/package.json +1 -1
- package/template/.agents/skills/70-release/SKILL.md +2 -0
- package/template/.agents/skills/ci/SKILL.md +25 -78
- package/template/.agents/skills/commit/SKILL.md +39 -43
- package/template/.agents/skills/debug/SKILL.md +43 -104
- package/template/.agents/skills/deploy/SKILL.md +37 -65
- package/template/.agents/skills/insight/SKILL.md +27 -116
- package/template/.agents/skills/preview/SKILL.md +24 -103
- package/template/.agents/skills/review/SKILL.md +53 -37
- package/template/.agents/skills/rollback/SKILL.md +1 -0
- package/template/.agents/skills/security-review/SKILL.md +44 -147
- package/template/.agents/skills/simplify/SKILL.md +48 -57
- package/template/.agents/skills/test/SKILL.md +63 -51
- package/template/.claude/skills/70-release/SKILL.md +2 -0
- package/template/.claude/skills/ci/SKILL.md +25 -78
- package/template/.claude/skills/commit/SKILL.md +39 -43
- package/template/.claude/skills/debug/SKILL.md +43 -104
- package/template/.claude/skills/deploy/SKILL.md +37 -65
- package/template/.claude/skills/insight/SKILL.md +27 -116
- package/template/.claude/skills/preview/SKILL.md +24 -103
- package/template/.claude/skills/review/SKILL.md +53 -37
- package/template/.claude/skills/rollback/SKILL.md +1 -0
- package/template/.claude/skills/security-review/SKILL.md +44 -147
- package/template/.claude/skills/simplify/SKILL.md +48 -57
- package/template/.claude/skills/test/SKILL.md +63 -51
- package/template/devflow/history/HISTORY.md +27 -0
- package/template/devflow/reference/running-id-contract.md +1 -1
- package/template/.agents/skills/9arm-skills/README.md +0 -51
- package/template/.agents/skills/9arm-skills/debug-mantra/SKILL.md +0 -86
- package/template/.agents/skills/9arm-skills/management-talk/SKILL.md +0 -79
- package/template/.agents/skills/9arm-skills/post-mortem/SKILL.md +0 -71
- package/template/.agents/skills/9arm-skills/scrutinize/SKILL.md +0 -72
- package/template/.agents/skills/browser-testing-with-devtools/SKILL.md +0 -302
- package/template/.agents/skills/ci-cd-and-automation/SKILL.md +0 -390
- package/template/.agents/skills/code-review-and-quality/SKILL.md +0 -392
- package/template/.agents/skills/code-simplification/SKILL.md +0 -331
- package/template/.agents/skills/debugging-and-error-recovery/SKILL.md +0 -298
- package/template/.agents/skills/deployment-procedures/SKILL.md +0 -241
- package/template/.agents/skills/deprecation-and-migration/SKILL.md +0 -206
- package/template/.agents/skills/diagnosing-bugs/SKILL.md +0 -93
- package/template/.agents/skills/git-workflow-and-versioning/SKILL.md +0 -300
- package/template/.agents/skills/human-review-decisions/SKILL.md +0 -74
- package/template/.agents/skills/idea-refine/SKILL.md +0 -178
- package/template/.agents/skills/idea-refine/examples.md +0 -238
- package/template/.agents/skills/idea-refine/frameworks.md +0 -99
- package/template/.agents/skills/idea-refine/refinement-criteria.md +0 -113
- package/template/.agents/skills/idea-refine/scripts/idea-refine.sh +0 -15
- package/template/.agents/skills/incremental-implementation/SKILL.md +0 -248
- package/template/.agents/skills/insight-capture/SKILL.md +0 -84
- package/template/.agents/skills/intelligent-routing/SKILL.md +0 -176
- package/template/.agents/skills/md2html/SKILL.md +0 -154
- package/template/.agents/skills/md2html/components.md +0 -505
- package/template/.agents/skills/md2html/template.html +0 -1152
- package/template/.agents/skills/planning-and-task-breakdown/SKILL.md +0 -239
- package/template/.agents/skills/pr-review/SKILL.md +0 -143
- package/template/.agents/skills/pr-review-analysis/SKILL.md +0 -89
- package/template/.agents/skills/preview-local-check/SKILL.md +0 -59
- package/template/.agents/skills/release-git-operations/SKILL.md +0 -97
- package/template/.agents/skills/review-followup-routing/SKILL.md +0 -98
- package/template/.agents/skills/security-and-hardening/SKILL.md +0 -349
- package/template/.agents/skills/security-and-hardening/security-checklist.md +0 -134
- package/template/.agents/skills/shipping-and-launch/SKILL.md +0 -311
- package/template/.agents/skills/silent-failure-audit/SKILL.md +0 -73
- package/template/.agents/skills/spec-orchestration/SKILL.md +0 -91
- package/template/.agents/skills/specialist-agent-routing/SKILL.md +0 -107
- package/template/.agents/skills/test-driven-development/SKILL.md +0 -422
- package/template/.agents/skills/test-driven-development/testing-patterns.md +0 -236
- package/template/.agents/skills/test-execution-and-coverage/SKILL.md +0 -56
- package/template/.agents/skills/using-agent-skills/SKILL.md +0 -171
- package/template/.agents/skills/verification-orchestration/SKILL.md +0 -68
- package/template/.agents/skills/vulnerability-scanner/SKILL.md +0 -276
- package/template/.agents/skills/vulnerability-scanner/checklists.md +0 -121
- package/template/.agents/skills/vulnerability-scanner/scripts/security_scan.py +0 -458
- package/template/.agents/skills/wiki/SKILL.md +0 -149
- package/template/.agents/skills/workflow-documentation-sync/SKILL.md +0 -87
- package/template/.claude/skills/9arm-skills/README.md +0 -51
- package/template/.claude/skills/9arm-skills/debug-mantra/SKILL.md +0 -86
- package/template/.claude/skills/9arm-skills/management-talk/SKILL.md +0 -79
- package/template/.claude/skills/9arm-skills/post-mortem/SKILL.md +0 -71
- package/template/.claude/skills/9arm-skills/scrutinize/SKILL.md +0 -72
- package/template/.claude/skills/browser-testing-with-devtools/SKILL.md +0 -302
- package/template/.claude/skills/ci-cd-and-automation/SKILL.md +0 -390
- package/template/.claude/skills/code-review-and-quality/SKILL.md +0 -392
- package/template/.claude/skills/code-simplification/SKILL.md +0 -331
- package/template/.claude/skills/debugging-and-error-recovery/SKILL.md +0 -298
- package/template/.claude/skills/deployment-procedures/SKILL.md +0 -241
- package/template/.claude/skills/deprecation-and-migration/SKILL.md +0 -206
- package/template/.claude/skills/diagnosing-bugs/SKILL.md +0 -93
- package/template/.claude/skills/git-workflow-and-versioning/SKILL.md +0 -300
- package/template/.claude/skills/human-review-decisions/SKILL.md +0 -74
- package/template/.claude/skills/idea-refine/SKILL.md +0 -178
- package/template/.claude/skills/idea-refine/examples.md +0 -238
- package/template/.claude/skills/idea-refine/frameworks.md +0 -99
- package/template/.claude/skills/idea-refine/refinement-criteria.md +0 -113
- package/template/.claude/skills/idea-refine/scripts/idea-refine.sh +0 -15
- package/template/.claude/skills/incremental-implementation/SKILL.md +0 -248
- package/template/.claude/skills/insight-capture/SKILL.md +0 -84
- package/template/.claude/skills/intelligent-routing/SKILL.md +0 -176
- package/template/.claude/skills/md2html/SKILL.md +0 -154
- package/template/.claude/skills/md2html/components.md +0 -505
- package/template/.claude/skills/md2html/template.html +0 -1152
- package/template/.claude/skills/planning-and-task-breakdown/SKILL.md +0 -239
- package/template/.claude/skills/pr-review/SKILL.md +0 -143
- package/template/.claude/skills/pr-review-analysis/SKILL.md +0 -89
- package/template/.claude/skills/preview-local-check/SKILL.md +0 -59
- package/template/.claude/skills/release-git-operations/SKILL.md +0 -97
- package/template/.claude/skills/review-followup-routing/SKILL.md +0 -98
- package/template/.claude/skills/security-and-hardening/SKILL.md +0 -349
- package/template/.claude/skills/security-and-hardening/security-checklist.md +0 -134
- package/template/.claude/skills/shipping-and-launch/SKILL.md +0 -311
- package/template/.claude/skills/silent-failure-audit/SKILL.md +0 -73
- package/template/.claude/skills/spec-orchestration/SKILL.md +0 -91
- package/template/.claude/skills/specialist-agent-routing/SKILL.md +0 -107
- package/template/.claude/skills/test-driven-development/SKILL.md +0 -422
- package/template/.claude/skills/test-driven-development/testing-patterns.md +0 -236
- package/template/.claude/skills/test-execution-and-coverage/SKILL.md +0 -56
- package/template/.claude/skills/using-agent-skills/SKILL.md +0 -171
- package/template/.claude/skills/verification-orchestration/SKILL.md +0 -68
- package/template/.claude/skills/vulnerability-scanner/SKILL.md +0 -276
- package/template/.claude/skills/vulnerability-scanner/checklists.md +0 -121
- package/template/.claude/skills/vulnerability-scanner/scripts/security_scan.py +0 -458
- package/template/.claude/skills/wiki/SKILL.md +0 -149
- package/template/.claude/skills/workflow-documentation-sync/SKILL.md +0 -87
|
@@ -1,248 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: incremental-implementation
|
|
3
|
-
description: "[Devflow] Delivers changes incrementally. Use when implementing any feature or change that touches more than one file. Use when you're about to write a large amount of code at once, or when a task feels too big to land in one step."
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Incremental Implementation
|
|
7
|
-
|
|
8
|
-
## Overview
|
|
9
|
-
|
|
10
|
-
Build in thin vertical slices — implement one piece, test it, verify it, then expand. Avoid implementing an entire feature in one pass. Each increment should leave the system in a working, testable state. This is the execution discipline that makes large features manageable.
|
|
11
|
-
|
|
12
|
-
## When to Use
|
|
13
|
-
|
|
14
|
-
- Implementing any multi-file change
|
|
15
|
-
- Building a new feature from a task breakdown
|
|
16
|
-
- Refactoring existing code
|
|
17
|
-
- Any time you're tempted to write more than ~100 lines before testing
|
|
18
|
-
|
|
19
|
-
**When NOT to use:** Single-file, single-function changes where the scope is already minimal.
|
|
20
|
-
|
|
21
|
-
## The Increment Cycle
|
|
22
|
-
|
|
23
|
-
```
|
|
24
|
-
┌──────────────────────────────────────┐
|
|
25
|
-
│ │
|
|
26
|
-
│ Implement ──→ Test ──→ Verify ──┐ │
|
|
27
|
-
│ ▲ │ │
|
|
28
|
-
│ └───── Commit ◄─────────────┘ │
|
|
29
|
-
│ │ │
|
|
30
|
-
│ ▼ │
|
|
31
|
-
│ Next slice │
|
|
32
|
-
│ │
|
|
33
|
-
└──────────────────────────────────────┘
|
|
34
|
-
```
|
|
35
|
-
|
|
36
|
-
For each slice:
|
|
37
|
-
|
|
38
|
-
1. **Implement** the smallest complete piece of functionality
|
|
39
|
-
2. **Test** — run the test suite (or write a test if none exists)
|
|
40
|
-
3. **Verify** — confirm the slice works as expected (tests pass, build succeeds, manual check)
|
|
41
|
-
4. **Commit** -- save your progress with a descriptive message (see `git-workflow-and-versioning` for atomic commit guidance)
|
|
42
|
-
5. **Move to the next slice** — carry forward, don't restart
|
|
43
|
-
|
|
44
|
-
## Slicing Strategies
|
|
45
|
-
|
|
46
|
-
### Vertical Slices (Preferred)
|
|
47
|
-
|
|
48
|
-
Build one complete path through the stack:
|
|
49
|
-
|
|
50
|
-
```
|
|
51
|
-
Slice 1: Create a task (DB + API + basic UI)
|
|
52
|
-
→ Tests pass, user can create a task via the UI
|
|
53
|
-
|
|
54
|
-
Slice 2: List tasks (query + API + UI)
|
|
55
|
-
→ Tests pass, user can see their tasks
|
|
56
|
-
|
|
57
|
-
Slice 3: Edit a task (update + API + UI)
|
|
58
|
-
→ Tests pass, user can modify tasks
|
|
59
|
-
|
|
60
|
-
Slice 4: Delete a task (delete + API + UI + confirmation)
|
|
61
|
-
→ Tests pass, full CRUD complete
|
|
62
|
-
```
|
|
63
|
-
|
|
64
|
-
Each slice delivers working end-to-end functionality.
|
|
65
|
-
|
|
66
|
-
### Contract-First Slicing
|
|
67
|
-
|
|
68
|
-
When backend and frontend need to develop in parallel:
|
|
69
|
-
|
|
70
|
-
```
|
|
71
|
-
Slice 0: Define the API contract (types, interfaces, OpenAPI spec)
|
|
72
|
-
Slice 1a: Implement backend against the contract + API tests
|
|
73
|
-
Slice 1b: Implement frontend against mock data matching the contract
|
|
74
|
-
Slice 2: Integrate and test end-to-end
|
|
75
|
-
```
|
|
76
|
-
|
|
77
|
-
### Risk-First Slicing
|
|
78
|
-
|
|
79
|
-
Tackle the riskiest or most uncertain piece first:
|
|
80
|
-
|
|
81
|
-
```
|
|
82
|
-
Slice 1: Prove the WebSocket connection works (highest risk)
|
|
83
|
-
Slice 2: Build real-time task updates on the proven connection
|
|
84
|
-
Slice 3: Add offline support and reconnection
|
|
85
|
-
```
|
|
86
|
-
|
|
87
|
-
If Slice 1 fails, you discover it before investing in Slices 2 and 3.
|
|
88
|
-
|
|
89
|
-
## Implementation Rules
|
|
90
|
-
|
|
91
|
-
### Rule 0: Simplicity First
|
|
92
|
-
|
|
93
|
-
Before writing any code, ask: "What is the simplest thing that could work?"
|
|
94
|
-
|
|
95
|
-
After writing code, review it against these checks:
|
|
96
|
-
- Can this be done in fewer lines?
|
|
97
|
-
- Are these abstractions earning their complexity?
|
|
98
|
-
- Would a staff engineer look at this and say "why didn't you just..."?
|
|
99
|
-
- Am I building for hypothetical future requirements, or the current task?
|
|
100
|
-
|
|
101
|
-
```
|
|
102
|
-
SIMPLICITY CHECK:
|
|
103
|
-
✗ Generic EventBus with middleware pipeline for one notification
|
|
104
|
-
✓ Simple function call
|
|
105
|
-
|
|
106
|
-
✗ Abstract factory pattern for two similar components
|
|
107
|
-
✓ Two straightforward components with shared utilities
|
|
108
|
-
|
|
109
|
-
✗ Config-driven form builder for three forms
|
|
110
|
-
✓ Three form components
|
|
111
|
-
```
|
|
112
|
-
|
|
113
|
-
Three similar lines of code is better than a premature abstraction. Implement the naive, obviously-correct version first. Optimize only after correctness is proven with tests.
|
|
114
|
-
|
|
115
|
-
### Rule 0.5: Scope Discipline
|
|
116
|
-
|
|
117
|
-
Touch only what the task requires.
|
|
118
|
-
|
|
119
|
-
Do NOT:
|
|
120
|
-
- "Clean up" code adjacent to your change
|
|
121
|
-
- Refactor imports in files you're not modifying
|
|
122
|
-
- Remove comments you don't fully understand
|
|
123
|
-
- Add features not in the spec because they "seem useful"
|
|
124
|
-
- Modernize syntax in files you're only reading
|
|
125
|
-
|
|
126
|
-
If you notice something worth improving outside your task scope, note it — don't fix it:
|
|
127
|
-
|
|
128
|
-
```
|
|
129
|
-
NOTICED BUT NOT TOUCHING:
|
|
130
|
-
- src/utils/format.ts has an unused import (unrelated to this task)
|
|
131
|
-
- The auth middleware could use better error messages (separate task)
|
|
132
|
-
→ Want me to create tasks for these?
|
|
133
|
-
```
|
|
134
|
-
|
|
135
|
-
### Rule 1: One Thing at a Time
|
|
136
|
-
|
|
137
|
-
Each increment changes one logical thing. Don't mix concerns:
|
|
138
|
-
|
|
139
|
-
**Bad:** One commit that adds a new component, refactors an existing one, and updates the build config.
|
|
140
|
-
|
|
141
|
-
**Good:** Three separate commits — one for each change.
|
|
142
|
-
|
|
143
|
-
### Rule 2: Keep It Compilable
|
|
144
|
-
|
|
145
|
-
After each increment, the project must build and existing tests must pass. Don't leave the codebase in a broken state between slices.
|
|
146
|
-
|
|
147
|
-
### Rule 3: Feature Flags for Incomplete Features
|
|
148
|
-
|
|
149
|
-
If a feature isn't ready for users but you need to merge increments:
|
|
150
|
-
|
|
151
|
-
```typescript
|
|
152
|
-
// Feature flag for work-in-progress
|
|
153
|
-
const ENABLE_TASK_SHARING = process.env.FEATURE_TASK_SHARING === 'true';
|
|
154
|
-
|
|
155
|
-
if (ENABLE_TASK_SHARING) {
|
|
156
|
-
// New sharing UI
|
|
157
|
-
}
|
|
158
|
-
```
|
|
159
|
-
|
|
160
|
-
This lets you merge small increments to the main branch without exposing incomplete work.
|
|
161
|
-
|
|
162
|
-
### Rule 4: Safe Defaults
|
|
163
|
-
|
|
164
|
-
New code should default to safe, conservative behavior:
|
|
165
|
-
|
|
166
|
-
```typescript
|
|
167
|
-
// Safe: disabled by default, opt-in
|
|
168
|
-
export function createTask(data: TaskInput, options?: { notify?: boolean }) {
|
|
169
|
-
const shouldNotify = options?.notify ?? false;
|
|
170
|
-
// ...
|
|
171
|
-
}
|
|
172
|
-
```
|
|
173
|
-
|
|
174
|
-
### Rule 5: Rollback-Friendly
|
|
175
|
-
|
|
176
|
-
Each increment should be independently revertable:
|
|
177
|
-
|
|
178
|
-
- Additive changes (new files, new functions) are easy to revert
|
|
179
|
-
- Modifications to existing code should be minimal and focused
|
|
180
|
-
- Database migrations should have corresponding rollback migrations
|
|
181
|
-
- Avoid deleting something in one commit and replacing it in the same commit — separate them
|
|
182
|
-
|
|
183
|
-
## Working with Agents
|
|
184
|
-
|
|
185
|
-
When directing an agent to implement incrementally:
|
|
186
|
-
|
|
187
|
-
```
|
|
188
|
-
"Let's implement Task 3 from the plan.
|
|
189
|
-
|
|
190
|
-
Start with just the database schema change and the API endpoint.
|
|
191
|
-
Don't touch the UI yet — we'll do that in the next increment.
|
|
192
|
-
|
|
193
|
-
After implementing, run `npm test` and `npm run build` to verify
|
|
194
|
-
nothing is broken."
|
|
195
|
-
```
|
|
196
|
-
|
|
197
|
-
Be explicit about what's in scope and what's NOT in scope for each increment.
|
|
198
|
-
|
|
199
|
-
## Increment Checklist
|
|
200
|
-
|
|
201
|
-
After each increment, verify:
|
|
202
|
-
|
|
203
|
-
- [ ] The change does one thing and does it completely
|
|
204
|
-
- [ ] All existing tests still pass (`npm test`)
|
|
205
|
-
- [ ] The build succeeds (`npm run build`)
|
|
206
|
-
- [ ] Type checking passes (`npx tsc --noEmit`)
|
|
207
|
-
- [ ] Linting passes (`npm run lint`)
|
|
208
|
-
- [ ] The new functionality works as expected
|
|
209
|
-
- [ ] The change is committed with a descriptive message
|
|
210
|
-
|
|
211
|
-
## DevFlow 2.0 Progress Tracking
|
|
212
|
-
|
|
213
|
-
During implementation, keep progress visible in markdown first:
|
|
214
|
-
|
|
215
|
-
1. **Update `implement.md`**: Record the current slice, completed work, validation evidence, blockers, and next step.
|
|
216
|
-
2. **Commit stage artifacts with code changes**: The implementation history should remain understandable from the repository, even without old dashboard tooling.
|
|
217
|
-
|
|
218
|
-
## Common Rationalizations
|
|
219
|
-
|
|
220
|
-
| Rationalization | Reality |
|
|
221
|
-
|---|---|
|
|
222
|
-
| "I'll test it all at the end" | Bugs compound. A bug in Slice 1 makes Slices 2-5 wrong. Test each slice. |
|
|
223
|
-
| "It's faster to do it all at once" | It *feels* faster until something breaks and you can't find which of 500 changed lines caused it. |
|
|
224
|
-
| "These changes are too small to commit separately" | Small commits are free. Large commits hide bugs and make rollbacks painful. |
|
|
225
|
-
| "I'll add the feature flag later" | If the feature isn't complete, it shouldn't be user-visible. Add the flag now. |
|
|
226
|
-
| "This refactor is small enough to include" | Refactors mixed with features make both harder to review and debug. Separate them. |
|
|
227
|
-
|
|
228
|
-
## Red Flags
|
|
229
|
-
|
|
230
|
-
- More than 100 lines of code written without running tests
|
|
231
|
-
- Multiple unrelated changes in a single increment
|
|
232
|
-
- "Let me just quickly add this too" scope expansion
|
|
233
|
-
- Skipping the test/verify step to move faster
|
|
234
|
-
- Build or tests broken between increments
|
|
235
|
-
- Large uncommitted changes accumulating
|
|
236
|
-
- Building abstractions before the third use case demands it
|
|
237
|
-
- Touching files outside the task scope "while I'm here"
|
|
238
|
-
- Creating new utility files for one-time operations
|
|
239
|
-
|
|
240
|
-
## Verification
|
|
241
|
-
|
|
242
|
-
After completing all increments for a task:
|
|
243
|
-
|
|
244
|
-
- [ ] Each increment was individually tested and committed
|
|
245
|
-
- [ ] The full test suite passes
|
|
246
|
-
- [ ] The build is clean
|
|
247
|
-
- [ ] The feature works end-to-end as specified
|
|
248
|
-
- [ ] No uncommitted changes remain
|
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: insight-capture
|
|
3
|
-
description: "[Devflow] Extract durable lessons, patterns, gotchas, and post-mortem knowledge from completed work. Use when implementation or verification work should become reusable team knowledge."
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Insight Capture
|
|
7
|
-
|
|
8
|
-
## Overview
|
|
9
|
-
|
|
10
|
-
This skill is the shared behavior layer behind `Insight`.
|
|
11
|
-
|
|
12
|
-
It preserves the valuable learning workflow from the legacy system while treating insight capture as a support capability rather than a numbered stage.
|
|
13
|
-
|
|
14
|
-
## Related Foundation Skills
|
|
15
|
-
|
|
16
|
-
This skill should reuse and align with:
|
|
17
|
-
|
|
18
|
-
- `.agents/skills/9arm-skills/post-mortem/SKILL.md`
|
|
19
|
-
- `.agent/resources/schemas/lessons.template.md`
|
|
20
|
-
|
|
21
|
-
## When to Use
|
|
22
|
-
|
|
23
|
-
- after `50-verify`, release preparation, or a completed implementation run
|
|
24
|
-
- after debugging, regression fixes, or incidents that deserve durable learning
|
|
25
|
-
- when reusable project knowledge should move into lessons, wiki material, or final reporting
|
|
26
|
-
|
|
27
|
-
## Process
|
|
28
|
-
|
|
29
|
-
### 1. Load Evidence
|
|
30
|
-
|
|
31
|
-
Inspect only the evidence needed:
|
|
32
|
-
|
|
33
|
-
- `implement.md`
|
|
34
|
-
- `verify.md`
|
|
35
|
-
- `release.md`
|
|
36
|
-
- `report.md`
|
|
37
|
-
- recent diff, commits, or review comments when relevant
|
|
38
|
-
|
|
39
|
-
### 2. Extract Actionable Knowledge
|
|
40
|
-
|
|
41
|
-
Capture only useful knowledge such as:
|
|
42
|
-
|
|
43
|
-
- important file or behavior changes
|
|
44
|
-
- reusable patterns
|
|
45
|
-
- gotchas and triggers
|
|
46
|
-
- approach outcome
|
|
47
|
-
- alternatives tried
|
|
48
|
-
- context loading waste or handoff overhead
|
|
49
|
-
- recommendations for future runs
|
|
50
|
-
|
|
51
|
-
### 3. Apply Post-Mortem When Needed
|
|
52
|
-
|
|
53
|
-
For bug, regression, or incident work, use the `post-mortem` lens only after fix and validation evidence exist:
|
|
54
|
-
|
|
55
|
-
- what broke
|
|
56
|
-
- impact
|
|
57
|
-
- repro or timeline
|
|
58
|
-
- root cause
|
|
59
|
-
- fix
|
|
60
|
-
- validation evidence
|
|
61
|
-
- why it slipped through
|
|
62
|
-
- prevention or follow-up
|
|
63
|
-
|
|
64
|
-
### 4. Save To The Smallest Durable Destination
|
|
65
|
-
|
|
66
|
-
Prefer:
|
|
67
|
-
|
|
68
|
-
- stage artifacts when the lesson is run-specific
|
|
69
|
-
- `devflow/lessons.md` for project-wide knowledge
|
|
70
|
-
- `Wiki` when the knowledge should become navigable team documentation
|
|
71
|
-
- `60-report` when the lesson belongs in the final communication package before release
|
|
72
|
-
|
|
73
|
-
When updating `devflow/lessons.md`, use `.agent/resources/schemas/lessons.template.md` and replace placeholder text completely.
|
|
74
|
-
|
|
75
|
-
## Output
|
|
76
|
-
|
|
77
|
-
Return:
|
|
78
|
-
|
|
79
|
-
- lessons captured
|
|
80
|
-
- patterns and gotchas
|
|
81
|
-
- approach outcome
|
|
82
|
-
- recommendations
|
|
83
|
-
- where the insight was recorded
|
|
84
|
-
- whether `Wiki` or `60-report` should be the next handoff
|
|
@@ -1,176 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: intelligent-routing
|
|
3
|
-
description: "[Devflow] Automatic agent and stage routing for DevFlow 2.0. Use when deciding which active workflow, skill, or specialist should own the next step."
|
|
4
|
-
version: 2.0.0
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
# Intelligent Routing For DevFlow 2.0
|
|
8
|
-
|
|
9
|
-
## Purpose
|
|
10
|
-
|
|
11
|
-
Analyze a user request and route it to the correct DevFlow 2.0 surface without requiring the user to name the exact workflow, skill, or agent.
|
|
12
|
-
|
|
13
|
-
## Canonical Routing Order
|
|
14
|
-
|
|
15
|
-
Always route in this order:
|
|
16
|
-
|
|
17
|
-
1. Mainline stage if the request is lifecycle work
|
|
18
|
-
2. Public companion command if the request is support work
|
|
19
|
-
3. Specialist agent if the user needs focused expert judgment
|
|
20
|
-
4. Internal companion or skill only when the public surface should stay thin
|
|
21
|
-
|
|
22
|
-
Do not route new work into retired JSON-first commands, dashboard-first flows, or removed aliases.
|
|
23
|
-
|
|
24
|
-
When routing to support skills, follow `docs/skill-selection-policy.md`.
|
|
25
|
-
|
|
26
|
-
## Timeline Stages
|
|
27
|
-
|
|
28
|
-
`00-discover -> 10-define -> 20-spec -> 30-plan -> 40-implement -> 50-verify -> 60-report -> 70-release`
|
|
29
|
-
|
|
30
|
-
## Public Companion Commands
|
|
31
|
-
|
|
32
|
-
- `Goal`
|
|
33
|
-
- `Brainstorm`
|
|
34
|
-
- `Research`
|
|
35
|
-
- `Debug`
|
|
36
|
-
- `PRD`
|
|
37
|
-
- `Issue-Triage`
|
|
38
|
-
- `Wiki`
|
|
39
|
-
- `Check-For-Updates`
|
|
40
|
-
- `Help`
|
|
41
|
-
|
|
42
|
-
## Specialist Agent Routing
|
|
43
|
-
|
|
44
|
-
Use these agent mappings when expert judgment is the best next step:
|
|
45
|
-
|
|
46
|
-
| Request Type | Route To |
|
|
47
|
-
|---|---|
|
|
48
|
-
| requirements clarification | `requirements-engineer` |
|
|
49
|
-
| product framing | `prp-core-prd-architect` |
|
|
50
|
-
| planning breakdown | `prp-core-planner` |
|
|
51
|
-
| codebase exploration | `codebase-explorer` |
|
|
52
|
-
| backend implementation or API review | `backend-specialist` |
|
|
53
|
-
| frontend implementation or UI review | `frontend-specialist` |
|
|
54
|
-
| schema and query design | `database-architect` |
|
|
55
|
-
| implementation execution | `prp-core-coder` |
|
|
56
|
-
| tests and coverage | `test-engineer` |
|
|
57
|
-
| code review and risk review | `code-reviewer` |
|
|
58
|
-
| security review | `security-auditor` |
|
|
59
|
-
| performance review | `performance-engineer` |
|
|
60
|
-
| root-cause debugging | `prp-core-debugger` |
|
|
61
|
-
| release packaging and commit scope | `prp-core-git-committer`, `prp-core-git-pr-maker` |
|
|
62
|
-
| broad orchestration across domains | `orchestrator` |
|
|
63
|
-
| overnight maintenance loops and repo cleanup | `ob-loop-engineer` |
|
|
64
|
-
|
|
65
|
-
## Lifecycle Routing Rules
|
|
66
|
-
|
|
67
|
-
| User State | Recommended Route |
|
|
68
|
-
|---|---|
|
|
69
|
-
| new request, vague or clear | `00-discover`; it selects support inquiry and owns the delivery decision |
|
|
70
|
-
| approved discovery needs one or more delivery boundaries | `10-define {discovery_id}` |
|
|
71
|
-
| needs requirements and acceptance criteria | `20-spec` |
|
|
72
|
-
| has a stable spec and needs execution plan | `30-plan` |
|
|
73
|
-
| needs implementation work | `40-implement` |
|
|
74
|
-
| needs testing, review, or validation evidence | `50-verify` |
|
|
75
|
-
| needs packaging, commit, PR, or release handling | `70-release` |
|
|
76
|
-
| needs the final summary or handoff narrative | `60-report` |
|
|
77
|
-
|
|
78
|
-
## Routing Heuristics
|
|
79
|
-
|
|
80
|
-
### Use a Timeline stage when:
|
|
81
|
-
|
|
82
|
-
- the request advances a task through its lifecycle
|
|
83
|
-
- the user needs an artifact in `devflow`
|
|
84
|
-
- the next step should change stage ownership
|
|
85
|
-
|
|
86
|
-
### Use a public companion command when:
|
|
87
|
-
|
|
88
|
-
- the request supports a stage rather than replacing it
|
|
89
|
-
- the user needs exploration, research, debugging, or help
|
|
90
|
-
- the output is advisory or investigative
|
|
91
|
-
|
|
92
|
-
### Use an internal clarification skill when:
|
|
93
|
-
|
|
94
|
-
- the current stage is blocked by ambiguity, not by missing execution effort
|
|
95
|
-
- a small amount of user interaction could change scope, acceptance criteria, or planning decisions
|
|
96
|
-
- the public surface should stay the same and the questioning method is only supporting the active stage
|
|
97
|
-
|
|
98
|
-
If `grill-with-docs` is available in the current environment, prefer it as an optional internal support skill for:
|
|
99
|
-
|
|
100
|
-
- `10-define` when scope or terminology is unstable
|
|
101
|
-
- `20-spec` when acceptance criteria or rules are ambiguous
|
|
102
|
-
- `30-plan` when architecture or verification choices are still reversible but unclear
|
|
103
|
-
|
|
104
|
-
Do not use deep questioning by default in every stage. Collect only the information that affects the current Timeline-stage decision.
|
|
105
|
-
|
|
106
|
-
### Use an internal clarification skill when:
|
|
107
|
-
|
|
108
|
-
- the current stage is blocked by ambiguity, not by missing execution effort
|
|
109
|
-
- a small amount of user interaction could change scope, acceptance criteria, or planning decisions
|
|
110
|
-
- the public surface should stay the same and the questioning method is only supporting the active stage
|
|
111
|
-
|
|
112
|
-
If `grill-with-docs` is available in the current environment, prefer it as an optional internal support skill for:
|
|
113
|
-
|
|
114
|
-
- `10-define` when scope or terminology is unstable
|
|
115
|
-
- `20-spec` when acceptance criteria or rules are ambiguous
|
|
116
|
-
- `30-plan` when architecture or verification choices are still reversible but unclear
|
|
117
|
-
|
|
118
|
-
Do not use deep questioning by default in every stage. Collect only the information that affects the current stage decision.
|
|
119
|
-
|
|
120
|
-
### Use a specialist agent when:
|
|
121
|
-
|
|
122
|
-
- the user explicitly asks for one
|
|
123
|
-
- a narrow expert lens is more useful than a workflow shell
|
|
124
|
-
- the active stage already exists and only specialist judgment is missing
|
|
125
|
-
|
|
126
|
-
### Use a support skill when:
|
|
127
|
-
|
|
128
|
-
- a mainline stage or public companion already owns the work
|
|
129
|
-
- the skill resolves a bounded uncertainty inside that owner
|
|
130
|
-
- the skill is more specific than the general companion surface
|
|
131
|
-
- the skill output can be captured in the owning stage artifact, `CONTEXT.md`, an ADR, or a focused doc
|
|
132
|
-
|
|
133
|
-
Support skill limits:
|
|
134
|
-
|
|
135
|
-
- choose one primary skill per pass
|
|
136
|
-
- add at most two secondary skills when each has a distinct purpose
|
|
137
|
-
- prefer the most specific skill when descriptions overlap
|
|
138
|
-
- route back to the owning stage when a skill finds a lifecycle-level contradiction
|
|
139
|
-
|
|
140
|
-
Key conflict defaults:
|
|
141
|
-
|
|
142
|
-
| Conflict | Route |
|
|
143
|
-
|---|---|
|
|
144
|
-
| `Brainstorm` vs `grilling` | `Brainstorm` for option generation; `grilling` for stress-testing a candidate idea |
|
|
145
|
-
| `grilling` vs `grill-with-docs` | `grill-with-docs` when a codebase or durable docs matter |
|
|
146
|
-
| `grill-with-docs` vs `domain-modeling` | `grill-with-docs` interviews; `domain-modeling` records confirmed glossary terms or ADRs |
|
|
147
|
-
| `to-prd` vs `PRD` | `PRD` owns the public surface; `to-prd` is an internal synthesis method |
|
|
148
|
-
| `to-issues` vs `30-plan` | `30-plan` owns work breakdown; `to-issues` packages slices when issue tracker output is needed |
|
|
149
|
-
| `implement` vs `40-implement` | `40-implement` owns implementation |
|
|
150
|
-
| `review` vs `50-verify` | `50-verify` owns verification; `review` is one lane |
|
|
151
|
-
|
|
152
|
-
## Examples
|
|
153
|
-
|
|
154
|
-
| User Request | Route |
|
|
155
|
-
|---|---|
|
|
156
|
-
| "I have an idea but not the shape yet" | `00-discover`, likely `Brainstorm`, then return to Discover |
|
|
157
|
-
| "Turn this stable new goal into requirements" | `00-discover`, then `10-define {discovery_id}` before `20-spec {running_id}` |
|
|
158
|
-
| "Fix this newly reported broken auth flow" | `00-discover`, likely `Debug`, then return to Discover before Define |
|
|
159
|
-
| "Review this implementation for risks" | `50-verify` or `Agent code-reviewer ...` |
|
|
160
|
-
| "Install or upgrade Nexus-DevFlow on this machine" | `Check-For-Updates` |
|
|
161
|
-
| "Help me figure out which command to use" | `Help` |
|
|
162
|
-
|
|
163
|
-
## Guardrails
|
|
164
|
-
|
|
165
|
-
- Do not recommend removed numeric aliases such as old task/code/verify commands.
|
|
166
|
-
- Do not mention legacy external control files as part of the routing model.
|
|
167
|
-
- Do not invent agent names that are not present in the current repo.
|
|
168
|
-
- If the request spans multiple domains and the owner is unclear, route to `orchestrator`.
|
|
169
|
-
- If clarification is needed, ask only for information that can change the active stage decision.
|
|
170
|
-
- If clarification is needed, ask only for information that can change the active stage decision.
|
|
171
|
-
|
|
172
|
-
## Output Pattern
|
|
173
|
-
|
|
174
|
-
When applying this skill, answer in one short line before proceeding:
|
|
175
|
-
|
|
176
|
-
`Applying DevFlow 2.0 routing: <chosen route> because <reason>.`
|
|
@@ -1,154 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: md2html
|
|
3
|
-
description: "[Devflow] Convert long-form Markdown (plan, spec, system design, RFC, runbook, postmortem, brainstorm, notes) into a single self-contained HTML page with Mermaid diagrams, step timelines, callouts, sidebar TOC. Claude-orange light+dark theme. Multi-language. Portable across Claude Code / Codex / Antigravity / any AI agent."
|
|
4
|
-
trigger: /md2html
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
# /md2html
|
|
8
|
-
|
|
9
|
-
Convert a verbose Markdown document into a single, self-contained HTML file that a tired human can actually scan: diagrams instead of paragraphs, step cards instead of numbered lists, callouts for the parts that matter.
|
|
10
|
-
|
|
11
|
-
## Usage
|
|
12
|
-
|
|
13
|
-
```
|
|
14
|
-
/md2html <file.md> # output <file>.html next to source
|
|
15
|
-
/md2html <file.md> --out X.html # custom output path
|
|
16
|
-
/md2html # if no arg, ask user which file
|
|
17
|
-
```
|
|
18
|
-
|
|
19
|
-
## Skill files (resolved relative to this SKILL.md)
|
|
20
|
-
|
|
21
|
-
- `template.html` — HTML skeleton with embedded CSS (Claude orange light+dark), Mermaid CDN, theme toggle, TOC sidebar, footer. Contains `{{PLACEHOLDER}}` strings and `<!-- COMMENT -->` slots.
|
|
22
|
-
- `components.md` — catalog of HTML snippets you must copy verbatim (step cards, callouts, mermaid blocks, pros-cons, comparison cards, collapsibles).
|
|
23
|
-
- `examples/` — at least one reference `<doc>.md` → `<doc>.html` pair. Read one to calibrate output quality before starting.
|
|
24
|
-
|
|
25
|
-
**You MUST read all three before writing output.** Do not invent CSS classes or skip the catalog.
|
|
26
|
-
|
|
27
|
-
## What you must do when invoked
|
|
28
|
-
|
|
29
|
-
Follow these steps in order. Do not skip.
|
|
30
|
-
|
|
31
|
-
### Step 1 — Resolve inputs
|
|
32
|
-
|
|
33
|
-
1. Determine the source file from the user's invocation. If none given, ask: *"Tệp `.md` nào cần convert?"* and stop.
|
|
34
|
-
2. Read the source `.md` fully.
|
|
35
|
-
3. Read `template.html` and `components.md` from the same directory as this SKILL.md.
|
|
36
|
-
4. Read one example pair under `examples/` to calibrate.
|
|
37
|
-
|
|
38
|
-
### Step 2 — Analyze the source document
|
|
39
|
-
|
|
40
|
-
Do this analysis silently in your head (or as one short summary line to the user). Identify:
|
|
41
|
-
|
|
42
|
-
- **Language of the source** — detect from the actual prose, not the filename. Set `<html lang="...">` to the ISO 639-1 code (`en`, `vi`, `zh`, `ja`, `ko`, `es`, `fr`, `de`, `ru`, `ar`, `th`, …) and translate every UI label to that language.
|
|
43
|
-
|
|
44
|
-
Common samples (extend to any language using the same scheme):
|
|
45
|
-
|
|
46
|
-
| Key | EN | VI | ZH (中文) | JA (日本語) | KO (한국어) | ES (Español) |
|
|
47
|
-
|--- |--- |--- |--- |--- |--- |--- |
|
|
48
|
-
| TOC title | Contents | Mục lục | 目录 | 目次 | 목차 | Contenido |
|
|
49
|
-
| Read-time | ~N min read | ~N phút đọc | ~N 分钟阅读 | ~N 分で読了 | ~N분 소요 | ~N min de lectura |
|
|
50
|
-
| Recommended | ★ Recommended | ★ Đề xuất | ★ 推荐 | ★ 推奨 | ★ 추천 | ★ Recomendado |
|
|
51
|
-
| Key point | Key point | Ý chính | 要点 | 要点 | 핵심 | Idea clave |
|
|
52
|
-
| Pros | ✓ Pros | ✓ Ưu điểm | ✓ 优点 | ✓ 長所 | ✓ 장점 | ✓ Ventajas |
|
|
53
|
-
| Cons | ✕ Cons | ✕ Nhược điểm | ✕ 缺点 | ✕ 短所 | ✕ 단점 | ✕ Desventajas |
|
|
54
|
-
| Print tooltip | Print / Save PDF | In / Lưu PDF | 打印 / 保存 PDF | 印刷 / PDF 保存 | 인쇄 / PDF 저장 | Imprimir / Guardar |
|
|
55
|
-
| Theme tooltip | Toggle theme | Đổi theme | 切换主题 | テーマ切替 | 테마 전환 | Cambiar tema |
|
|
56
|
-
| Source: prefix | Source: | Nguồn: | 来源: | ソース: | 소스: | Fuente: |
|
|
57
|
-
|
|
58
|
-
For any language not listed, translate using the same conventions. The "Recommended" badge is configured via the `--rec-label` CSS variable set on `<html>` (no per-language CSS needed) — see `{{REC_LABEL}}` below.
|
|
59
|
-
|
|
60
|
-
**RTL languages** (Arabic, Hebrew, Persian) — current template is LTR-only. If source is RTL, also add `dir="rtl"` to `<html>` and consider it a known visual limitation (sidebar will stay on the left).
|
|
61
|
-
|
|
62
|
-
- **Title** — from first H1 or filename. Title should be ≤ 80 chars.
|
|
63
|
-
- **Subtitle** — first paragraph after H1, or the document's TL;DR sentence. ≤ 200 chars.
|
|
64
|
-
- **Doc type** — infer one of: `PLAN`, `SPEC`, `SYSTEM DESIGN`, `RFC`, `RUNBOOK`, `POSTMORTEM`, `BRAINSTORM`, `NOTES`. Pick the closest match based on the document's *purpose*, not its filename. Brainstorm = exploring options with rationale; Plan = ordered steps to a goal; Spec = exact behavior contract; System design = architecture + tradeoffs; RFC = proposal seeking feedback; Runbook = operational procedure; Postmortem = incident review. The uppercase code in the eyebrow stays universal; the topbar `BRAND_LABEL` localizes (Plan / Kế hoạch / 计划 / etc).
|
|
65
|
-
- **Reading time** — words ÷ 250, round to nearest minute. Format: `~N min read` (EN) or `~N phút đọc` (VI).
|
|
66
|
-
- **Section map** — walk each H2/H3 and tag with the BEST component using §11 cheatsheet in `components.md`:
|
|
67
|
-
- numbered action list → Timeline
|
|
68
|
-
- architecture/flow prose → Mermaid
|
|
69
|
-
- "ưu/nhược", "pros/cons" → Pros-Cons
|
|
70
|
-
- "option A vs B" → Comparison cards
|
|
71
|
-
- critical conclusion → Key-point highlight
|
|
72
|
-
- warnings/decisions → Callouts
|
|
73
|
-
- long appendix → Collapsible
|
|
74
|
-
- everything else → plain `<h2>` + `<p>`
|
|
75
|
-
|
|
76
|
-
### Step 3 — Build the output HTML
|
|
77
|
-
|
|
78
|
-
1. **Copy** the full `template.html` content into a string. Do NOT use Read-then-Edit on a file you haven't created; instead, build the output buffer in memory then `Write` once.
|
|
79
|
-
2. **Replace placeholders** in the template (all values come from Step 2 analysis, language-matched):
|
|
80
|
-
- `{{LANG}}` → ISO 639-1 code: `en` / `vi` / `zh` / `ja` / `ko` / `es` / …
|
|
81
|
-
- `{{REC_LABEL}}` → text shown on the "Recommended" comparison-card badge, e.g. `★ Recommended` / `★ Đề xuất` / `★ 推荐` / `★ 추천`. Sets the `--rec-label` CSS variable on `<html>`. If you forget this, CSS falls back to `★ Recommended`.
|
|
82
|
-
- `{{TITLE}}` (appears twice: `<title>` and `.doc-title`)
|
|
83
|
-
- `{{SUBTITLE}}`
|
|
84
|
-
- `{{DOC_TYPE}}` → universal uppercase code: `PLAN`, `SPEC`, `SYSTEM DESIGN`, `RFC`, `RUNBOOK`, `POSTMORTEM`, `BRAINSTORM`, `NOTES`
|
|
85
|
-
- `{{SOURCE_FILE}}` → basename of source (e.g. `plan.md`)
|
|
86
|
-
- `{{DATE}}` → ISO date or localized "Updated <today>"
|
|
87
|
-
- `{{READ_TIME}}` → localized reading time, e.g. `~3 min read` / `~3 phút đọc` / `~3 分钟阅读`
|
|
88
|
-
- `{{BRAND_LABEL}}` → localized doc-type label for the topbar
|
|
89
|
-
- `{{TOC_TITLE}}` → localized "Contents" (also used as `aria-label` for the TOC drawer)
|
|
90
|
-
- `{{PRINT_TOOLTIP}}` → localized print tooltip
|
|
91
|
-
- `{{THEME_TOOLTIP}}` → localized theme-toggle tooltip
|
|
92
|
-
- `{{CLOSE_LABEL}}` → localized "Close" (used for the mobile TOC drawer close button), e.g. `Close` / `Đóng` / `关闭` / `閉じる`
|
|
93
|
-
- `{{SKIP_LINK_LABEL}}` → localized skip-to-content link text, e.g. `Skip to content` / `Bỏ qua menu` / `跳到正文`
|
|
94
|
-
- `{{FOOTER_NOTE}}` → localized source attribution (e.g. `Source: plan.md` / `Nguồn: plan.md` / `来源: plan.md`)
|
|
95
|
-
3. **Replace `<!-- TOC_ENTRIES -->`** with one `<a>` per H2/H3 (see §2 in components.md). Generate stable kebab-case `id` from heading text.
|
|
96
|
-
4. **Replace the slot between `<!-- CONTENT_START -->` and `<!-- CONTENT_END -->`** with the document body, section by section, using components from `components.md`. Each section must:
|
|
97
|
-
- Start with `<h2 id="..."> ` (matching the TOC entry).
|
|
98
|
-
- Use ONE primary component per logical chunk (don't stack 3 callouts in a row).
|
|
99
|
-
- Preserve original meaning — do not summarize away technical detail; condense only filler/repetition.
|
|
100
|
-
5. **Write** the assembled HTML to the output path.
|
|
101
|
-
|
|
102
|
-
### Step 4 — Verify
|
|
103
|
-
|
|
104
|
-
After writing, do ONE quick sanity check by re-reading just the section you generated (not the whole file):
|
|
105
|
-
- Every `id="..."` referenced in the TOC exists on a heading.
|
|
106
|
-
- No leftover `{{PLACEHOLDER}}` strings.
|
|
107
|
-
- Mermaid blocks have valid syntax (use `flowchart`, `sequenceDiagram`, `erDiagram`, `stateDiagram-v2`, or `gantt` — never bare `graph` without direction).
|
|
108
|
-
- No `<script>` tags added beyond what `template.html` already includes.
|
|
109
|
-
|
|
110
|
-
Report back to the user with:
|
|
111
|
-
- Output file path
|
|
112
|
-
- 1-line summary of what changed (e.g. *"Rendered 7 sections: 1 mermaid flow, 2 step timelines, 4 callouts. ~6 phút đọc."*)
|
|
113
|
-
- A reminder they can open it with `xdg-open <file>.html` (Linux) / `open <file>.html` (mac).
|
|
114
|
-
|
|
115
|
-
## Critical rules
|
|
116
|
-
|
|
117
|
-
1. **Never paraphrase technical content into vague prose.** A step `chạy migration 0042_user_schema.sql` must remain that exact filename — don't change to `chạy migration mới`.
|
|
118
|
-
2. **One component per chunk.** Don't wrap a callout inside a step card inside a collapsible. Keep nesting flat.
|
|
119
|
-
3. **Mermaid > prose for any flow ≥ 3 hops.** If the source says "A gọi B, B gọi C, C ghi DB", make a diagram.
|
|
120
|
-
4. **Key-point highlights are rare.** Max 1 per H2 section, ideally 2-3 total per document.
|
|
121
|
-
5. **UI text follows the detected source language** — including for non-EN/non-VI sources (Chinese, Japanese, Korean, Spanish, etc). Use the language sample table in Step 2 or translate equivalently. Code, commands, file names, library names, error messages stay verbatim regardless of language.
|
|
122
|
-
6. **Self-contained output.** No external file references except the CDN scripts already in `template.html`.
|
|
123
|
-
7. **Do not modify `template.html` or `components.md`** — those are the skill's source of truth. Only Write the output `.html`.
|
|
124
|
-
8. **Use SVG icons only — never emojis.** Every icon is `<svg class="..."><use href="#i-NAME"/></svg>` referencing the sprite at the top of `<body>`. See §13 in `components.md` for the catalog. No emoji glyphs anywhere in callouts, doc-meta, topbar, or body content.
|
|
125
|
-
9. **Anchor links and copy-to-clipboard auto-inject via JS** — do NOT add them manually. Just give H2/H3 a proper `id`, and put code in `<pre><code>`. The template's boot script handles the rest.
|
|
126
|
-
10. **Wrap wide tables in `.table-wrap`** — see components.md §14b. Tables ≥ 4 columns or with long cells need the wrapper for mobile scroll.
|
|
127
|
-
11. **Use `<figure>` + `<figcaption>` for images** with descriptive `alt`. See components.md §14a.
|
|
128
|
-
|
|
129
|
-
## Cross-AI compatibility
|
|
130
|
-
|
|
131
|
-
This skill is designed to run identically on:
|
|
132
|
-
|
|
133
|
-
- **Claude Code** — install at `~/.claude/skills/md2html/` (this directory, symlinked or copied). Invoke with `/md2html <file>`.
|
|
134
|
-
- **Codex CLI** — copy `SKILL.md` content to `~/.codex/prompts/md2html.md`, keep `template.html` and `components.md` at a stable absolute path, update the file references in SKILL.md if needed. Invoke with `/md2html`.
|
|
135
|
-
- **Antigravity** — add SKILL.md as a custom prompt/agent instruction, ensure the agent has Read/Write tool access to the skill folder.
|
|
136
|
-
|
|
137
|
-
The only external dependency is `mermaid` via CDN (resolved at HTML open time, not at skill execution time). No npm/pip install required for the skill itself.
|
|
138
|
-
|
|
139
|
-
## Edge cases
|
|
140
|
-
|
|
141
|
-
- **Source has no headings** — wrap content in one `<h2 id="content">Nội dung</h2>` and infer logical breaks from blank lines + topic shifts.
|
|
142
|
-
- **Source has existing mermaid code blocks** — keep them, just rewrap in `<figure class="diagram">` with caption.
|
|
143
|
-
- **Source has HTML embedded** — pass through as-is inside `<div>` if safe, else escape.
|
|
144
|
-
- **Source is very short (< 200 words)** — skip TOC sidebar (delete `<aside class="toc">` block), render as single column.
|
|
145
|
-
- **Source is very long (> 5000 words)** — collapse low-priority sections by default with `<details>`.
|
|
146
|
-
- **Output file already exists** — overwrite. The source `.md` is canonical; HTML is regenerated artifact.
|
|
147
|
-
|
|
148
|
-
## Anti-patterns
|
|
149
|
-
|
|
150
|
-
- ❌ Generating the HTML in many small Edit calls — produces drift. Build full string, Write once.
|
|
151
|
-
- ❌ Adding new CSS via `<style>` — extend `template.html` instead and tell the user.
|
|
152
|
-
- ❌ Translating proper nouns or code identifiers.
|
|
153
|
-
- ❌ "Improving" the source by adding info not in the original.
|
|
154
|
-
- ❌ Reporting success without running Step 4 verification.
|