@orchestrator-claude/definitions 3.30.2 → 3.31.1
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/agents/adversarial-reviewer.md +217 -0
- package/agents/azure-devops-engineer.md +805 -0
- package/agents/methodology-researcher.md +190 -0
- package/agents/operational-artifact-builder.md +173 -0
- package/agents/presentation-engineer.md +605 -0
- package/agents/reviewer.md +3 -1
- package/dist/scripts/generate-manifest.js +3 -3
- package/dist/scripts/generate-manifest.js.map +1 -1
- package/hooks/mailbox-listener.ts +246 -0
- package/hooks/pre-agent-dispatch.ts +57 -0
- package/hooks/sprint-registry.ts +85 -0
- package/hooks/verification-before-completion.ts +97 -0
- package/manifest.json +278 -5
- package/package.json +1 -1
- package/skills/artifact-generator/SKILL.md +385 -0
- package/skills/brainstorm-formalize/SKILL.md +272 -0
- package/skills/brainstorming/SKILL.md +167 -0
- package/skills/brainstorming/scripts/frame-template.html +214 -0
- package/skills/brainstorming/scripts/helper.js +88 -0
- package/skills/brainstorming/scripts/server.cjs +354 -0
- package/skills/brainstorming/scripts/start-server.sh +148 -0
- package/skills/brainstorming/scripts/stop-server.sh +56 -0
- package/skills/brainstorming/visual-companion.md +139 -0
- package/skills/compositional-intelligence/SKILL.md +93 -0
- package/skills/design-system-validated-loop/SKILL.md +366 -0
- package/skills/finishing-branch/SKILL.md +184 -0
- package/skills/orchestrator/SKILL.md +158 -0
- package/skills/persona-library/SKILL.md +365 -0
- package/skills/project-management-enterprise/SKILL.md +304 -0
- package/skills/receiving-code-review/SKILL.md +186 -0
- package/skills/release/SKILL.md +41 -0
- package/skills/sprint-launch/SKILL.md +176 -0
- package/skills/sprint-teammate/sprint-teammate.md +107 -0
- package/skills/systematic-debugging/SKILL.md +262 -0
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: orchestrator
|
|
3
|
+
description: Workflow coordination runtime — phase dispatch call signatures, sub-agent prompt template, gate-check template, stack context, error recovery. Loaded on demand when starting or advancing a workflow. Greeting and orchestrator identity live in the Skin (.claude/agents/orchestrator.md); universal invariants live in CLAUDE.md. See ADR-019.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Skill: /orchestrator (Layer B — On-Demand Coordination Runtime)
|
|
7
|
+
|
|
8
|
+
> **Scope:** this skill is loaded by the main-with-skin-orchestrator **when a workflow is being started, advanced, or completed**. It does NOT handle greeting (Skin + hook data) and does NOT restate identity or universal invariants (those live in Skin and `CLAUDE.md` respectively). See **ADR-019** for the three-layer rationale.
|
|
9
|
+
|
|
10
|
+
## Step 1 — Start a Workflow
|
|
11
|
+
|
|
12
|
+
```
|
|
13
|
+
mcp__orchestrator-tools__detectWorkflow({ prompt: "user's request" })
|
|
14
|
+
mcp__orchestrator-tools__startWorkflow({
|
|
15
|
+
type: "feature_development" | "bug_fix" | "refactoring" | "emergency_debug" | "project_management_enterprise",
|
|
16
|
+
prompt: "...",
|
|
17
|
+
variant: "consultoria-externa" | "consultoria-interna" | "software-handoff" | "cirurgico" | undefined, // optional, defaults to "full"
|
|
18
|
+
inputs: { ... } // optional, required_inputs per variant (validated by PreFlightValidator)
|
|
19
|
+
})
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
## Step 2 — Phase Dispatch Loop
|
|
23
|
+
|
|
24
|
+
For each phase (research → specify → plan → tasks → implement → review), run this cycle.
|
|
25
|
+
|
|
26
|
+
### 2a. Build Stack Context (RFC-026 Sprint 2)
|
|
27
|
+
|
|
28
|
+
Before dispatching an agent, build stack context if auto-detection has produced a result:
|
|
29
|
+
|
|
30
|
+
```
|
|
31
|
+
const context = await stackContextBuilder.build(patternSet, agentRole);
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
Role-appropriate slicing:
|
|
35
|
+
- **Implementers** get full context (commands + assets + conventions + patterns).
|
|
36
|
+
- **Specifiers** get minimal context (stack label only).
|
|
37
|
+
- **All agents** can deep-dive via `mcp__orchestrator-extended__getStackConventions`.
|
|
38
|
+
|
|
39
|
+
If no detection result, skip — agents fall back to universal conventions.
|
|
40
|
+
|
|
41
|
+
### 2b. Variant-Aware Phase Dispatch (RFC-031 §4)
|
|
42
|
+
|
|
43
|
+
When a workflow has a `variant`, the phase-skip mechanic applies at each phase boundary. Before dispatching an agent, resolve the variant matrix cell:
|
|
44
|
+
|
|
45
|
+
```
|
|
46
|
+
cell = VariantResolver.resolvePhaseCell(modes, variant, phase)
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
- **cell = EXEC** → dispatch agent normally (proceed to 2c).
|
|
50
|
+
- **cell = SKIP** → mark phase complete without dispatching any agent; call `advancePhase` and continue loop.
|
|
51
|
+
- **cell = PARTIAL** → dispatch agent but only require the artifacts listed in the cell; gate check still applies.
|
|
52
|
+
|
|
53
|
+
If no variant is set (or variant resolves to `"full"`), all phases execute normally — skip this check.
|
|
54
|
+
|
|
55
|
+
### 2c. Dispatch Phase Sub-Agent
|
|
56
|
+
|
|
57
|
+
| Phase | Agent | Artifact |
|
|
58
|
+
|-------|-------|----------|
|
|
59
|
+
| research | `researcher` | research findings |
|
|
60
|
+
| specify | `specifier` | spec.md → `artifactStore` |
|
|
61
|
+
| plan | `planner` | plan.md → `artifactStore` |
|
|
62
|
+
| tasks | `task-generator` | tasks.md → `artifactStore` |
|
|
63
|
+
| implement | `implementer` | code + tests |
|
|
64
|
+
| review | `reviewer` | review feedback |
|
|
65
|
+
|
|
66
|
+
**Dispatch template:**
|
|
67
|
+
|
|
68
|
+
```
|
|
69
|
+
Agent(subagent_type: "{phase_agent}", prompt: "
|
|
70
|
+
[Workflow] Type: {type}, Phase: {phase}, Project: {projectId}
|
|
71
|
+
|
|
72
|
+
[Stack Context]
|
|
73
|
+
{stack_context_from_builder}
|
|
74
|
+
|
|
75
|
+
[Previous artifact] {summary of previous phase artifact, if any}
|
|
76
|
+
[Task] {phase-specific instructions from user's original request}
|
|
77
|
+
|
|
78
|
+
Store your output artifact via mcp__orchestrator-extended__artifactStore.
|
|
79
|
+
")
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
Sub-agents MUST persist artifacts to MinIO via `artifactStore` (universal rule, see `CLAUDE.md`).
|
|
83
|
+
|
|
84
|
+
<!-- TODO S182 (OQ-4): per-phase agent override (.phases[n].agent) deferred — S182 will resolve permissive vs registry-validated vs KnownAgent-enum strategy after agent list complete -->
|
|
85
|
+
|
|
86
|
+
#### 2c.1 Implementer-specific dispatch addenda (TD-S188-002)
|
|
87
|
+
|
|
88
|
+
When dispatching `implementer` (phase=`implement`), the generic template above is **insufficient**. The S188 implement phase surfaced an ambiguity: the implementer interpreted `createCheckpoint` as requiring a git commit beforehand, producing 4 unsolicited commits per dispatch (commit prefix also leaked from BACKLOG context: `feat(s186)` instead of `feat(s188)`). To prevent recurrence, append the following **commit policy block** to every implementer dispatch prompt:
|
|
89
|
+
|
|
90
|
+
```
|
|
91
|
+
[Commit Policy]
|
|
92
|
+
- createCheckpoint (mcp__orchestrator-tools__createCheckpoint) is a PostgreSQL state snapshot per RFC-012. It is INDEPENDENT of git. You do NOT need to commit before calling it. Calling createCheckpoint with no uncommitted changes is the normal path.
|
|
93
|
+
- Commit policy for this dispatch: <one of>
|
|
94
|
+
a) "DO NOT commit — orchestrator owns the closure commit at review gate."
|
|
95
|
+
b) "Commit per-phase using prefix `<feat|fix|refactor>(s<N>): <subject>` — confirm prefix before commit." (use when implement phase exceeds 80k tokens or spans multiple fases)
|
|
96
|
+
- If you commit, the prefix MUST be: `<feat|fix|refactor>(s<CURRENT_SESSION>):` — do NOT infer from BACKLOG examples or previous session context.
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
Substitute `<CURRENT_SESSION>` with the active session number (e.g., `s189`) and pick **exactly one** of (a) or (b) — never leave both options visible. The block goes **after** `[Task]` and **before** the artifactStore instruction.
|
|
100
|
+
|
|
101
|
+
If the orchestrator (main) wants to own all commits, prefer option (a) + call `createCheckpoint` itself after the implement phase completes — do NOT delegate that call to implementer.
|
|
102
|
+
|
|
103
|
+
### 2d. Gate Check
|
|
104
|
+
|
|
105
|
+
After each sub-agent completes, present the artifact summary and ask for approval:
|
|
106
|
+
|
|
107
|
+
```
|
|
108
|
+
AskUserQuestion({
|
|
109
|
+
question: "Phase '{phase}' complete.\n\n{artifact_summary}\n\nApprove to proceed to next phase?",
|
|
110
|
+
options: ["Approve", "Request changes", "Abort workflow"]
|
|
111
|
+
})
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
- **Approve** → call `advancePhase`, dispatch next phase agent.
|
|
115
|
+
- **Request changes** → re-dispatch same sub-agent with the user's feedback.
|
|
116
|
+
- **Abort** → call `completeWorkflow` with `cancelled` status.
|
|
117
|
+
|
|
118
|
+
### 2e. Advance Phase
|
|
119
|
+
|
|
120
|
+
```
|
|
121
|
+
mcp__orchestrator-tools__advancePhase({ workflowId: "..." })
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
Loop back to 2a for the next phase.
|
|
125
|
+
|
|
126
|
+
## Step 3 — Complete Workflow
|
|
127
|
+
|
|
128
|
+
After all phases are done:
|
|
129
|
+
|
|
130
|
+
```
|
|
131
|
+
mcp__orchestrator-extended__completeWorkflow({ workflowId: "..." })
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
Summarize what was accomplished and any follow-up items.
|
|
135
|
+
|
|
136
|
+
## Operational SHOULDs
|
|
137
|
+
|
|
138
|
+
1. SHOULD keep sub-agent prompts focused — workflow context + previous artifact summary + task description, nothing else.
|
|
139
|
+
2. SHOULD summarize, not dump — at gate checks, present a concise artifact summary, not full content.
|
|
140
|
+
3. SHOULD use `/workflow-status` to diagnose stuck workflows.
|
|
141
|
+
|
|
142
|
+
## Phase-Specific Skills
|
|
143
|
+
|
|
144
|
+
Load these for phase-specific guidance when needed:
|
|
145
|
+
|
|
146
|
+
| Skill | When |
|
|
147
|
+
|-------|------|
|
|
148
|
+
| `/artifact-production` | Before dispatching specify / plan / tasks agents |
|
|
149
|
+
| `/tdd-discipline` | Before dispatching implementer |
|
|
150
|
+
| `/project-conventions` | Before implementation (stack-agnostic; stack-specific context via StackContextBuilder) |
|
|
151
|
+
| `/checkpoint-protocol` | After completing task groups |
|
|
152
|
+
|
|
153
|
+
## Error Recovery
|
|
154
|
+
|
|
155
|
+
- **Sub-agent fails** → read the error, fix the issue, re-dispatch.
|
|
156
|
+
- **MCP tool not found** → call `ToolSearch` to load the schema, then retry (deferred loading, see `CLAUDE.md`).
|
|
157
|
+
- **Workflow stuck** → call `getStatus` to diagnose, present options to user via `AskUserQuestion`.
|
|
158
|
+
- **Context getting large** → sub-agents carry heavy work; main stays lean with summaries.
|
|
@@ -0,0 +1,365 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: persona-library
|
|
3
|
+
description: Catalog navigation for `.claude/personas/`. Load when: "find persona", "list personas", "select reviewer persona", "persona by industry", "persona for X industry", "create new persona", or when methodology-researcher / adversarial-reviewer / operational-artifact-builder need persona selection guidance. Provides search/filter/select-for-review primitives + scaffold for new persona authoring.
|
|
4
|
+
allowed-tools: Read, Grep, Glob, Write
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Skill: /persona-library - Persona Catalog Navigation
|
|
8
|
+
|
|
9
|
+
## When to Use This Skill
|
|
10
|
+
|
|
11
|
+
Load when any of the following triggers appear:
|
|
12
|
+
|
|
13
|
+
- "find persona", "list personas", "list personas by industry", "select reviewer persona"
|
|
14
|
+
- "persona for X industry", "persona by role", "which persona should I use"
|
|
15
|
+
- "create new persona", "add a persona to the library"
|
|
16
|
+
- methodology-researcher needs persona vocabulary before shortlisting methodologies
|
|
17
|
+
- adversarial-reviewer needs persona biases before executing a critique pass
|
|
18
|
+
- operational-artifact-builder needs persona demands before formatting a deliverable
|
|
19
|
+
- explicit `/persona-library` invocation from orchestrator or any sub-agent
|
|
20
|
+
|
|
21
|
+
**Out of scope:** adversarial review execution, methodology selection, artifact formatting,
|
|
22
|
+
persona file authoring beyond the scaffold template here.
|
|
23
|
+
|
|
24
|
+
---
|
|
25
|
+
|
|
26
|
+
## Catalog Overview
|
|
27
|
+
|
|
28
|
+
Canonical entry point: `.claude/personas/INDEX.md`. Seed library (S183):
|
|
29
|
+
|
|
30
|
+
| id | role | industry | adversarial_intensity | validated_in |
|
|
31
|
+
|----|------|----------|-----------------------|--------------|
|
|
32
|
+
| diretor-cetico-fmcg | Diretor de Marketing / Brand Director | FMCG | high | S178 |
|
|
33
|
+
| cfo-conservador | CFO / VP Finance | cross-industry | high | S183 |
|
|
34
|
+
| auditor-compliance | Auditor de Compliance / Compliance Officer | cross-industry (financeiro, saude, governo) | medium | - |
|
|
35
|
+
| designer-perfeccionista | Senior Designer / Design Lead | cross-industry (product, marketing, brand) | medium | - |
|
|
36
|
+
| engenheiro-cetico-construcao | Engenheiro Civil Senior / Construction Project Engineer | construcao civil | medium | - |
|
|
37
|
+
|
|
38
|
+
Each persona file: `.claude/personas/<id>.md`. Schema: YAML frontmatter (10 required fields) +
|
|
39
|
+
Markdown body (3 sections: Narrative, Sample Objections, Adversarial Review Behavior).
|
|
40
|
+
For stacking guidance, read `.claude/personas/INDEX.md` directly.
|
|
41
|
+
|
|
42
|
+
---
|
|
43
|
+
|
|
44
|
+
## Search Patterns
|
|
45
|
+
|
|
46
|
+
Use these grep patterns to filter the library when INDEX.md alone is insufficient
|
|
47
|
+
(e.g., a newly scaffolded persona not yet in the table).
|
|
48
|
+
|
|
49
|
+
### By Industry
|
|
50
|
+
|
|
51
|
+
```bash
|
|
52
|
+
# FMCG
|
|
53
|
+
grep -l "industry:.*FMCG" .claude/personas/*.md
|
|
54
|
+
# -> diretor-cetico-fmcg.md
|
|
55
|
+
|
|
56
|
+
# Compliance-regulated sectors (financeiro, saude, governo)
|
|
57
|
+
grep -l "industry:.*compliance\|industry:.*financeiro\|industry:.*governo\|industry:.*saude" .claude/personas/*.md
|
|
58
|
+
# -> auditor-compliance.md
|
|
59
|
+
|
|
60
|
+
# Construction / civil engineering
|
|
61
|
+
grep -l "industry:.*construcao" .claude/personas/*.md
|
|
62
|
+
# -> engenheiro-cetico-construcao.md
|
|
63
|
+
|
|
64
|
+
# Cross-industry (applies to any sector)
|
|
65
|
+
grep -l "industry:.*cross-industry" .claude/personas/*.md
|
|
66
|
+
# -> cfo-conservador.md, auditor-compliance.md
|
|
67
|
+
|
|
68
|
+
# Design / product / brand
|
|
69
|
+
grep -l "industry:.*product\|industry:.*marketing\|industry:.*brand" .claude/personas/*.md
|
|
70
|
+
# -> designer-perfeccionista.md
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
Default to the INDEX.md table for the full filterable list. Use grep only when INDEX.md may be
|
|
74
|
+
stale relative to freshly-authored persona files.
|
|
75
|
+
|
|
76
|
+
### By Role
|
|
77
|
+
|
|
78
|
+
```bash
|
|
79
|
+
# CFO / finance executive
|
|
80
|
+
grep -l "role:.*CFO\|role:.*VP Finance" .claude/personas/*.md
|
|
81
|
+
# -> cfo-conservador.md
|
|
82
|
+
|
|
83
|
+
# Marketing / brand director
|
|
84
|
+
grep -l "role:.*Diretor de Marketing\|role:.*Brand Director" .claude/personas/*.md
|
|
85
|
+
# -> diretor-cetico-fmcg.md
|
|
86
|
+
|
|
87
|
+
# Compliance / audit
|
|
88
|
+
grep -l "role:.*Compliance\|role:.*Auditor" .claude/personas/*.md
|
|
89
|
+
# -> auditor-compliance.md
|
|
90
|
+
|
|
91
|
+
# Design lead
|
|
92
|
+
grep -l "role:.*Designer\|role:.*Design Lead" .claude/personas/*.md
|
|
93
|
+
# -> designer-perfeccionista.md
|
|
94
|
+
|
|
95
|
+
# Civil engineer
|
|
96
|
+
grep -l "role:.*Engenheiro" .claude/personas/*.md
|
|
97
|
+
# -> engenheiro-cetico-construcao.md
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
### By Bias (Semantic)
|
|
101
|
+
|
|
102
|
+
When the caller knows the dominant objection type but not the persona name, map bias to persona:
|
|
103
|
+
|
|
104
|
+
| Bias / Objection Axis | Persona |
|
|
105
|
+
|-----------------------|---------|
|
|
106
|
+
| audit-trail obsession, regulatory compliance, sign-off chain | auditor-compliance |
|
|
107
|
+
| TCO / NPV / cash flow obsession, exit cost transparency | cfo-conservador |
|
|
108
|
+
| pixel-level scrutiny, typography, spacing, visual consistency | designer-perfeccionista |
|
|
109
|
+
| critical-path integrity, NBR norms, structural risk | engenheiro-cetico-construcao |
|
|
110
|
+
| data-driven but skeptical, FMCG sell-out velocity, shelf ROI | diretor-cetico-fmcg |
|
|
111
|
+
|
|
112
|
+
To search frontmatter biases directly:
|
|
113
|
+
|
|
114
|
+
```bash
|
|
115
|
+
# Find personas that mention cash flow in their bias list
|
|
116
|
+
grep -l "cash flow" .claude/personas/*.md
|
|
117
|
+
|
|
118
|
+
# Find personas that mention audit trail
|
|
119
|
+
grep -l "audit.trail\|audit trail" .claude/personas/*.md
|
|
120
|
+
|
|
121
|
+
# Find personas with pixel or visual scrutiny
|
|
122
|
+
grep -l "pixel\|visual consistency" .claude/personas/*.md
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
### By Adversarial Intensity
|
|
126
|
+
|
|
127
|
+
```bash
|
|
128
|
+
# High-intensity personas (block approval on structural gaps)
|
|
129
|
+
grep -rl "^adversarial_intensity: high" .claude/personas/
|
|
130
|
+
# -> diretor-cetico-fmcg.md, cfo-conservador.md
|
|
131
|
+
|
|
132
|
+
# Medium-intensity personas (flag issues, allow progression with remediation plan)
|
|
133
|
+
grep -rl "^adversarial_intensity: medium" .claude/personas/
|
|
134
|
+
# -> auditor-compliance.md, designer-perfeccionista.md, engenheiro-cetico-construcao.md
|
|
135
|
+
|
|
136
|
+
# Low-intensity (none in seed library - extensibility hook for future addition)
|
|
137
|
+
grep -rl "^adversarial_intensity: low" .claude/personas/
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
**Intensity semantics:** `high` = blocks approval without evidence; `medium` = flags issues,
|
|
141
|
+
allows progression with remediation plan; `low` = none in seed library (extensibility hook).
|
|
142
|
+
|
|
143
|
+
**Stacking rule:** when multiple personas apply, run high-intensity first, then medium.
|
|
144
|
+
|
|
145
|
+
---
|
|
146
|
+
|
|
147
|
+
## Select-for-Review Primitive
|
|
148
|
+
|
|
149
|
+
Algorithm for programmatic persona selection:
|
|
150
|
+
|
|
151
|
+
```
|
|
152
|
+
function selectReviewerPersona(artifactKind, clientIndustry, riskTolerance) {
|
|
153
|
+
// 1. Filter personas matching clientIndustry
|
|
154
|
+
// - exact match on industry field, OR
|
|
155
|
+
// - industry field contains "cross-industry" (applies everywhere)
|
|
156
|
+
candidates = personas.filter(p =>
|
|
157
|
+
p.industry.includes(clientIndustry) || p.industry.includes("cross-industry")
|
|
158
|
+
)
|
|
159
|
+
|
|
160
|
+
// 2. Filter by adversarial_intensity matching riskTolerance
|
|
161
|
+
// riskTolerance: "high" => prefer high-intensity personas
|
|
162
|
+
// riskTolerance: "medium" => prefer medium-intensity personas
|
|
163
|
+
// riskTolerance: "low" => prefer low-intensity (fall back to medium if none)
|
|
164
|
+
if (candidates.some(p => p.adversarial_intensity === riskTolerance)) {
|
|
165
|
+
candidates = candidates.filter(p => p.adversarial_intensity === riskTolerance)
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
// 3. If multiple remain, prefer validated persona (validated_in != "-" or empty)
|
|
169
|
+
if (candidates.some(p => p.validated_in && p.validated_in !== "-")) {
|
|
170
|
+
candidates = candidates.filter(p => p.validated_in && p.validated_in !== "-")
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
// 4. Return persona id for adversarial-reviewer dispatch
|
|
174
|
+
return candidates[0].id
|
|
175
|
+
}
|
|
176
|
+
```
|
|
177
|
+
|
|
178
|
+
**Quick decision table for common scenarios:**
|
|
179
|
+
|
|
180
|
+
| Scenario | Recommended persona | Rationale |
|
|
181
|
+
|----------|--------------------|-----------|
|
|
182
|
+
| Financial proposal, any sector | cfo-conservador | Cross-industry, high intensity, TCO lens |
|
|
183
|
+
| Marketing / brand strategy, FMCG | diretor-cetico-fmcg | Exact industry match, high intensity |
|
|
184
|
+
| Regulatory or compliance audit | auditor-compliance | Cross-industry, compliance lens |
|
|
185
|
+
| Product / UX deliverable review | designer-perfeccionista | Visual and UX scrutiny |
|
|
186
|
+
| Construction or infrastructure plan | engenheiro-cetico-construcao | Domain-specific, NBR/technical norms |
|
|
187
|
+
| Multi-stakeholder review (finance + ops) | cfo-conservador + auditor-compliance | Stack sequentially; high before medium |
|
|
188
|
+
|
|
189
|
+
---
|
|
190
|
+
|
|
191
|
+
## Scaffold for New Persona
|
|
192
|
+
|
|
193
|
+
Create `.claude/personas/<id>.md` using the templates below. All 10 frontmatter fields
|
|
194
|
+
required. Body must contain the 3 section headings shown. Run audit script before committing.
|
|
195
|
+
|
|
196
|
+
### Frontmatter Template
|
|
197
|
+
|
|
198
|
+
```yaml
|
|
199
|
+
---
|
|
200
|
+
id: <kebab-case-identifier>
|
|
201
|
+
role: <Job Title / Role Name>
|
|
202
|
+
industry: <target industry or "cross-industry (applicable sectors list)">
|
|
203
|
+
seniority: <seniority level, e.g., C-level | Senior | Director | Manager>
|
|
204
|
+
biases:
|
|
205
|
+
- <bias or cognitive tendency 1 - phrase as a behavioral pattern>
|
|
206
|
+
- <bias or cognitive tendency 2>
|
|
207
|
+
- <bias or cognitive tendency 3>
|
|
208
|
+
vocabulary:
|
|
209
|
+
- <domain term, acronym, or signature phrase 1>
|
|
210
|
+
- <domain term, acronym, or signature phrase 2>
|
|
211
|
+
- <domain term, acronym, or signature phrase 3>
|
|
212
|
+
demands:
|
|
213
|
+
- <concrete deliverable or evidence requirement 1>
|
|
214
|
+
- <concrete deliverable or evidence requirement 2>
|
|
215
|
+
- <concrete deliverable or evidence requirement 3>
|
|
216
|
+
adversarial_intensity: <high | medium | low>
|
|
217
|
+
validated_in:
|
|
218
|
+
- <sprint ref, e.g., S183> # or use "-" if not yet exercised in a live workflow
|
|
219
|
+
---
|
|
220
|
+
```
|
|
221
|
+
|
|
222
|
+
10 required fields: `id`, `role`, `industry`, `seniority`, `biases`, `vocabulary`, `demands`,
|
|
223
|
+
`adversarial_intensity`, `validated_in`. Each list field must have >= 3 items.
|
|
224
|
+
|
|
225
|
+
### Body Template
|
|
226
|
+
|
|
227
|
+
```markdown
|
|
228
|
+
# <Persona Display Name>
|
|
229
|
+
|
|
230
|
+
## Narrative
|
|
231
|
+
|
|
232
|
+
<2-4 paragraphs. Cover: professional background, years of experience, formative incidents
|
|
233
|
+
that shaped current skepticism, core approval criteria. Write in third person. Make the
|
|
234
|
+
persona's dominant fear and dominant approval signal explicit.>
|
|
235
|
+
|
|
236
|
+
## Sample Objections
|
|
237
|
+
|
|
238
|
+
<Numbered or bulleted list of 4-8 verbatim challenge phrases this persona would voice during
|
|
239
|
+
a review. These should be direct quotes, not descriptions. Examples:
|
|
240
|
+
- "Where is the 3-year TCO? I am not approving without seeing the all-in number."
|
|
241
|
+
- "This timeline assumes perfect execution. What is the contingency plan?"
|
|
242
|
+
- "You have cited a 2019 case study. I need evidence from the last 24 months.">
|
|
243
|
+
|
|
244
|
+
## Adversarial Review Behavior
|
|
245
|
+
|
|
246
|
+
<Structured rubric the adversarial-reviewer agent applies when embodying this persona.
|
|
247
|
+
Organize by severity: CRITICAL blockers (will reject), HIGH flags (must remediate before
|
|
248
|
+
next phase), MEDIUM observations (document and address). Each item should name the
|
|
249
|
+
gap and the evidence that would satisfy it.>
|
|
250
|
+
```
|
|
251
|
+
|
|
252
|
+
### Validation After Authoring
|
|
253
|
+
|
|
254
|
+
After writing the persona file, run the audit script and verify it exits 0:
|
|
255
|
+
|
|
256
|
+
```bash
|
|
257
|
+
bash scripts/audit-personas.sh
|
|
258
|
+
```
|
|
259
|
+
|
|
260
|
+
The script checks:
|
|
261
|
+
- All 10 required frontmatter fields are present
|
|
262
|
+
- `adversarial_intensity` value is one of: `high`, `medium`, `low`
|
|
263
|
+
- Each of `biases`, `vocabulary`, `demands` has at least 3 items
|
|
264
|
+
- Body contains all 3 required section headings: `Narrative`, `Sample Objections`,
|
|
265
|
+
`Adversarial Review Behavior`
|
|
266
|
+
|
|
267
|
+
**The persona MUST pass `scripts/audit-personas.sh` with exit 0 before any commit.**
|
|
268
|
+
|
|
269
|
+
After the persona passes, add it to `.claude/personas/INDEX.md` by inserting a row in the
|
|
270
|
+
Persona Table with its id, role, industry, adversarial_intensity, and `validated_in: -`
|
|
271
|
+
(until it survives a live workflow dry-run).
|
|
272
|
+
|
|
273
|
+
---
|
|
274
|
+
|
|
275
|
+
## Validation Requirements
|
|
276
|
+
|
|
277
|
+
Every persona file in `.claude/personas/` MUST satisfy all of the following:
|
|
278
|
+
|
|
279
|
+
1. **10 required frontmatter fields present:** `id`, `role`, `industry`, `seniority`,
|
|
280
|
+
`biases`, `vocabulary`, `demands`, `adversarial_intensity`, `validated_in`.
|
|
281
|
+
|
|
282
|
+
2. **List field minimums:** `biases`, `vocabulary`, and `demands` each contain >= 3 items.
|
|
283
|
+
|
|
284
|
+
3. **adversarial_intensity value:** must be exactly one of `high`, `medium`, or `low`.
|
|
285
|
+
Any other value (or missing value) causes `audit-personas.sh` to fail.
|
|
286
|
+
|
|
287
|
+
4. **Body section completeness:** the Markdown body must contain all three section headings
|
|
288
|
+
in this exact form: `## Narrative`, `## Sample Objections`, `## Adversarial Review Behavior`.
|
|
289
|
+
|
|
290
|
+
5. **Audit script exit 0:** `bash scripts/audit-personas.sh` must exit 0 before any commit
|
|
291
|
+
that adds or modifies a persona file. This is a hard gate - do not bypass with `--no-verify`.
|
|
292
|
+
|
|
293
|
+
6. **INDEX.md registration:** after a new persona passes the audit, add a row to the INDEX.md
|
|
294
|
+
Persona Table. The `validated_in` column starts as `-`; update it to the sprint reference
|
|
295
|
+
once the persona is exercised in a live workflow dry-run.
|
|
296
|
+
|
|
297
|
+
---
|
|
298
|
+
|
|
299
|
+
## Common Use Cases
|
|
300
|
+
|
|
301
|
+
### methodology-researcher
|
|
302
|
+
|
|
303
|
+
Load persona BEFORE shortlisting methodologies. Extract `vocabulary` to scope language
|
|
304
|
+
register; extract `demands` to confirm the methodology produces required outputs.
|
|
305
|
+
|
|
306
|
+
```
|
|
307
|
+
1. Load /persona-library -> select persona by industry + risk tolerance
|
|
308
|
+
2. Read .claude/personas/<id>.md -> extract vocabulary and demands
|
|
309
|
+
3. Use vocabulary to constrain methodology naming; verify methodology satisfies demands
|
|
310
|
+
```
|
|
311
|
+
|
|
312
|
+
### adversarial-reviewer
|
|
313
|
+
|
|
314
|
+
Load persona BEFORE the critique pass. Apply `biases` as lens; use `adversarial_intensity`
|
|
315
|
+
to set severity threshold; log persona id in artifact metadata.
|
|
316
|
+
|
|
317
|
+
```
|
|
318
|
+
1. Load /persona-library -> selectReviewerPersona(artifactKind, clientIndustry, riskTolerance)
|
|
319
|
+
2. Read .claude/personas/<id>.md -> full file including Adversarial Review Behavior section
|
|
320
|
+
3. Embody persona: raise objections in persona vocabulary; classify CRITICAL / HIGH / MEDIUM
|
|
321
|
+
4. Log persona_id in artifact metadata (audit trail)
|
|
322
|
+
```
|
|
323
|
+
|
|
324
|
+
### operational-artifact-builder
|
|
325
|
+
|
|
326
|
+
Load persona BEFORE formatting. Map `demands` to required deliverable sections.
|
|
327
|
+
|
|
328
|
+
```
|
|
329
|
+
1. Load /persona-library -> select persona(s) for target audience
|
|
330
|
+
2. Read demands field -> map each demand to a required deliverable section
|
|
331
|
+
3. Build artifact satisfying all demands; log persona_id(s) in metadata
|
|
332
|
+
```
|
|
333
|
+
|
|
334
|
+
---
|
|
335
|
+
|
|
336
|
+
## Audit Trail
|
|
337
|
+
|
|
338
|
+
Record persona usage in artifact metadata at every phase where a persona was loaded.
|
|
339
|
+
|
|
340
|
+
When calling `mcp__orchestrator-extended__artifactStore`, include in `metadata`:
|
|
341
|
+
|
|
342
|
+
```json
|
|
343
|
+
{
|
|
344
|
+
"persona_id": "<id of persona used>",
|
|
345
|
+
"persona_intensity": "<high|medium|low>",
|
|
346
|
+
"persona_validated_in": "<sprint ref or ->",
|
|
347
|
+
"review_phase": "<workflow phase where persona was applied>"
|
|
348
|
+
}
|
|
349
|
+
```
|
|
350
|
+
|
|
351
|
+
### Updating INDEX.md validated_in
|
|
352
|
+
|
|
353
|
+
After a persona survives a live workflow dry-run, update `validated_in` in both the persona
|
|
354
|
+
file (YAML sequence) and the INDEX.md table row. Until then, leave it as `-`. Prefer validated
|
|
355
|
+
personas for high-stakes review passes; treat unvalidated personas as draft.
|
|
356
|
+
|
|
357
|
+
---
|
|
358
|
+
|
|
359
|
+
## References
|
|
360
|
+
|
|
361
|
+
- Persona catalog index: `.claude/personas/INDEX.md`
|
|
362
|
+
- Individual persona files: `.claude/personas/<id>.md`
|
|
363
|
+
- Audit validation script: `scripts/audit-personas.sh`
|
|
364
|
+
- Persona schema established: TASK-007, commit cc7a4724, S183 Wave 3
|
|
365
|
+
- This skill created: TASK-017, S183 Wave 4
|