Initial commit

This commit is contained in:
Zhongwei Li
2025-11-30 08:37:11 +08:00
commit 20b36ca9b1
56 changed files with 14530 additions and 0 deletions

View File

@@ -0,0 +1,31 @@
# Universal Exit Criteria Pattern
Add this section to define clear completion:
## Definition of Done
You may ONLY claim completion when:
□ All checklist items complete
□ Verification commands run and passed
□ Output evidence included in response
□ No "should" or "probably" in message
□ State tracking shows all phases done
□ No unresolved blockers
**Incomplete checklist = not done**
Example claim structure:
```
Status: Task complete
Evidence:
- Tests: 15/15 passing [output shown above]
- Lint: No errors [output shown above]
- Build: Success [output shown above]
- All requirements met [checklist verified]
The implementation is complete and verified.
```
**Never claim done without this structure.**

View File

@@ -0,0 +1,74 @@
# Universal Failure Recovery Pattern
Add this section to any skill with potential failure points:
## When You Violate This Skill
**Skills can be violated by skipping steps or doing things out of order.**
Add skill-specific violation recovery procedures:
### Violation Template
```markdown
### Violation: [Common violation name]
**How to detect:**
[What indicates this violation occurred]
**Recovery procedure:**
1. [Step 1 to recover]
2. [Step 2 to recover]
3. [Step 3 to recover]
**Why recovery matters:**
[Explanation of why you can't just continue]
```
**Example:**
Violation: Wrote implementation before test (in TDD)
**How to detect:**
- Implementation file exists but no test file
- Git history shows implementation committed before test
**Recovery procedure:**
1. Stash or delete the implementation code
2. Write the failing test first
3. Run test to verify it fails
4. Rewrite the implementation to make test pass
**Why recovery matters:**
The test must fail first to prove it actually tests something. If implementation exists first, you can't verify the test works - it might be passing for the wrong reason or not testing anything at all.
---
## When Things Go Wrong
**If you get stuck:**
1. **Attempt failed?**
- Document exactly what happened
- Include error messages verbatim
- Note what you tried
2. **Can't proceed?**
- State blocker explicitly: "Blocked by: [specific issue]"
- Don't guess or work around
- Ask for help
3. **Confused?**
- Say "I don't understand [specific thing]"
- Don't pretend to understand
- Research or ask for clarification
4. **Multiple failures?**
- After 3 attempts: STOP
- Document all attempts
- Reassess approach with human partner
**Never:** Pretend to succeed when stuck
**Never:** Continue after 3 failures
**Never:** Hide confusion or errors
**Always:** Be explicit about blockage

View File

@@ -0,0 +1,30 @@
# Universal State Tracking Pattern
Add this section to any multi-step skill:
## State Tracking (MANDATORY)
Create and maintain a status comment:
```
SKILL: [skill-name]
PHASE: [current phase/step]
COMPLETED: [✓ list what's done]
NEXT: [→ what's next]
EVIDENCE: [last verification output]
BLOCKED: [any blockers]
```
**Update after EACH phase/step.**
Example:
```
SKILL: systematic-debugging
PHASE: 2 - Pattern Analysis
COMPLETED: ✓ Error reproduced ✓ Recent changes reviewed
NEXT: → Compare with working examples
EVIDENCE: Test fails with "KeyError: 'user_id'"
BLOCKED: None
```
This comment should be included in EVERY response while using the skill.

View File

@@ -0,0 +1,38 @@
# Universal TodoWrite Integration
Add this requirement to skill starts:
## TodoWrite Requirement
**BEFORE starting this skill:**
1. Create todos for major phases:
```javascript
[
{content: "Phase 1: [name]", status: "in_progress", activeForm: "Working on Phase 1"},
{content: "Phase 2: [name]", status: "pending", activeForm: "Working on Phase 2"},
{content: "Phase 3: [name]", status: "pending", activeForm: "Working on Phase 3"}
]
```
2. Update after each phase:
- Mark complete when done
- Move next to in_progress
- Add any new discovered tasks
3. Never work without todos:
- Skipping todos = skipping the skill
- Mental tracking = guaranteed to miss steps
- Todos are your external memory
**Example for debugging:**
```javascript
[
{content: "Root cause investigation", status: "in_progress", ...},
{content: "Pattern analysis", status: "pending", ...},
{content: "Hypothesis testing", status: "pending", ...},
{content: "Implementation", status: "pending", ...}
]
```
If you're not updating todos, you're not following the skill.