openhermes 2.8.0 → 4.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (158) hide show
  1. package/CONTEXT.md +18 -0
  2. package/ETHOS.md +15 -0
  3. package/README.md +135 -292
  4. package/bootstrap.mjs +174 -512
  5. package/harness/agents/openhermes.md +87 -0
  6. package/harness/codex/CONSTITUTION.md +70 -148
  7. package/harness/codex/ROUTING.md +126 -0
  8. package/harness/commands/oh-doctor.md +26 -0
  9. package/harness/instructions/CONVENTIONS.md +206 -206
  10. package/harness/instructions/RUNTIME.md +54 -31
  11. package/harness/skills/oh-builder/SKILL.md +98 -0
  12. package/harness/skills/oh-caveman/SKILL.md +33 -0
  13. package/harness/skills/oh-expert/SKILL.md +121 -0
  14. package/harness/skills/oh-freeze/SKILL.md +28 -0
  15. package/harness/skills/oh-gauntlet/SKILL.md +119 -0
  16. package/harness/skills/oh-grill/SKILL.md +77 -0
  17. package/harness/skills/oh-guard/SKILL.md +33 -0
  18. package/harness/skills/oh-handoff/SKILL.md +33 -0
  19. package/harness/skills/oh-health/SKILL.md +90 -0
  20. package/harness/skills/oh-init/SKILL.md +78 -0
  21. package/harness/skills/oh-investigate/SKILL.md +35 -0
  22. package/harness/skills/oh-issue/SKILL.md +36 -0
  23. package/harness/skills/oh-learn/SKILL.md +28 -0
  24. package/harness/skills/oh-manifest/SKILL.md +84 -0
  25. package/harness/skills/oh-plan-review/SKILL.md +128 -0
  26. package/harness/skills/oh-planner/SKILL.md +159 -0
  27. package/harness/skills/oh-prd/SKILL.md +35 -0
  28. package/harness/skills/oh-retro/SKILL.md +33 -0
  29. package/harness/skills/oh-review/SKILL.md +110 -0
  30. package/harness/skills/oh-security/SKILL.md +110 -0
  31. package/harness/skills/oh-ship/SKILL.md +39 -0
  32. package/harness/skills/oh-skill-craft/SKILL.md +107 -0
  33. package/harness/skills/oh-skills-link/SKILL.md +29 -0
  34. package/harness/skills/oh-skills-list/SKILL.md +31 -0
  35. package/harness/skills/oh-triage/SKILL.md +36 -0
  36. package/index.mjs +3 -60
  37. package/lib/harness-resolver.mjs +77 -0
  38. package/lib/logger.mjs +62 -0
  39. package/package.json +49 -53
  40. package/test/plugins-behavioral.test.mjs +64 -0
  41. package/test/plugins.test.mjs +62 -0
  42. package/autorecall.mjs +0 -237
  43. package/curator.mjs +0 -482
  44. package/harness/commands/build-fix.md +0 -60
  45. package/harness/commands/checkpoint.md +0 -68
  46. package/harness/commands/code-review.md +0 -71
  47. package/harness/commands/doctor.md +0 -42
  48. package/harness/commands/eval.md +0 -89
  49. package/harness/commands/go-build.md +0 -87
  50. package/harness/commands/go-review.md +0 -71
  51. package/harness/commands/harness-audit.md +0 -90
  52. package/harness/commands/learn.md +0 -37
  53. package/harness/commands/loop-start.md +0 -38
  54. package/harness/commands/loop-status.md +0 -30
  55. package/harness/commands/memory-search.md +0 -37
  56. package/harness/commands/model-route.md +0 -32
  57. package/harness/commands/ohc.md +0 -13
  58. package/harness/commands/orchestrate.md +0 -88
  59. package/harness/commands/plan.md +0 -53
  60. package/harness/commands/quality-gate.md +0 -35
  61. package/harness/commands/refactor-clean.md +0 -102
  62. package/harness/commands/rust-build.md +0 -78
  63. package/harness/commands/rust-review.md +0 -65
  64. package/harness/commands/security.md +0 -93
  65. package/harness/commands/setup-pm.md +0 -65
  66. package/harness/commands/skill-create.md +0 -99
  67. package/harness/commands/test-coverage.md +0 -80
  68. package/harness/commands/update-codemaps.md +0 -81
  69. package/harness/commands/update-docs.md +0 -67
  70. package/harness/commands/verify.md +0 -68
  71. package/harness/prompts/architect.txt +0 -189
  72. package/harness/prompts/build-cpp.md +0 -98
  73. package/harness/prompts/build-error-resolver.md +0 -44
  74. package/harness/prompts/build-go.md +0 -340
  75. package/harness/prompts/build-java.md +0 -140
  76. package/harness/prompts/build-kotlin.md +0 -137
  77. package/harness/prompts/build-rust.md +0 -108
  78. package/harness/prompts/code-reviewer.md +0 -40
  79. package/harness/prompts/doc-updater.md +0 -206
  80. package/harness/prompts/docs-lookup.md +0 -71
  81. package/harness/prompts/e2e-runner.txt +0 -317
  82. package/harness/prompts/explore.md +0 -42
  83. package/harness/prompts/harness-optimizer.md +0 -42
  84. package/harness/prompts/loop-operator.md +0 -53
  85. package/harness/prompts/planner.md +0 -37
  86. package/harness/prompts/refactor-cleaner.md +0 -256
  87. package/harness/prompts/review-cpp.md +0 -81
  88. package/harness/prompts/review-database.md +0 -261
  89. package/harness/prompts/review-go.md +0 -257
  90. package/harness/prompts/review-java.md +0 -113
  91. package/harness/prompts/review-kotlin.md +0 -143
  92. package/harness/prompts/review-python.md +0 -101
  93. package/harness/prompts/review-rust.md +0 -77
  94. package/harness/prompts/security-reviewer.md +0 -42
  95. package/harness/prompts/tdd-guide.md +0 -228
  96. package/harness/rules/audit.md +0 -84
  97. package/harness/rules/checkpointing.md +0 -75
  98. package/harness/rules/context-loading.md +0 -33
  99. package/harness/rules/credential-exposure.md +0 -0
  100. package/harness/rules/delegation.md +0 -80
  101. package/harness/rules/handoff.md +0 -267
  102. package/harness/rules/memory-management.md +0 -28
  103. package/harness/rules/precedence.md +0 -52
  104. package/harness/rules/promotion.md +0 -46
  105. package/harness/rules/ranking.md +0 -64
  106. package/harness/rules/retrieval.md +0 -94
  107. package/harness/rules/runtime-guards.md +0 -196
  108. package/harness/rules/self-heal.md +0 -79
  109. package/harness/rules/session-start.md +0 -34
  110. package/harness/rules/skills-management.md +0 -165
  111. package/harness/rules/state-drift.md +0 -192
  112. package/harness/rules/verification.md +0 -88
  113. package/harness/scripts/sync-commands.mjs +0 -259
  114. package/harness/skills/.bundled_manifest +0 -17
  115. package/harness/skills/.usage.json +0 -6
  116. package/harness/skills/api-design/SKILL.md +0 -523
  117. package/harness/skills/backend-patterns/SKILL.md +0 -598
  118. package/harness/skills/coding-standards/SKILL.md +0 -549
  119. package/harness/skills/e2e-testing/SKILL.md +0 -326
  120. package/harness/skills/frontend-patterns/SKILL.md +0 -642
  121. package/harness/skills/frontend-slides/SKILL.md +0 -184
  122. package/harness/skills/security-review/SKILL.md +0 -495
  123. package/harness/skills/strategic-compact/SKILL.md +0 -131
  124. package/harness/skills/tdd-workflow/SKILL.md +0 -463
  125. package/harness/skills/verification-loop/SKILL.md +0 -126
  126. package/lib/ambient-memory.mjs +0 -167
  127. package/lib/handoff.mjs +0 -171
  128. package/lib/hardening.mjs +0 -146
  129. package/lib/memory-tools-plugin.mjs +0 -368
  130. package/lib/ohc/block-sync.mjs +0 -69
  131. package/lib/ohc/compress/search.mjs +0 -152
  132. package/lib/ohc/compress/state.mjs +0 -76
  133. package/lib/ohc/config.mjs +0 -185
  134. package/lib/ohc/message-ids.mjs +0 -178
  135. package/lib/ohc/notify.mjs +0 -135
  136. package/lib/ohc/protected-patterns.mjs +0 -55
  137. package/lib/ohc/prune-apply.mjs +0 -134
  138. package/lib/ohc/pruner.mjs +0 -608
  139. package/lib/ohc/reaper.mjs +0 -70
  140. package/lib/ohc/state.mjs +0 -265
  141. package/lib/ohc/strategies/deduplication.mjs +0 -72
  142. package/lib/ohc/strategies/index.mjs +0 -2
  143. package/lib/ohc/strategies/purge-errors.mjs +0 -43
  144. package/lib/ohc/token-utils.mjs +0 -26
  145. package/lib/ohc/updater.mjs +0 -132
  146. package/lib/paths.mjs +0 -49
  147. package/lib/schema-validator.mjs +0 -79
  148. package/lib/search.mjs +0 -48
  149. package/schemas/audit.schema.json +0 -82
  150. package/schemas/backlog.schema.json +0 -63
  151. package/schemas/checkpoint.schema.json +0 -65
  152. package/schemas/constraint.schema.json +0 -62
  153. package/schemas/decision.schema.json +0 -63
  154. package/schemas/instinct.schema.json +0 -63
  155. package/schemas/loop-state.schema.json +0 -33
  156. package/schemas/mistake.schema.json +0 -64
  157. package/schemas/verification_receipt.schema.json +0 -88
  158. package/skill-builder.mjs +0 -88
