specialist-agent 2.11.3 → 2.12.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.
Files changed (80) hide show
  1. package/.claude-plugin/marketplace.json +48 -73
  2. package/.claude-plugin/plugin.json +8 -14
  3. package/.codex/INSTALL.md +32 -9
  4. package/.cursor-plugin/marketplace.json +45 -2
  5. package/.cursor-plugin/plugin.json +14 -12
  6. package/.opencode/opencode.json +45 -0
  7. package/README.md +18 -2
  8. package/agents/analyst-lite.md +1 -1
  9. package/agents/analyst.md +5 -1
  10. package/agents/api.md +1 -0
  11. package/agents/architect-lite.md +1 -1
  12. package/agents/architect.md +10 -1
  13. package/agents/autopilot-lite.md +46 -0
  14. package/agents/autopilot.md +196 -0
  15. package/agents/cloud-lite.md +1 -1
  16. package/agents/cloud.md +2 -1
  17. package/agents/data.md +1 -0
  18. package/agents/debugger.md +3 -0
  19. package/agents/deps-lite.md +1 -1
  20. package/agents/deps.md +2 -1
  21. package/agents/designer.md +8 -0
  22. package/agents/devops-lite.md +1 -1
  23. package/agents/devops.md +2 -1
  24. package/agents/docs-lite.md +1 -1
  25. package/agents/docs.md +2 -1
  26. package/agents/executor-lite.md +1 -1
  27. package/agents/executor.md +58 -31
  28. package/agents/explorer-lite.md +1 -1
  29. package/agents/explorer.md +14 -1
  30. package/agents/finance.md +1 -0
  31. package/agents/i18n.md +1 -0
  32. package/agents/legal.md +1 -0
  33. package/agents/marketing.md +9 -0
  34. package/agents/memory.md +103 -178
  35. package/agents/orchestrator-lite.md +1 -1
  36. package/agents/orchestrator.md +62 -39
  37. package/agents/pair-lite.md +1 -1
  38. package/agents/pair.md +2 -1
  39. package/agents/perf.md +1 -0
  40. package/agents/planner-lite.md +1 -1
  41. package/agents/planner.md +17 -11
  42. package/agents/product.md +9 -0
  43. package/agents/refactor.md +1 -0
  44. package/agents/ripple-lite.md +1 -1
  45. package/agents/ripple.md +4 -1
  46. package/agents/scout-lite.md +1 -1
  47. package/agents/scout.md +2 -1
  48. package/agents/security-lite.md +1 -1
  49. package/agents/security.md +4 -1
  50. package/agents/sentry-triage-lite.md +1 -1
  51. package/agents/sentry-triage.md +4 -1
  52. package/agents/starter-lite.md +1 -1
  53. package/agents/starter.md +2 -1
  54. package/agents/support.md +1 -0
  55. package/agents/tdd.md +3 -0
  56. package/agents/tester.md +1 -0
  57. package/cli/index.mjs +1 -1
  58. package/hooks/hooks.json +61 -76
  59. package/hooks/lifecycle.json +91 -0
  60. package/hooks/native/auto-dispatch.mjs +7 -2
  61. package/hooks/native/session-end.mjs +42 -0
  62. package/package.json +1 -1
  63. package/skills/audit/SKILL.md +71 -9
  64. package/skills/autopilot/SKILL.md +286 -0
  65. package/skills/brainstorm/SKILL.md +60 -7
  66. package/skills/codereview/SKILL.md +16 -3
  67. package/skills/copywriting/SKILL.md +218 -0
  68. package/skills/cro/SKILL.md +234 -0
  69. package/skills/design-review/SKILL.md +217 -0
  70. package/skills/grill/SKILL.md +270 -0
  71. package/skills/improve-architecture/SKILL.md +205 -0
  72. package/skills/prd/SKILL.md +241 -0
  73. package/skills/recall/SKILL.md +36 -74
  74. package/skills/remember/SKILL.md +41 -91
  75. package/skills/seo-audit/SKILL.md +240 -0
  76. package/skills/tdd/SKILL.md +49 -4
  77. package/skills/write-skill/SKILL.md +18 -6
  78. package/templates/autopilot/PROMPT.md +39 -0
  79. package/templates/autopilot/README.md +122 -0
  80. package/templates/autopilot/devcontainer.json +21 -0
