agentsys 5.3.4 → 5.3.6

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 +11 -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,330 +0,0 @@
1
-
2
- # /audit-project - Multi-Agent Code Review
3
-
4
- Comprehensive code review using specialized AI agents with iterative improvement.
5
-
6
- ## Quick Reference
7
-
8
- | Phase | Description | Details |
9
- |-------|-------------|---------|
10
- | 1 | Context & Agent Selection | This file |
11
- | 2 | Multi-Agent Review | See `audit-project-agents.md` |
12
- | 3-4 | Tech Debt & Fixes | This file |
13
- | 5-6 | Verification & Iteration | This file |
14
- | 7 | Completion Report | This file |
15
- | 8 | GitHub Issues | See `audit-project-github.md` |
16
-
17
- ## Arguments
18
-
19
- Parse from $ARGUMENTS:
20
- - **Scope**: Path to review (default: `.`) or `--recent` (last 5 commits only)
21
- - **--domain AGENT**: Review with specific agent only (e.g., `--domain security`)
22
- - **--quick**: Single pass, no iteration (fast feedback)
23
- - **--create-tech-debt**: Force create/update TECHNICAL_DEBT.md
24
- - **--resume**: Resume from existing review queue file
25
-
26
- ### Resume Mode
27
-
28
- If `--resume` is provided, reuse the most recent review queue in the platform state dir.
29
- Otherwise create a new queue file. See `audit-project-agents.md` for queue handling.
30
-
31
- ## Phase 1: Context Gathering
32
-
33
- ### Platform Detection
34
-
35
- ```bash
36
- # Get plugin root using Node.js helper
37
- PLUGIN_ROOT=$(node -e " const root = getPluginRoot('audit-project'); if (!root) { console.error('Error: Could not locate audit-project plugin root'); process.exit(1); } console.log(root);")
38
- PLATFORM=$(node "/Users/avifen/.agentsys/plugins/audit-project/lib/platform/detect-platform.js")
39
- TOOLS=$(node "/Users/avifen/.agentsys/plugins/audit-project/lib/platform/verify-tools.js")
40
-
41
- PROJECT_TYPE=$(echo $PLATFORM | jq -r '.projectType')
42
- PACKAGE_MGR=$(echo $PLATFORM | jq -r '.packageManager')
43
-
44
- # Detect framework
45
- FRAMEWORK="unknown"
46
- if [ "$PROJECT_TYPE" = "nodejs" ]; then
47
- [ -n "$(jq -e '.dependencies.react' package.json 2>/dev/null)" ] && FRAMEWORK="react"
48
- [ -n "$(jq -e '.dependencies.express' package.json 2>/dev/null)" ] && FRAMEWORK="express"
49
- elif [ "$PROJECT_TYPE" = "python" ]; then
50
- grep -q "django" requirements.txt 2>/dev/null && FRAMEWORK="django"
51
- grep -q "fastapi" requirements.txt 2>/dev/null && FRAMEWORK="fastapi"
52
- fi
53
-
54
- RESUME_MODE=$([ "${ARGUMENTS}" != "${ARGUMENTS%--resume*}" ] && echo "true" || echo "false")
55
- ```
56
-
57
- ### Project Analysis
58
-
59
- ```bash
60
- FILE_COUNT=$(git ls-files | wc -l)
61
- TEST_FILES=$(git ls-files | grep -E '(test|spec)\.' | wc -l)
62
- HAS_TESTS=$( [ "$TEST_FILES" -gt 0 ] && echo "true" || echo "false" )
63
- HAS_DB=$(grep -rq -E "(Sequelize|Prisma|TypeORM)" . 2>/dev/null && echo "true" || echo "false")
64
- HAS_API=$(grep -rq -E "(express|fastify|@nestjs)" . 2>/dev/null && echo "true" || echo "false")
65
- HAS_FRONTEND=$( [ "$(git ls-files | grep -E '\.(tsx|jsx|vue|svelte)$' | wc -l)" -gt 0 ] && echo "true" || echo "false" )
66
- HAS_BACKEND=$(grep -rq -E "(express|fastify|@nestjs|koa|hapi)" . 2>/dev/null && echo "true" || echo "false")
67
- if [ -d ".github/workflows" ] || [ -f ".gitlab-ci.yml" ] || [ -f ".circleci/config.yml" ] || \
68
- [ -f "Jenkinsfile" ] || [ -f ".travis.yml" ] || [ -f "azure-pipelines.yml" ] || \
69
- [ -f "bitbucket-pipelines.yml" ]; then
70
- HAS_CICD="true"
71
- else
72
- HAS_CICD="false"
73
- fi
74
- ```
75
-
76
- ### Agent Selection
77
-
78
- **Always Active:**
79
- - `code-quality-reviewer`: Code quality, error handling, maintainability
80
- - `security-expert`: Security vulnerabilities, auth, input validation
81
- - `performance-engineer`: Performance bottlenecks, algorithms, memory
82
- - `test-quality-guardian`: Test coverage and quality (reports missing tests)
83
-
84
- **Conditional:**
85
- - `architecture-reviewer`: Design patterns (if `FILE_COUNT > 50`)
86
- - `database-specialist`: Query optimization (if `HAS_DB=true`)
87
- - `api-designer`: REST best practices (if `HAS_API=true`)
88
- - `frontend-specialist`: Component design (if `HAS_FRONTEND=true`)
89
- - `backend-specialist`: Service and domain logic (if `HAS_BACKEND=true`)
90
- - `devops-reviewer`: CI/CD config (if `HAS_CICD=true`)
91
-
92
- ## Phase 2: Multi-Agent Review
93
-
94
- See `audit-project-agents.md` for detailed agent coordination.
95
-
96
- **Review queue:** Write findings to a temporary queue file in the platform state dir and keep it updated until all issues are resolved. Remove the file when the queue is empty.
97
-
98
- ### Finding Format (Required)
99
-
100
- Every finding MUST include:
101
- - **File:Line**: Exact location (e.g., `src/auth/session.ts:42`)
102
- - **Severity**: critical | high | medium | low
103
- - **Category**: From agent domain
104
- - **Description**: What's wrong and why
105
- - **Code Quote**: 1-3 lines showing issue
106
- - **Suggested Fix**: Specific remediation
107
- - **Effort**: small | medium | large
108
-
109
- ### Example Finding
110
-
111
- ```markdown
112
- ### Finding: Unsafe SQL Query
113
- **Agent**: security-expert
114
- **File**: src/api/users.ts:87
115
- **Severity**: critical
116
- **Code**:
117
- ```typescript
118
- const query = `SELECT * FROM users WHERE id = ${userId}`;
119
- ```
120
- **Fix**: Use parameterized queries.
121
- **Effort**: small
122
- ```
123
-
124
- ## Phase 3: Tech Debt Documentation
125
-
126
- If TECHNICAL_DEBT.md exists or `--create-tech-debt`:
127
-
128
- ```markdown
129
- # Technical Debt
130
-
131
- Last updated: $(date -I)
132
-
133
- ## Summary
134
- **Total Issues**: X | Critical: Y | High: Z | Medium: A | Low: B
135
-
136
- ## Critical Issues
137
- [Grouped by severity with file:line, description, fix, effort]
138
-
139
- ## Progress Tracking
140
- - [ ] Issue 1
141
- - [ ] Issue 2
142
- ```
143
-
144
- ## Phase 4: Automated Fixes
145
-
146
- ### Fix Strategy
147
-
148
- 1. **Auto-fixable** (lint, formatting): Apply directly
149
- 2. **Manual fix** (code logic): Implement suggested fix
150
- 3. **Design decision required**: Flag as blocked and report to user
151
- 4. **False positive**: Mark and remove from review queue
152
-
153
- ### Fix Order
154
-
155
- 1. Critical severity first
156
- 2. Then high → medium → low
157
- 3. Then by effort (small → large)
158
- 4. Then batch by file
159
-
160
- ## Phase 5: Verification
161
-
162
- ```bash
163
- # Run tests
164
- [ -n "$TEST_CMD" ] && $TEST_CMD
165
- TEST_STATUS=$?
166
-
167
- # Run linter
168
- [ -n "$LINT_CMD" ] && $LINT_CMD
169
- LINT_STATUS=$?
170
-
171
- # Run build
172
- [ -n "$BUILD_CMD" ] && $BUILD_CMD
173
- BUILD_STATUS=$?
174
-
175
- # Overall status
176
- VERIFICATION_PASSED=$([ $TEST_STATUS -eq 0 ] && [ $LINT_STATUS -eq 0 ] && [ $BUILD_STATUS -eq 0 ] && echo "true" || echo "false")
177
- ```
178
-
179
- ### Handle Failures
180
-
181
- If verification fails:
182
- 1. Review recent changes (`git diff`)
183
- 2. Identify breaking fix
184
- 3. Rollback: `git restore <file>`
185
- 4. Document as "fix caused regression"
186
-
187
- ## Phase 6: Iteration
188
-
189
- ```javascript
190
- const initialReview = /* results from Phase 2 review */;
191
- const initialIssues = Array.isArray(initialReview?.issues) ? initialReview.issues : [];
192
- let iteration = 1;
193
- let remainingIssues = initialIssues;
194
-
195
- while (remainingIssues.length > 0) {
196
- const fixResult = applyFixes(remainingIssues);
197
-
198
- const verifyResult = runVerification();
199
- if (!verifyResult.passed) {
200
- rollbackFailed(fixResult);
201
- }
202
-
203
- const reReviewResult = reReview(fixResult.changedFiles);
204
- remainingIssues = reReviewResult.issues;
205
-
206
- if (remainingIssues.length === 0) {
207
- console.log("[OK] Zero issues remaining!");
208
- break;
209
- }
210
-
211
- iteration++;
212
- }
213
- ```
214
-
215
- ### Quick Mode
216
-
217
- If `--quick` flag: Single pass, findings only, no fixes.
218
-
219
- ## Phase 6.5: Decision Gate (User)
220
-
221
- After each iteration (or after re-review if issues remain), report the queue state and ask the user what to do next.
222
-
223
- ```javascript
224
- const openCount = remainingIssues.length;
225
- console.log(`Open issues: ${openCount}`);
226
- console.log(`Queue file: ${reviewQueuePath}`); // set in Phase 2 (audit-project-agents)
227
-
228
- const decision = await AskUserQuestion({
229
- questions: [{
230
- header: "Audit Decision",
231
- question: "Review queue still open. What next?",
232
- options: [
233
- { label: "Continue review", description: "Run another iteration" },
234
- { label: "Create issues", description: "Stop and create issues" },
235
- { label: "Update tech debt", description: "Stop and update TECHNICAL_DEBT.md" },
236
- { label: "Leave queue", description: "Stop and keep queue for resume" }
237
- ],
238
- multiSelect: false
239
- }]
240
- });
241
-
242
- const choice = decision[0];
243
- if (choice === 'Continue review') {
244
- // continue loop
245
- } else if (choice === 'Create issues') {
246
- // Create issues and remove queue file
247
- } else if (choice === 'Update tech debt') {
248
- // Update TECHNICAL_DEBT.md and remove queue file
249
- } else if (choice === 'Leave queue') {
250
- // Leave queue file for --resume
251
- break;
252
- }
253
- ```
254
-
255
- ## Phase 7: Completion Report
256
-
257
- ```markdown
258
- # Project Review Complete
259
-
260
- **Scope**: ${SCOPE} | **Framework**: ${FRAMEWORK}
261
- **Iterations**: ${iteration} | **Duration**: ${duration}
262
-
263
- ## Summary
264
- **Issues Found**: ${initialCount}
265
- **Issues Fixed**: ${fixedCount}
266
- **Remaining**: ${remainingCount}
267
-
268
- ## By Severity
269
- - Critical: ${criticalFound} → ${criticalRemaining}
270
- - High: ${highFound} → ${highRemaining}
271
- - Medium: ${mediumFound} → ${mediumRemaining}
272
- - Low: ${lowFound} → ${lowRemaining}
273
-
274
- ## Verification
275
- - Tests: [OK]/[FAIL]
276
- - Linter: [OK]/[FAIL]
277
- - Build: [OK]/[FAIL]
278
-
279
- ## Files Changed
280
- ${FILE_COUNT} files modified
281
-
282
- ## Remaining Issues
283
- [List of issues needing attention]
284
- ```
285
-
286
- ## Phase 8: GitHub Issue Creation
287
-
288
- See `audit-project-github.md` for:
289
- - Creating GitHub issues for deferred items
290
- - Security issue handling (no public issues)
291
- - TECHNICAL_DEBT.md cleanup
292
-
293
- ## Error Handling
294
-
295
- ### No Framework Detected
296
- ```
297
- Framework detection failed, using generic patterns.
298
- ```
299
-
300
- ### No Tests Available
301
- ```
302
- No test suite detected. Skipping test-quality-guardian.
303
- ```
304
-
305
- ### All Agents Failed
306
- ```
307
- ERROR: All review agents failed.
308
- Try: --recent or specific path for smaller scope.
309
- ```
310
-
311
- ## Usage Examples
312
-
313
- ```bash
314
- /audit-project # Full review
315
- /audit-project --recent # Last 5 commits only
316
- /audit-project src/api # Specific path
317
- /audit-project --domain security # Security audit only
318
- /audit-project --quick # Fast feedback, no fixes
319
- /audit-project --create-tech-debt # Force tech debt file
320
- ```
321
-
322
- ## Success Criteria
323
-
324
- - [OK] All agents completed review
325
- - [OK] Evidence-based findings (file:line provided)
326
- - [OK] Critical issues fixed or documented
327
- - [OK] Verification passes
328
- - [OK] TECHNICAL_DEBT.md updated (if enabled)
329
-
330
- Begin Phase 1 now.