claudecode-omc 4.8.3 → 4.8.4
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/dist/__tests__/consolidation-contracts.test.js +1 -2
- package/dist/__tests__/consolidation-contracts.test.js.map +1 -1
- package/dist/__tests__/skills.test.js +15 -5
- package/dist/__tests__/skills.test.js.map +1 -1
- package/package.json +1 -1
- package/skills/analyze/SKILL.md +42 -0
- package/skills/bdd-generator/SKILL.md +60 -0
- package/skills/e2e/SKILL.md +55 -0
- package/skills/electron-driver/SKILL.md +51 -0
- package/skills/electron-driver/scripts/driver-template.js +46 -0
- package/skills/multi-model-research/SKILL.md +51 -0
- package/skills/planning-with-files/SKILL.md +49 -0
- package/skills/planning-with-files/examples.md +17 -0
- package/skills/planning-with-files/reference.md +21 -0
- package/skills/planning-with-files/scripts/check-complete.ps1 +28 -0
- package/skills/planning-with-files/scripts/check-complete.sh +31 -0
- package/skills/planning-with-files/scripts/init-session.ps1 +31 -0
- package/skills/planning-with-files/scripts/init-session.sh +36 -0
- package/skills/planning-with-files/scripts/session-catchup.py +66 -0
- package/skills/planning-with-files/templates/findings.md +24 -0
- package/skills/planning-with-files/templates/progress.md +38 -0
- package/skills/planning-with-files/templates/task_plan.md +53 -0
- package/skills/start-dev/SKILL.md +45 -0
- package/skills/tdd-generator/SKILL.md +51 -0
- package/skills/test-coverage/SKILL.md +40 -0
- package/skills/test-gen/SKILL.md +70 -0
- package/skills/test-gen/skill.md +0 -531
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# Initialize planning files in the current project root.
|
|
3
|
+
# Usage: bash skills/planning-with-files/scripts/init-session.sh [project-name]
|
|
4
|
+
|
|
5
|
+
set -euo pipefail
|
|
6
|
+
|
|
7
|
+
PROJECT_NAME="${1:-project}"
|
|
8
|
+
DATE="$(date +%Y-%m-%d)"
|
|
9
|
+
|
|
10
|
+
echo "Initializing planning files for: ${PROJECT_NAME}"
|
|
11
|
+
|
|
12
|
+
if [[ ! -f task_plan.md ]]; then
|
|
13
|
+
cp skills/planning-with-files/templates/task_plan.md task_plan.md
|
|
14
|
+
echo "Created task_plan.md"
|
|
15
|
+
else
|
|
16
|
+
echo "task_plan.md already exists, skipping"
|
|
17
|
+
fi
|
|
18
|
+
|
|
19
|
+
if [[ ! -f findings.md ]]; then
|
|
20
|
+
cp skills/planning-with-files/templates/findings.md findings.md
|
|
21
|
+
echo "Created findings.md"
|
|
22
|
+
else
|
|
23
|
+
echo "findings.md already exists, skipping"
|
|
24
|
+
fi
|
|
25
|
+
|
|
26
|
+
if [[ ! -f progress.md ]]; then
|
|
27
|
+
cp skills/planning-with-files/templates/progress.md progress.md
|
|
28
|
+
# Replace session token with current date for convenience.
|
|
29
|
+
sed -i.bak "s/\\[DATE\\]/${DATE}/g" progress.md && rm -f progress.md.bak
|
|
30
|
+
echo "Created progress.md"
|
|
31
|
+
else
|
|
32
|
+
echo "progress.md already exists, skipping"
|
|
33
|
+
fi
|
|
34
|
+
|
|
35
|
+
echo "Planning files initialized."
|
|
36
|
+
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
"""
|
|
3
|
+
Session catchup helper for planning-with-files.
|
|
4
|
+
|
|
5
|
+
Checks if planning files were updated long ago while the working tree changed,
|
|
6
|
+
and prints a lightweight catchup reminder.
|
|
7
|
+
"""
|
|
8
|
+
|
|
9
|
+
from __future__ import annotations
|
|
10
|
+
|
|
11
|
+
import os
|
|
12
|
+
import subprocess
|
|
13
|
+
import sys
|
|
14
|
+
from datetime import datetime
|
|
15
|
+
from pathlib import Path
|
|
16
|
+
|
|
17
|
+
PLANNING_FILES = ("task_plan.md", "findings.md", "progress.md")
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
def run(cmd: list[str], cwd: Path) -> str:
|
|
21
|
+
try:
|
|
22
|
+
out = subprocess.check_output(cmd, cwd=str(cwd), stderr=subprocess.STDOUT, text=True)
|
|
23
|
+
return out.strip()
|
|
24
|
+
except Exception:
|
|
25
|
+
return ""
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
def newest_planning_mtime(root: Path) -> float:
|
|
29
|
+
mtimes = []
|
|
30
|
+
for name in PLANNING_FILES:
|
|
31
|
+
p = root / name
|
|
32
|
+
if p.exists():
|
|
33
|
+
mtimes.append(p.stat().st_mtime)
|
|
34
|
+
return max(mtimes) if mtimes else 0.0
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
def main() -> int:
|
|
38
|
+
root = Path(sys.argv[1]).resolve() if len(sys.argv) > 1 else Path.cwd().resolve()
|
|
39
|
+
if not (root / ".git").exists():
|
|
40
|
+
return 0
|
|
41
|
+
|
|
42
|
+
planning_mtime = newest_planning_mtime(root)
|
|
43
|
+
if planning_mtime == 0:
|
|
44
|
+
return 0
|
|
45
|
+
|
|
46
|
+
diff_stat = run(["git", "diff", "--stat"], root)
|
|
47
|
+
if not diff_stat:
|
|
48
|
+
return 0
|
|
49
|
+
|
|
50
|
+
now = datetime.now().timestamp()
|
|
51
|
+
age_hours = (now - planning_mtime) / 3600
|
|
52
|
+
if age_hours < 1:
|
|
53
|
+
return 0
|
|
54
|
+
|
|
55
|
+
print("[planning-with-files] Catchup reminder")
|
|
56
|
+
print("Detected git changes after last planning file update.")
|
|
57
|
+
print("Recommended next steps:")
|
|
58
|
+
print("1. Read task_plan.md, findings.md, progress.md")
|
|
59
|
+
print("2. Run: git diff --stat")
|
|
60
|
+
print("3. Sync planning files with current code changes")
|
|
61
|
+
return 0
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
if __name__ == "__main__":
|
|
65
|
+
raise SystemExit(main())
|
|
66
|
+
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# Findings and Decisions
|
|
2
|
+
|
|
3
|
+
## Requirements
|
|
4
|
+
-
|
|
5
|
+
|
|
6
|
+
## Research Findings
|
|
7
|
+
-
|
|
8
|
+
|
|
9
|
+
## Technical Decisions
|
|
10
|
+
| Decision | Rationale |
|
|
11
|
+
|----------|-----------|
|
|
12
|
+
| | |
|
|
13
|
+
|
|
14
|
+
## Issues Encountered
|
|
15
|
+
| Issue | Resolution |
|
|
16
|
+
|-------|------------|
|
|
17
|
+
| | |
|
|
18
|
+
|
|
19
|
+
## Resources
|
|
20
|
+
-
|
|
21
|
+
|
|
22
|
+
## Visual or Browser Findings
|
|
23
|
+
-
|
|
24
|
+
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# Progress Log
|
|
2
|
+
|
|
3
|
+
## Session: [DATE]
|
|
4
|
+
|
|
5
|
+
### Phase 1: [Title]
|
|
6
|
+
- **Status:** in_progress
|
|
7
|
+
- **Started:** [timestamp]
|
|
8
|
+
- Actions taken:
|
|
9
|
+
-
|
|
10
|
+
- Files created or modified:
|
|
11
|
+
-
|
|
12
|
+
|
|
13
|
+
### Phase 2: [Title]
|
|
14
|
+
- **Status:** pending
|
|
15
|
+
- Actions taken:
|
|
16
|
+
-
|
|
17
|
+
- Files created or modified:
|
|
18
|
+
-
|
|
19
|
+
|
|
20
|
+
## Test Results
|
|
21
|
+
| Test | Input | Expected | Actual | Status |
|
|
22
|
+
|------|-------|----------|--------|--------|
|
|
23
|
+
| | | | | |
|
|
24
|
+
|
|
25
|
+
## Error Log
|
|
26
|
+
| Timestamp | Error | Attempt | Resolution |
|
|
27
|
+
|-----------|-------|---------|------------|
|
|
28
|
+
| | | 1 | |
|
|
29
|
+
|
|
30
|
+
## Reboot Check
|
|
31
|
+
| Question | Answer |
|
|
32
|
+
|----------|--------|
|
|
33
|
+
| Where am I? | Phase X |
|
|
34
|
+
| Where am I going? | Remaining phases |
|
|
35
|
+
| What is the goal? | See task_plan.md |
|
|
36
|
+
| What have I learned? | See findings.md |
|
|
37
|
+
| What have I done? | See this file |
|
|
38
|
+
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
# Task Plan: [Brief Description]
|
|
2
|
+
|
|
3
|
+
## Goal
|
|
4
|
+
[One sentence describing the end state]
|
|
5
|
+
|
|
6
|
+
## Current Phase
|
|
7
|
+
Phase 1
|
|
8
|
+
|
|
9
|
+
## Phases
|
|
10
|
+
|
|
11
|
+
### Phase 1: Requirements and Discovery
|
|
12
|
+
- [ ] Understand user intent
|
|
13
|
+
- [ ] Identify constraints and requirements
|
|
14
|
+
- [ ] Document findings in findings.md
|
|
15
|
+
- **Status:** in_progress
|
|
16
|
+
|
|
17
|
+
### Phase 2: Planning and Structure
|
|
18
|
+
- [ ] Define technical approach
|
|
19
|
+
- [ ] Create project structure if needed
|
|
20
|
+
- [ ] Document major decisions
|
|
21
|
+
- **Status:** pending
|
|
22
|
+
|
|
23
|
+
### Phase 3: Implementation
|
|
24
|
+
- [ ] Execute plan in small steps
|
|
25
|
+
- [ ] Keep changes reversible
|
|
26
|
+
- [ ] Verify incrementally
|
|
27
|
+
- **Status:** pending
|
|
28
|
+
|
|
29
|
+
### Phase 4: Testing and Verification
|
|
30
|
+
- [ ] Verify requirements are met
|
|
31
|
+
- [ ] Log test results in progress.md
|
|
32
|
+
- [ ] Fix issues found
|
|
33
|
+
- **Status:** pending
|
|
34
|
+
|
|
35
|
+
### Phase 5: Delivery
|
|
36
|
+
- [ ] Review output quality
|
|
37
|
+
- [ ] Summarize results and residual risks
|
|
38
|
+
- **Status:** pending
|
|
39
|
+
|
|
40
|
+
## Key Questions
|
|
41
|
+
1. [Question to answer]
|
|
42
|
+
2. [Question to answer]
|
|
43
|
+
|
|
44
|
+
## Decisions Made
|
|
45
|
+
| Decision | Rationale |
|
|
46
|
+
|----------|-----------|
|
|
47
|
+
| | |
|
|
48
|
+
|
|
49
|
+
## Errors Encountered
|
|
50
|
+
| Error | Attempt | Resolution |
|
|
51
|
+
|-------|---------|------------|
|
|
52
|
+
| | 1 | |
|
|
53
|
+
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: start-dev
|
|
3
|
+
description: Adaptive development workflow that runs discover -> research -> plan -> implement -> verify with explicit quality gates.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# start-dev
|
|
7
|
+
|
|
8
|
+
Use this skill as a practical default for non-trivial feature delivery.
|
|
9
|
+
|
|
10
|
+
## Goal
|
|
11
|
+
|
|
12
|
+
Move from request to verified implementation with minimal rework.
|
|
13
|
+
|
|
14
|
+
## Workflow
|
|
15
|
+
|
|
16
|
+
1. Discover:
|
|
17
|
+
- Map affected modules
|
|
18
|
+
- Identify constraints and existing patterns
|
|
19
|
+
2. Research:
|
|
20
|
+
- Validate version-sensitive APIs and framework behavior from official docs
|
|
21
|
+
3. Plan:
|
|
22
|
+
- Define smallest reversible change
|
|
23
|
+
- List files and risks
|
|
24
|
+
4. Implement:
|
|
25
|
+
- Execute in small increments
|
|
26
|
+
- Keep tests and build green
|
|
27
|
+
5. Verify:
|
|
28
|
+
- Run targeted tests, then broader checks
|
|
29
|
+
- Summarize residual risk honestly
|
|
30
|
+
|
|
31
|
+
## Delegation Pattern
|
|
32
|
+
|
|
33
|
+
- `explore` for codebase mapping
|
|
34
|
+
- `architect` for design tradeoffs
|
|
35
|
+
- `executor` for implementation
|
|
36
|
+
- `test-engineer` for test strategy
|
|
37
|
+
- `code-reviewer` or `verifier` for final quality pass
|
|
38
|
+
|
|
39
|
+
## Quality Gates
|
|
40
|
+
|
|
41
|
+
- Requirements are explicit before coding.
|
|
42
|
+
- Plan includes rollback strategy.
|
|
43
|
+
- Verification commands and results are captured.
|
|
44
|
+
- No completion claim without evidence.
|
|
45
|
+
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: tdd-generator
|
|
3
|
+
description: Test-driven workflow for unit, component, and E2E testing. Enforces Red-Green-Refactor and generates the right test type for changed code.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# TDD Generator
|
|
7
|
+
|
|
8
|
+
Use this skill to drive implementation through tests first.
|
|
9
|
+
|
|
10
|
+
## Workflow
|
|
11
|
+
|
|
12
|
+
1. Detect target type:
|
|
13
|
+
- Pure logic -> unit tests
|
|
14
|
+
- UI behavior -> component/integration tests
|
|
15
|
+
- User journeys -> E2E tests
|
|
16
|
+
2. RED:
|
|
17
|
+
- Write failing test first
|
|
18
|
+
3. GREEN:
|
|
19
|
+
- Implement minimal code to pass
|
|
20
|
+
4. REFACTOR:
|
|
21
|
+
- Improve structure while keeping tests green
|
|
22
|
+
5. Add regression cases for discovered bugs and edges.
|
|
23
|
+
|
|
24
|
+
## Recommended Stack
|
|
25
|
+
|
|
26
|
+
- Unit/component: Vitest + Testing Library
|
|
27
|
+
- E2E: Playwright
|
|
28
|
+
|
|
29
|
+
## E2E Agent Option
|
|
30
|
+
|
|
31
|
+
For large journey suites, you can run Playwright test agents:
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
npx playwright test --init-agents
|
|
35
|
+
npx playwright test --agent=planner
|
|
36
|
+
npx playwright test --agent=generator
|
|
37
|
+
npx playwright test --agent=healer --repeat
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
## Quality Rules
|
|
41
|
+
|
|
42
|
+
- Test behavior, not private implementation details.
|
|
43
|
+
- Prefer semantic queries (`getByRole`, `getByLabelText`) for UI tests.
|
|
44
|
+
- Keep one assertion intent per test case.
|
|
45
|
+
- Add explicit edge cases and failure-path coverage.
|
|
46
|
+
|
|
47
|
+
## References
|
|
48
|
+
|
|
49
|
+
- Playwright best practices: https://playwright.dev/docs/best-practices
|
|
50
|
+
- Vitest guide: https://vitest.dev/guide/
|
|
51
|
+
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: test-coverage
|
|
3
|
+
description: Analyze coverage, prioritize untested risk hotspots, generate missing tests, and verify threshold improvements.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Test Coverage
|
|
7
|
+
|
|
8
|
+
Use this skill to close meaningful coverage gaps, not just raise percentages.
|
|
9
|
+
|
|
10
|
+
## Workflow
|
|
11
|
+
|
|
12
|
+
1. Run coverage:
|
|
13
|
+
- `pnpm test --coverage` or `npx vitest run --coverage`
|
|
14
|
+
2. Parse summary and rank low-coverage files by risk:
|
|
15
|
+
- Business-critical logic
|
|
16
|
+
- Error handling paths
|
|
17
|
+
- Security-sensitive branches
|
|
18
|
+
3. Generate targeted tests:
|
|
19
|
+
- Unit for pure functions
|
|
20
|
+
- Integration for service/API boundaries
|
|
21
|
+
- E2E for critical user journeys
|
|
22
|
+
4. Re-run coverage and report before/after delta.
|
|
23
|
+
|
|
24
|
+
## Coverage Rules
|
|
25
|
+
|
|
26
|
+
- Use thresholds per project policy; default target can start at 80%.
|
|
27
|
+
- Cover meaningful branches and failure modes, not only statements.
|
|
28
|
+
- Exclude generated/build/vendor files explicitly.
|
|
29
|
+
- Enable all-file analysis when feasible to avoid hidden zero-coverage files.
|
|
30
|
+
|
|
31
|
+
## Vitest Guidance
|
|
32
|
+
|
|
33
|
+
- Default provider is V8; use Istanbul if project requires instrumentation parity.
|
|
34
|
+
- Configure `coverage.include`, `coverage.exclude`, and `coverage.thresholds`.
|
|
35
|
+
|
|
36
|
+
## References
|
|
37
|
+
|
|
38
|
+
- Vitest coverage guide: https://vitest.dev/guide/coverage.html
|
|
39
|
+
- Vitest coverage config: https://vitest.dev/config/#coverage
|
|
40
|
+
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: test-gen
|
|
3
|
+
description: Post-change intelligent test generation workflow that detects stack, analyzes changed files, and produces acceptance plus regression tests.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Test Generation Workflow
|
|
7
|
+
|
|
8
|
+
Use this skill after code changes to generate the right tests quickly.
|
|
9
|
+
|
|
10
|
+
## Workflow
|
|
11
|
+
|
|
12
|
+
### Phase 1: Detect context
|
|
13
|
+
|
|
14
|
+
```bash
|
|
15
|
+
omc test detect-stack
|
|
16
|
+
omc test changed
|
|
17
|
+
omc test analyze path/to/file
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
Prefer `omc test changed` when the goal is to cover the current diff.
|
|
21
|
+
|
|
22
|
+
### Phase 2: Generate testing pack
|
|
23
|
+
|
|
24
|
+
```bash
|
|
25
|
+
omc test gen path/to/file
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
Expected artifacts:
|
|
29
|
+
|
|
30
|
+
- test plan
|
|
31
|
+
- acceptance checklist
|
|
32
|
+
- regression checklist
|
|
33
|
+
|
|
34
|
+
### Phase 3: Write or update tests
|
|
35
|
+
|
|
36
|
+
Choose test depth by risk:
|
|
37
|
+
|
|
38
|
+
- Pure logic -> unit tests
|
|
39
|
+
- UI behavior -> component/integration tests
|
|
40
|
+
- Async I/O or cross-boundary behavior -> integration tests
|
|
41
|
+
- Critical user flows -> E2E tests
|
|
42
|
+
|
|
43
|
+
### Phase 4: Verify
|
|
44
|
+
|
|
45
|
+
Run the smallest targeted test command first, then broaden if needed.
|
|
46
|
+
|
|
47
|
+
If higher orchestration is needed, combine with:
|
|
48
|
+
|
|
49
|
+
- `/oh-my-claudecode:tdd-generator`
|
|
50
|
+
- `/oh-my-claudecode:test-coverage`
|
|
51
|
+
- `/oh-my-claudecode:ultraqa`
|
|
52
|
+
|
|
53
|
+
## Rules
|
|
54
|
+
|
|
55
|
+
- Do not stop at happy-path-only coverage.
|
|
56
|
+
- Add regression assertions for risk signals.
|
|
57
|
+
- Avoid implementation-detail-only tests.
|
|
58
|
+
- If no safe automated test can be added, provide a concrete manual regression checklist.
|
|
59
|
+
|
|
60
|
+
## Output
|
|
61
|
+
|
|
62
|
+
Always report:
|
|
63
|
+
|
|
64
|
+
1. analyzed target files
|
|
65
|
+
2. generated/updated test files
|
|
66
|
+
3. acceptance items covered
|
|
67
|
+
4. regression items covered
|
|
68
|
+
5. commands executed
|
|
69
|
+
6. remaining gaps
|
|
70
|
+
|