mindforge-cc 11.5.1 → 11.6.0
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/.agent/mindforge/skill-tdd.md +53 -0
- package/.agent/mindforge/skills-index.md +118 -0
- package/.agent/mindforge/systematic-debug.md +60 -0
- package/.agent/skills/1password-skill/SKILL.md +156 -0
- package/.agent/skills/1password-skill/references/cli-examples.md +31 -0
- package/.agent/skills/1password-skill/references/get-started.md +21 -0
- package/.agent/skills/article-illustrator/SKILL.md +199 -0
- package/.agent/skills/article-illustrator/references/prompt-construction.md +426 -0
- package/.agent/skills/article-illustrator/references/style-presets.md +80 -0
- package/.agent/skills/article-illustrator/references/styles.md +224 -0
- package/.agent/skills/article-illustrator/references/usage.md +50 -0
- package/.agent/skills/article-illustrator/references/workflow.md +332 -0
- package/.agent/skills/arxiv/SKILL.md +275 -0
- package/.agent/skills/blogwatcher/SKILL.md +130 -0
- package/.agent/skills/code-wiki/SKILL.md +438 -0
- package/.agent/skills/code-wiki/templates/README.md +31 -0
- package/.agent/skills/code-wiki/templates/architecture.md +30 -0
- package/.agent/skills/code-wiki/templates/getting-started.md +47 -0
- package/.agent/skills/code-wiki/templates/module.md +38 -0
- package/.agent/skills/codebase-inspection/SKILL.md +109 -0
- package/.agent/skills/comic-creator/SKILL.md +240 -0
- package/.agent/skills/comic-creator/references/analysis-framework.md +176 -0
- package/.agent/skills/comic-creator/references/auto-selection.md +71 -0
- package/.agent/skills/comic-creator/references/base-prompt.md +98 -0
- package/.agent/skills/comic-creator/references/character-template.md +180 -0
- package/.agent/skills/comic-creator/references/ohmsha-guide.md +85 -0
- package/.agent/skills/comic-creator/references/partial-workflows.md +106 -0
- package/.agent/skills/comic-creator/references/storyboard-template.md +143 -0
- package/.agent/skills/comic-creator/references/workflow.md +401 -0
- package/.agent/skills/concept-diagrams/SKILL.md +355 -0
- package/.agent/skills/concept-diagrams/references/dashboard-patterns.md +43 -0
- package/.agent/skills/concept-diagrams/references/infrastructure-patterns.md +144 -0
- package/.agent/skills/concept-diagrams/references/physical-shape-cookbook.md +42 -0
- package/.agent/skills/creative-ideation/SKILL.md +144 -0
- package/.agent/skills/creative-ideation/references/full-prompt-library.md +110 -0
- package/.agent/skills/devops-cli/SKILL.md +149 -0
- package/.agent/skills/devops-cli/references/app-discovery.md +112 -0
- package/.agent/skills/devops-cli/references/authentication.md +59 -0
- package/.agent/skills/devops-cli/references/cli-reference.md +104 -0
- package/.agent/skills/devops-cli/references/running-apps.md +171 -0
- package/.agent/skills/devops-watchers/SKILL.md +103 -0
- package/.agent/skills/docker-management/SKILL.md +273 -0
- package/.agent/skills/domain-intel/SKILL.md +96 -0
- package/.agent/skills/duckduckgo-search/SKILL.md +230 -0
- package/.agent/skills/github-auth/SKILL.md +240 -0
- package/.agent/skills/github-code-review/SKILL.md +474 -0
- package/.agent/skills/github-code-review/references/review-output-template.md +74 -0
- package/.agent/skills/github-issues/SKILL.md +363 -0
- package/.agent/skills/github-issues/templates/bug-report.md +35 -0
- package/.agent/skills/github-issues/templates/feature-request.md +31 -0
- package/.agent/skills/github-pr-workflow/SKILL.md +360 -0
- package/.agent/skills/github-pr-workflow/references/ci-troubleshooting.md +183 -0
- package/.agent/skills/github-pr-workflow/references/conventional-commits.md +71 -0
- package/.agent/skills/github-pr-workflow/templates/pr-body-bugfix.md +35 -0
- package/.agent/skills/github-pr-workflow/templates/pr-body-feature.md +33 -0
- package/.agent/skills/github-repo-management/SKILL.md +509 -0
- package/.agent/skills/github-repo-management/references/github-api-cheatsheet.md +161 -0
- package/.agent/skills/godmode/SKILL.md +396 -0
- package/.agent/skills/godmode/references/jailbreak-templates.md +128 -0
- package/.agent/skills/godmode/references/refusal-detection.md +142 -0
- package/.agent/skills/hyperframes/SKILL.md +182 -0
- package/.agent/skills/hyperframes/references/cli.md +185 -0
- package/.agent/skills/hyperframes/references/composition.md +129 -0
- package/.agent/skills/hyperframes/references/features.md +289 -0
- package/.agent/skills/hyperframes/references/gsap.md +136 -0
- package/.agent/skills/hyperframes/references/troubleshooting.md +137 -0
- package/.agent/skills/hyperframes/references/website-to-video.md +145 -0
- package/.agent/skills/jupyter-live-kernel/SKILL.md +160 -0
- package/.agent/skills/kanban-orchestrator/SKILL.md +209 -0
- package/.agent/skills/kanban-worker/SKILL.md +188 -0
- package/.agent/skills/llm-wiki/SKILL.md +499 -0
- package/.agent/skills/meme-generation/SKILL.md +122 -0
- package/.agent/skills/node-inspect-debugger/SKILL.md +312 -0
- package/.agent/skills/obsidian/SKILL.md +60 -0
- package/.agent/skills/osint-investigation/SKILL.md +269 -0
- package/.agent/skills/osint-investigation/templates/source-template.md +59 -0
- package/.agent/skills/oss-forensics/SKILL.md +422 -0
- package/.agent/skills/oss-forensics/references/evidence-types.md +89 -0
- package/.agent/skills/oss-forensics/references/github-archive-guide.md +184 -0
- package/.agent/skills/oss-forensics/references/investigation-templates.md +131 -0
- package/.agent/skills/oss-forensics/references/recovery-techniques.md +164 -0
- package/.agent/skills/oss-forensics/templates/forensic-report.md +151 -0
- package/.agent/skills/oss-forensics/templates/malicious-package-report.md +43 -0
- package/.agent/skills/parallel-cli/SKILL.md +384 -0
- package/.agent/skills/pinggy-tunnel/SKILL.md +302 -0
- package/.agent/skills/pixel-art/SKILL.md +209 -0
- package/.agent/skills/pixel-art/references/palettes.md +49 -0
- package/.agent/skills/plan/SKILL.md +331 -0
- package/.agent/skills/polymarket/SKILL.md +75 -0
- package/.agent/skills/polymarket/references/api-endpoints.md +220 -0
- package/.agent/skills/python-debugpy/SKILL.md +368 -0
- package/.agent/skills/requesting-code-review/SKILL.md +273 -0
- package/.agent/skills/research-paper-writing/SKILL.md +2367 -0
- package/.agent/skills/research-paper-writing/references/autoreason-methodology.md +394 -0
- package/.agent/skills/research-paper-writing/references/checklists.md +434 -0
- package/.agent/skills/research-paper-writing/references/citation-workflow.md +563 -0
- package/.agent/skills/research-paper-writing/references/experiment-patterns.md +728 -0
- package/.agent/skills/research-paper-writing/references/human-evaluation.md +476 -0
- package/.agent/skills/research-paper-writing/references/paper-types.md +481 -0
- package/.agent/skills/research-paper-writing/references/reviewer-guidelines.md +433 -0
- package/.agent/skills/research-paper-writing/references/sources.md +191 -0
- package/.agent/skills/research-paper-writing/references/writing-guide.md +474 -0
- package/.agent/skills/research-paper-writing/templates/README.md +251 -0
- package/.agent/skills/rest-graphql-debug/SKILL.md +507 -0
- package/.agent/skills/s6-container-supervision/SKILL.md +171 -0
- package/.agent/skills/scrapling/SKILL.md +328 -0
- package/.agent/skills/sherlock/SKILL.md +186 -0
- package/.agent/skills/simplify-code/SKILL.md +168 -0
- package/.agent/skills/skill-authoring/SKILL.md +158 -0
- package/.agent/skills/spike/SKILL.md +190 -0
- package/.agent/skills/subagent-driven-development/SKILL.md +345 -0
- package/.agent/skills/subagent-driven-development/references/context-budget-discipline.md +53 -0
- package/.agent/skills/subagent-driven-development/references/gates-taxonomy.md +93 -0
- package/.agent/skills/systematic-debugging/SKILL.md +360 -0
- package/.agent/skills/test-driven-development/SKILL.md +336 -0
- package/.agent/skills/video-orchestrator/SKILL.md +194 -0
- package/.agent/skills/video-orchestrator/references/examples.md +227 -0
- package/.agent/skills/video-orchestrator/references/intake.md +166 -0
- package/.agent/skills/video-orchestrator/references/kanban-setup.md +278 -0
- package/.agent/skills/video-orchestrator/references/monitoring.md +180 -0
- package/.agent/skills/video-orchestrator/references/role-archetypes.md +298 -0
- package/.agent/skills/video-orchestrator/references/tool-matrix.md +317 -0
- package/.agent/skills/web-pentest/SKILL.md +332 -0
- package/.agent/skills/web-pentest/references/bypass-techniques.md +133 -0
- package/.agent/skills/web-pentest/references/exploitation-techniques.md +204 -0
- package/.agent/skills/web-pentest/references/scope-enforcement.md +110 -0
- package/.agent/skills/web-pentest/references/vuln-taxonomy.md +81 -0
- package/.agent/skills/web-pentest/templates/authorization.md +69 -0
- package/.agent/skills/web-pentest/templates/pentest-report.md +178 -0
- package/.claude/commands/mindforge/skill-tdd.md +53 -0
- package/.claude/commands/mindforge/skills-index.md +118 -0
- package/.claude/commands/mindforge/systematic-debug.md +60 -0
- package/.mindforge/config.json +2 -2
- package/.mindforge/memory/sync-manifest.json +1 -1
- package/.mindforge/skills/arxiv/SKILL.md +294 -0
- package/.mindforge/skills/blogwatcher/SKILL.md +147 -0
- package/.mindforge/skills/code-wiki/SKILL.md +457 -0
- package/.mindforge/skills/codebase-inspection/SKILL.md +126 -0
- package/.mindforge/skills/concept-diagrams/SKILL.md +373 -0
- package/.mindforge/skills/creative-ideation/SKILL.md +162 -0
- package/.mindforge/skills/domain-intel/SKILL.md +116 -0
- package/.mindforge/skills/duckduckgo-search/SKILL.md +249 -0
- package/.mindforge/skills/github-code-review/SKILL.md +493 -0
- package/.mindforge/skills/github-issues/SKILL.md +382 -0
- package/.mindforge/skills/github-pr-workflow/SKILL.md +379 -0
- package/.mindforge/skills/jupyter-live-kernel/SKILL.md +179 -0
- package/.mindforge/skills/kanban-orchestrator/SKILL.md +227 -0
- package/.mindforge/skills/kanban-worker/SKILL.md +206 -0
- package/.mindforge/skills/meme-generation/SKILL.md +141 -0
- package/.mindforge/skills/obsidian/SKILL.md +80 -0
- package/.mindforge/skills/osint-investigation/SKILL.md +288 -0
- package/.mindforge/skills/oss-forensics/SKILL.md +421 -0
- package/.mindforge/skills/pixel-art/SKILL.md +228 -0
- package/.mindforge/skills/plan/SKILL.md +350 -0
- package/.mindforge/skills/requesting-code-review/SKILL.md +292 -0
- package/.mindforge/skills/research-paper-writing/SKILL.md +2384 -0
- package/.mindforge/skills/scrapling/SKILL.md +345 -0
- package/.mindforge/skills/sherlock/SKILL.md +203 -0
- package/.mindforge/skills/simplify-code/SKILL.md +187 -0
- package/.mindforge/skills/spike/SKILL.md +209 -0
- package/.mindforge/skills/subagent-driven-development/SKILL.md +364 -0
- package/.mindforge/skills/systematic-debugging/SKILL.md +379 -0
- package/.mindforge/skills/test-driven-development/SKILL.md +355 -0
- package/.mindforge/skills/web-pentest/SKILL.md +327 -0
- package/CHANGELOG.md +43 -0
- package/MINDFORGE.md +2 -2
- package/README.md +39 -3
- package/RELEASENOTES.md +55 -0
- package/docs/getting-started.md +42 -5
- package/package.json +1 -1
|
@@ -0,0 +1,336 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: test-driven-development
|
|
3
|
+
description: "TDD: enforce RED-GREEN-REFACTOR, tests before code."
|
|
4
|
+
version: 1.1.0
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Test-Driven Development (TDD)
|
|
8
|
+
|
|
9
|
+
## Overview
|
|
10
|
+
|
|
11
|
+
Write the test first. Watch it fail. Write minimal code to pass.
|
|
12
|
+
|
|
13
|
+
**Core principle:** If you didn't watch the test fail, you don't know if it tests the right thing.
|
|
14
|
+
|
|
15
|
+
**Violating the letter of the rules is violating the spirit of the rules.**
|
|
16
|
+
|
|
17
|
+
## When to Use
|
|
18
|
+
|
|
19
|
+
**Always:**
|
|
20
|
+
- New features
|
|
21
|
+
- Bug fixes
|
|
22
|
+
- Refactoring
|
|
23
|
+
- Behavior changes
|
|
24
|
+
|
|
25
|
+
**Exceptions (ask the user first):**
|
|
26
|
+
- Throwaway prototypes
|
|
27
|
+
- Generated code
|
|
28
|
+
- Configuration files
|
|
29
|
+
|
|
30
|
+
Thinking "skip TDD just this once"? Stop. That's rationalization.
|
|
31
|
+
|
|
32
|
+
## The Iron Law
|
|
33
|
+
|
|
34
|
+
```
|
|
35
|
+
NO PRODUCTION CODE WITHOUT A FAILING TEST FIRST
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
Write code before the test? Delete it. Start over.
|
|
39
|
+
|
|
40
|
+
**No exceptions:**
|
|
41
|
+
- Don't keep it as "reference"
|
|
42
|
+
- Don't "adapt" it while writing tests
|
|
43
|
+
- Don't look at it
|
|
44
|
+
- Delete means delete
|
|
45
|
+
|
|
46
|
+
Implement fresh from tests. Period.
|
|
47
|
+
|
|
48
|
+
## Red-Green-Refactor Cycle
|
|
49
|
+
|
|
50
|
+
### RED — Write Failing Test
|
|
51
|
+
|
|
52
|
+
Write one minimal test showing what should happen.
|
|
53
|
+
|
|
54
|
+
**Good test:**
|
|
55
|
+
```python
|
|
56
|
+
def test_retries_failed_operations_3_times():
|
|
57
|
+
attempts = 0
|
|
58
|
+
def operation():
|
|
59
|
+
nonlocal attempts
|
|
60
|
+
attempts += 1
|
|
61
|
+
if attempts < 3:
|
|
62
|
+
raise Exception('fail')
|
|
63
|
+
return 'success'
|
|
64
|
+
|
|
65
|
+
result = retry_operation(operation)
|
|
66
|
+
|
|
67
|
+
assert result == 'success'
|
|
68
|
+
assert attempts == 3
|
|
69
|
+
```
|
|
70
|
+
Clear name, tests real behavior, one thing.
|
|
71
|
+
|
|
72
|
+
**Bad test:**
|
|
73
|
+
```python
|
|
74
|
+
def test_retry_works():
|
|
75
|
+
mock = MagicMock()
|
|
76
|
+
mock.side_effect = [Exception(), Exception(), 'success']
|
|
77
|
+
result = retry_operation(mock)
|
|
78
|
+
assert result == 'success' # What about retry count? Timing?
|
|
79
|
+
```
|
|
80
|
+
Vague name, tests mock not real code.
|
|
81
|
+
|
|
82
|
+
**Requirements:**
|
|
83
|
+
- One behavior per test
|
|
84
|
+
- Clear descriptive name ("and" in name? Split it)
|
|
85
|
+
- Real code, not mocks (unless truly unavoidable)
|
|
86
|
+
- Name describes behavior, not implementation
|
|
87
|
+
|
|
88
|
+
### Verify RED — Watch It Fail
|
|
89
|
+
|
|
90
|
+
**MANDATORY. Never skip.**
|
|
91
|
+
|
|
92
|
+
```bash
|
|
93
|
+
# Use terminal tool to run the specific test
|
|
94
|
+
pytest tests/test_feature.py::test_specific_behavior -v
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
Confirm:
|
|
98
|
+
- Test fails (not errors from typos)
|
|
99
|
+
- Failure message is expected
|
|
100
|
+
- Fails because the feature is missing
|
|
101
|
+
|
|
102
|
+
**Test passes immediately?** You're testing existing behavior. Fix the test.
|
|
103
|
+
|
|
104
|
+
**Test errors?** Fix the error, re-run until it fails correctly.
|
|
105
|
+
|
|
106
|
+
### GREEN — Minimal Code
|
|
107
|
+
|
|
108
|
+
Write the simplest code to pass the test. Nothing more.
|
|
109
|
+
|
|
110
|
+
**Good:**
|
|
111
|
+
```python
|
|
112
|
+
def add(a, b):
|
|
113
|
+
return a + b # Nothing extra
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
**Bad:**
|
|
117
|
+
```python
|
|
118
|
+
def add(a, b):
|
|
119
|
+
result = a + b
|
|
120
|
+
logging.info(f"Adding {a} + {b} = {result}") # Extra!
|
|
121
|
+
return result
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
Don't add features, refactor other code, or "improve" beyond the test.
|
|
125
|
+
|
|
126
|
+
**Cheating is OK in GREEN:**
|
|
127
|
+
- Hardcode return values
|
|
128
|
+
- Copy-paste
|
|
129
|
+
- Duplicate code
|
|
130
|
+
- Skip edge cases
|
|
131
|
+
|
|
132
|
+
We'll fix it in REFACTOR.
|
|
133
|
+
|
|
134
|
+
### Verify GREEN — Watch It Pass
|
|
135
|
+
|
|
136
|
+
**MANDATORY.**
|
|
137
|
+
|
|
138
|
+
```bash
|
|
139
|
+
# Run the specific test
|
|
140
|
+
pytest tests/test_feature.py::test_specific_behavior -v
|
|
141
|
+
|
|
142
|
+
# Then run ALL tests to check for regressions
|
|
143
|
+
pytest tests/ -q
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
Confirm:
|
|
147
|
+
- Test passes
|
|
148
|
+
- Other tests still pass
|
|
149
|
+
- Output pristine (no errors, warnings)
|
|
150
|
+
|
|
151
|
+
**Test fails?** Fix the code, not the test.
|
|
152
|
+
|
|
153
|
+
**Other tests fail?** Fix regressions now.
|
|
154
|
+
|
|
155
|
+
### REFACTOR — Clean Up
|
|
156
|
+
|
|
157
|
+
After green only:
|
|
158
|
+
- Remove duplication
|
|
159
|
+
- Improve names
|
|
160
|
+
- Extract helpers
|
|
161
|
+
- Simplify expressions
|
|
162
|
+
|
|
163
|
+
Keep tests green throughout. Don't add behavior.
|
|
164
|
+
|
|
165
|
+
**If tests fail during refactor:** Undo immediately. Take smaller steps.
|
|
166
|
+
|
|
167
|
+
### Repeat
|
|
168
|
+
|
|
169
|
+
Next failing test for next behavior. One cycle at a time.
|
|
170
|
+
|
|
171
|
+
## Why Order Matters
|
|
172
|
+
|
|
173
|
+
**"I'll write tests after to verify it works"**
|
|
174
|
+
|
|
175
|
+
Tests written after code pass immediately. Passing immediately proves nothing:
|
|
176
|
+
- Might test the wrong thing
|
|
177
|
+
- Might test implementation, not behavior
|
|
178
|
+
- Might miss edge cases you forgot
|
|
179
|
+
- You never saw it catch the bug
|
|
180
|
+
|
|
181
|
+
Test-first forces you to see the test fail, proving it actually tests something.
|
|
182
|
+
|
|
183
|
+
**"I already manually tested all the edge cases"**
|
|
184
|
+
|
|
185
|
+
Manual testing is ad-hoc. You think you tested everything but:
|
|
186
|
+
- No record of what you tested
|
|
187
|
+
- Can't re-run when code changes
|
|
188
|
+
- Easy to forget cases under pressure
|
|
189
|
+
- "It worked when I tried it" ≠ comprehensive
|
|
190
|
+
|
|
191
|
+
Automated tests are systematic. They run the same way every time.
|
|
192
|
+
|
|
193
|
+
**"Deleting X hours of work is wasteful"**
|
|
194
|
+
|
|
195
|
+
Sunk cost fallacy. The time is already gone. Your choice now:
|
|
196
|
+
- Delete and rewrite with TDD (high confidence)
|
|
197
|
+
- Keep it and add tests after (low confidence, likely bugs)
|
|
198
|
+
|
|
199
|
+
The "waste" is keeping code you can't trust.
|
|
200
|
+
|
|
201
|
+
**"TDD is dogmatic, being pragmatic means adapting"**
|
|
202
|
+
|
|
203
|
+
TDD IS pragmatic:
|
|
204
|
+
- Finds bugs before commit (faster than debugging after)
|
|
205
|
+
- Prevents regressions (tests catch breaks immediately)
|
|
206
|
+
- Documents behavior (tests show how to use code)
|
|
207
|
+
- Enables refactoring (change freely, tests catch breaks)
|
|
208
|
+
|
|
209
|
+
"Pragmatic" shortcuts = debugging in production = slower.
|
|
210
|
+
|
|
211
|
+
**"Tests after achieve the same goals — it's spirit not ritual"**
|
|
212
|
+
|
|
213
|
+
No. Tests-after answer "What does this do?" Tests-first answer "What should this do?"
|
|
214
|
+
|
|
215
|
+
Tests-after are biased by your implementation. You test what you built, not what's required. Tests-first force edge case discovery before implementing.
|
|
216
|
+
|
|
217
|
+
## Common Rationalizations
|
|
218
|
+
|
|
219
|
+
| Excuse | Reality |
|
|
220
|
+
|--------|---------|
|
|
221
|
+
| "Too simple to test" | Simple code breaks. Test takes 30 seconds. |
|
|
222
|
+
| "I'll test after" | Tests passing immediately prove nothing. |
|
|
223
|
+
| "Tests after achieve same goals" | Tests-after = "what does this do?" Tests-first = "what should this do?" |
|
|
224
|
+
| "Already manually tested" | Ad-hoc ≠ systematic. No record, can't re-run. |
|
|
225
|
+
| "Deleting X hours is wasteful" | Sunk cost fallacy. Keeping unverified code is technical debt. |
|
|
226
|
+
| "Keep as reference, write tests first" | You'll adapt it. That's testing after. Delete means delete. |
|
|
227
|
+
| "Need to explore first" | Fine. Throw away exploration, start with TDD. |
|
|
228
|
+
| "Test hard = design unclear" | Listen to the test. Hard to test = hard to use. |
|
|
229
|
+
| "TDD will slow me down" | TDD faster than debugging. Pragmatic = test-first. |
|
|
230
|
+
| "Manual test faster" | Manual doesn't prove edge cases. You'll re-test every change. |
|
|
231
|
+
| "Existing code has no tests" | You're improving it. Add tests for the code you touch. |
|
|
232
|
+
|
|
233
|
+
## Red Flags — STOP and Start Over
|
|
234
|
+
|
|
235
|
+
If you catch yourself doing any of these, delete the code and restart with TDD:
|
|
236
|
+
|
|
237
|
+
- Code before test
|
|
238
|
+
- Test after implementation
|
|
239
|
+
- Test passes immediately on first run
|
|
240
|
+
- Can't explain why test failed
|
|
241
|
+
- Tests added "later"
|
|
242
|
+
- Rationalizing "just this once"
|
|
243
|
+
- "I already manually tested it"
|
|
244
|
+
- "Tests after achieve the same purpose"
|
|
245
|
+
- "Keep as reference" or "adapt existing code"
|
|
246
|
+
- "Already spent X hours, deleting is wasteful"
|
|
247
|
+
- "TDD is dogmatic, I'm being pragmatic"
|
|
248
|
+
- "This is different because..."
|
|
249
|
+
|
|
250
|
+
**All of these mean: Delete code. Start over with TDD.**
|
|
251
|
+
|
|
252
|
+
## Verification Checklist
|
|
253
|
+
|
|
254
|
+
Before marking work complete:
|
|
255
|
+
|
|
256
|
+
- [ ] Every new function/method has a test
|
|
257
|
+
- [ ] Watched each test fail before implementing
|
|
258
|
+
- [ ] Each test failed for expected reason (feature missing, not typo)
|
|
259
|
+
- [ ] Wrote minimal code to pass each test
|
|
260
|
+
- [ ] All tests pass
|
|
261
|
+
- [ ] Output pristine (no errors, warnings)
|
|
262
|
+
- [ ] Tests use real code (mocks only if unavoidable)
|
|
263
|
+
- [ ] Edge cases and errors covered
|
|
264
|
+
|
|
265
|
+
Can't check all boxes? You skipped TDD. Start over.
|
|
266
|
+
|
|
267
|
+
## When Stuck
|
|
268
|
+
|
|
269
|
+
| Problem | Solution |
|
|
270
|
+
|---------|----------|
|
|
271
|
+
| Don't know how to test | Write the wished-for API. Write the assertion first. Ask the user. |
|
|
272
|
+
| Test too complicated | Design too complicated. Simplify the interface. |
|
|
273
|
+
| Must mock everything | Code too coupled. Use dependency injection. |
|
|
274
|
+
| Test setup huge | Extract helpers. Still complex? Simplify the design. |
|
|
275
|
+
|
|
276
|
+
##
|
|
277
|
+
|
|
278
|
+
### Running Tests
|
|
279
|
+
|
|
280
|
+
Use the `terminal` tool to run tests at each step:
|
|
281
|
+
|
|
282
|
+
```python
|
|
283
|
+
# RED — verify failure
|
|
284
|
+
terminal("pytest tests/test_feature.py::test_name -v")
|
|
285
|
+
|
|
286
|
+
# GREEN — verify pass
|
|
287
|
+
terminal("pytest tests/test_feature.py::test_name -v")
|
|
288
|
+
|
|
289
|
+
# Full suite — verify no regressions
|
|
290
|
+
terminal("pytest tests/ -q")
|
|
291
|
+
```
|
|
292
|
+
|
|
293
|
+
### With delegate_task
|
|
294
|
+
|
|
295
|
+
When dispatching subagents for implementation, enforce TDD in the goal:
|
|
296
|
+
|
|
297
|
+
```python
|
|
298
|
+
delegate_task(
|
|
299
|
+
goal="Implement [feature] using strict TDD",
|
|
300
|
+
context="""
|
|
301
|
+
Follow test-driven-development skill:
|
|
302
|
+
1. Write failing test FIRST
|
|
303
|
+
2. Run test to verify it fails
|
|
304
|
+
3. Write minimal code to pass
|
|
305
|
+
4. Run test to verify it passes
|
|
306
|
+
5. Refactor if needed
|
|
307
|
+
6. Commit
|
|
308
|
+
|
|
309
|
+
Project test command: pytest tests/ -q
|
|
310
|
+
Project structure: [describe relevant files]
|
|
311
|
+
""",
|
|
312
|
+
toolsets=['terminal', 'file']
|
|
313
|
+
)
|
|
314
|
+
```
|
|
315
|
+
|
|
316
|
+
### With systematic-debugging
|
|
317
|
+
|
|
318
|
+
Bug found? Write failing test reproducing it. Follow TDD cycle. The test proves the fix and prevents regression.
|
|
319
|
+
|
|
320
|
+
Never fix bugs without a test.
|
|
321
|
+
|
|
322
|
+
## Testing Anti-Patterns
|
|
323
|
+
|
|
324
|
+
- **Testing mock behavior instead of real behavior** — mocks should verify interactions, not replace the system under test
|
|
325
|
+
- **Testing implementation details** — test behavior/results, not internal method calls
|
|
326
|
+
- **Happy path only** — always test edge cases, errors, and boundaries
|
|
327
|
+
- **Brittle tests** — tests should verify behavior, not structure; refactoring shouldn't break them
|
|
328
|
+
|
|
329
|
+
## Final Rule
|
|
330
|
+
|
|
331
|
+
```
|
|
332
|
+
Production code → test exists and failed first
|
|
333
|
+
Otherwise → not TDD
|
|
334
|
+
```
|
|
335
|
+
|
|
336
|
+
No exceptions without the user's explicit permission.
|
|
@@ -0,0 +1,194 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: kanban-video-orchestrator
|
|
3
|
+
description: Plan, set up, and monitor a multi-agent video production pipeline backed by a Kanban pipeline. Use when the user wants to make ANY video — narrative film, product/marketing, music video, explainer, ASCII/terminal art, abstract/generative loop, comic, 3D, real-time/installation — and the work warrants decomposition into specialized profiles (writer, designer, animator, renderer, voice, editor, etc.) coordinated through a kanban board. Performs adaptive discovery to scope the brief, designs an appropriate team for the requested style, generates the setup script that creates agent profiles + initial kanban task, then helps monitor execution and intervene when tasks stall or fail. Routes scenes to whichever rendering / audio / design skill fits each beat (`ascii-video`, `manim-video`, `p5js`, `comfyui`, `touchdesigner-mcp`, `blender-mcp`, `pixel-art`, `baoyu-comic`, `claude-design`, `excalidraw`, `songsee`, `heartmula`, …) plus external APIs for TTS, image-gen, and image-to-video as needed.
|
|
4
|
+
version: 1.0.0
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Kanban Video Orchestrator
|
|
8
|
+
|
|
9
|
+
Wrap any video request — from a 15-second product teaser to a 5-minute narrative
|
|
10
|
+
short to a music video to an ASCII loop — in a Kanban pipeline that
|
|
11
|
+
decomposes the work to specialized agent profiles.
|
|
12
|
+
|
|
13
|
+
This skill does **not** render anything itself. It is a meta-pipeline that:
|
|
14
|
+
|
|
15
|
+
1. **Scopes** the request through targeted discovery
|
|
16
|
+
2. **Designs** an appropriate team (which roles, which tools per role) based on the style
|
|
17
|
+
3. **Generates** a setup script that creates agent profiles, project workspace, and the initial kanban task
|
|
18
|
+
4. **Hands off** to the director profile, which decomposes via the kanban
|
|
19
|
+
5. **Monitors** execution, helps intervene when tasks stall or fail
|
|
20
|
+
|
|
21
|
+
The actual rendering happens inside the kanban once it's running, via whichever
|
|
22
|
+
existing skills + tools fit the scenes — `ascii-video`, `manim-video`, `p5js`,
|
|
23
|
+
`comfyui`, `touchdesigner-mcp`, `blender-mcp`, `songwriting-and-ai-music`,
|
|
24
|
+
`heartmula`, external APIs, or plain Python with PIL + ffmpeg.
|
|
25
|
+
|
|
26
|
+
## When NOT to use this skill
|
|
27
|
+
|
|
28
|
+
- The video is one continuous procedural project that needs no specialists. Just write the code directly.
|
|
29
|
+
- The user wants a quick one-shot conversion (e.g. "convert this mp4 to a GIF") — use ffmpeg directly.
|
|
30
|
+
- The output is a static image, GIF, or audio-only artifact — use the matching specific skill (`ascii-art`, `gifs`, `meme-generation`, `songwriting-and-ai-music`).
|
|
31
|
+
- The work fits a single existing skill cleanly (e.g. a pure ASCII video — just use `ascii-video`).
|
|
32
|
+
|
|
33
|
+
## Workflow
|
|
34
|
+
|
|
35
|
+
```
|
|
36
|
+
DISCOVER → BRIEF → TEAM DESIGN → SETUP → EXECUTE → MONITOR
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
### Step 1 — Discover (ask the right questions)
|
|
40
|
+
|
|
41
|
+
The discovery process is **adaptive**: ask only what is actually needed. Always
|
|
42
|
+
start with three questions to identify the broad shape:
|
|
43
|
+
|
|
44
|
+
- **What is the video?** (one-sentence brief)
|
|
45
|
+
- **How long?** (5-30s teaser / 30-90s short / 90s-3min explainer / 3-10min film / longer)
|
|
46
|
+
- **What aspect ratio + target platform?** (1:1 / 9:16 / 16:9; X, IG, YouTube, internal, etc.)
|
|
47
|
+
|
|
48
|
+
From the answer, classify the style category. The style determines which
|
|
49
|
+
follow-up questions to ask. **Do not ask all questions at once.** Ask 2-4 at a
|
|
50
|
+
time, listen, then proceed. Make reasonable assumptions whenever the user
|
|
51
|
+
implies an answer.
|
|
52
|
+
|
|
53
|
+
For complete intake patterns and per-style question banks, see
|
|
54
|
+
**[references/intake.md](references/intake.md)**.
|
|
55
|
+
|
|
56
|
+
### Step 2 — Brief
|
|
57
|
+
|
|
58
|
+
Once enough is known, produce a structured `brief.md` using the template in
|
|
59
|
+
`assets/brief.md.tmpl`. Stages:
|
|
60
|
+
|
|
61
|
+
1. **Concept** — the one-sentence pitch + emotional north star
|
|
62
|
+
2. **Scope** — duration, aspect, platform, deadline
|
|
63
|
+
3. **Style** — visual references, brand constraints, tone
|
|
64
|
+
4. **Scenes** — beat-by-beat breakdown (durations, content, target tool)
|
|
65
|
+
5. **Audio** — narration / music / SFX / silent (per scene if needed)
|
|
66
|
+
6. **Deliverables** — file format, resolution, optional alternates (vertical cut, GIF, etc.)
|
|
67
|
+
|
|
68
|
+
Show the brief to the user for confirmation before designing the team. **The
|
|
69
|
+
brief is the contract** — every downstream task references it.
|
|
70
|
+
|
|
71
|
+
### Step 3 — Team design
|
|
72
|
+
|
|
73
|
+
Pick role archetypes from the library that fit this video. **Compose, don't
|
|
74
|
+
clone.** Most videos need 4-7 profiles. The director is always present; the
|
|
75
|
+
rest are picked by what the brief actually requires.
|
|
76
|
+
|
|
77
|
+
For the role library and per-style team compositions, see
|
|
78
|
+
**[references/role-archetypes.md](references/role-archetypes.md)**.
|
|
79
|
+
|
|
80
|
+
For mapping role → which skills + toolsets it loads, see
|
|
81
|
+
**[references/tool-matrix.md](references/tool-matrix.md)**.
|
|
82
|
+
|
|
83
|
+
### Step 4 — Setup
|
|
84
|
+
|
|
85
|
+
Generate a setup script (`setup.sh`) and run it. The script:
|
|
86
|
+
|
|
87
|
+
1. Creates the project workspace (`~/projects/video-pipeline/<slug>/`)
|
|
88
|
+
2. Copies any provided assets into `taste/`, `audio/`, `assets/`
|
|
89
|
+
3. Creates each agent profile via `agent profile create --clone`
|
|
90
|
+
4. Writes per-profile `SOUL.md` (personality + role definition)
|
|
91
|
+
5. Configures profile YAML (toolsets, always_load skills, cwd)
|
|
92
|
+
6. Writes `brief.md`, `TEAM.md`, and `taste/` content
|
|
93
|
+
7. Fires the initial `hermes kanban create` task assigned to the director
|
|
94
|
+
|
|
95
|
+
Use `scripts/bootstrap_pipeline.py` to generate setup.sh from a brief +
|
|
96
|
+
team-design JSON. See **[references/kanban-setup.md](references/kanban-setup.md)**
|
|
97
|
+
for the setup script structure, profile config patterns, and the critical
|
|
98
|
+
"shared workspace" rule.
|
|
99
|
+
|
|
100
|
+
### Step 5 — Execute
|
|
101
|
+
|
|
102
|
+
Run `setup.sh`. Then provide the user with monitoring commands:
|
|
103
|
+
|
|
104
|
+
```bash
|
|
105
|
+
hermes kanban watch --tenant <project-tenant> # live events
|
|
106
|
+
hermes kanban list --tenant <project-tenant> # board snapshot
|
|
107
|
+
hermes dashboard # visual board UI
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
The director profile takes over from here, decomposing the work and routing
|
|
111
|
+
tasks to specialist profiles via the kanban toolset.
|
|
112
|
+
|
|
113
|
+
### Step 6 — Monitor and intervene
|
|
114
|
+
|
|
115
|
+
Stay engaged — the kanban runs autonomously but a stuck task or bad output
|
|
116
|
+
needs human (or AI) judgment.
|
|
117
|
+
|
|
118
|
+
Monitoring patterns: poll `kanban list` periodically, inspect any RUNNING task
|
|
119
|
+
that exceeds its expected duration with `kanban show <id>`, and check
|
|
120
|
+
heartbeats. When a worker's output fails review, the standard interventions are:
|
|
121
|
+
|
|
122
|
+
1. Comment on the worker's task with specific feedback (`kanban_comment`)
|
|
123
|
+
2. Create a re-run task with the original as parent
|
|
124
|
+
3. Adjust the brief's scope and let the director re-decompose
|
|
125
|
+
|
|
126
|
+
For diagnostic patterns, intervention recipes, and the "task is stuck"
|
|
127
|
+
playbook, see **[references/monitoring.md](references/monitoring.md)**.
|
|
128
|
+
|
|
129
|
+
## Reference: worked examples
|
|
130
|
+
|
|
131
|
+
Six concrete pipelines covering very different video styles — narrative film,
|
|
132
|
+
product/marketing, music video, math/algorithm explainer, ASCII video, real-time
|
|
133
|
+
installation — showing how the same workflow yields very different teams and
|
|
134
|
+
task graphs. See **[references/examples.md](references/examples.md)**.
|
|
135
|
+
|
|
136
|
+
## Critical rules
|
|
137
|
+
|
|
138
|
+
1. **Discovery before action.** Never start generating a brief or team without
|
|
139
|
+
asking at least the three baseline questions. A bad brief cascades through
|
|
140
|
+
the entire pipeline.
|
|
141
|
+
|
|
142
|
+
2. **Match the team to the video.** Don't reuse the same 4-profile setup for
|
|
143
|
+
every job. A music video that doesn't have a beat-analysis profile will
|
|
144
|
+
misfire. A narrative film that doesn't have a writer profile will produce
|
|
145
|
+
incoherent scenes. See `references/role-archetypes.md`.
|
|
146
|
+
|
|
147
|
+
3. **One workspace per project.** All profiles for a given video share the same
|
|
148
|
+
`dir:` workspace. Tasks pass artifacts via shared filesystem and structured
|
|
149
|
+
handoffs. **Every** `kanban_create` call passes
|
|
150
|
+
`workspace_kind="dir"` + `workspace_path="<absolute project path>"`.
|
|
151
|
+
|
|
152
|
+
4. **Tenant every project.** Use a project-specific tenant
|
|
153
|
+
(`--tenant <project-slug>`). Keeps the dashboard scoped and prevents
|
|
154
|
+
cross-pollination with other ongoing kanbans.
|
|
155
|
+
|
|
156
|
+
5. **Respect existing skills.** When a scene fits an existing skill, the
|
|
157
|
+
relevant renderer should load that skill via `--skill <name>` on its task
|
|
158
|
+
or `always_load` in its profile. Do not re-derive what a skill already
|
|
159
|
+
provides.
|
|
160
|
+
|
|
161
|
+
6. **The director never executes.** Even with the full `kanban + terminal +
|
|
162
|
+
file` toolset, the director's `SOUL.md` rules forbid it from executing
|
|
163
|
+
work itself. It decomposes and routes only — every concrete task becomes
|
|
164
|
+
a `hermes kanban create` call to a specialist profile. The
|
|
165
|
+
`kanban-orchestrator` skill spells this out further.
|
|
166
|
+
|
|
167
|
+
7. **Don't over-decompose.** A 30-second product video does NOT need 20 tasks.
|
|
168
|
+
Aim for the smallest task graph that still parallelizes well and exposes the
|
|
169
|
+
right human-review gates.
|
|
170
|
+
|
|
171
|
+
8. **Verify API keys BEFORE firing.** External APIs (TTS, image-gen,
|
|
172
|
+
image-to-video) need keys in `${HERMES_HOME:-~/.hermes}/.env` or the user's secret store.
|
|
173
|
+
A worker that hits a missing-key error wastes a task slot. The setup
|
|
174
|
+
script's `check_key` helper aborts cleanly if a required key is missing.
|
|
175
|
+
|
|
176
|
+
## File map
|
|
177
|
+
|
|
178
|
+
```
|
|
179
|
+
SKILL.md ← this file (workflow + rules)
|
|
180
|
+
references/
|
|
181
|
+
intake.md ← discovery question banks per style
|
|
182
|
+
role-archetypes.md ← role library (writer, designer, animator, …)
|
|
183
|
+
tool-matrix.md ← skill + toolset mapping per role
|
|
184
|
+
kanban-setup.md ← setup script structure & profile config
|
|
185
|
+
monitoring.md ← watch + intervene patterns
|
|
186
|
+
examples.md ← six worked pipelines
|
|
187
|
+
assets/
|
|
188
|
+
brief.md.tmpl ← brief skeleton
|
|
189
|
+
setup.sh.tmpl ← setup script skeleton
|
|
190
|
+
soul.md.tmpl ← profile personality skeleton
|
|
191
|
+
scripts/
|
|
192
|
+
bootstrap_pipeline.py ← generate setup.sh from brief + team JSON
|
|
193
|
+
monitor.py ← polling + intervention helpers
|
|
194
|
+
```
|