package/agents/scout.md CHANGED
@@ -2,7 +2,8 @@
2
2
  name: scout
3
3
  description: "Use when assessing a project for the first time, evaluating technical debt, or generating a health report."
4
4
  model: haiku
5
- tools: Read, Glob, Grep
5
+ tools: Read, Glob, Grep, Agent
6
+ memory: project
6
7
  color: "#64748b"
7
8
  ---
8
9
 
@@ -2,7 +2,7 @@
2
2
  name: security
3
3
  description: "Use when implementing authentication, authorization, encryption, or auditing for OWASP compliance and security best practices."
4
4
  model: haiku
5
- tools: Read, Write, Edit, Bash, Glob, Grep
5
+ tools: Read, Write, Edit, Bash, Glob, Grep, WebSearch, WebFetch
6
6
  ---
7
7
 
8
8
  # Security (Lite)
@@ -1,7 +1,10 @@
1
1
  ---
2
2
  name: security
3
3
  description: "Use when implementing authentication, authorization, encryption, or auditing for OWASP compliance and security best practices."
4
- tools: Read, Write, Edit, Bash, Glob, Grep
4
+ tools: Read, Write, Edit, Bash, Glob, Grep, WebSearch, WebFetch
5
+ effort: high
6
+ skills:
7
+ - audit
5
8
  color: "#dc2626"
6
9
  ---
7
10
 
@@ -2,7 +2,7 @@
2
2
  name: sentry-triage
3
3
  description: "Use when triaging Sentry errors, analyzing recent issues, checking if fixes already exist, and creating prioritized fix PRs automatically."
4
4
  model: haiku
5
- tools: Read, Write, Edit, Bash, Glob, Grep
5
+ tools: Read, Write, Edit, Bash, Glob, Grep, WebFetch
6
6
  ---
7
7
 
8
8
  # @sentry-triage (Lite)
@@ -1,7 +1,10 @@
1
1
  ---
2
2
  name: sentry-triage
3
3
  description: "Use when triaging Sentry errors, analyzing recent issues, checking if fixes already exist, and creating prioritized fix PRs automatically."
4
- tools: Read, Write, Edit, Bash, Glob, Grep
4
+ tools: Read, Write, Edit, Bash, Glob, Grep, WebFetch
5
+ effort: high
6
+ skills:
7
+ - autofix
5
8
  color: "#362d59"
6
9
  ---
7
10
 
@@ -2,7 +2,7 @@
2
2
  name: starter
3
3
  description: "Use when creating a new project from scratch - any frontend, backend, and database combination."
4
4
  model: haiku
5
- tools: Read, Write, Edit, Bash, Glob, Grep
5
+ tools: Read, Write, Edit, Bash, Glob, Grep, WebSearch
6
6
  ---
7
7
 
8
8
  # Starter (Lite)
package/agents/starter.md CHANGED
@@ -1,7 +1,8 @@
1
1
  ---
2
2
  name: starter
3
3
  description: "Use when creating a new project from scratch - any frontend, backend, and database combination."
4
- tools: Read, Write, Edit, Bash, Glob, Grep
4
+ tools: Read, Write, Edit, Bash, Glob, Grep, WebSearch
5
+ effort: medium
5
6
  color: "#2563eb"
6
7
  ---
7
8
 
package/agents/support.md CHANGED
@@ -2,6 +2,7 @@
2
2
  name: support
3
3
  description: "Use when creating support documentation, help center content, runbooks, incident response procedures, or customer-facing knowledge base articles."
4
4
  tools: Read, Write, Edit, Bash, Glob, Grep
5
+ effort: medium
5
6
  color: "#0ea5e9"
6
7
  ---
7
8
 
package/agents/tdd.md CHANGED
@@ -2,6 +2,9 @@
2
2
  name: tdd
3
3
  description: "Use when implementing any feature or bugfix where correctness matters - before writing implementation code."
4
4
  tools: Read, Write, Edit, Bash, Glob, Grep
