openhermes 2.6.1 → 4.0.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/CONTEXT.md +18 -0
- package/ETHOS.md +15 -0
- package/README.md +135 -292
- package/bootstrap.mjs +174 -499
- package/harness/agents/openhermes.md +87 -0
- package/harness/codex/CONSTITUTION.md +70 -148
- package/harness/codex/ROUTING.md +126 -0
- package/harness/commands/oh-doctor.md +26 -0
- package/harness/instructions/CONVENTIONS.md +206 -206
- package/harness/instructions/RUNTIME.md +54 -31
- package/harness/skills/oh-builder/SKILL.md +98 -0
- package/harness/skills/oh-caveman/SKILL.md +33 -0
- package/harness/skills/oh-expert/SKILL.md +121 -0
- package/harness/skills/oh-freeze/SKILL.md +28 -0
- package/harness/skills/oh-gauntlet/SKILL.md +119 -0
- package/harness/skills/oh-grill/SKILL.md +77 -0
- package/harness/skills/oh-guard/SKILL.md +33 -0
- package/harness/skills/oh-handoff/SKILL.md +33 -0
- package/harness/skills/oh-health/SKILL.md +90 -0
- package/harness/skills/oh-init/SKILL.md +78 -0
- package/harness/skills/oh-investigate/SKILL.md +35 -0
- package/harness/skills/oh-issue/SKILL.md +36 -0
- package/harness/skills/oh-learn/SKILL.md +28 -0
- package/harness/skills/oh-manifest/SKILL.md +84 -0
- package/harness/skills/oh-plan-review/SKILL.md +128 -0
- package/harness/skills/oh-planner/SKILL.md +157 -0
- package/harness/skills/oh-prd/SKILL.md +35 -0
- package/harness/skills/oh-retro/SKILL.md +33 -0
- package/harness/skills/oh-review/SKILL.md +110 -0
- package/harness/skills/oh-security/SKILL.md +110 -0
- package/harness/skills/oh-ship/SKILL.md +39 -0
- package/harness/skills/oh-skill-craft/SKILL.md +107 -0
- package/harness/skills/oh-skills-link/SKILL.md +29 -0
- package/harness/skills/oh-skills-list/SKILL.md +31 -0
- package/harness/skills/oh-triage/SKILL.md +36 -0
- package/index.mjs +3 -58
- package/lib/harness-resolver.mjs +77 -0
- package/lib/logger.mjs +62 -0
- package/package.json +49 -53
- package/test/plugins-behavioral.test.mjs +64 -0
- package/test/plugins.test.mjs +62 -0
- package/autorecall.mjs +0 -237
- package/curator.mjs +0 -455
- package/harness/commands/build-fix.md +0 -60
- package/harness/commands/checkpoint.md +0 -68
- package/harness/commands/code-review.md +0 -71
- package/harness/commands/doctor.md +0 -42
- package/harness/commands/eval.md +0 -89
- package/harness/commands/go-build.md +0 -87
- package/harness/commands/go-review.md +0 -71
- package/harness/commands/harness-audit.md +0 -90
- package/harness/commands/learn.md +0 -37
- package/harness/commands/loop-start.md +0 -38
- package/harness/commands/loop-status.md +0 -30
- package/harness/commands/memory-search.md +0 -37
- package/harness/commands/model-route.md +0 -32
- package/harness/commands/ohc.md +0 -13
- package/harness/commands/orchestrate.md +0 -88
- package/harness/commands/plan.md +0 -53
- package/harness/commands/quality-gate.md +0 -35
- package/harness/commands/refactor-clean.md +0 -102
- package/harness/commands/rust-build.md +0 -78
- package/harness/commands/rust-review.md +0 -65
- package/harness/commands/security.md +0 -93
- package/harness/commands/setup-pm.md +0 -65
- package/harness/commands/skill-create.md +0 -99
- package/harness/commands/test-coverage.md +0 -80
- package/harness/commands/update-codemaps.md +0 -81
- package/harness/commands/update-docs.md +0 -67
- package/harness/commands/verify.md +0 -68
- package/harness/prompts/architect.txt +0 -189
- package/harness/prompts/build-cpp.md +0 -98
- package/harness/prompts/build-error-resolver.md +0 -44
- package/harness/prompts/build-go.md +0 -340
- package/harness/prompts/build-java.md +0 -140
- package/harness/prompts/build-kotlin.md +0 -137
- package/harness/prompts/build-rust.md +0 -108
- package/harness/prompts/code-reviewer.md +0 -40
- package/harness/prompts/doc-updater.md +0 -206
- package/harness/prompts/docs-lookup.md +0 -71
- package/harness/prompts/e2e-runner.txt +0 -317
- package/harness/prompts/explore.md +0 -42
- package/harness/prompts/harness-optimizer.md +0 -42
- package/harness/prompts/loop-operator.md +0 -53
- package/harness/prompts/planner.md +0 -37
- package/harness/prompts/refactor-cleaner.md +0 -256
- package/harness/prompts/review-cpp.md +0 -81
- package/harness/prompts/review-database.md +0 -261
- package/harness/prompts/review-go.md +0 -257
- package/harness/prompts/review-java.md +0 -113
- package/harness/prompts/review-kotlin.md +0 -143
- package/harness/prompts/review-python.md +0 -101
- package/harness/prompts/review-rust.md +0 -77
- package/harness/prompts/security-reviewer.md +0 -42
- package/harness/prompts/tdd-guide.md +0 -228
- package/harness/rules/audit.md +0 -84
- package/harness/rules/checkpointing.md +0 -75
- package/harness/rules/context-loading.md +0 -33
- package/harness/rules/credential-exposure.md +0 -0
- package/harness/rules/delegation.md +0 -80
- package/harness/rules/handoff.md +0 -267
- package/harness/rules/memory-management.md +0 -28
- package/harness/rules/precedence.md +0 -52
- package/harness/rules/promotion.md +0 -46
- package/harness/rules/ranking.md +0 -64
- package/harness/rules/retrieval.md +0 -94
- package/harness/rules/runtime-guards.md +0 -196
- package/harness/rules/self-heal.md +0 -79
- package/harness/rules/session-start.md +0 -34
- package/harness/rules/skills-management.md +0 -165
- package/harness/rules/state-drift.md +0 -192
- package/harness/rules/verification.md +0 -88
- package/harness/scripts/sync-commands.mjs +0 -259
- package/harness/skills/.bundled_manifest +0 -17
- package/harness/skills/.usage.json +0 -6
- package/harness/skills/api-design/SKILL.md +0 -523
- package/harness/skills/backend-patterns/SKILL.md +0 -598
- package/harness/skills/coding-standards/SKILL.md +0 -549
- package/harness/skills/e2e-testing/SKILL.md +0 -326
- package/harness/skills/frontend-patterns/SKILL.md +0 -642
- package/harness/skills/frontend-slides/SKILL.md +0 -184
- package/harness/skills/security-review/SKILL.md +0 -495
- package/harness/skills/strategic-compact/SKILL.md +0 -131
- package/harness/skills/tdd-workflow/SKILL.md +0 -463
- package/harness/skills/verification-loop/SKILL.md +0 -126
- package/lib/ambient-memory.mjs +0 -167
- package/lib/handoff.mjs +0 -176
- package/lib/hardening.mjs +0 -128
- package/lib/memory-tools-plugin.mjs +0 -365
- package/lib/ohc/block-sync.mjs +0 -69
- package/lib/ohc/compress/search.mjs +0 -152
- package/lib/ohc/compress/state.mjs +0 -76
- package/lib/ohc/config.mjs +0 -186
- package/lib/ohc/message-ids.mjs +0 -168
- package/lib/ohc/notify.mjs +0 -154
- package/lib/ohc/protected-patterns.mjs +0 -54
- package/lib/ohc/prune-apply.mjs +0 -134
- package/lib/ohc/pruner.mjs +0 -610
- package/lib/ohc/reaper.mjs +0 -70
- package/lib/ohc/state.mjs +0 -266
- package/lib/ohc/strategies/deduplication.mjs +0 -72
- package/lib/ohc/strategies/index.mjs +0 -2
- package/lib/ohc/strategies/purge-errors.mjs +0 -43
- package/lib/ohc/token-utils.mjs +0 -26
- package/lib/ohc/updater.mjs +0 -133
- package/lib/paths.mjs +0 -50
- package/lib/schema-validator.mjs +0 -77
- package/lib/search.mjs +0 -48
- package/schemas/audit.schema.json +0 -82
- package/schemas/backlog.schema.json +0 -63
- package/schemas/checkpoint.schema.json +0 -65
- package/schemas/constraint.schema.json +0 -62
- package/schemas/decision.schema.json +0 -63
- package/schemas/instinct.schema.json +0 -63
- package/schemas/loop-state.schema.json +0 -33
- package/schemas/mistake.schema.json +0 -64
- package/schemas/verification_receipt.schema.json +0 -88
- package/skill-builder.mjs +0 -88
|
@@ -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.
|
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
description: Update codemaps for codebase navigation
|
|
3
|
-
agent: doc-updater
|
|
4
|
-
subtask: true
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
# Update Codemaps Command
|
|
8
|
-
|
|
9
|
-
Update codemaps to reflect current codebase structure: $ARGUMENTS
|
|
10
|
-
|
|
11
|
-
## Your Task
|
|
12
|
-
|
|
13
|
-
Generate or update codemaps in `docs/CODEMAPS/` directory:
|
|
14
|
-
|
|
15
|
-
1. **Analyze codebase structure**
|
|
16
|
-
2. **Generate component maps**
|
|
17
|
-
3. **Document relationships**
|
|
18
|
-
4. **Update navigation guides**
|
|
19
|
-
|
|
20
|
-
## Codemap Types
|
|
21
|
-
|
|
22
|
-
### Architecture Map
|
|
23
|
-
```
|
|
24
|
-
docs/CODEMAPS/ARCHITECTURE.md
|
|
25
|
-
```
|
|
26
|
-
- High-level system overview
|
|
27
|
-
- Component relationships
|
|
28
|
-
- Data flow diagrams
|
|
29
|
-
|
|
30
|
-
### Module Map
|
|
31
|
-
```
|
|
32
|
-
docs/CODEMAPS/MODULES.md
|
|
33
|
-
```
|
|
34
|
-
- Module descriptions
|
|
35
|
-
- Public APIs
|
|
36
|
-
- Dependencies
|
|
37
|
-
|
|
38
|
-
### File Map
|
|
39
|
-
```
|
|
40
|
-
docs/CODEMAPS/FILES.md
|
|
41
|
-
```
|
|
42
|
-
- Directory structure
|
|
43
|
-
- File purposes
|
|
44
|
-
- Key files
|
|
45
|
-
|
|
46
|
-
## Codemap Format
|
|
47
|
-
|
|
48
|
-
### [Module Name]
|
|
49
|
-
|
|
50
|
-
**Purpose**: [Brief description]
|
|
51
|
-
|
|
52
|
-
**Location**: `src/[path]/`
|
|
53
|
-
|
|
54
|
-
**Key Files**:
|
|
55
|
-
- `file1.ts` - [purpose]
|
|
56
|
-
- `file2.ts` - [purpose]
|
|
57
|
-
|
|
58
|
-
**Dependencies**:
|
|
59
|
-
- [Module A]
|
|
60
|
-
- [Module B]
|
|
61
|
-
|
|
62
|
-
**Exports**:
|
|
63
|
-
- `functionName()` - [description]
|
|
64
|
-
- `ClassName` - [description]
|
|
65
|
-
|
|
66
|
-
**Usage Example**:
|
|
67
|
-
```typescript
|
|
68
|
-
import { functionName } from '@/module'
|
|
69
|
-
```
|
|
70
|
-
|
|
71
|
-
## Generation Process
|
|
72
|
-
|
|
73
|
-
1. Scan directory structure
|
|
74
|
-
2. Parse imports/exports
|
|
75
|
-
3. Build dependency graph
|
|
76
|
-
4. Generate markdown maps
|
|
77
|
-
5. Validate links
|
|
78
|
-
|
|
79
|
-
---
|
|
80
|
-
|
|
81
|
-
**TIP**: Keep codemaps updated when adding new modules or significant refactoring.
|