agentsys 5.3.4 → 5.3.5

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 (74) hide show
  1. package/.claude-plugin/marketplace.json +1 -1
  2. package/.claude-plugin/plugin.json +1 -1
  3. package/CHANGELOG.md +8 -0
  4. package/bin/cli.js +40 -28
  5. package/lib/adapter-transforms.js +3 -3
  6. package/package.json +1 -1
  7. package/site/content.json +32 -8
  8. package/.cursor/commands/audit-project-agents.md +0 -454
  9. package/.cursor/commands/audit-project-github.md +0 -141
  10. package/.cursor/commands/audit-project.md +0 -330
  11. package/.cursor/commands/consult.md +0 -417
  12. package/.cursor/commands/debate.md +0 -381
  13. package/.cursor/commands/delivery-approval.md +0 -334
  14. package/.cursor/commands/deslop.md +0 -142
  15. package/.cursor/commands/drift-detect.md +0 -259
  16. package/.cursor/commands/enhance.md +0 -172
  17. package/.cursor/commands/learn.md +0 -165
  18. package/.cursor/commands/next-task.md +0 -519
  19. package/.cursor/commands/perf.md +0 -464
  20. package/.cursor/commands/repo-map.md +0 -124
  21. package/.cursor/commands/ship-ci-review-loop.md +0 -468
  22. package/.cursor/commands/ship-deployment.md +0 -348
  23. package/.cursor/commands/ship-error-handling.md +0 -265
  24. package/.cursor/commands/ship.md +0 -517
  25. package/.cursor/commands/sync-docs.md +0 -171
  26. package/.cursor/commands/web-ctl.md +0 -101
  27. package/.cursor/skills/consult/SKILL.md +0 -425
  28. package/.cursor/skills/debate/SKILL.md +0 -316
  29. package/.cursor/skills/deslop/SKILL.md +0 -204
  30. package/.cursor/skills/discover-tasks/SKILL.md +0 -297
  31. package/.cursor/skills/drift-analysis/SKILL.md +0 -324
  32. package/.cursor/skills/enhance-agent-prompts/SKILL.md +0 -277
  33. package/.cursor/skills/enhance-claude-memory/SKILL.md +0 -387
  34. package/.cursor/skills/enhance-cross-file/SKILL.md +0 -110
  35. package/.cursor/skills/enhance-docs/SKILL.md +0 -298
  36. package/.cursor/skills/enhance-hooks/SKILL.md +0 -554
  37. package/.cursor/skills/enhance-orchestrator/SKILL.md +0 -255
  38. package/.cursor/skills/enhance-plugins/SKILL.md +0 -319
  39. package/.cursor/skills/enhance-prompts/SKILL.md +0 -340
  40. package/.cursor/skills/enhance-skills/SKILL.md +0 -436
  41. package/.cursor/skills/learn/SKILL.md +0 -349
  42. package/.cursor/skills/orchestrate-review/SKILL.md +0 -260
  43. package/.cursor/skills/perf-analyzer/SKILL.md +0 -37
  44. package/.cursor/skills/perf-baseline-manager/SKILL.md +0 -30
  45. package/.cursor/skills/perf-benchmarker/SKILL.md +0 -52
  46. package/.cursor/skills/perf-code-paths/SKILL.md +0 -32
  47. package/.cursor/skills/perf-investigation-logger/SKILL.md +0 -41
  48. package/.cursor/skills/perf-profiler/SKILL.md +0 -42
  49. package/.cursor/skills/perf-theory-gatherer/SKILL.md +0 -35
  50. package/.cursor/skills/perf-theory-tester/SKILL.md +0 -36
  51. package/.cursor/skills/repo-mapping/SKILL.md +0 -83
  52. package/.cursor/skills/sync-docs/SKILL.md +0 -351
  53. package/.cursor/skills/validate-delivery/SKILL.md +0 -186
  54. package/.cursor/skills/web-auth/SKILL.md +0 -177
  55. package/.cursor/skills/web-browse/SKILL.md +0 -516
  56. package/.kiro/steering/audit-project-agents.md +0 -459
  57. package/.kiro/steering/audit-project-github.md +0 -146
  58. package/.kiro/steering/audit-project.md +0 -330
  59. package/.kiro/steering/consult.md +0 -422
  60. package/.kiro/steering/debate.md +0 -386
  61. package/.kiro/steering/delivery-approval.md +0 -339
  62. package/.kiro/steering/deslop.md +0 -149
  63. package/.kiro/steering/drift-detect.md +0 -264
  64. package/.kiro/steering/enhance.md +0 -177
  65. package/.kiro/steering/learn.md +0 -166
  66. package/.kiro/steering/next-task.md +0 -481
  67. package/.kiro/steering/perf.md +0 -469
  68. package/.kiro/steering/repo-map.md +0 -126
  69. package/.kiro/steering/ship-ci-review-loop.md +0 -473
  70. package/.kiro/steering/ship-deployment.md +0 -353
  71. package/.kiro/steering/ship-error-handling.md +0 -270
  72. package/.kiro/steering/ship.md +0 -522
  73. package/.kiro/steering/sync-docs.md +0 -178
  74. package/.kiro/steering/web-ctl.md +0 -106