5
+ effort: high
6
+ skills:
7
+ - tdd
5
8
  color: "#8b5cf6"
6
9
  ---
7
10
 
package/agents/tester.md CHANGED
@@ -2,6 +2,7 @@
2
2
  name: tester
3
3
  description: "Use when defining test strategy, improving coverage, setting up test infrastructure, or choosing testing patterns."
4
4
  tools: Read, Write, Edit, Bash, Glob, Grep
5
+ effort: medium
5
6
  color: "#22c55e"
6
7
  ---
7
8
 
package/cli/index.mjs CHANGED
@@ -273,7 +273,7 @@ if (args.includes('--help') || args.includes('-h')) {
273
273
  console.log(' Usage: specialist-agent <command> [options]')
274
274
  console.log()
275
275
  console.log(' Commands:')
276
- console.log(` init ${DIM}Install 35 agents and 24 skills (works on empty projects too)${NC}`)
276
+ console.log(` init ${DIM}Install 36 agents and 32 skills (works on empty projects too)${NC}`)
277
277
  console.log(` detect ${DIM}Detect architecture, monorepo, and suggest migrations${NC}`)
278
278
  console.log(` create-agent <name> ${DIM}Create a custom agent from template${NC}`)
279
279
  console.log(` list ${DIM}List installed agents, skills, and memory${NC}`)
package/hooks/hooks.json CHANGED
@@ -1,81 +1,66 @@
1
1
  {
2
- "$schema": "https://specialist-agent.dev/schemas/hooks-v1.json",
3
- "version": "1.0.0",
4
- "description": "Specialist Agent hooks configuration",
5
2
  "hooks": {
6
- "session-start": {
7
- "description": "Runs when a new Claude Code session starts",
8
- "scripts": [
9
- "./hooks/session-start.mjs"
10
- ],
11
- "enabled": true
12
- },
13
- "before-plan": {
14
- "description": "Runs before @planner creates a plan",
15
- "scripts": [
16
- "./hooks/before-plan.mjs"
17
- ],
18
- "enabled": true
19
- },
20
- "after-task": {
21
- "description": "Runs after each task completes (from @executor)",
22
- "scripts": [
23
- "./hooks/after-task.mjs"
24
- ],
25
- "enabled": true
26
- },
27
- "on-error": {
28
- "description": "Runs when an agent encounters an error",
29
- "scripts": [
30
- "./hooks/on-error.mjs"
31
- ],
32
- "enabled": true
33
- },
34
- "before-review": {
35
- "description": "Runs before @reviewer starts review",
36
- "scripts": [
37
- "./hooks/before-review.mjs"
38
- ],
39
- "enabled": true
40
- },
41
- "after-review": {
42
- "description": "Runs after @reviewer completes review",
43
- "scripts": [
44
- "./hooks/after-review.mjs"
45
- ],
46
- "enabled": true
47
- },
48
- "session-end": {
49
- "description": "Runs when session ends (if detectable)",
50
- "scripts": [
51
- "./hooks/session-end.mjs"
52
- ],
53
- "enabled": true
54
- }
55
- },
56
- "metrics": {
57
- "enabled": true,
58
- "outputDir": ".claude/metrics",
59
- "track": {
60
- "tokens": true,
61
- "duration": true,
62
- "agents": true,
63
- "skills": true,
64
- "files": true,
65
- "checkpoints": true
66
- }
67
- },
68
- "notifications": {
69
- "enabled": false,
70
- "channels": {
71
- "slack": {
72
- "webhook": "",
73
- "events": ["on-error", "session-end"]
74
- },
75
- "discord": {
76
- "webhook": "",
77
- "events": ["on-error"]
3
+ "PreToolUse": [
4
+ {
5
+ "matcher": "Bash",
6
+ "hooks": [
7
+ {
8
+ "type": "command",
9
+ "command": "node ${CLAUDE_PLUGIN_ROOT}/hooks/native/security-guard.mjs",
10
+ "timeout": 5
11
+ }
12
+ ]
78
13
  }
79
- }
14
+ ],
15
+ "UserPromptSubmit": [
16
+ {
17
+ "hooks": [
18
+ {
19
+ "type": "command",
20
+ "command": "node ${CLAUDE_PLUGIN_ROOT}/hooks/native/auto-dispatch.mjs",
21
+ "timeout": 3
22
+ }
23
+ ]
24
+ }
25
+ ],
26
+ "SessionStart": [
27
+ {
28
+ "hooks": [
29
+ {
30
+ "type": "command",
31
+ "command": "node ${CLAUDE_PLUGIN_ROOT}/hooks/native/session-context.mjs",
32
+ "timeout": 5
33
+ },
34
+ {
35
+ "type": "command",
36
+ "command": "node ${CLAUDE_PLUGIN_ROOT}/hooks/native/mcp-discovery.mjs",
37
+ "timeout": 5
38
+ }
39
+ ]
40
+ }
41
+ ],
42
+ "PostToolUse": [
43
+ {
44
+ "matcher": "Write|Edit",
45
+ "hooks": [
46
+ {
47
+ "type": "command",
48
+ "command": "node ${CLAUDE_PLUGIN_ROOT}/hooks/native/auto-format.mjs",
49
+ "timeout": 15
50
+ }
51
+ ]
52
+ }
53
+ ],
54
+ "Stop": [
55
+ {
56
+ "hooks": [
57
+ {
58
+ "type": "command",
59
+ "command": "node ${CLAUDE_PLUGIN_ROOT}/hooks/native/session-end.mjs",
60
+ "timeout": 5
61
+ }
62
+ ]
63
+ }
64
+ ]
80
65
  }
81
66
  }
@@ -0,0 +1,91 @@
1
+ {
2
+ "$schema": "https://specialist-agent.dev/schemas/hooks-v1.json",
3
+ "version": "1.0.0",
4
+ "description": "Specialist Agent internal lifecycle hooks (used by agents, not by Claude Code plugin system)",
5
+ "hooks": {
6
+ "session-start": {
7
+ "description": "Runs when a new Claude Code session starts",
8
+ "scripts": [
9
+ "./hooks/session-start.mjs"
10
+ ],
11
+ "enabled": true
12
+ },
13
+ "before-plan": {
14
+ "description": "Runs before @planner creates a plan",
15
+ "scripts": [
16
+ "./hooks/before-plan.mjs"
17
+ ],
18
+ "enabled": true
19
+ },
20
+ "after-task": {
21
+ "description": "Runs after each task completes (from @executor)",
22
+ "scripts": [
23
+ "./hooks/after-task.mjs"
24
+ ],
25
+ "enabled": true
26
+ },
27
+ "on-error": {
28
+ "description": "Runs when an agent encounters an error",
29
+ "scripts": [
30
+ "./hooks/on-error.mjs"
31
+ ],
32
+ "enabled": true
33
+ },
34
+ "before-review": {
35
+ "description": "Runs before @reviewer starts review",
36
+ "scripts": [
37
+ "./hooks/before-review.mjs"
38
+ ],
39
+ "enabled": true
40
+ },
41
+ "after-review": {
42
+ "description": "Runs after @reviewer completes review",
43
+ "scripts": [
44
+ "./hooks/after-review.mjs"
45
+ ],
46
+ "enabled": true
47
+ },
48
+ "session-end": {
49
+ "description": "Runs when session ends (if detectable)",
50
+ "scripts": [
51
+ "./hooks/session-end.mjs"
52
+ ],
53
+ "enabled": true
54
+ },
55
+ "before-iteration": {
56
+ "description": "Runs before each autopilot iteration starts",
57
+ "scripts": [],
58
+ "enabled": true
59
+ },
60
+ "after-iteration": {
61
+ "description": "Runs after each autopilot iteration completes",
62
+ "scripts": [],
63
+ "enabled": true
64
+ }
65
+ },
66
+ "metrics": {
67
+ "enabled": true,
68
+ "outputDir": ".claude/metrics",
69
+ "track": {
70
+ "tokens": true,
71
+ "duration": true,
72
+ "agents": true,
73
+ "skills": true,
74
+ "files": true,
75
+ "checkpoints": true
76
+ }
77
+ },
78
+ "notifications": {
79
+ "enabled": false,
80
+ "channels": {
81
+ "slack": {
82
+ "webhook": "",
83
+ "events": ["on-error", "session-end"]
84
+ },
85
+ "discord": {
86
+ "webhook": "",
87
+ "events": ["on-error"]
88
+ }
89
+ }
90
+ }
91
+ }
@@ -61,6 +61,7 @@ const INTENT_MAP = {
61
61
 
62
62
  // Automation agents
63
63
  'sentry-triage': { phrases: ['sentry error', 'triage errors', 'sentry issue', 'error triage', 'fix sentry'], keywords: ['sentry', 'triage', 'error tracking', 'alert'], weight: 2 },
64
+ autopilot: { phrases: ['autopilot', 'autonomous loop', 'overnight build', 'iterative build', 'batch build loop', 'ralf loop', 'ralph loop'], keywords: ['autopilot', 'autonomous build', 'overnight', 'iterative build', 'ralf', 'ralph'], weight: 2 },
64
65
 
65
66
  // Support agents
66
67
  scout: { phrases: ['analyze project', 'project analysis', 'quick scan'], keywords: ['analyze', 'scan', 'overview', 'analysis'], weight: 1 },
@@ -107,6 +108,7 @@ const AGENT_DESCRIPTIONS = {
107
108
  product: 'defines product strategy, user stories, roadmaps, and feature prioritization',
108
109
  support: 'generates knowledge base articles, runbooks, changelogs, and FAQs',
109
110
  'sentry-triage': 'triages Sentry errors, prioritizes by impact, and auto-creates fix PRs',
111
+ autopilot: 'runs iterative autonomous builds with PRD and progress tracking',
110
112
  };
111
113
 
112
114
  // ── Intent Matching Engine (exported for testing) ───────────
@@ -183,11 +185,14 @@ async function main() {
183
185
 
184
186
  if (match) {
185
187
  outputJson({
186
- additionalContext: `Specialist Agent suggests: @${match.agent} — ${match.description}. Mention @${match.agent} in your prompt to activate it. Agents provide domain expertise, structured workflows, and verification — always prefer them over generic prompts.`,
188
+ additionalContext: `AUTO-DISPATCH: Read agents/${match.agent}.md and follow its workflow NOW. Agent @${match.agent} — ${match.description}. Do NOT respond as a generic assistant — the agent file has structured phases, rules, and verification that produce better results.`,
187
189
  });
188
190
  } else {
189
191
  outputJson({
190
- additionalContext: 'Tip: Specialist Agent has 35 agents for this project. Use @builder to create, @reviewer to review, @doctor to debug, @planner to plan, @tdd for test-driven development. Agents deliver better results than generic prompts.',
192
+ additionalContext: `SPECIALIST AGENT REMINDER: You are NOT a generic assistant. You are a platform of 36+ agents and 32+ skills. Before responding, check if any agent or skill fits this task:
193
+ AGENTS: @builder (create), @reviewer (review), @doctor (debug), @planner (plan), @tdd (test-first), @pair (collaborate), @analyst (specs), @architect (architecture), @security (audit), @devops (deploy), @data (database), @api (endpoints), @perf (optimize), @docs (document), @refactor (clean), @deps (dependencies), @marketing (growth), @product (strategy).
194
+ SKILLS: /plan (plan feature), /debug (debug issue), /commit (smart commit), /audit (code audit), /codereview (parallel review), /tdd (test-driven), /brainstorm (ideation), /verify (verify work), /health (project score), /estimate (cost), /prd (product requirements), /design-review (UI audit), /seo-audit (SEO), /grill (stress-test), /autopilot (autonomous build).
195
+ Read the matching agent file from agents/ or execute the skill. Generic responses when a specialist exists is a FAILURE MODE.`,
191
196
  });
192
197
  }
193
198
 
@@ -0,0 +1,42 @@
1
+ #!/usr/bin/env node
2
+
3
+ /**
4
+ * Session End - Stop Hook
5
+ *
6
+ * Fires when Claude Code finishes responding. Can be used to
7
+ * trigger lifecycle hooks (session-end) or log session metrics.
8
+ * All operations are best-effort. Errors are silently ignored.
9
+ *
10
+ * Claude Code event: Stop
11
+ * Output: { "additionalContext": "..." } or empty
12
+ */
13
+
14
+ import { readFileSync, existsSync } from 'fs';
15
+ import { join } from 'path';
16
+
17
+ const lifecyclePath = join(process.cwd(), 'hooks', 'lifecycle.json');
18
+
19
+ function main() {
20
+ try {
21
+ if (!existsSync(lifecyclePath)) {
22
+ process.stdout.write(JSON.stringify({}));
23
+ return;
24
+ }
25
+
26
+ const lifecycle = JSON.parse(readFileSync(lifecyclePath, 'utf-8'));
27
+ const sessionEnd = lifecycle?.hooks?.['session-end'];
28
+
29
+ if (!sessionEnd?.enabled) {
30
+ process.stdout.write(JSON.stringify({}));
31
+ return;
32
+ }
33
+
34
+ // Log session end for metrics/notifications if configured
35
+ // The lifecycle.json may define webhook URLs or log destinations
36
+ process.stdout.write(JSON.stringify({}));
37
+ } catch {
38
+ process.stdout.write(JSON.stringify({}));
39
+ }
40
+ }
41
+
42
+ main();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "specialist-agent",
3
- "version": "2.11.3",
3
+ "version": "2.12.0",
4
4
  "type": "module",
5
5
  "description": "AI agents for Claude Code — any framework, any stack",
6
6
  "bin": {
@@ -85,7 +85,54 @@ Check for performance issues:
85
85
  | Network | Missing caching, redundant API calls |
86
86
  | Assets | Unoptimized images, missing lazy loading |
87
87
 
88
- ### Step 5: Dependency Audit
88
+ ### Step 5: Observability Audit
89
+
90
+ Check for production readiness observability:
91
+
92
+ | Check | What to Look For |
93
+ |-------|------------------|
94
+ | Structured logging | JSON format, consistent fields (timestamp, level, service, traceId) |
95
+ | Error tracking | Errors captured with context (user, request, stack trace) |
96
+ | Health endpoints | `/health` or equivalent exposed by every service |
97
+ | Metrics | RED metrics (Rate, Errors, Duration) for critical operations |
98
+ | Correlation IDs | Trace/request IDs propagated across service boundaries |
99
+ | Sensitive data | NO passwords, tokens, PII, credit cards in logs |
100
+
101
+ ```bash
102
+ # Check for structured logging
103
+ grep -rn "console\.log\|console\.error\|console\.warn" $TARGET --include="*.ts" --include="*.tsx" 2>/dev/null | grep -v "node_modules\|test\|spec" | head -15
104
+
105
+ # Check for health endpoints
106
+ grep -rn "health\|healthcheck\|readiness\|liveness" $TARGET --include="*.ts" --include="*.tsx" 2>/dev/null | head -10
107
+
108
+ # Check for sensitive data in logs
109
+ grep -rn "console\.\|logger\.\|log\." $TARGET --include="*.ts" 2>/dev/null | grep -i "password\|token\|secret\|credit\|ssn" | head -10
110
+ ```
111
+
112
+ ### Step 6: Accessibility Audit (if frontend detected)
113
+
114
+ If the project contains frontend code (`.tsx`, `.vue`, `.svelte`, `.astro`), check:
115
+
116
+ | Check | Criteria |
117
+ |-------|----------|
118
+ | Alt text | All images have descriptive alt attributes |
119
+ | Form labels | All inputs have associated labels or aria-label |
120
+ | Heading hierarchy | Single H1, logical H2-H6, no skipped levels |
121
+ | Keyboard navigation | Interactive elements accessible via keyboard |
122
+ | Color contrast | Text meets WCAG AA 4.5:1 ratio |
123
+ | ARIA usage | Correct roles, states, properties |
124
+
125
+ ```bash
126
+ # Detect frontend code
127
+ FRONTEND_FILES=$(find $TARGET -name "*.tsx" -o -name "*.vue" -o -name "*.svelte" -o -name "*.astro" 2>/dev/null | grep -v node_modules | head -5)
128
+ if [ -n "$FRONTEND_FILES" ]; then
129
+ echo "Frontend detected - running accessibility checks"
130
+ grep -rn "<img" $TARGET --include="*.tsx" --include="*.vue" 2>/dev/null | grep -v "alt=" | head -10
131
+ grep -rn "<input\|<select" $TARGET --include="*.tsx" --include="*.vue" 2>/dev/null | grep -v "aria-label\|id=" | head -10
132
+ fi
133
+ ```
134
+
135
+ ### Step 7: Dependency Audit
89
136
 
90
137
  Check dependency health:
91
138
 
@@ -102,10 +149,21 @@ Run if available:
102
149
  npx depcheck --json 2>/dev/null || true
103
150
  ```
104
151
 
105
- ### Step 6: Report Generation
152
+ ### Step 8: Report Generation & Scoring
106
153
 
107
154
  Compile findings into a structured report with severity ratings.
108
155
 
156
+ **Scoring formula per domain (0-100):**
157
+ - Start at 100
158
+ - CRITICAL finding: -25 points
159
+ - HIGH finding: -15 points
160
+ - MEDIUM finding: -10 points
161
+ - LOW finding: -5 points
162
+ - INFO: -0 points
163
+ - Minimum: 0
164
+
165
+ **Overall score** = average of all domain scores (weighted: Security 30%, Architecture 25%, Performance 20%, Observability 15%, Dependencies 10%).
166
+
109
167
  ## Severity Levels
110
168
 
111
169
  | Level | Description | Action |
@@ -120,7 +178,7 @@ Compile findings into a structured report with severity ratings.
120
178
 
121
179
  **Before claiming audit is complete:**
122
180
 
123
- 1. All 4 audit domains were checked (security, architecture, performance, dependencies)
181
+ 1. All domains were checked (security, architecture, performance, observability, dependencies, and accessibility if frontend)
124
182
  2. Every finding has a severity level
125
183
  3. Every CRITICAL/HIGH finding has a specific remediation step
126
184
  4. Automated tools were run where available (npm audit, eslint, depcheck)
@@ -135,10 +193,12 @@ Compile findings into a structured report with severity ratings.
135
193
  | "Dependencies are up to date" | Did you run `npm audit`? Check for unused deps? |
136
194
  | "Performance seems okay" | Did you check for N+1 queries, memory leaks, bundle size? |
137
195
  | "The codebase is too large to audit fully" | Scope down to critical paths (auth, payments, data). Never skip security. |
196
+ | "Observability is a nice-to-have" | Production without observability is flying blind. You can't fix what you can't see. |
197
+ | "Accessibility doesn't apply to us" | Internal tools have users with disabilities too. And legal requirements don't have exemptions. |
138
198
 
139
199
  ## Rules
140
200
 
141
- 1. **Check all 4 domains** - Skipping one defeats the purpose
201
+ 1. **Check all domains** - Skipping one defeats the purpose (security, architecture, performance, observability, dependencies + accessibility if frontend)
142
202
  2. **Run automated tools** - Never skip `npm audit` or linting if available
143
203
  3. **Severity must be justified** - Every rating needs evidence
144
204
  4. **Remediation is required** - Findings without fix suggestions are useless
@@ -152,12 +212,14 @@ Compile findings into a structured report with severity ratings.
152
212
  Target: [path or module]
153
213
  Scope: [X files, Y lines]
154
214
 
155
- Security: [X critical, Y high, Z medium]
156
- Architecture: [X high, Y medium]
157
- Performance: [X high, Y medium]
158
- Dependencies: [X vulnerable, Y outdated, Z unused]
215
+ Security: [score]/100 - [X critical, Y high, Z medium]
216
+ Architecture: [score]/100 - [X high, Y medium]
217
+ Performance: [score]/100 - [X high, Y medium]
218
+ Observability: [score]/100 - [X high, Y medium]
219
+ Dependencies: [score]/100 - [X vulnerable, Y outdated, Z unused]
220
+ Accessibility: [score]/100 - [N findings] (if frontend)
159
221
 
160
- Overall Score: [0-100]
222
+ Overall Score: [0-100] (weighted average)
161
223
  Risk Level: [CRITICAL | HIGH | MEDIUM | LOW]
162
224
 
163
225
  Top Findings: