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,459 +0,0 @@
1
- ---
2
- inclusion: manual
3
- name: "audit-project-agents"
4
- description: "Use when coordinating multi-agent review passes in /audit-project. Details agent specialization, file filtering, and review queue handling."
5
- ---
6
-
7
- # Phase 2: Multi-Agent Review - Reference
8
-
9
- This file contains detailed agent coordination for `/audit-project`.
10
-
11
- **Parent document**: `audit-project.md`
12
-
13
- **Review Pass Definitions**: See `orchestrate-review` skill for canonical pass definitions (core + conditional). This command uses the same review passes but detects signals from project structure (not just changed files).
14
-
15
- ## Agent Specialization
16
-
17
- ### File Filtering by Agent
18
-
19
- Each agent reviews only relevant files:
20
-
21
- | Agent | File Patterns |
22
- |-------|--------------|
23
- | code-quality-reviewer | All source files (includes error handling) |
24
- | security-expert | Auth, validation, API endpoints, config |
25
- | performance-engineer | Hot paths, algorithms, loops, queries |
26
- | test-quality-guardian | Test files + missing-test signals |
27
- | architecture-reviewer | Cross-module boundaries, core packages |
28
- | database-specialist | Models, queries, migrations |
29
- | api-designer | API routes, controllers, handlers |
30
- | frontend-specialist | Components, state management |
31
- | backend-specialist | Services, domain logic, queues |
32
- | devops-reviewer | CI/CD configs, Dockerfiles |
33
-
34
- ## Review Queue File
35
-
36
- Create a temporary review queue file in the platform state dir. Review passes append JSONL or return JSON for the parent to write.
37
-
38
- ```javascript
39
-
40
-
41
-
42
- const pluginRoot = getPluginRoot('audit-project');
43
- if (!pluginRoot) { console.error('Error: Could not locate audit-project plugin root'); process.exit(1); }
44
-
45
-
46
- const stateDirPath = getStateDirPath(process.cwd());
47
- if (!fs.existsSync(stateDirPath)) {
48
- fs.mkdirSync(stateDirPath, { recursive: true });
49
- }
50
-
51
- function findLatestQueue(dirPath) {
52
- const files = fs.readdirSync(dirPath)
53
- .filter(name => name.startsWith('review-queue-') && name.endsWith('.json'))
54
- .map(name => ({
55
- name,
56
- fullPath: path.join(dirPath, name),
57
- mtime: fs.statSync(path.join(dirPath, name)).mtimeMs
58
- }))
59
- .sort((a, b) => b.mtime - a.mtime);
60
- return files[0]?.fullPath || null;
61
- }
62
-
63
- function safeReadJson(filePath) {
64
- try {
65
- return JSON.parse(fs.readFileSync(filePath, 'utf8'));
66
- } catch (error) {
67
- console.warn(`Review queue unreadable: ${filePath}. Starting fresh.`);
68
- return null;
69
- }
70
- }
71
-
72
- const resumeRequested = typeof RESUME_MODE !== 'undefined' && RESUME_MODE === 'true';
73
- let reviewQueuePath = resumeRequested ? findLatestQueue(stateDirPath) : null;
74
-
75
- if (!reviewQueuePath) {
76
- reviewQueuePath = path.join(stateDirPath, `review-queue-${Date.now()}.json`);
77
- }
78
-
79
- if (!fs.existsSync(reviewQueuePath)) {
80
- const reviewQueue = {
81
- status: 'open',
82
- scope: { type: 'audit', value: SCOPE },
83
- passes: [],
84
- items: [],
85
- iteration: 0,
86
- updatedAt: new Date().toISOString()
87
- };
88
- fs.writeFileSync(reviewQueuePath, JSON.stringify(reviewQueue, null, 2), 'utf8');
89
- } else if (resumeRequested) {
90
- const reviewQueue = safeReadJson(reviewQueuePath) || {
91
- status: 'open',
92
- scope: { type: 'audit', value: SCOPE },
93
- passes: [],
94
- items: [],
95
- iteration: 0,
96
- updatedAt: new Date().toISOString()
97
- };
98
- reviewQueue.status = 'open';
99
- reviewQueue.resumedAt = new Date().toISOString();
100
- reviewQueue.updatedAt = new Date().toISOString();
101
- fs.writeFileSync(reviewQueuePath, JSON.stringify(reviewQueue, null, 2), 'utf8');
102
- }
103
- ```
104
-
105
- ## Agent Coordination
106
-
107
- Use Task tool to launch agents in parallel:
108
-
109
- ```javascript
110
- const agents = [];
111
-
112
- const baseReviewPrompt = (passId, role, focus) => `Role: ${role}.
113
-
114
- Scope: ${SCOPE}
115
- Framework: ${FRAMEWORK}
116
-
117
- Focus on:
118
- ${focus.map(item => `- ${item}`).join('\n')}
119
-
120
- Write findings to ${reviewQueuePath} (append JSONL if possible). If you cannot write files, return JSON only.
121
-
122
- Return JSON ONLY in this format:
123
- {
124
- "pass": "${passId}",
125
- "findings": [
126
- {
127
- "file": "path/to/file.ts",
128
- "line": 42,
129
- "severity": "critical|high|medium|low",
130
- "category": "${passId}",
131
- "description": "Issue description",
132
- "suggestion": "How to fix",
133
- "confidence": "high|medium|low",
134
- "falsePositive": false
135
- }
136
- ]
137
- }`;
138
-
139
- // Always active agents
140
- agents.push(Task({
141
- subagent_type: "review",
142
- prompt: baseReviewPrompt('code-quality', 'code quality reviewer', [
143
- 'Code style and consistency',
144
- 'Best practices violations',
145
- 'Potential bugs and logic errors',
146
- 'Error handling and failure paths',
147
- 'Maintainability issues',
148
- 'Code duplication'
149
- ])
150
- }));
151
-
152
- agents.push(Task({
153
- subagent_type: "review",
154
- prompt: baseReviewPrompt('security', 'security reviewer', [
155
- 'Auth/authz flaws',
156
- 'Input validation and output encoding',
157
- 'Injection risks (SQL/command/template)',
158
- 'Secrets exposure and unsafe configs',
159
- 'Insecure defaults'
160
- ])
161
- }));
162
-
163
- agents.push(Task({
164
- subagent_type: "review",
165
- prompt: baseReviewPrompt('performance', 'performance reviewer', [
166
- 'N+1 queries and inefficient loops',
167
- 'Blocking operations in async paths',
168
- 'Hot path inefficiencies',
169
- 'Memory leaks or unnecessary allocations'
170
- ])
171
- }));
172
-
173
- agents.push(Task({
174
- subagent_type: "review",
175
- prompt: baseReviewPrompt('test-coverage', 'test coverage reviewer', [
176
- 'New code without corresponding tests',
177
- 'Missing edge case coverage',
178
- 'Test quality (meaningful assertions)',
179
- 'Integration test needs',
180
- 'Mock/stub appropriateness',
181
- HAS_TESTS ? 'Existing tests: verify coverage depth' : 'No tests detected: report missing tests'
182
- ])
183
- }));
184
-
185
- // Conditional agents
186
- if (FILE_COUNT > 50) {
187
- agents.push(Task({
188
- subagent_type: "review",
189
- prompt: baseReviewPrompt('architecture', 'architecture reviewer', [
190
- 'Module boundaries and ownership',
191
- 'Dependency direction and layering',
192
- 'Cross-layer coupling',
193
- 'Consistency of patterns'
194
- ])
195
- }));
196
- }
197
-
198
- if (HAS_DB) {
199
- agents.push(Task({
200
- subagent_type: "review",
201
- prompt: baseReviewPrompt('database', 'database specialist', [
202
- 'Query optimization and N+1 queries',
203
- 'Missing indexes',
204
- 'Transaction handling',
205
- 'Migration safety'
206
- ])
207
- }));
208
- }
209
-
210
- if (HAS_API) {
211
- agents.push(Task({
212
- subagent_type: "review",
213
- prompt: baseReviewPrompt('api', 'api designer', [
214
- 'REST best practices',
215
- 'Error handling and status codes',
216
- 'Rate limiting and pagination',
217
- 'API versioning'
218
- ])
219
- }));
220
- }
221
-
222
- if (HAS_FRONTEND) {
223
- agents.push(Task({
224
- subagent_type: "review",
225
- prompt: baseReviewPrompt('frontend', 'frontend specialist', [
226
- 'Component boundaries',
227
- 'State management patterns',
228
- 'Accessibility',
229
- 'Render performance'
230
- ])
231
- }));
232
- }
233
-
234
- if (HAS_BACKEND) {
235
- agents.push(Task({
236
- subagent_type: "review",
237
- prompt: baseReviewPrompt('backend', 'backend specialist', [
238
- 'Service boundaries',
239
- 'Domain logic correctness',
240
- 'Concurrency and idempotency',
241
- 'Background job safety'
242
- ])
243
- }));
244
- }
245
-
246
- if (HAS_CICD) {
247
- agents.push(Task({
248
- subagent_type: "review",
249
- prompt: baseReviewPrompt('devops', 'devops reviewer', [
250
- 'CI/CD safety',
251
- 'Secrets handling',
252
- 'Build/test pipelines',
253
- 'Deploy config correctness'
254
- ])
255
- }));
256
- }
257
- ```
258
-
259
- ## Finding Consolidation
260
-
261
- After all agents complete:
262
-
263
- ```javascript
264
- function consolidateFindings(agentResults) {
265
- const allFindings = [];
266
-
267
- for (const result of agentResults) {
268
- const pass = result.pass || 'unknown';
269
- const findings = Array.isArray(result.findings) ? result.findings : [];
270
- for (const finding of findings) {
271
- allFindings.push({
272
- id: `${pass}:${finding.file}:${finding.line}:${finding.description}`,
273
- pass,
274
- ...finding,
275
- status: finding.falsePositive ? 'false-positive' : 'open'
276
- });
277
- }
278
- }
279
-
280
- // Deduplicate by pass:file:line:description
281
- const seen = new Set();
282
- const deduped = allFindings.filter(f => {
283
- const key = `${f.pass}:${f.file}:${f.line}:${f.description}`;
284
- if (seen.has(key)) return false;
285
- seen.add(key);
286
- return true;
287
- });
288
-
289
- // Sort by severity
290
- const severityOrder = { critical: 0, high: 1, medium: 2, low: 3 };
291
- deduped.sort((a, b) => {
292
- const aRank = severityOrder[a.severity] ?? 99;
293
- const bRank = severityOrder[b.severity] ?? 99;
294
- return aRank - bRank;
295
- });
296
-
297
- // Update queue file
298
- const queueState = safeReadJson(reviewQueuePath) || {
299
- status: 'open',
300
- scope: { type: 'audit', value: SCOPE },
301
- passes: [],
302
- items: [],
303
- iteration: 0,
304
- updatedAt: new Date().toISOString()
305
- };
306
- queueState.items = deduped;
307
- queueState.passes = Array.from(new Set(deduped.map(item => item.pass)));
308
- queueState.updatedAt = new Date().toISOString();
309
- fs.writeFileSync(reviewQueuePath, JSON.stringify(queueState, null, 2), 'utf8');
310
-
311
- // Group by file
312
- const byFile = {};
313
- for (const f of deduped) {
314
- if (!byFile[f.file]) byFile[f.file] = [];
315
- byFile[f.file].push(f);
316
- }
317
-
318
- return {
319
- all: deduped,
320
- byFile,
321
- counts: {
322
- critical: deduped.filter(f => f.severity === 'critical' && !f.falsePositive).length,
323
- high: deduped.filter(f => f.severity === 'high' && !f.falsePositive).length,
324
- medium: deduped.filter(f => f.severity === 'medium' && !f.falsePositive).length,
325
- low: deduped.filter(f => f.severity === 'low' && !f.falsePositive).length
326
- }
327
- };
328
- }
329
- ```
330
-
331
- ## Queue Cleanup
332
-
333
- After fixes and re-review, remove the queue file if no open issues remain:
334
-
335
- ```javascript
336
- const queueState = safeReadJson(reviewQueuePath);
337
- if (!queueState) {
338
- return;
339
- }
340
- const openCount = queueState.items.filter(item => !item.falsePositive).length;
341
- if (openCount === 0) {
342
- if (fs.existsSync(reviewQueuePath)) {
343
- try {
344
- fs.unlinkSync(reviewQueuePath);
345
- } catch (error) {
346
- if (error.code !== 'ENOENT') {
347
- throw error;
348
- }
349
- }
350
- }
351
- }
352
- ```
353
-
354
- ## Framework-Specific Patterns
355
-
356
- ### React Patterns
357
-
358
- ```javascript
359
- const reactPatterns = {
360
- hooks_rules: {
361
- description: "React hooks must be called at top level",
362
- pattern: /use[A-Z]\w+\(/,
363
- context: "inside conditionals or loops"
364
- },
365
- state_management: {
366
- description: "Avoid prop drilling, use context or state management",
367
- pattern: /props\.\w+\.\w+\.\w+/
368
- },
369
- performance: {
370
- description: "Use memo/useMemo for expensive computations",
371
- pattern: /\.map\(.*=>.*\.map\(/
372
- }
373
- };
374
- ```
375
-
376
- ### Express Patterns
377
-
378
- ```javascript
379
- const expressPatterns = {
380
- error_handling: {
381
- description: "Express routes must have error handling",
382
- pattern: /app\.(get|post|put|delete)\(/,
383
- check: "next(err) in catch block"
384
- },
385
- async_handlers: {
386
- description: "Async handlers need try-catch or wrapper",
387
- pattern: /async\s*\(req,\s*res/
388
- }
389
- };
390
- ```
391
-
392
- ### Django Patterns
393
-
394
- ```javascript
395
- const djangoPatterns = {
396
- n_plus_one: {
397
- description: "Use select_related/prefetch_related",
398
- pattern: /\.objects\.(all|filter)\(\)/
399
- },
400
- raw_queries: {
401
- description: "Avoid raw SQL, use ORM",
402
- pattern: /\.raw\(|connection\.cursor\(\)/
403
- }
404
- };
405
- ```
406
-
407
- ## Pattern Application
408
-
409
- ```javascript
410
- function applyPatterns(findings, frameworkPatterns) {
411
- if (!frameworkPatterns) return findings;
412
-
413
- for (const pattern of Object.values(frameworkPatterns)) {
414
- // Check each finding against framework patterns
415
- for (const finding of findings) {
416
- if (pattern.pattern.test(finding.codeQuote)) {
417
- finding.frameworkContext = pattern.description;
418
- }
419
- }
420
- }
421
-
422
- return findings;
423
- }
424
- ```
425
-
426
- ## Review Output Format
427
-
428
- ```markdown
429
- ## Agent Reports
430
-
431
- ### security-expert
432
- **Files Reviewed**: X
433
- **Issues Found**: Y (Z critical, A high)
434
-
435
- Findings:
436
- 1. [Finding details with file:line]
437
- 2. [Finding details with file:line]
438
-
439
- ### performance-engineer
440
- **Files Reviewed**: X
441
- **Issues Found**: Y
442
-
443
- Findings:
444
- 1. [Finding details with file:line]
445
-
446
- [... per agent]
447
-
448
- ## Consolidated Summary
449
-
450
- **Total Issues**: X
451
- - Critical: Y (must fix)
452
- - High: Z (should fix)
453
- - Medium: A (consider)
454
- - Low: B (nice to have)
455
-
456
- **Top Files by Issue Count**:
457
- 1. src/api/users.ts: 5 issues
458
- 2. src/auth/session.ts: 3 issues
459
- ```
@@ -1,146 +0,0 @@
1
- ---
2
- inclusion: manual
3
- name: "audit-project-github"
4
- description: "Create GitHub issues for non-security deferred findings identified by /audit-project."
5
- ---
6
-
7
- # Phase 8: GitHub Issue Creation - Reference
8
-
9
- This file contains GitHub integration for `/audit-project`.
10
-
11
- **Parent document**: `audit-project.md`
12
-
13
- ## Pre-Conditions
14
-
15
- ```bash
16
- # Check if git and gh are available
17
- GIT_AVAILABLE=$(command -v git >/dev/null 2>&1 && echo "true" || echo "false")
18
- GH_AVAILABLE=$(command -v gh >/dev/null 2>&1 && echo "true" || echo "false")
19
-
20
- # Check if this is a GitHub repository
21
- IS_GITHUB_REPO="false"
22
- if [ "$GIT_AVAILABLE" = "true" ]; then
23
- REMOTE_URL=$(git remote get-url origin 2>/dev/null || echo "")
24
- if echo "$REMOTE_URL" | grep -q "github.com"; then
25
- IS_GITHUB_REPO="true"
26
- fi
27
- fi
28
- ```
29
-
30
- ## Creating GitHub Issues
31
-
32
- If `git` and `gh` are available, create issues for **non-security** deferred items:
33
-
34
- ```bash
35
- if [ "$GH_AVAILABLE" = "true" ] && [ "$IS_GITHUB_REPO" = "true" ]; then
36
- echo "Creating GitHub issues for deferred items..."
37
-
38
- # DO NOT create public issues for security-sensitive findings
39
- for issue in "${DEFERRED_NON_SECURITY_ISSUES[@]}"; do
40
- gh issue create \
41
- --title "${issue.title}" \
42
- --body "${issue.body}"
43
- done
44
-
45
- echo "Created ${#DEFERRED_NON_SECURITY_ISSUES[@]} GitHub issues"
46
- fi
47
- ```
48
-
49
- ## Issue Format
50
-
51
- Each created issue includes:
52
-
53
- ```markdown
54
- ## Issue from /audit-project
55
-
56
- **Severity**: [Critical|High|Medium|Low]
57
- **Category**: [Performance|Architecture|Code Quality|Enhancement]
58
- **Effort**: [Small|Medium|Large] (~X hours)
59
-
60
- ### Description
61
- [Description of the issue]
62
-
63
- ### Current Behavior
64
- \`\`\`[language]
65
- [Code showing the problem]
66
- \`\`\`
67
-
68
- ### Proposed Fix
69
- [Specific remediation approach]
70
-
71
- ### Impact
72
- [Why this matters]
73
-
74
- ### Files
75
- - [List of affected files]
76
- ```
77
-
78
- ## Security Issue Handling
79
-
80
- ```
81
-
82
- [WARN] SECURITY ISSUES MUST NOT BE PUBLIC
83
-
84
- The following must NOT be created as GitHub issues:
85
- - Token/credential exposure
86
- - Authentication vulnerabilities
87
- - Authorization bypasses
88
- - Injection vulnerabilities
89
- - Any exploitable security finding
90
-
91
- For security issues:
92
- 1. Fix immediately if possible
93
- 2. Keep documented internally only
94
- 3. Note in completion report (no details)
95
-
96
- ```
97
-
98
- ## TECHNICAL_DEBT.md Cleanup
99
-
100
- After all issues are handled, remove TECHNICAL_DEBT.md:
101
-
102
- ```bash
103
- if [ "$GH_AVAILABLE" = "true" ] && [ "$IS_GITHUB_REPO" = "true" ]; then
104
- if [ -f "TECHNICAL_DEBT.md" ]; then
105
- rm TECHNICAL_DEBT.md
106
- git add TECHNICAL_DEBT.md
107
- git commit -m "chore: remove TECHNICAL_DEBT.md - issues tracked in GitHub
108
-
109
- Created GitHub issues for all deferred non-security items.
110
- Security-sensitive issues kept internal."
111
- echo "Removed TECHNICAL_DEBT.md - issues now in GitHub"
112
- fi
113
- else
114
- echo "TECHNICAL_DEBT.md retained - no GitHub integration"
115
- fi
116
- ```
117
-
118
- ## Cleanup Conditions
119
-
120
- **Remove TECHNICAL_DEBT.md when ALL true:**
121
- 1. `git` is available
122
- 2. `gh` CLI is available and authenticated
123
- 3. Repository has GitHub remote
124
- 4. All non-security issues created as GitHub issues
125
-
126
- **Keep TECHNICAL_DEBT.md when ANY true:**
127
- 1. No GitHub integration available
128
- 2. `gh` CLI not authenticated
129
- 3. User requested `--create-tech-debt` flag
130
- 4. Security issues exist
131
-
132
- ## Final Commit
133
-
134
- If issues were created:
135
-
136
- ```bash
137
- git add -A
138
- git commit -m "chore: audit-project complete - issues tracked in GitHub
139
-
140
- Created X GitHub issues for deferred items:
141
- - #N: [issue title]
142
- - #N: [issue title]
143
-
144
- Security-sensitive issues (Y total) kept internal.
145
- Fixed Z issues in this review session."
146
- ```