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.
- package/.claude-plugin/marketplace.json +48 -73
- package/.claude-plugin/plugin.json +8 -14
- package/.codex/INSTALL.md +32 -9
- package/.cursor-plugin/marketplace.json +45 -2
- package/.cursor-plugin/plugin.json +14 -12
- package/.opencode/opencode.json +45 -0
- package/README.md +18 -2
- package/agents/analyst-lite.md +1 -1
- package/agents/analyst.md +5 -1
- package/agents/api.md +1 -0
- package/agents/architect-lite.md +1 -1
- package/agents/architect.md +10 -1
- package/agents/autopilot-lite.md +46 -0
- package/agents/autopilot.md +196 -0
- package/agents/cloud-lite.md +1 -1
- package/agents/cloud.md +2 -1
- package/agents/data.md +1 -0
- package/agents/debugger.md +3 -0
- package/agents/deps-lite.md +1 -1
- package/agents/deps.md +2 -1
- package/agents/designer.md +8 -0
- package/agents/devops-lite.md +1 -1
- package/agents/devops.md +2 -1
- package/agents/docs-lite.md +1 -1
- package/agents/docs.md +2 -1
- package/agents/executor-lite.md +1 -1
- package/agents/executor.md +58 -31
- package/agents/explorer-lite.md +1 -1
- package/agents/explorer.md +14 -1
- package/agents/finance.md +1 -0
- package/agents/i18n.md +1 -0
- package/agents/legal.md +1 -0
- package/agents/marketing.md +9 -0
- package/agents/memory.md +103 -178
- package/agents/orchestrator-lite.md +1 -1
- package/agents/orchestrator.md +62 -39
- package/agents/pair-lite.md +1 -1
- package/agents/pair.md +2 -1
- package/agents/perf.md +1 -0
- package/agents/planner-lite.md +1 -1
- package/agents/planner.md +17 -11
- package/agents/product.md +9 -0
- package/agents/refactor.md +1 -0
- package/agents/ripple-lite.md +1 -1
- package/agents/ripple.md +4 -1
- package/agents/scout-lite.md +1 -1
- package/agents/scout.md +2 -1
- package/agents/security-lite.md +1 -1
- package/agents/security.md +4 -1
- package/agents/sentry-triage-lite.md +1 -1
- package/agents/sentry-triage.md +4 -1
- package/agents/starter-lite.md +1 -1
- package/agents/starter.md +2 -1
- package/agents/support.md +1 -0
- package/agents/tdd.md +3 -0
- package/agents/tester.md +1 -0
- package/cli/index.mjs +1 -1
- package/hooks/hooks.json +61 -76
- package/hooks/lifecycle.json +91 -0
- package/hooks/native/auto-dispatch.mjs +7 -2
- package/hooks/native/session-end.mjs +42 -0
- package/package.json +1 -1
- package/skills/audit/SKILL.md +71 -9
- package/skills/autopilot/SKILL.md +286 -0
- package/skills/brainstorm/SKILL.md +60 -7
- package/skills/codereview/SKILL.md +16 -3
- package/skills/copywriting/SKILL.md +218 -0
- package/skills/cro/SKILL.md +234 -0
- package/skills/design-review/SKILL.md +217 -0
- package/skills/grill/SKILL.md +270 -0
- package/skills/improve-architecture/SKILL.md +205 -0
- package/skills/prd/SKILL.md +241 -0
- package/skills/recall/SKILL.md +36 -74
- package/skills/remember/SKILL.md +41 -91
- package/skills/seo-audit/SKILL.md +240 -0
- package/skills/tdd/SKILL.md +49 -4
- package/skills/write-skill/SKILL.md +18 -6
- package/templates/autopilot/PROMPT.md +39 -0
- package/templates/autopilot/README.md +122 -0
- package/templates/autopilot/devcontainer.json +21 -0
package/agents/scout.md
CHANGED
package/agents/security-lite.md
CHANGED
|
@@ -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)
|
package/agents/security.md
CHANGED
|
@@ -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)
|
package/agents/sentry-triage.md
CHANGED
|
@@ -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
|
|
package/agents/starter-lite.md
CHANGED
|
@@ -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
package/agents/tdd.md
CHANGED
package/agents/tester.md
CHANGED
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
|
|
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
|
-
"
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
"
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
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: `
|
|
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:
|
|
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
package/skills/audit/SKILL.md
CHANGED
|
@@ -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:
|
|
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
|
|
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
|
|
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
|
|
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:
|
|
156
|
-
Architecture: [X high, Y medium]
|
|
157
|
-
Performance:
|
|
158
|
-
|
|
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:
|