@@ -1,53 +0,0 @@
1
- ---
2
- description: Create implementation plan with risk assessment
3
- agent: planner
4
- subtask: true
5
- ---
6
-
7
- # Plan Command
8
-
9
- Create a detailed implementation plan for: $ARGUMENTS
10
-
11
- ## Project context
12
-
13
- !git branch --show-current 2>&1 && echo "---" && git log --oneline -20 2>&1 || echo "No git repo"
14
-
15
- ## Your Task
16
-
17
- 1. **Restate Requirements** - Clarify what needs to be built
18
- 2. **Identify Risks** - Surface potential issues, blockers, and dependencies
19
- 3. **Create Step Plan** - Break down implementation into phases
20
- 4. **Wait for Confirmation** - MUST receive user approval before proceeding
21
-
22
- ## Output Format
23
-
24
- ### Requirements Restatement
25
- [Clear, concise restatement of what will be built]
26
-
27
- ### Implementation Phases
28
- [Phase 1: Description]
29
- - Step 1.1
30
- - Step 1.2
31
- ...
32
-
33
- [Phase 2: Description]
34
- - Step 2.1
35
- - Step 2.2
36
- ...
37
-
38
- ### Dependencies
39
- [List external dependencies, APIs, services needed]
40
-
41
- ### Risks
42
- - HIGH: [Critical risks that could block implementation]
43
- - MEDIUM: [Moderate risks to address]
44
- - LOW: [Minor concerns]
45
-
46
- ### Estimated Complexity
47
- [HIGH/MEDIUM/LOW with time estimates]
48
-
49
- **WAITING FOR CONFIRMATION**: Proceed with this plan? (yes/no/modify)
50
-
51
- ---
52
-
53
- **CRITICAL**: Do NOT write any code until the user explicitly confirms with "yes", "proceed", or similar affirmative response.
@@ -1,35 +0,0 @@
1
- ---
2
- description: Run quality pipeline on demand for a file or project scope
3
- agent: OpenHermes
4
- subtask: true
5
- ---
6
-
7
- # Quality Gate Command
8
-
9
- Run the quality pipeline on demand for a file or project scope.
10
-
11
- ## Usage
12
-
13
- `/quality-gate [path|.] [--fix] [--strict]`
14
-
15
- - default target: current directory (`.`)
16
- - `--fix`: allow auto-format/fix where configured
17
- - `--strict`: fail on warnings where supported
18
-
19
- ## Pipeline
20
-
21
- 1. Detect language/tooling for target.
22
- 2. Run formatter checks.
23
- 3. Run lint/type checks when available.
24
- 4. Produce a concise remediation list.
25
-
26
- ## Notes
27
-
28
- This command mirrors hook behavior but is operator-invoked.
29
-
30
- ## Arguments
31
-
32
- $ARGUMENTS:
33
- - `[path|.]` optional target path
34
- - `--fix` optional
35
- - `--strict` optional
@@ -1,102 +0,0 @@
1
- ---
2
- description: Remove dead code and consolidate duplicates
3
- agent: refactor-cleaner
4
- subtask: true
5
- ---
6
-
7
- # Refactor Clean Command
8
-
9
- Analyze and clean up the codebase: $ARGUMENTS
10
-
11
- ## Your Task
12
-
13
- 1. **Detect dead code** using analysis tools
14
- 2. **Identify duplicates** and consolidation opportunities
15
- 3. **Safely remove** unused code with documentation
16
- 4. **Verify** no functionality broken
17
-
18
- ## Detection Phase
19
-
20
- ### Run Analysis Tools
21
-
22
- ```bash
23
- # Find unused exports
24
- npx knip
25
-
26
- # Find unused dependencies
27
- npx depcheck
28
-
29
- # Find unused TypeScript exports
30
- npx ts-prune
31
- ```
32
-
33
- ### Manual Checks
34
-
35
- - Unused functions (no callers)
36
- - Unused variables
37
- - Unused imports
38
- - Commented-out code
39
- - Unreachable code
40
- - Unused CSS classes
41
-
42
- ## Removal Phase
43
-
44
- ### Before Removing
45
-
46
- 1. **Search for usage** - grep, find references
47
- 2. **Check exports** - might be used externally
48
- 3. **Verify tests** - no test depends on it
49
- 4. **Document removal** - git commit message
50
-
51
- ### Safe Removal Order
52
-
53
- 1. Remove unused imports first
54
- 2. Remove unused private functions
55
- 3. Remove unused exported functions
56
- 4. Remove unused types/interfaces
57
- 5. Remove unused files
58
-
59
- ## Consolidation Phase
60
-
61
- ### Identify Duplicates
62
-
63
- - Similar functions with minor differences
64
- - Copy-pasted code blocks
65
- - Repeated patterns
66
-
67
- ### Consolidation Strategies
68
-
69
- 1. **Extract utility function** - for repeated logic
70
- 2. **Create base class** - for similar classes
71
- 3. **Use higher-order functions** - for repeated patterns
72
- 4. **Create shared constants** - for magic values
73
-
74
- ## Verification
75
-
76
- After cleanup:
77
-
78
- 1. `npm run build` - builds successfully
79
- 2. `npm test` - all tests pass
80
- 3. `npm run lint` - no new lint errors
81
- 4. Manual smoke test - features work
82
-
83
- ## Report Format
84
-
85
- ```
86
- Dead Code Analysis
87
- ==================
88
-
89
- Removed:
90
- - file.ts: functionName (unused export)
91
- - utils.ts: helperFunction (no callers)
92
-
93
- Consolidated:
94
- - formatDate() and formatDateTime() → dateUtils.format()
95
-
96
- Remaining (manual review needed):
97
- - oldComponent.tsx: potentially unused, verify with team
98
- ```
99
-
100
- ---
101
-
102
- **CAUTION**: Always verify before removing. When in doubt, ask or add `// TODO: verify usage` comment.
@@ -1,78 +0,0 @@
1
- ---
2
- description: Fix Rust build errors and borrow checker issues
3
- agent: build-rust
4
- subtask: true
5
- ---
6
-
7
- # Rust Build Command
8
-
9
- Fix Rust build, clippy, and dependency errors: $ARGUMENTS
10
-
11
- ## Your Task
12
-
13
- 1. **Run cargo check**: `cargo check 2>&1`
14
- 2. **Run cargo clippy**: `cargo clippy -- -D warnings 2>&1`
15
- 3. **Fix errors** one at a time
16
- 4. **Verify fixes** don't introduce new errors
17
-
18
- ## Common Rust Errors
19
-
20
- ### Borrow Checker
21
- ```
22
- cannot borrow `x` as mutable because it is also borrowed as immutable
23
- ```
24
- **Fix**: Restructure to end immutable borrow first; clone only if justified
25
-
26
- ### Type Mismatch
27
- ```
28
- mismatched types: expected `T`, found `U`
29
- ```
30
- **Fix**: Add `.into()`, `as`, or explicit type conversion
31
-
32
- ### Missing Import
33
- ```
34
- unresolved import `crate::module`
35
- ```
36
- **Fix**: Fix the `use` path or declare the module (add Cargo.toml deps only for external crates)
37
-
38
- ### Lifetime Errors
39
- ```
40
- does not live long enough
41
- ```
42
- **Fix**: Use owned type or add lifetime annotation
43
-
44
- ### Trait Not Implemented
45
- ```
46
- the trait `X` is not implemented for `Y`
47
- ```
48
- **Fix**: Add `#[derive(Trait)]` or implement manually
49
-
50
- ## Fix Order
51
-
52
- 1. **Build errors** - Code must compile
53
- 2. **Clippy warnings** - Fix suspicious constructs
54
- 3. **Formatting** - `cargo fmt` compliance
55
-
56
- ## Build Commands
57
-
58
- ```bash
59
- cargo check 2>&1
60
- cargo clippy -- -D warnings 2>&1
61
- cargo fmt --check 2>&1
62
- cargo tree --duplicates
63
- cargo test
64
- ```
65
-
66
- ## Verification
67
-
68
- After fixes:
69
- ```bash
70
- cargo check # Should succeed
71
- cargo clippy -- -D warnings # No warnings allowed
72
- cargo fmt --check # Formatting should pass
73
- cargo test # Tests should pass
74
- ```
75
-
76
- ---
77
-
78
- **IMPORTANT**: Fix errors only. No refactoring, no improvements. Get the build green with minimal changes.
@@ -1,65 +0,0 @@
1
- ---
2
- description: Rust code review for ownership, safety, and idiomatic patterns
3
- agent: review-rust
4
- subtask: true
5
- ---
6
-
7
- # Rust Review Command
8
-
9
- Review Rust code for idiomatic patterns and best practices: $ARGUMENTS
10
-
11
- ## Your Task
12
-
13
- 1. **Analyze Rust code** for idioms and patterns
14
- 2. **Check ownership** - borrowing, lifetimes, unnecessary clones
15
- 3. **Review error handling** - proper `?` propagation, no unwrap in production
16
- 4. **Verify safety** - unsafe usage, injection, secrets
17
-
18
- ## Review Checklist
19
-
20
- ### Safety (CRITICAL)
21
- - [ ] No unchecked `unwrap()`/`expect()` in production paths
22
- - [ ] `unsafe` blocks have `// SAFETY:` comments
23
- - [ ] No SQL/command injection
24
- - [ ] No hardcoded secrets
25
-
26
- ### Ownership (HIGH)
27
- - [ ] No unnecessary `.clone()` to satisfy borrow checker
28
- - [ ] `&str` preferred over `String` in function parameters
29
- - [ ] `&[T]` preferred over `Vec<T>` in function parameters
30
- - [ ] No excessive lifetime annotations where elision works
31
-
32
- ### Error Handling (HIGH)
33
- - [ ] Errors propagated with `?`; use `.context()` in `anyhow`/`eyre` application code
34
- - [ ] No silenced errors (`let _ = result;`)
35
- - [ ] `thiserror` for library errors, `anyhow` for applications
36
-
37
- ### Concurrency (HIGH)
38
- - [ ] No blocking in async context
39
- - [ ] Bounded channels preferred
40
- - [ ] `Mutex` poisoning handled
41
- - [ ] `Send`/`Sync` bounds correct
42
-
43
- ### Code Quality (MEDIUM)
44
- - [ ] Functions under 50 lines
45
- - [ ] No deep nesting (>4 levels)
46
- - [ ] Exhaustive matching on business enums
47
- - [ ] Clippy warnings addressed
48
-
49
- ## Report Format
50
-
51
- ### CRITICAL Issues
52
- - [file:line] Issue description
53
- Suggestion: How to fix
54
-
55
- ### HIGH Issues
56
- - [file:line] Issue description
57
- Suggestion: How to fix
58
-
59
- ### MEDIUM Issues
60
- - [file:line] Issue description
61
- Suggestion: How to fix
62
-
63
- ---
64
-
65
- **TIP**: Run `cargo clippy -- -D warnings` and `cargo fmt --check` for automated checks.
@@ -1,93 +0,0 @@
1
- ---
2
- description: Run comprehensive security review
3
- agent: security-reviewer
4
- subtask: true
5
- ---
6
-
7
- # Security Review Command
8
-
9
- Conduct a comprehensive security review: $ARGUMENTS
10
-
11
- ## Dependency audit
12
-
13
- !npm audit --json 2>&1 || echo '{"error":"npm audit unavailable"}'
14
-
15
- ## Your Task
16
-
17
- Analyze the specified code for security vulnerabilities following OWASP guidelines and security best practices.
18
-
19
- ## Security Checklist
20
-
21
- ### OWASP Top 10
22
-
23
- 1. **Injection** (SQL, NoSQL, OS command, LDAP)
24
- - Check for parameterized queries
25
- - Verify input sanitization
26
- - Review dynamic query construction
27
-
28
- 2. **Broken Authentication**
29
- - Password storage (bcrypt, argon2)
30
- - Session management
31
- - Multi-factor authentication
32
- - Password reset flows
33
-
34
- 3. **Sensitive Data Exposure**
35
- - Encryption at rest and in transit
36
- - Proper key management
37
- - PII handling
38
-
39
- 4. **XML External Entities (XXE)**
40
- - Disable DTD processing
41
- - Input validation for XML
42
-
43
- 5. **Broken Access Control**
44
- - Authorization checks on every endpoint
45
- - Role-based access control
46
- - Resource ownership validation
47
-
48
- 6. **Security Misconfiguration**
49
- - Default credentials removed
50
- - Error handling doesn't leak info
51
- - Security headers configured
52
-
53
- 7. **Cross-Site Scripting (XSS)**
54
- - Output encoding
55
- - Content Security Policy
56
- - Input sanitization
57
-
58
- 8. **Insecure Deserialization**
59
- - Validate serialized data
60
- - Implement integrity checks
61
-
62
- 9. **Using Components with Known Vulnerabilities**
63
- - Run `npm audit`
64
- - Check for outdated dependencies
65
-
66
- 10. **Insufficient Logging & Monitoring**
67
- - Security events logged
68
- - No sensitive data in logs
69
- - Alerting configured
70
-
71
- ### Additional Checks
72
-
73
- - [ ] Secrets in code (API keys, passwords)
74
- - [ ] Environment variable handling
75
- - [ ] CORS configuration
76
- - [ ] Rate limiting
77
- - [ ] CSRF protection
78
- - [ ] Secure cookie flags
79
-
80
- ## Report Format
81
-
82
- ### Critical Issues
83
- [Issues that must be fixed immediately]
84
-
85
- ### High Priority
86
- [Issues that should be fixed before release]
87
-
88
- ### Recommendations
89
- [Security improvements to consider]
90
-
91
- ---
92
-
93
- **IMPORTANT**: Security issues are blockers. Do not proceed until critical issues are resolved.
@@ -1,65 +0,0 @@
1
- ---
2
- description: Configure package manager preference for OpenHermes
3
- agent: OpenHermes
4
- subtask: true
5
- ---
6
-
7
- # Setup Package Manager Command
8
-
9
- Configure your preferred package manager: $ARGUMENTS
10
-
11
- ## Your Task
12
-
13
- Set up package manager preference for the project or globally.
14
-
15
- ## Detection Order
16
-
17
- 1. **Environment variable**: `OPENHERMES_PACKAGE_MANAGER`
18
- 2. **Project config**: `.opencode/package-manager.json`
19
- 3. **package.json**: `packageManager` field
20
- 4. **Lock file**: Auto-detect from lock files
21
- 5. **Global config**: `~/.config/opencode/package-manager.json`
22
- 6. **Fallback**: First available
23
-
24
- ## Configuration Options
25
-
26
- ### Option 1: Environment Variable
27
- ```bash
28
- $env:OPENHERMES_PACKAGE_MANAGER="pnpm"
29
- ```
30
-
31
- ### Option 2: Project Config
32
- ```bash
33
- # Create .opencode/package-manager.json
34
- echo '{"packageManager": "pnpm"}' | Out-File -Encoding utf8 .opencode/package-manager.json
35
- ```
36
-
37
- ### Option 3: package.json
38
- ```json
39
- {
40
- "packageManager": "pnpm@8.0.0"
41
- }
42
- ```
43
-
44
- ### Option 4: Global Config
45
- ```bash
46
- # Create ~/.config/opencode/package-manager.json
47
- echo '{"packageManager": "yarn"}' | Out-File -Encoding utf8 ~/.config/opencode/package-manager.json
48
- ```
49
-
50
- ## Supported Package Managers
51
-
52
- | Manager | Lock File | Commands |
53
- |---------|-----------|----------|
54
- | npm | package-lock.json | `npm install`, `npm run` |
55
- | pnpm | pnpm-lock.yaml | `pnpm install`, `pnpm run` |
56
- | yarn | yarn.lock | `yarn install`, `yarn run` |
57
- | bun | bun.lockb | `bun install`, `bun run` |
58
-
59
- ## Verification
60
-
61
- Check current setting by inspecting detection order from top down.
62
-
63
- ---
64
-
65
- **TIP**: For consistency across team, add `packageManager` field to package.json.
@@ -1,99 +0,0 @@
1
- ---
2
- description: Generate SKILL.md files from git history analysis
3
- agent: OpenHermes
4
- subtask: true
5
- ---
6
-
7
- # Skill Create Command
8
-
9
- Analyze git history to generate OpenHermes skills: $ARGUMENTS
10
-
11
- ## Your Task
12
-
13
- 1. **Analyze commits** - Pattern recognition from history
14
- 2. **Extract patterns** - Common practices and conventions
15
- 3. **Generate SKILL.md** - Structured skill documentation in OH harness format
16
-
17
- ## Analysis Process
18
-
19
- ### Step 1: Gather Commit Data
20
- ```bash
21
- # Recent commits
22
- git log --oneline -100
23
-
24
- # Commits by file type
25
- git log --name-only --pretty=format: | sort | uniq -c | sort -rn
26
-
27
- # Most changed files
28
- git log --pretty=format: --name-only | sort | uniq -c | sort -rn | head -20
29
- ```
30
-
31
- ### Step 2: Identify Patterns
32
-
33
- **Commit Message Patterns**:
34
- - Common prefixes (feat, fix, refactor)
35
- - Naming conventions
36
- - Co-author patterns
37
-
38
- **Code Patterns**:
39
- - File structure conventions
40
- - Import organization
41
- - Error handling approaches
42
-
43
- **Review Patterns**:
44
- - Common review feedback
45
- - Recurring fix types
46
- - Quality gates
47
-
48
- ### Step 3: Generate SKILL.md
49
-
50
- ```markdown
51
- # [Skill Name]
52
-
53
- ## Overview
54
- [What this skill teaches]
55
-
56
- ## Patterns
57
-
58
- ### Pattern 1: [Name]
59
- - When to use
60
- - Implementation
61
- - Example
62
-
63
- ### Pattern 2: [Name]
64
- - When to use
65
- - Implementation
66
- - Example
67
-
68
- ## Best Practices
69
-
70
- 1. [Practice 1]
71
- 2. [Practice 2]
72
- 3. [Practice 3]
73
-
74
- ## Common Mistakes
75
-
76
- 1. [Mistake 1] - How to avoid
77
- 2. [Mistake 2] - How to avoid
78
-
79
- ## Examples
80
-
81
- ### Good Example
82
- ```[language]
83
- // Code example
84
- ```
85
-
86
- ### Anti-pattern
87
- ```[language]
88
- // What not to do
89
- ```
90
- ```
91
-
92
- ## Output
93
-
94
- Creates:
95
- - `skills/[name]/SKILL.md` - Skill documentation in OpenHermes harness format
96
-
97
- ---
98
-
99
- **TIP**: Run `/skill-create` after several related commits to extract reusable patterns.
@@ -1,80 +0,0 @@
1
- ---
2
- description: Analyze and improve test coverage
3
- agent: tdd-guide
4
- subtask: true
5
- ---
6
-
7
- # Test Coverage Command
8
-
9
- Analyze test coverage and identify gaps: $ARGUMENTS
10
-
11
- ## Your Task
12
-
13
- 1. **Run coverage report**: `npm test -- --coverage`
14
- 2. **Analyze results** - Identify low coverage areas
15
- 3. **Prioritize gaps** - Critical code first
16
- 4. **Generate missing tests** - For uncovered code
17
-
18
- ## Coverage Targets
19
-
20
- | Code Type | Target |
21
- |-----------|--------|
22
- | Standard code | 80% |
23
- | Financial logic | 100% |
24
- | Auth/security | 100% |
25
- | Utilities | 90% |
26
- | UI components | 70% |
27
-
28
- ## Coverage Report Analysis
29
-
30
- ### Summary
31
- ```
32
- File | % Stmts | % Branch | % Funcs | % Lines
33
- ---------------|---------|----------|---------|--------
34
- All files | XX | XX | XX | XX
35
- ```
36
-
37
- ### Low Coverage Files
38
- [Files below target, prioritized by criticality]
39
-
40
- ### Uncovered Lines
41
- [Specific lines that need tests]
42
-
43
- ## Test Generation
44
-
45
- For each uncovered area:
46
-
47
- ### [Function/Component Name]
48
-
49
- **Location**: `src/path/file.ts:123`
50
-
51
- **Coverage Gap**: [description]
52
-
53
- **Suggested Tests**:
54
- ```typescript
55
- describe('functionName', () => {
56
- it('should [expected behavior]', () => {
57
- // Test code
58
- })
59
-
60
- it('should handle [edge case]', () => {
61
- // Edge case test
62
- })
63
- })
64
- ```
65
-
66
- ## Coverage Improvement Plan
67
-
68
- 1. **Critical** (add immediately)
69
- - [ ] file1.ts - Auth logic
70
- - [ ] file2.ts - Payment handling
71
-
72
- 2. **High** (add this sprint)
73
- - [ ] file3.ts - Core business logic
74
-
75
- 3. **Medium** (add when touching file)
76
- - [ ] file4.ts - Utilities
77
-
78
- ---
79
-
80
- **IMPORTANT**: Coverage is a metric, not a goal. Focus on meaningful tests, not just hitting numbers.