@@ -1,334 +0,0 @@
1
-
2
- # /delivery-approval - Delivery Validation
3
-
4
- Validate that the current work is complete and ready to ship.
5
- This command runs the same validation as the workflow's delivery-validator agent.
6
-
7
- ## Arguments
8
-
9
- - `--task-id ID`: Specify task ID to validate against (default: from workflow state)
10
- - `--verbose`: Show detailed output for each check
11
-
12
- ## Parse Arguments
13
-
14
- ```javascript
15
- const args = $ARGUMENTS.split(' ').filter(Boolean);
16
- const verbose = args.includes('--verbose');
17
- const taskIdArg = args.find(a => a.startsWith('--task-id'));
18
- const taskId = taskIdArg ? args[args.indexOf(taskIdArg) + 1] : null;
19
- ```
20
-
21
- ## Phase 1: Get Context
22
-
23
- ```javascript
24
-
25
-
26
-
27
- const pluginRoot = getPluginRoot('next-task');
28
- if (!pluginRoot) {
29
- console.error('Error: Could not locate next-task plugin installation');
30
- process.exit(1);
31
- }
32
-
33
- );
34
-
35
- let task;
36
- let changedFiles;
37
-
38
- // Try to get from workflow state first
39
- const state = workflowState.readState();
40
- if (state?.task) {
41
- task = state.task;
42
- } else if (taskId) {
43
- // Fetch task from GitHub
44
- task = await fetchGitHubIssue(taskId);
45
- } else {
46
- // Get from recent commit message
47
- task = await inferTaskFromCommits();
48
- }
49
-
50
- // Get changed files
51
- changedFiles = (await exec('git diff --name-only origin/main..HEAD')).split('\n').filter(Boolean);
52
- ```
53
-
54
- ## Phase 2: Run Validation Checks
55
-
56
- ### Check 1: Git State
57
-
58
- ```bash
59
- # Check for uncommitted changes
60
- UNCOMMITTED=$(git status --porcelain)
61
- if [ -n "$UNCOMMITTED" ]; then
62
- echo "UNCOMMITTED_CHANGES=true"
63
- echo "$UNCOMMITTED"
64
- fi
65
-
66
- # Check if ahead of remote
67
- AHEAD=$(git rev-list --count origin/main..HEAD)
68
- echo "COMMITS_AHEAD=$AHEAD"
69
-
70
- # Check branch name
71
- BRANCH=$(git branch --show-current)
72
- echo "BRANCH=$BRANCH"
73
- ```
74
-
75
- ### Check 2: Tests Pass
76
-
77
- ```bash
78
- # Detect and run tests
79
- if [ -f "package.json" ]; then
80
- if grep -q '"test"' package.json; then
81
- echo "Running npm test..."
82
- npm test 2>&1
83
- TEST_RESULT=$?
84
- echo "TEST_RESULT=$TEST_RESULT"
85
- else
86
- echo "NO_TEST_SCRIPT=true"
87
- fi
88
- elif [ -f "pytest.ini" ] || [ -f "pyproject.toml" ]; then
89
- echo "Running pytest..."
90
- pytest -v 2>&1
91
- TEST_RESULT=$?
92
- echo "TEST_RESULT=$TEST_RESULT"
93
- elif [ -f "Cargo.toml" ]; then
94
- echo "Running cargo test..."
95
- cargo test 2>&1
96
- TEST_RESULT=$?
97
- echo "TEST_RESULT=$TEST_RESULT"
98
- elif [ -f "go.mod" ]; then
99
- echo "Running go test..."
100
- go test ./... -v 2>&1
101
- TEST_RESULT=$?
102
- echo "TEST_RESULT=$TEST_RESULT"
103
- fi
104
- ```
105
-
106
- ### Check 3: Build Passes
107
-
108
- ```bash
109
- # Detect and run build
110
- if [ -f "package.json" ] && grep -q '"build"' package.json; then
111
- echo "Running npm run build..."
112
- npm run build 2>&1
113
- BUILD_RESULT=$?
114
- echo "BUILD_RESULT=$BUILD_RESULT"
115
- elif [ -f "Cargo.toml" ]; then
116
- echo "Running cargo build..."
117
- cargo build --release 2>&1
118
- BUILD_RESULT=$?
119
- echo "BUILD_RESULT=$BUILD_RESULT"
120
- elif [ -f "go.mod" ]; then
121
- echo "Running go build..."
122
- go build ./... 2>&1
123
- BUILD_RESULT=$?
124
- echo "BUILD_RESULT=$BUILD_RESULT"
125
- else
126
- echo "NO_BUILD_SCRIPT=true"
127
- BUILD_RESULT=0
128
- fi
129
- ```
130
-
131
- ### Check 4: Lint Passes
132
-
133
- ```bash
134
- # Run linter if available
135
- if [ -f "package.json" ] && grep -q '"lint"' package.json; then
136
- echo "Running npm run lint..."
137
- npm run lint 2>&1
138
- LINT_RESULT=$?
139
- echo "LINT_RESULT=$LINT_RESULT"
140
- elif [ -f ".eslintrc.js" ] || [ -f ".eslintrc.json" ]; then
141
- echo "Running eslint..."
142
- npx eslint . 2>&1
143
- LINT_RESULT=$?
144
- echo "LINT_RESULT=$LINT_RESULT"
145
- else
146
- echo "NO_LINTER=true"
147
- LINT_RESULT=0
148
- fi
149
- ```
150
-
151
- ### Check 5: Type Check (TypeScript)
152
-
153
- ```bash
154
- if [ -f "tsconfig.json" ]; then
155
- echo "Running tsc --noEmit..."
156
- npx tsc --noEmit 2>&1
157
- TYPE_RESULT=$?
158
- echo "TYPE_RESULT=$TYPE_RESULT"
159
- else
160
- echo "NO_TYPESCRIPT=true"
161
- TYPE_RESULT=0
162
- fi
163
- ```
164
-
165
- ## Phase 3: Check Task Requirements
166
-
167
- ```javascript
168
- async function checkRequirements(task, changedFiles) {
169
- if (!task) {
170
- return { passed: true, reason: 'No task specified, skipping requirements check' };
171
- }
172
-
173
- const requirements = extractRequirements(task.description || task.body || '');
174
-
175
- if (requirements.length === 0) {
176
- return { passed: true, reason: 'No specific requirements found in task' };
177
- }
178
-
179
- // Analyze changed files for each requirement
180
- const results = [];
181
- for (const req of requirements) {
182
- const evidence = await findEvidence(req, changedFiles);
183
- results.push({
184
- requirement: req,
185
- implemented: evidence.found,
186
- evidence: evidence.details
187
- });
188
- }
189
-
190
- const allMet = results.every(r => r.implemented);
191
- return {
192
- passed: allMet,
193
- results,
194
- reason: allMet ? 'All requirements met' : 'Some requirements not implemented'
195
- };
196
- }
197
- ```
198
-
199
- ## Phase 4: Aggregate Results
200
-
201
- ```javascript
202
- const checks = {
203
- gitState: {
204
- passed: !UNCOMMITTED_CHANGES,
205
- uncommitted: UNCOMMITTED_CHANGES,
206
- commitsAhead: COMMITS_AHEAD,
207
- branch: BRANCH
208
- },
209
- tests: {
210
- passed: TEST_RESULT === 0,
211
- exitCode: TEST_RESULT
212
- },
213
- build: {
214
- passed: BUILD_RESULT === 0,
215
- exitCode: BUILD_RESULT
216
- },
217
- lint: {
218
- passed: LINT_RESULT === 0,
219
- exitCode: LINT_RESULT
220
- },
221
- typeCheck: {
222
- passed: TYPE_RESULT === 0,
223
- exitCode: TYPE_RESULT
224
- },
225
- requirements: await checkRequirements(task, changedFiles)
226
- };
227
-
228
- const allPassed = Object.values(checks).every(c => c.passed);
229
- const failedChecks = Object.entries(checks)
230
- .filter(([_, v]) => !v.passed)
231
- .map(([k, _]) => k);
232
- ```
233
-
234
- ## Phase 5: Output Results
235
-
236
- ### Summary Report
237
-
238
- ```markdown
239
- ## Delivery Validation Report
240
-
241
- **Task**: ${task?.title || 'N/A'}
242
- **Branch**: ${BRANCH}
243
- **Commits ahead of main**: ${COMMITS_AHEAD}
244
-
245
- ### Validation Results
246
-
247
- | Check | Status | Details |
248
- |-------|--------|---------|
249
- | Git State | ${checks.gitState.passed ? '[OK]' : '[FAIL]'} | ${checks.gitState.uncommitted ? 'Uncommitted changes' : 'Clean'} |
250
- | Tests | ${checks.tests.passed ? '[OK]' : '[FAIL]'} | Exit code: ${checks.tests.exitCode} |
251
- | Build | ${checks.build.passed ? '[OK]' : '[FAIL]'} | Exit code: ${checks.build.exitCode} |
252
- | Lint | ${checks.lint.passed ? '[OK]' : '[FAIL]'} | Exit code: ${checks.lint.exitCode} |
253
- | Type Check | ${checks.typeCheck.passed ? '[OK]' : '[FAIL]'} | Exit code: ${checks.typeCheck.exitCode} |
254
- | Requirements | ${checks.requirements.passed ? '[OK]' : '[FAIL]'} | ${checks.requirements.reason} |
255
-
256
- ### Overall Status
257
-
258
- ${allPassed ?
259
- '## [OK] APPROVED\nAll validation checks passed. Ready to ship!' :
260
- `## [FAIL] NOT APPROVED\nFailed checks: ${failedChecks.join(', ')}`}
261
-
262
- ${!allPassed ? `
263
- ### Fix Required
264
-
265
- ${failedChecks.map(check => {
266
- switch(check) {
267
- case 'gitState': return '- Commit or stash uncommitted changes';
268
- case 'tests': return '- Fix failing tests';
269
- case 'build': return '- Fix build errors';
270
- case 'lint': return '- Fix linting errors';
271
- case 'typeCheck': return '- Fix TypeScript errors';
272
- case 'requirements': return '- Implement missing requirements';
273
- }
274
- }).join('\n')}
275
- ` : ''}
276
- ```
277
-
278
- ### JSON Output (for scripting)
279
-
280
- ```json
281
- {
282
- "approved": ${allPassed},
283
- "task": {
284
- "id": "${task?.id || 'N/A'}",
285
- "title": "${task?.title || 'N/A'}"
286
- },
287
- "checks": {
288
- "gitState": ${JSON.stringify(checks.gitState)},
289
- "tests": ${JSON.stringify(checks.tests)},
290
- "build": ${JSON.stringify(checks.build)},
291
- "lint": ${JSON.stringify(checks.lint)},
292
- "typeCheck": ${JSON.stringify(checks.typeCheck)},
293
- "requirements": ${JSON.stringify(checks.requirements)}
294
- },
295
- "failedChecks": ${JSON.stringify(failedChecks)},
296
- "summary": "${allPassed ? 'All checks passed' : `Failed: ${failedChecks.join(', ')}`}"
297
- }
298
- ```
299
-
300
- ## Examples
301
-
302
- ```bash
303
- # Basic validation
304
- /delivery-approval
305
-
306
- # With verbose output
307
- /delivery-approval --verbose
308
-
309
- # For specific task
310
- /delivery-approval --task-id 142
311
-
312
- # Combined
313
- /delivery-approval --task-id 142 --verbose
314
- ```
315
-
316
- ## Integration with Workflow
317
-
318
- When called from the next-task workflow:
319
- 1. Task context is read from workflow state
320
- 2. Results are written back to workflow state
321
- 3. Workflow continues to ship phase if approved
322
-
323
- When called standalone:
324
- 1. Attempts to infer task from commits
325
- 2. Runs all validation checks
326
- 3. Reports results but doesn't modify workflow state
327
-
328
- ## Success Criteria
329
-
330
- - Runs all validation checks (tests, build, lint, types)
331
- - Checks task requirements if available
332
- - Provides clear pass/fail determination
333
- - Shows actionable fixes for failures
334
- - Works both standalone and in workflow context
@@ -1,142 +0,0 @@
1
-
2
- # /deslop - AI Slop Cleanup
3
-
4
- Senior maintainer performing periodic repo hygiene. Mission: remove AI-generated slop while preserving behavior and minimizing diffs.
5
-
6
- ## Constraints (Priority Order)
7
-
8
- When constraints conflict, follow this priority:
9
-
10
- 1. **Preserve behavior and public APIs** (highest priority)
11
- 2. **Minimal diffs** - do not reformat unrelated code
12
- 3. **Prefer deletion over invention**
13
- 4. **No new dependencies or abstractions**
14
- 5. **Respect repo conventions** (check CLAUDE.md/AGENTS.md)
15
-
16
- ## Arguments
17
-
18
- Parse from $ARGUMENTS or use defaults:
19
-
20
- - **Mode**: `report` (default) or `apply`
21
- - **Scope**: `all` (default), `diff`, or path
22
- - **Thoroughness**: `quick`, `normal` (default), or `deep`
23
-
24
- ## Execution
25
-
26
- ### Phase 1: Spawn Deslop Agent
27
-
28
- ```javascript
29
- // Parse arguments
30
- const args = '$ARGUMENTS'.split(' ').filter(Boolean);
31
- const mode = args.includes('apply') ? 'apply' : 'report';
32
- const thoroughness = args.find(a => a.startsWith('--thoroughness='))?.split('=')[1] || 'normal';
33
- const scope = args.find(a => a.startsWith('--scope='))?.split('=')[1] ||
34
- args.find(a => !a.startsWith('-') && a !== 'report' && a !== 'apply') || 'all';
35
-
36
- // Spawn agent to get findings
37
- const result = Invoke the deslop-agent agent
38
- ```
39
-
40
- ### Phase 2: Parse Agent Results
41
-
42
- Extract structured JSON from agent output:
43
-
44
- ```javascript
45
- function parseDeslop(output) {
46
- const match = output.match(/=== DESLOP_RESULT ===[\s\S]*?({[\s\S]*?})[\s\S]*?=== END_RESULT ===/);
47
- return match ? JSON.parse(match[1]) : { fixes: [] };
48
- }
49
-
50
- const findings = parseDeslop(result);
51
- ```
52
-
53
- ### Phase 3: Handle Mode
54
-
55
- #### Report Mode (Default)
56
-
57
- Present findings as markdown table:
58
-
59
- ```markdown
60
- ## Slop Hotspots
61
-
62
- | Priority | File | Issue | Certainty | Fix |
63
- |----------|------|-------|-----------|-----|
64
- | 1 | src/api.js:42 | console.log | HIGH | auto |
65
- | 2 | src/auth.js:15 | empty catch | HIGH | auto |
66
- | 3 | lib/utils.js:88 | excessive comments | MEDIUM | review |
67
-
68
- ## Summary
69
-
70
- - **HIGH certainty**: N (auto-fixable)
71
- - **MEDIUM certainty**: N (review required)
72
- - **LOW certainty**: N (flagged only)
73
-
74
- ## Do Next
75
-
76
- - [ ] Run `/deslop apply` to auto-fix HIGH certainty items
77
- - [ ] Review MEDIUM certainty items manually
78
- ```
79
-
80
- #### Apply Mode
81
-
82
- If fixes array is non-empty, spawn simple-fixer:
83
-
84
- ```javascript
85
- if (mode === 'apply' && findings?.fixes?.length > 0) {
86
- Invoke the simple-fixer agent
87
- }
88
- ```
89
-
90
- Present results:
91
-
92
- ```markdown
93
- ## Applied Fixes
94
-
95
- | File | Line | Fix |
96
- |------|------|-----|
97
- | src/api.js | 42 | remove-line (console.log) |
98
- | src/auth.js | 15 | add-comment (empty catch) |
99
-
100
- **Total**: N fixes applied
101
-
102
- ## Remaining (manual review needed)
103
-
104
- | File | Line | Issue | Certainty |
105
- |------|------|-------|-----------|
106
- | lib/utils.js | 88 | excessive comments | MEDIUM |
107
- ```
108
-
109
- ## Verification Strategy
110
-
111
- After fixes are applied, run project's test command:
112
-
113
- ```bash
114
- npm test
115
- # or pytest, cargo test, go test ./...
116
- ```
117
-
118
- On failure: `git restore .` and report which change failed.
119
-
120
- ## Ignore Zones
121
-
122
- Skip these paths (handled by detection script):
123
- - Build artifacts: `dist/`, `build/`, `target/`, `out/`, `.next/`
124
- - Vendored: `vendor/`, `node_modules/`, `**/*.min.*`
125
- - Generated: `**/*.gen.*`, lockfiles
126
-
127
- ## Error Handling
128
-
129
- - Git not available: Exit with "Git required for rollback safety"
130
- - Invalid scope path: Exit with "Path not found: <path>"
131
- - Verification fails: Rollback with `git restore .`, report failure
132
-
133
- ## Additional Resources
134
-
135
- ### Reference Files
136
-
137
- For detailed pattern documentation, consult:
138
- - **`references/slop-categories.md`** - All pattern categories, severity levels, certainty thresholds, auto-fix strategies
139
-
140
- ### Scripts
141
-
142
- - **`scripts/detect.js`** - Detection pipeline CLI (run with `--help` for options)