agentsys 5.2.1 → 5.3.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.
- package/.claude-plugin/marketplace.json +1 -1
- package/.claude-plugin/plugin.json +1 -1
- package/.cursor/commands/audit-project-agents.md +454 -0
- package/.cursor/commands/audit-project-github.md +141 -0
- package/.cursor/commands/audit-project.md +330 -0
- package/.cursor/commands/consult.md +417 -0
- package/.cursor/commands/debate.md +381 -0
- package/.cursor/commands/delivery-approval.md +334 -0
- package/.cursor/commands/deslop.md +142 -0
- package/.cursor/commands/drift-detect.md +259 -0
- package/.cursor/commands/enhance.md +172 -0
- package/.cursor/commands/learn.md +165 -0
- package/.cursor/commands/next-task.md +519 -0
- package/.cursor/commands/perf.md +464 -0
- package/.cursor/commands/repo-map.md +124 -0
- package/.cursor/commands/ship-ci-review-loop.md +468 -0
- package/.cursor/commands/ship-deployment.md +348 -0
- package/.cursor/commands/ship-error-handling.md +265 -0
- package/.cursor/commands/ship.md +517 -0
- package/.cursor/commands/sync-docs.md +171 -0
- package/.cursor/commands/web-ctl.md +101 -0
- package/.cursor/skills/consult/SKILL.md +425 -0
- package/.cursor/skills/debate/SKILL.md +316 -0
- package/.cursor/skills/deslop/SKILL.md +204 -0
- package/.cursor/skills/discover-tasks/SKILL.md +297 -0
- package/.cursor/skills/drift-analysis/SKILL.md +324 -0
- package/.cursor/skills/enhance-agent-prompts/SKILL.md +277 -0
- package/.cursor/skills/enhance-claude-memory/SKILL.md +387 -0
- package/.cursor/skills/enhance-cross-file/SKILL.md +110 -0
- package/.cursor/skills/enhance-docs/SKILL.md +298 -0
- package/.cursor/skills/enhance-hooks/SKILL.md +554 -0
- package/.cursor/skills/enhance-orchestrator/SKILL.md +255 -0
- package/.cursor/skills/enhance-plugins/SKILL.md +319 -0
- package/.cursor/skills/enhance-prompts/SKILL.md +340 -0
- package/.cursor/skills/enhance-skills/SKILL.md +436 -0
- package/.cursor/skills/learn/SKILL.md +349 -0
- package/.cursor/skills/orchestrate-review/SKILL.md +260 -0
- package/.cursor/skills/perf-analyzer/SKILL.md +37 -0
- package/.cursor/skills/perf-baseline-manager/SKILL.md +30 -0
- package/.cursor/skills/perf-benchmarker/SKILL.md +52 -0
- package/.cursor/skills/perf-code-paths/SKILL.md +32 -0
- package/.cursor/skills/perf-investigation-logger/SKILL.md +41 -0
- package/.cursor/skills/perf-profiler/SKILL.md +42 -0
- package/.cursor/skills/perf-theory-gatherer/SKILL.md +35 -0
- package/.cursor/skills/perf-theory-tester/SKILL.md +36 -0
- package/.cursor/skills/repo-mapping/SKILL.md +83 -0
- package/.cursor/skills/sync-docs/SKILL.md +351 -0
- package/.cursor/skills/validate-delivery/SKILL.md +186 -0
- package/.cursor/skills/web-auth/SKILL.md +177 -0
- package/.cursor/skills/web-browse/SKILL.md +516 -0
- package/.kiro/agents/agent-enhancer.json +12 -0
- package/.kiro/agents/ci-fixer.json +13 -0
- package/.kiro/agents/ci-monitor.json +12 -0
- package/.kiro/agents/claudemd-enhancer.json +12 -0
- package/.kiro/agents/consult-agent.json +13 -0
- package/.kiro/agents/cross-file-enhancer.json +12 -0
- package/.kiro/agents/debate-orchestrator.json +13 -0
- package/.kiro/agents/delivery-validator.json +12 -0
- package/.kiro/agents/deslop-agent.json +12 -0
- package/.kiro/agents/docs-enhancer.json +12 -0
- package/.kiro/agents/exploration-agent.json +12 -0
- package/.kiro/agents/hooks-enhancer.json +11 -0
- package/.kiro/agents/implementation-agent.json +13 -0
- package/.kiro/agents/learn-agent.json +12 -0
- package/.kiro/agents/map-validator.json +11 -0
- package/.kiro/agents/perf-analyzer.json +12 -0
- package/.kiro/agents/perf-code-paths.json +11 -0
- package/.kiro/agents/perf-investigation-logger.json +12 -0
- package/.kiro/agents/perf-orchestrator.json +13 -0
- package/.kiro/agents/perf-theory-gatherer.json +12 -0
- package/.kiro/agents/perf-theory-tester.json +13 -0
- package/.kiro/agents/plan-synthesizer.json +12 -0
- package/.kiro/agents/planning-agent.json +12 -0
- package/.kiro/agents/plugin-enhancer.json +12 -0
- package/.kiro/agents/prompt-enhancer.json +12 -0
- package/.kiro/agents/reviewer-perf-test.json +11 -0
- package/.kiro/agents/reviewer-quality-security.json +11 -0
- package/.kiro/agents/simple-fixer.json +13 -0
- package/.kiro/agents/skills-enhancer.json +11 -0
- package/.kiro/agents/sync-docs-agent.json +13 -0
- package/.kiro/agents/task-discoverer.json +12 -0
- package/.kiro/agents/test-coverage-checker.json +12 -0
- package/.kiro/agents/web-session.json +12 -0
- package/.kiro/agents/worktree-manager.json +13 -0
- package/.kiro/skills/consult/SKILL.md +425 -0
- package/.kiro/skills/debate/SKILL.md +316 -0
- package/.kiro/skills/deslop/SKILL.md +204 -0
- package/.kiro/skills/discover-tasks/SKILL.md +297 -0
- package/.kiro/skills/drift-analysis/SKILL.md +324 -0
- package/.kiro/skills/enhance-agent-prompts/SKILL.md +277 -0
- package/.kiro/skills/enhance-claude-memory/SKILL.md +387 -0
- package/.kiro/skills/enhance-cross-file/SKILL.md +110 -0
- package/.kiro/skills/enhance-docs/SKILL.md +298 -0
- package/.kiro/skills/enhance-hooks/SKILL.md +554 -0
- package/.kiro/skills/enhance-orchestrator/SKILL.md +255 -0
- package/.kiro/skills/enhance-plugins/SKILL.md +319 -0
- package/.kiro/skills/enhance-prompts/SKILL.md +340 -0
- package/.kiro/skills/enhance-skills/SKILL.md +436 -0
- package/.kiro/skills/learn/SKILL.md +349 -0
- package/.kiro/skills/orchestrate-review/SKILL.md +260 -0
- package/.kiro/skills/perf-analyzer/SKILL.md +37 -0
- package/.kiro/skills/perf-baseline-manager/SKILL.md +30 -0
- package/.kiro/skills/perf-benchmarker/SKILL.md +52 -0
- package/.kiro/skills/perf-code-paths/SKILL.md +32 -0
- package/.kiro/skills/perf-investigation-logger/SKILL.md +41 -0
- package/.kiro/skills/perf-profiler/SKILL.md +42 -0
- package/.kiro/skills/perf-theory-gatherer/SKILL.md +35 -0
- package/.kiro/skills/perf-theory-tester/SKILL.md +36 -0
- package/.kiro/skills/repo-mapping/SKILL.md +83 -0
- package/.kiro/skills/sync-docs/SKILL.md +351 -0
- package/.kiro/skills/validate-delivery/SKILL.md +186 -0
- package/.kiro/skills/web-auth/SKILL.md +177 -0
- package/.kiro/skills/web-browse/SKILL.md +516 -0
- package/.kiro/steering/audit-project-agents.md +459 -0
- package/.kiro/steering/audit-project-github.md +146 -0
- package/.kiro/steering/audit-project.md +330 -0
- package/.kiro/steering/consult.md +422 -0
- package/.kiro/steering/debate.md +386 -0
- package/.kiro/steering/delivery-approval.md +339 -0
- package/.kiro/steering/deslop.md +149 -0
- package/.kiro/steering/drift-detect.md +264 -0
- package/.kiro/steering/enhance.md +177 -0
- package/.kiro/steering/learn.md +166 -0
- package/.kiro/steering/next-task.md +481 -0
- package/.kiro/steering/perf.md +469 -0
- package/.kiro/steering/repo-map.md +126 -0
- package/.kiro/steering/ship-ci-review-loop.md +473 -0
- package/.kiro/steering/ship-deployment.md +353 -0
- package/.kiro/steering/ship-error-handling.md +270 -0
- package/.kiro/steering/ship.md +522 -0
- package/.kiro/steering/sync-docs.md +178 -0
- package/.kiro/steering/web-ctl.md +106 -0
- package/AGENTS.md +5 -3
- package/CHANGELOG.md +25 -1
- package/README.md +6 -5
- package/agent-knowledge/AGENTS.md +32 -2
- package/agent-knowledge/acp-with-codex-gemini-copilot-claude.md +504 -0
- package/agent-knowledge/kiro-supervised-autopilot.md +400 -0
- package/agent-knowledge/resources/acp-with-codex-gemini-copilot-claude-sources.json +408 -0
- package/agent-knowledge/resources/kiro-supervised-autopilot-sources.json +135 -0
- package/bin/cli.js +176 -9
- package/lib/adapter-transforms.js +224 -1
- package/lib/cross-platform/index.js +9 -3
- package/lib/discovery/index.js +22 -0
- package/lib/platform/state-dir.js +16 -2
- package/package.json +1 -1
- package/scripts/dev-install.js +137 -1
- package/scripts/gen-adapters.js +66 -4
- package/site/content.json +1 -1
|
@@ -0,0 +1,259 @@
|
|
|
1
|
+
|
|
2
|
+
# /drift-detect - Reality Check Scanner
|
|
3
|
+
|
|
4
|
+
Perform deep repository analysis to identify drift between documented plans and actual implementation.
|
|
5
|
+
|
|
6
|
+
## Architecture
|
|
7
|
+
|
|
8
|
+
```
|
|
9
|
+
scan.md → collectors.js (pure JS) → plan-synthesizer (Opus) → report
|
|
10
|
+
├─ scanGitHubState() (single call with full context)
|
|
11
|
+
├─ analyzeDocumentation()
|
|
12
|
+
└─ scanCodebase()
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
Data collection is pure JavaScript (no LLM). Only semantic analysis uses Opus.
|
|
16
|
+
|
|
17
|
+
## Arguments
|
|
18
|
+
|
|
19
|
+
Parse from $ARGUMENTS:
|
|
20
|
+
- `--sources`: Comma-separated list of sources to scan (default: github,docs,code)
|
|
21
|
+
- `--depth`: Scan depth - quick or thorough (default: thorough)
|
|
22
|
+
- `--output`: Output mode - file, display, or both (default: both)
|
|
23
|
+
- `--file`: Output file path (default: drift-detect-report.md)
|
|
24
|
+
|
|
25
|
+
Example: `/drift-detect --sources github,docs --depth quick --output file`
|
|
26
|
+
|
|
27
|
+
## Phase 1: Parse Arguments and Collect Data
|
|
28
|
+
|
|
29
|
+
```javascript
|
|
30
|
+
|
|
31
|
+
const pluginRoot = getPluginRoot('drift-detect');
|
|
32
|
+
if (!pluginRoot) { console.error('Error: Could not locate drift-detect plugin root'); process.exit(1); }
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
// Suggest repo-map if missing or stale
|
|
37
|
+
const mapStatus = repoMap.status(process.cwd());
|
|
38
|
+
if (!mapStatus.exists) {
|
|
39
|
+
console.log('Repo map not found. For faster, more accurate drift detection, run: /repo-map init');
|
|
40
|
+
} else if (mapStatus.status?.staleness?.isStale) {
|
|
41
|
+
console.log('Repo map is stale (' + mapStatus.status.staleness.reason + '). Consider: /repo-map update');
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
// Parse arguments
|
|
45
|
+
const args = '$ARGUMENTS'.split(' ').filter(Boolean);
|
|
46
|
+
const options = {
|
|
47
|
+
sources: ['github', 'docs', 'code'],
|
|
48
|
+
depth: 'thorough',
|
|
49
|
+
output: 'both',
|
|
50
|
+
file: 'drift-detect-report.md',
|
|
51
|
+
cwd: process.cwd()
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
// Parse flags
|
|
55
|
+
for (let i = 0; i < args.length; i++) {
|
|
56
|
+
if (args[i] === '--sources' && args[i+1]) {
|
|
57
|
+
options.sources = args[++i].split(',').map(s => s.trim());
|
|
58
|
+
} else if (args[i] === '--depth' && args[i+1]) {
|
|
59
|
+
options.depth = args[++i];
|
|
60
|
+
} else if (args[i] === '--output' && args[i+1]) {
|
|
61
|
+
options.output = args[++i];
|
|
62
|
+
} else if (args[i] === '--file' && args[i+1]) {
|
|
63
|
+
options.file = args[++i];
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
// Validate options
|
|
68
|
+
const allowedSources = ['github', 'docs', 'code'];
|
|
69
|
+
const allowedDepths = ['quick', 'thorough'];
|
|
70
|
+
const allowedOutputs = ['file', 'display', 'both'];
|
|
71
|
+
|
|
72
|
+
const invalidSources = options.sources.filter(s => !allowedSources.includes(s));
|
|
73
|
+
if (invalidSources.length > 0) {
|
|
74
|
+
console.error(`Invalid --sources value(s): ${invalidSources.join(', ')}. Allowed: ${allowedSources.join(', ')}`);
|
|
75
|
+
process.exit(1);
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
if (!allowedDepths.includes(options.depth)) {
|
|
79
|
+
console.error(`Invalid --depth value: ${options.depth}. Allowed: ${allowedDepths.join(', ')}`);
|
|
80
|
+
process.exit(1);
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
if (!allowedOutputs.includes(options.output)) {
|
|
84
|
+
console.error(`Invalid --output value: ${options.output}. Allowed: ${allowedOutputs.join(', ')}`);
|
|
85
|
+
process.exit(1);
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
console.log(`
|
|
89
|
+
## Starting Reality Check Scan
|
|
90
|
+
|
|
91
|
+
**Sources**: ${options.sources.join(', ')}
|
|
92
|
+
**Depth**: ${options.depth}
|
|
93
|
+
**Output**: ${options.output}
|
|
94
|
+
|
|
95
|
+
Collecting data...
|
|
96
|
+
`);
|
|
97
|
+
|
|
98
|
+
// Collect all data using pure JavaScript (no LLM)
|
|
99
|
+
const collectedData = await collectors.collectAllData(options);
|
|
100
|
+
|
|
101
|
+
// Check if GitHub data collection succeeded
|
|
102
|
+
if (options.sources.includes('github') && collectedData.github && !collectedData.github.available) {
|
|
103
|
+
console.log(`
|
|
104
|
+
[WARN] GitHub CLI not available or not authenticated.
|
|
105
|
+
Run \`gh auth login\` to enable GitHub issue scanning.
|
|
106
|
+
Continuing with other sources...
|
|
107
|
+
`);
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
console.log(`
|
|
111
|
+
### Data Collection Complete
|
|
112
|
+
|
|
113
|
+
${collectedData.github?.available ? `- **GitHub**: ${collectedData.github.issues.length} issues, ${collectedData.github.prs.length} PRs` : '- **GitHub**: Not available'}
|
|
114
|
+
${collectedData.docs ? `- **Documentation**: ${Object.keys(collectedData.docs.files).length} files analyzed` : '- **Documentation**: Skipped'}
|
|
115
|
+
${collectedData.code?.summary?.totalDirs ? `- **Code**: ${collectedData.code.summary.totalDirs} directories scanned` : '- **Code**: Skipped'}
|
|
116
|
+
|
|
117
|
+
→ Sending to semantic analyzer...
|
|
118
|
+
`);
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
## Phase 2: Semantic Analysis (Single Opus Call)
|
|
122
|
+
|
|
123
|
+
Send all collected data to plan-synthesizer for deep semantic analysis:
|
|
124
|
+
|
|
125
|
+
```javascript
|
|
126
|
+
const analysisPrompt = `
|
|
127
|
+
You are analyzing a project to identify drift between documented plans and actual implementation.
|
|
128
|
+
|
|
129
|
+
## Collected Data
|
|
130
|
+
|
|
131
|
+
### GitHub State
|
|
132
|
+
${'```'}json
|
|
133
|
+
${JSON.stringify(collectedData.github, null, 2)}
|
|
134
|
+
${'```'}
|
|
135
|
+
|
|
136
|
+
### Documentation Analysis
|
|
137
|
+
${'```'}json
|
|
138
|
+
${JSON.stringify(collectedData.docs, null, 2)}
|
|
139
|
+
${'```'}
|
|
140
|
+
|
|
141
|
+
### Codebase Analysis
|
|
142
|
+
${'```'}json
|
|
143
|
+
${JSON.stringify(collectedData.code, null, 2)}
|
|
144
|
+
${'```'}
|
|
145
|
+
|
|
146
|
+
## Your Task
|
|
147
|
+
|
|
148
|
+
Be BRUTALLY SPECIFIC. The user wants concrete, actionable insights - not generic observations.
|
|
149
|
+
|
|
150
|
+
### 1. Issue-by-Issue Verification
|
|
151
|
+
|
|
152
|
+
For EACH open issue, determine:
|
|
153
|
+
- Is this already implemented? → "Close issue #X - implemented in src/auth/login.js"
|
|
154
|
+
- Is this stale/irrelevant? → "Close issue #X - no longer applicable after Y refactor"
|
|
155
|
+
- Is this blocked? → "Issue #X blocked by: missing Z dependency"
|
|
156
|
+
|
|
157
|
+
### 2. Phase/Checkbox Validation
|
|
158
|
+
|
|
159
|
+
For EACH phase or checkbox marked "complete" in docs:
|
|
160
|
+
- Verify against actual code: Does the feature exist?
|
|
161
|
+
- Check for missing pieces: "Phase 'Authentication' marked complete but MISSING:
|
|
162
|
+
- Password reset functionality (no code in auth/)
|
|
163
|
+
- Session timeout handling (not implemented)
|
|
164
|
+
- Tests for login flow (0 test files)"
|
|
165
|
+
|
|
166
|
+
### 3. Release Readiness Assessment
|
|
167
|
+
|
|
168
|
+
If there are milestones or planned releases, assess:
|
|
169
|
+
- "Your plan to release tomorrow is UNREALISTIC because:
|
|
170
|
+
- 3 critical tests missing for payment module
|
|
171
|
+
- No QA coverage on authentication flows
|
|
172
|
+
- Issue #45 (security) still open
|
|
173
|
+
- Phase B only 40% complete despite being marked done"
|
|
174
|
+
|
|
175
|
+
### 4. Specific Recommendations
|
|
176
|
+
|
|
177
|
+
Output SPECIFIC actions, not generic advice:
|
|
178
|
+
- "Close issues: #12, #34, #56 (already implemented)"
|
|
179
|
+
- "Reopen: Phase C (missing: X, Y, Z)"
|
|
180
|
+
- "Block release until: tests added for auth/, issue #78 fixed"
|
|
181
|
+
- "Update PLAN.md: Phase B is NOT complete - missing items listed above"
|
|
182
|
+
|
|
183
|
+
## Output Format
|
|
184
|
+
|
|
185
|
+
```markdown
|
|
186
|
+
# Reality Check Report
|
|
187
|
+
|
|
188
|
+
## Executive Summary
|
|
189
|
+
[2-3 sentences: Overall project health and biggest concerns]
|
|
190
|
+
|
|
191
|
+
## Issues to Close (Already Done)
|
|
192
|
+
- #XX: [title] - Implemented in [file/location]
|
|
193
|
+
- #YY: [title] - No longer relevant because [reason]
|
|
194
|
+
|
|
195
|
+
## Phases Marked Complete But NOT Actually Done
|
|
196
|
+
### [Phase Name]
|
|
197
|
+
**Status in docs**: Complete [OK]
|
|
198
|
+
**Actual status**: INCOMPLETE
|
|
199
|
+
**Missing**:
|
|
200
|
+
- [ ] [Specific missing item 1]
|
|
201
|
+
- [ ] [Specific missing item 2]
|
|
202
|
+
|
|
203
|
+
## Release Blockers
|
|
204
|
+
If you're planning to ship soon, these MUST be addressed:
|
|
205
|
+
1. [Specific blocker with file/issue reference]
|
|
206
|
+
2. [Specific blocker with file/issue reference]
|
|
207
|
+
|
|
208
|
+
## Issues That Need Attention
|
|
209
|
+
- #XX: [why it's stale/blocked/misprioritized]
|
|
210
|
+
|
|
211
|
+
## Quick Wins
|
|
212
|
+
Things you can do right now:
|
|
213
|
+
1. Close issue #XX (already done)
|
|
214
|
+
2. Update Phase Y status (not complete)
|
|
215
|
+
3. Add test for [specific untested code]
|
|
216
|
+
```
|
|
217
|
+
`;
|
|
218
|
+
|
|
219
|
+
Invoke the plan-synthesizer agent
|
|
220
|
+
```
|
|
221
|
+
|
|
222
|
+
## Phase 3: Output Report
|
|
223
|
+
|
|
224
|
+
After the synthesizer completes, the report is available. Handle output per settings:
|
|
225
|
+
|
|
226
|
+
```javascript
|
|
227
|
+
// The synthesizer outputs the report directly
|
|
228
|
+
// Handle file writing if requested
|
|
229
|
+
|
|
230
|
+
if (options.output === 'file' || options.output === 'both') {
|
|
231
|
+
console.log(`\n---\nReport saved to: ${options.file}`);
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
console.log(`
|
|
235
|
+
## Reality Check Complete
|
|
236
|
+
|
|
237
|
+
Use the findings above to realign your project with reality.
|
|
238
|
+
Run \`/drift-detect --depth quick\` for faster subsequent scans.
|
|
239
|
+
`);
|
|
240
|
+
```
|
|
241
|
+
|
|
242
|
+
## Quick Reference
|
|
243
|
+
|
|
244
|
+
| Flag | Values | Default | Description |
|
|
245
|
+
|------|--------|---------|-------------|
|
|
246
|
+
| --sources | github,docs,code | all three | Which sources to scan |
|
|
247
|
+
| --depth | quick, thorough | thorough | How deep to analyze |
|
|
248
|
+
| --output | file, display, both | both | Where to output results |
|
|
249
|
+
| --file | path | drift-detect-report.md | Output file path |
|
|
250
|
+
|
|
251
|
+
## Success Criteria
|
|
252
|
+
|
|
253
|
+
- Data collected via pure JavaScript (no LLM overhead)
|
|
254
|
+
- Single Opus call for semantic analysis with full context
|
|
255
|
+
- Drift and gaps clearly identified with examples
|
|
256
|
+
- Prioritized reconstruction plan produced
|
|
257
|
+
- Report output per user settings
|
|
258
|
+
|
|
259
|
+
Begin scan now.
|
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
|
|
2
|
+
# /enhance - Master Enhancement Orchestrator
|
|
3
|
+
|
|
4
|
+
Run all enhancement analyzers in parallel and generate a unified report.
|
|
5
|
+
|
|
6
|
+
## Overview
|
|
7
|
+
|
|
8
|
+
The master `/enhance` command orchestrates 7 specialized enhancers:
|
|
9
|
+
- **plugin** - Plugin structures, MCP tools, security patterns
|
|
10
|
+
- **agent** - Agent prompts, frontmatter, tool restrictions
|
|
11
|
+
- **claudemd** - CLAUDE.md/AGENTS.md project memory files
|
|
12
|
+
- **docs** - Documentation structure and RAG optimization
|
|
13
|
+
- **prompt** - General prompt quality and clarity
|
|
14
|
+
- **hooks** - Hook definitions and frontmatter quality
|
|
15
|
+
- **skills** - SKILL.md structure and trigger clarity
|
|
16
|
+
|
|
17
|
+
## Arguments
|
|
18
|
+
|
|
19
|
+
Parse from $ARGUMENTS:
|
|
20
|
+
- **target-path**: Directory or file to analyze (default: current directory)
|
|
21
|
+
- **--apply**: Apply auto-fixes for HIGH certainty issues after report
|
|
22
|
+
- **--focus=TYPE**: Run only specified enhancer(s): plugin, agent, claudemd/claude-memory, docs, prompt, hooks, skills
|
|
23
|
+
- **--verbose**: Include LOW certainty issues in report
|
|
24
|
+
- **--show-suppressed**: Show what's being filtered by auto-learned suppressions
|
|
25
|
+
- **--no-learn**: Disable auto-learning for this run (analyze but don't save)
|
|
26
|
+
- **--reset-learned**: Clear all auto-learned suppressions for this project
|
|
27
|
+
- **--export-learned**: Export learned suppressions as JSON for team sharing
|
|
28
|
+
|
|
29
|
+
## Workflow
|
|
30
|
+
|
|
31
|
+
1. **Discovery** - Detect what content types exist in target path
|
|
32
|
+
2. **Load Suppressions** - Load auto-learned and manual suppressions for project
|
|
33
|
+
3. **Launch** - Start all relevant enhancers in parallel via Task()
|
|
34
|
+
4. **Aggregate** - Collect and deduplicate findings from all enhancers
|
|
35
|
+
5. **Report** - Generate unified report from aggregated findings
|
|
36
|
+
6. **Auto-Learn** - Detect false positives and save for future runs (unless --no-learn)
|
|
37
|
+
7. **Fix** - Apply auto-fixes if --apply flag is present
|
|
38
|
+
|
|
39
|
+
## Implementation
|
|
40
|
+
|
|
41
|
+
Execute the `enhance-orchestrator` skill directly. The skill workflow:
|
|
42
|
+
|
|
43
|
+
1. Parse arguments from $ARGUMENTS
|
|
44
|
+
2. Run discovery to find content types
|
|
45
|
+
3. Spawn enhancer agents in parallel via Task() for each content type
|
|
46
|
+
4. Aggregate results from all enhancers
|
|
47
|
+
5. Generate unified report
|
|
48
|
+
|
|
49
|
+
See `skills/enhance-orchestrator/SKILL.md` for detailed implementation.
|
|
50
|
+
|
|
51
|
+
## Output Format
|
|
52
|
+
|
|
53
|
+
```markdown
|
|
54
|
+
# Enhancement Analysis Report
|
|
55
|
+
|
|
56
|
+
**Target**: {targetPath}
|
|
57
|
+
**Date**: {timestamp}
|
|
58
|
+
**Enhancers Run**: plugin, agent, docs
|
|
59
|
+
|
|
60
|
+
## Executive Summary
|
|
61
|
+
|
|
62
|
+
| Enhancer | HIGH | MEDIUM | LOW | Auto-Fixable |
|
|
63
|
+
|----------|------|--------|-----|--------------|
|
|
64
|
+
| plugin | 2 | 3 | 1 | 1 |
|
|
65
|
+
| agent | 1 | 2 | 0 | 1 |
|
|
66
|
+
| docs | 0 | 4 | 2 | 0 |
|
|
67
|
+
| **Total** | **3** | **9** | **3** | **2** |
|
|
68
|
+
|
|
69
|
+
## HIGH Certainty Issues (3)
|
|
70
|
+
|
|
71
|
+
[Grouped by enhancer, sorted by file]
|
|
72
|
+
|
|
73
|
+
## MEDIUM Certainty Issues (9)
|
|
74
|
+
|
|
75
|
+
[...]
|
|
76
|
+
|
|
77
|
+
## Auto-Fix Summary
|
|
78
|
+
|
|
79
|
+
2 issues can be automatically fixed with `--apply` flag.
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
## Example Usage
|
|
83
|
+
|
|
84
|
+
```bash
|
|
85
|
+
# Full analysis of current directory
|
|
86
|
+
/enhance
|
|
87
|
+
|
|
88
|
+
# Focus on specific enhancer type
|
|
89
|
+
/enhance --focus=agent
|
|
90
|
+
|
|
91
|
+
# Apply auto-fixes for HIGH certainty issues
|
|
92
|
+
/enhance --apply
|
|
93
|
+
|
|
94
|
+
# Analyze specific path with verbose output
|
|
95
|
+
/enhance plugins/next-task --verbose
|
|
96
|
+
|
|
97
|
+
# Combined flags
|
|
98
|
+
/enhance --focus=plugin --apply --verbose
|
|
99
|
+
|
|
100
|
+
# Auto-Learning Suppression System
|
|
101
|
+
# See what's being filtered by auto-learned suppressions
|
|
102
|
+
/enhance --show-suppressed
|
|
103
|
+
|
|
104
|
+
# Run without auto-learning (analyze only, don't save new suppressions)
|
|
105
|
+
/enhance --no-learn
|
|
106
|
+
|
|
107
|
+
# Reset all learned suppressions for this project
|
|
108
|
+
/enhance --reset-learned
|
|
109
|
+
|
|
110
|
+
# Export learned suppressions for team sharing
|
|
111
|
+
/enhance --export-learned > suppressions-export.json
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
## Success Criteria
|
|
115
|
+
|
|
116
|
+
- All relevant enhancers run in parallel
|
|
117
|
+
- Findings deduplicated and sorted by certainty
|
|
118
|
+
- Clear executive summary with counts
|
|
119
|
+
- Auto-fixable issues highlighted
|
|
120
|
+
- Fixes applied only with explicit --apply flag
|
|
121
|
+
- Auto-learning detects false positives with 90%+ confidence
|
|
122
|
+
- Learned suppressions stored in cross-platform location (${STATE_DIR}/enhance/suppressions.json)
|
|
123
|
+
- Zero token waste on previously suppressed findings
|
|
124
|
+
|
|
125
|
+
---
|
|
126
|
+
|
|
127
|
+
# /plugin
|
|
128
|
+
|
|
129
|
+
Spawns `plugin-enhancer` agent which invokes `enhance-plugins` skill.
|
|
130
|
+
See skill for patterns, detection logic, and auto-fix implementations.
|
|
131
|
+
|
|
132
|
+
---
|
|
133
|
+
|
|
134
|
+
# /agent
|
|
135
|
+
|
|
136
|
+
Spawns `agent-enhancer` agent which invokes `enhance-agent-prompts` skill.
|
|
137
|
+
See skill for patterns, detection logic, and auto-fix implementations.
|
|
138
|
+
|
|
139
|
+
---
|
|
140
|
+
|
|
141
|
+
# /docs
|
|
142
|
+
|
|
143
|
+
Spawns `docs-enhancer` agent which invokes `enhance-docs` skill.
|
|
144
|
+
See skill for patterns, detection logic, and auto-fix implementations.
|
|
145
|
+
|
|
146
|
+
---
|
|
147
|
+
|
|
148
|
+
# /claudemd
|
|
149
|
+
|
|
150
|
+
Spawns `claudemd-enhancer` agent which invokes `enhance-claude-memory` skill.
|
|
151
|
+
See skill for patterns, detection logic, and auto-fix implementations.
|
|
152
|
+
|
|
153
|
+
---
|
|
154
|
+
|
|
155
|
+
# /prompt
|
|
156
|
+
|
|
157
|
+
Spawns `prompt-enhancer` agent which invokes `enhance-prompts` skill.
|
|
158
|
+
See skill for patterns, detection logic, and auto-fix implementations.
|
|
159
|
+
|
|
160
|
+
---
|
|
161
|
+
|
|
162
|
+
# /hooks
|
|
163
|
+
|
|
164
|
+
Spawns `hooks-enhancer` agent which invokes `enhance-hooks` skill.
|
|
165
|
+
See skill for patterns, detection logic, and auto-fix implementations.
|
|
166
|
+
|
|
167
|
+
---
|
|
168
|
+
|
|
169
|
+
# /skills
|
|
170
|
+
|
|
171
|
+
Spawns `skills-enhancer` agent which invokes `enhance-skills` skill.
|
|
172
|
+
See skill for patterns, detection logic, and auto-fix implementations.
|
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
|
|
2
|
+
# /learn - Learning Guide Generator
|
|
3
|
+
|
|
4
|
+
Research any topic by gathering online resources and synthesize into a comprehensive learning guide with RAG-optimized indexes.
|
|
5
|
+
|
|
6
|
+
## Depth Levels
|
|
7
|
+
|
|
8
|
+
| Level | Sources | Use Case |
|
|
9
|
+
|-------|---------|----------|
|
|
10
|
+
| `brief` | 10 | Quick overview, time-sensitive |
|
|
11
|
+
| `medium` | 20 | **Default** - balanced coverage |
|
|
12
|
+
| `deep` | 40 | Comprehensive, academic depth |
|
|
13
|
+
|
|
14
|
+
## Arguments
|
|
15
|
+
|
|
16
|
+
Parse from $ARGUMENTS:
|
|
17
|
+
|
|
18
|
+
- **topic**: The subject to learn about (required)
|
|
19
|
+
- **--depth**: `brief` (10 sources), `medium` (20, default), or `deep` (40)
|
|
20
|
+
- **--no-enhance**: Skip enhancement pass (default: enhance enabled)
|
|
21
|
+
|
|
22
|
+
## Execution
|
|
23
|
+
|
|
24
|
+
### Phase 1: Parse Arguments
|
|
25
|
+
|
|
26
|
+
```javascript
|
|
27
|
+
const args = '$ARGUMENTS';
|
|
28
|
+
|
|
29
|
+
// Extract depth flag
|
|
30
|
+
const depthMatch = args.match(/--depth=(brief|medium|deep)/);
|
|
31
|
+
const depth = depthMatch ? depthMatch[1] : 'medium';
|
|
32
|
+
const noEnhance = args.includes('--no-enhance');
|
|
33
|
+
|
|
34
|
+
// Extract topic (everything except flags)
|
|
35
|
+
const topic = args
|
|
36
|
+
.replace(/--depth=(brief|medium|deep)/g, '')
|
|
37
|
+
.replace(/--no-enhance/g, '')
|
|
38
|
+
.trim();
|
|
39
|
+
|
|
40
|
+
if (!topic) {
|
|
41
|
+
return 'Usage: /learn <topic> [--depth=brief|medium|deep]';
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
// Generate slug for filenames
|
|
45
|
+
const slug = topic
|
|
46
|
+
.toLowerCase()
|
|
47
|
+
.replace(/[^a-z0-9\s-]/g, '')
|
|
48
|
+
.replace(/\s+/g, '-')
|
|
49
|
+
.replace(/-+/g, '-')
|
|
50
|
+
.replace(/^-|-$/g, '')
|
|
51
|
+
.substring(0, 64);
|
|
52
|
+
|
|
53
|
+
// Source counts by depth
|
|
54
|
+
const sourceCounts = { brief: 10, medium: 20, deep: 40 };
|
|
55
|
+
const minSources = sourceCounts[depth];
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
### Phase 2: Check Existing Guide
|
|
59
|
+
|
|
60
|
+
```javascript
|
|
61
|
+
// Check if guide already exists
|
|
62
|
+
const existingGuide = await Glob({ pattern: `agent-knowledge/${slug}.md` });
|
|
63
|
+
|
|
64
|
+
if (existingGuide.length > 0) {
|
|
65
|
+
// Ask user: update existing or create fresh?
|
|
66
|
+
const choice = await AskUserQuestion({
|
|
67
|
+
questions: [{
|
|
68
|
+
question: `A guide for "${topic}" already exists. What would you like to do?`,
|
|
69
|
+
header: 'Existing guide',
|
|
70
|
+
options: [
|
|
71
|
+
{ label: 'Update existing', description: 'Add new sources and refresh content' },
|
|
72
|
+
{ label: 'Create fresh', description: 'Start over with new research' }
|
|
73
|
+
],
|
|
74
|
+
multiSelect: false
|
|
75
|
+
}]
|
|
76
|
+
});
|
|
77
|
+
|
|
78
|
+
if (choice === 'Create fresh') {
|
|
79
|
+
// Will overwrite
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
### Phase 3: Spawn Learn Agent
|
|
85
|
+
|
|
86
|
+
```javascript
|
|
87
|
+
const taskOutput = Invoke the learn-agent agent
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
### Phase 4: Parse Results
|
|
91
|
+
|
|
92
|
+
```javascript
|
|
93
|
+
function parseLearnResult(output) {
|
|
94
|
+
const match = output.match(/=== LEARN_RESULT ===[\s\S]*?({[\s\S]*?})[\s\S]*?=== END_RESULT ===/);
|
|
95
|
+
return match ? JSON.parse(match[1]) : null;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
const result = parseLearnResult(taskOutput);
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
### Phase 5: Present Results
|
|
102
|
+
|
|
103
|
+
```markdown
|
|
104
|
+
## Learning Guide Created
|
|
105
|
+
|
|
106
|
+
**Topic**: {topic}
|
|
107
|
+
**File**: agent-knowledge/{slug}.md
|
|
108
|
+
**Sources**: {sourceCount} resources analyzed
|
|
109
|
+
|
|
110
|
+
### Quality Assessment
|
|
111
|
+
|
|
112
|
+
| Metric | Rating |
|
|
113
|
+
|--------|--------|
|
|
114
|
+
| Coverage | {coverage}/10 |
|
|
115
|
+
| Source Diversity | {diversity}/10 |
|
|
116
|
+
| Example Quality | {examples}/10 |
|
|
117
|
+
| Confidence | {confidence}/10 |
|
|
118
|
+
|
|
119
|
+
### Source Breakdown
|
|
120
|
+
|
|
121
|
+
| Type | Count |
|
|
122
|
+
|------|-------|
|
|
123
|
+
| Official Docs | {n} |
|
|
124
|
+
| Tutorials | {n} |
|
|
125
|
+
| Q&A/Stack Overflow | {n} |
|
|
126
|
+
| Blog Posts | {n} |
|
|
127
|
+
| GitHub Examples | {n} |
|
|
128
|
+
|
|
129
|
+
### Next Steps
|
|
130
|
+
|
|
131
|
+
- [ ] Review the guide at `agent-knowledge/{slug}.md`
|
|
132
|
+
- [ ] Check source quality in `agent-knowledge/resources/{slug}-sources.json`
|
|
133
|
+
- [ ] Run `/learn {related-topic}` to expand your knowledge base
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
## Output Structure
|
|
137
|
+
|
|
138
|
+
Each `/learn` run creates/updates:
|
|
139
|
+
|
|
140
|
+
```
|
|
141
|
+
agent-knowledge/
|
|
142
|
+
CLAUDE.md # Master index (updated)
|
|
143
|
+
AGENTS.md # Master index for OpenCode/Codex (updated)
|
|
144
|
+
{slug}.md # Topic-specific guide (created)
|
|
145
|
+
resources/
|
|
146
|
+
{slug}-sources.json # Source metadata (created)
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
## Error Handling
|
|
150
|
+
|
|
151
|
+
| Error | Action |
|
|
152
|
+
|-------|--------|
|
|
153
|
+
| No topic provided | Show usage help |
|
|
154
|
+
| WebSearch fails | Retry with alternative queries |
|
|
155
|
+
| Insufficient sources | Warn user, proceed with available |
|
|
156
|
+
| Enhancement fails | Skip enhancement, note in output |
|
|
157
|
+
|
|
158
|
+
## Example Usage
|
|
159
|
+
|
|
160
|
+
```bash
|
|
161
|
+
/learn recursion
|
|
162
|
+
/learn react hooks --depth=deep
|
|
163
|
+
/learn "kubernetes networking" --depth=brief
|
|
164
|
+
/learn python async --no-enhance
|
|
165
|
+
```
|