@crewpilot/agent 1.0.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/README.md +107 -0
- package/dist-npm/cli.js +25 -0
- package/dist-npm/index.js +481 -0
- package/package.json +69 -0
- package/prompts/agent.md +266 -0
- package/prompts/catalyst.config.json +72 -0
- package/prompts/copilot-instructions.md +36 -0
- package/prompts/skills/assure-code-quality/SKILL.md +112 -0
- package/prompts/skills/assure-pr-intelligence/SKILL.md +148 -0
- package/prompts/skills/assure-vulnerability-scan/SKILL.md +146 -0
- package/prompts/skills/autopilot-meeting/SKILL.md +407 -0
- package/prompts/skills/autopilot-worker/SKILL.md +623 -0
- package/prompts/skills/daily-digest/SKILL.md +167 -0
- package/prompts/skills/deliver-change-management/SKILL.md +132 -0
- package/prompts/skills/deliver-deploy-guard/SKILL.md +144 -0
- package/prompts/skills/deliver-doc-governance/SKILL.md +130 -0
- package/prompts/skills/engineer-feature-builder/SKILL.md +270 -0
- package/prompts/skills/engineer-root-cause-analysis/SKILL.md +150 -0
- package/prompts/skills/engineer-test-first/SKILL.md +148 -0
- package/prompts/skills/insights-knowledge-base/SKILL.md +181 -0
- package/prompts/skills/insights-pattern-detection/SKILL.md +142 -0
- package/prompts/skills/strategize-architecture-planner/SKILL.md +141 -0
- package/prompts/skills/strategize-solution-design/SKILL.md +118 -0
- package/scripts/postinstall.js +108 -0
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
# PR Intelligence
|
|
2
|
+
|
|
3
|
+
> **Pillar**: Assure | **ID**: `assure-pr-intelligence`
|
|
4
|
+
|
|
5
|
+
## Purpose
|
|
6
|
+
|
|
7
|
+
Automated pull request analysis — generates structured summaries, risk assessments, reviewer guidance, and change impact analysis. Turns PRs from walls of diff into clear narratives.
|
|
8
|
+
|
|
9
|
+
## Activation Triggers
|
|
10
|
+
|
|
11
|
+
- "review this PR", "summarize PR", "PR summary", "pull request review"
|
|
12
|
+
- "what changed in this PR", "is this PR safe to merge"
|
|
13
|
+
- When a PR URL or branch diff is provided
|
|
14
|
+
|
|
15
|
+
## Methodology
|
|
16
|
+
|
|
17
|
+
### Process Flow
|
|
18
|
+
|
|
19
|
+
```dot
|
|
20
|
+
digraph pr_intelligence {
|
|
21
|
+
rankdir=LR;
|
|
22
|
+
node [shape=box];
|
|
23
|
+
|
|
24
|
+
inventory [label="Phase 1\nChange Inventory"];
|
|
25
|
+
narrative [label="Phase 2\nNarrative Summary"];
|
|
26
|
+
risk [label="Phase 3\nRisk Assessment"];
|
|
27
|
+
guidance [label="Phase 4\nReviewer Guidance"];
|
|
28
|
+
checklist [label="Phase 5\nMerge Readiness", shape=doublecircle];
|
|
29
|
+
|
|
30
|
+
inventory -> narrative;
|
|
31
|
+
narrative -> risk;
|
|
32
|
+
risk -> guidance;
|
|
33
|
+
guidance -> checklist;
|
|
34
|
+
}
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
### Phase 0 — Acceptance Criteria Verification
|
|
38
|
+
1. Fetch the linked issue/task (via `catalyst_board_get` or the PR description's `Closes #N`)
|
|
39
|
+
2. Extract the acceptance criteria checklist from the issue description
|
|
40
|
+
3. For each criterion, verify whether the PR's changes satisfy it:
|
|
41
|
+
- **Met** — Code changes clearly implement the criterion
|
|
42
|
+
- **Partially met** — Some work done but incomplete
|
|
43
|
+
- **Not met** — No evidence of this criterion in the diff
|
|
44
|
+
4. Any **Not met** criteria are automatic blockers — the PR cannot be approved
|
|
45
|
+
5. Include the acceptance criteria verdict in the output:
|
|
46
|
+
```
|
|
47
|
+
### Acceptance Criteria
|
|
48
|
+
- [x] Criterion 1 — Met (implemented in file.py)
|
|
49
|
+
- [ ] Criterion 2 — Not met (missing from PR)
|
|
50
|
+
- [~] Criterion 3 — Partially met (needs X)
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
### Phase 1 — Change Inventory
|
|
54
|
+
1. Get the diff (via git or GitHub API)
|
|
55
|
+
2. Categorize files changed:
|
|
56
|
+
- `core` — Business logic, domain models
|
|
57
|
+
- `api` — Endpoint changes, route modifications
|
|
58
|
+
- `infra` — CI/CD, Dockerfiles, IaC
|
|
59
|
+
- `test` — Test files
|
|
60
|
+
- `config` — Configuration, env vars
|
|
61
|
+
- `docs` — Documentation
|
|
62
|
+
3. Calculate change metrics: files changed, lines added/removed, churn
|
|
63
|
+
4. Identify new vs. modified vs. deleted files
|
|
64
|
+
|
|
65
|
+
### Phase 2 — Narrative Summary
|
|
66
|
+
Generate a human-readable summary:
|
|
67
|
+
1. **What**: One paragraph explaining what the PR accomplishes
|
|
68
|
+
2. **Why**: Inferred motivation (from commit messages, PR description, code context)
|
|
69
|
+
3. **How**: Key implementation decisions and patterns used
|
|
70
|
+
|
|
71
|
+
### Phase 3 — Risk Assessment
|
|
72
|
+
Evaluate each risk dimension:
|
|
73
|
+
|
|
74
|
+
| Dimension | Low | Medium | High |
|
|
75
|
+
|---|---|---|---|
|
|
76
|
+
| **Scope** | < 50 lines, 1-2 files | 50-200 lines, 3-5 files | > 200 lines or > 5 files |
|
|
77
|
+
| **Complexity** | Simple refactors | New logic paths | Algorithm/architecture changes |
|
|
78
|
+
| **Blast radius** | Isolated module | Shared utilities | Core framework, DB schema |
|
|
79
|
+
| **Test coverage** | Well-tested changes | Partial coverage | No tests for new code |
|
|
80
|
+
| **Reversibility** | Feature flag or easy revert | Rollback possible | DB migration, API contract |
|
|
81
|
+
|
|
82
|
+
Produce overall risk score: **Low / Medium / High / Critical**
|
|
83
|
+
|
|
84
|
+
### Phase 4 — Reviewer Guidance
|
|
85
|
+
1. List files to review first (highest risk → lowest)
|
|
86
|
+
2. Call out specific lines that need careful attention
|
|
87
|
+
3. Suggest questions the reviewer should ask
|
|
88
|
+
4. Identify what's NOT in the PR that probably should be (missing tests, missing docs, missing migration)
|
|
89
|
+
|
|
90
|
+
### Phase 5 — Merge Readiness Checklist
|
|
91
|
+
- [ ] Tests pass / test coverage adequate
|
|
92
|
+
- [ ] No security findings above medium
|
|
93
|
+
- [ ] Breaking changes documented
|
|
94
|
+
- [ ] PR description matches actual changes
|
|
95
|
+
- [ ] Dependencies updated safely
|
|
96
|
+
|
|
97
|
+
## Tools Required
|
|
98
|
+
|
|
99
|
+
- `githubRepo` — Fetch PR details, diff, commit history
|
|
100
|
+
- `codebase` — Understand impacted areas in the broader codebase
|
|
101
|
+
- `catalyst_git_diff` — Get precise diff data
|
|
102
|
+
- `catalyst_git_log` — Understand commit narrative
|
|
103
|
+
|
|
104
|
+
## Output Format
|
|
105
|
+
|
|
106
|
+
```
|
|
107
|
+
## [Catalyst → PR Intelligence]
|
|
108
|
+
|
|
109
|
+
### Summary
|
|
110
|
+
**What**: {one paragraph}
|
|
111
|
+
**Why**: {motivation}
|
|
112
|
+
**How**: {key decisions}
|
|
113
|
+
|
|
114
|
+
### Change Inventory
|
|
115
|
+
| Category | Files | Lines (+/-) |
|
|
116
|
+
|---|---|---|
|
|
117
|
+
| core | | |
|
|
118
|
+
| test | | |
|
|
119
|
+
| ... | | |
|
|
120
|
+
|
|
121
|
+
### Risk Assessment: {Low/Medium/High/Critical}
|
|
122
|
+
{risk table with evaluations}
|
|
123
|
+
|
|
124
|
+
### Review Guide
|
|
125
|
+
**Start with**: {ordered file list}
|
|
126
|
+
**Pay attention to**:
|
|
127
|
+
- {file}:{line} — {why}
|
|
128
|
+
- ...
|
|
129
|
+
|
|
130
|
+
**Missing from PR**:
|
|
131
|
+
- {what's absent}
|
|
132
|
+
|
|
133
|
+
### Merge Readiness
|
|
134
|
+
{checklist with status}
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
## Chains To
|
|
138
|
+
|
|
139
|
+
- `code-quality` — Deep review of flagged files
|
|
140
|
+
- `vulnerability-scan` — If risk assessment flags security-adjacent changes
|
|
141
|
+
- `change-management` — Verify commit message quality
|
|
142
|
+
|
|
143
|
+
## Anti-Patterns
|
|
144
|
+
|
|
145
|
+
- Do NOT rubber-stamp — always identify at least one concern or question
|
|
146
|
+
- Do NOT summarize the diff line-by-line — synthesize into a narrative
|
|
147
|
+
- Do NOT skip risk assessment for "small" PRs — small and dangerous is common
|
|
148
|
+
- Do NOT ignore test absence — explicitly call it out
|
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
# Vulnerability Scan
|
|
2
|
+
|
|
3
|
+
> **Pillar**: Assure | **ID**: `assure-vulnerability-scan`
|
|
4
|
+
|
|
5
|
+
## Purpose
|
|
6
|
+
|
|
7
|
+
Security-focused code analysis mapping findings to OWASP Top 10 and CWE Top 25. Provides actionable remediation with severity scoring, not just warnings.
|
|
8
|
+
|
|
9
|
+
## Activation Triggers
|
|
10
|
+
|
|
11
|
+
- "security review", "vulnerability scan", "is this secure", "owasp check"
|
|
12
|
+
- "audit for security", "cwe check", "pentest this code"
|
|
13
|
+
- Automatically chained when `code-quality` detects security-adjacent patterns
|
|
14
|
+
|
|
15
|
+
## Methodology
|
|
16
|
+
|
|
17
|
+
### Process Flow
|
|
18
|
+
|
|
19
|
+
```dot
|
|
20
|
+
digraph vulnerability_scan {
|
|
21
|
+
rankdir=TB;
|
|
22
|
+
node [shape=box];
|
|
23
|
+
|
|
24
|
+
surface [label="Phase 1\nAttack Surface Mapping"];
|
|
25
|
+
owasp [label="Phase 2\nOWASP Top 10 Scan"];
|
|
26
|
+
cwe [label="Phase 3\nCWE Pattern Matching"];
|
|
27
|
+
remediate [label="Phase 4\nRemediation"];
|
|
28
|
+
deps [label="Phase 5\nDependency Audit"];
|
|
29
|
+
report [label="Report", shape=doublecircle];
|
|
30
|
+
|
|
31
|
+
surface -> owasp;
|
|
32
|
+
owasp -> cwe;
|
|
33
|
+
cwe -> remediate;
|
|
34
|
+
remediate -> deps;
|
|
35
|
+
deps -> report;
|
|
36
|
+
}
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
### Phase 1 — Attack Surface Mapping
|
|
40
|
+
1. Identify all entry points: API endpoints, user inputs, file uploads, URL params
|
|
41
|
+
2. Map data flow from input → processing → storage → output
|
|
42
|
+
3. Identify trust boundaries (authenticated vs. unauthenticated, internal vs. external)
|
|
43
|
+
4. List dependencies and their known vulnerability status
|
|
44
|
+
|
|
45
|
+
### Phase 2 — OWASP Top 10 Scan
|
|
46
|
+
Check each applicable category:
|
|
47
|
+
|
|
48
|
+
| ID | Category | What to Look For |
|
|
49
|
+
|---|---|---|
|
|
50
|
+
| A01 | Broken Access Control | Missing auth checks, IDOR, privilege escalation |
|
|
51
|
+
| A02 | Cryptographic Failures | Weak hashing, plaintext secrets, poor TLS config |
|
|
52
|
+
| A03 | Injection | SQL/NoSQL/OS/LDAP injection, template injection |
|
|
53
|
+
| A04 | Insecure Design | Missing rate limits, business logic flaws |
|
|
54
|
+
| A05 | Security Misconfiguration | Default creds, verbose errors, unnecessary features |
|
|
55
|
+
| A06 | Vulnerable Components | Known CVEs in dependencies |
|
|
56
|
+
| A07 | Auth Failures | Weak passwords, missing MFA, session fixation |
|
|
57
|
+
| A08 | Data Integrity Failures | Insecure deserialization, unsigned updates |
|
|
58
|
+
| A09 | Logging Failures | Insufficient logging, log injection, PII in logs |
|
|
59
|
+
| A10 | SSRF | Unvalidated URLs, internal network access |
|
|
60
|
+
|
|
61
|
+
### Phase 3 — CWE Pattern Matching
|
|
62
|
+
Map findings to specific CWE entries (e.g., CWE-79 for XSS, CWE-89 for SQL injection). Include CWE ID in every finding.
|
|
63
|
+
|
|
64
|
+
### Phase 4 — Remediation
|
|
65
|
+
For each finding:
|
|
66
|
+
1. Explain the vulnerability in plain language
|
|
67
|
+
2. Show the vulnerable code
|
|
68
|
+
3. Provide the fixed code
|
|
69
|
+
4. Explain why the fix works
|
|
70
|
+
5. Rate exploitability: `trivial / moderate / complex`
|
|
71
|
+
|
|
72
|
+
### Phase 5 — Dependency Audit
|
|
73
|
+
1. Parse dependency manifests (package.json, requirements.txt, go.mod, etc.)
|
|
74
|
+
2. Flag dependencies with known CVEs
|
|
75
|
+
3. Suggest version upgrades with breaking change warnings
|
|
76
|
+
|
|
77
|
+
## Tools Required
|
|
78
|
+
|
|
79
|
+
- `codebase` — Read source code and dependency files
|
|
80
|
+
- `terminal` — Run `npm audit`, `pip audit`, or equivalent
|
|
81
|
+
- `fetch` — Check CVE databases for dependency vulnerabilities
|
|
82
|
+
|
|
83
|
+
## Severity Scoring
|
|
84
|
+
|
|
85
|
+
<HARD-GATE>
|
|
86
|
+
Do NOT mark a scan as "clean" or "no issues" if any Critical or High severity findings exist.
|
|
87
|
+
Do NOT downgrade severity to avoid blocking a deployment.
|
|
88
|
+
Critical findings MUST be remediated before code is shipped.
|
|
89
|
+
</HARD-GATE>
|
|
90
|
+
|
|
91
|
+
| Level | Criteria |
|
|
92
|
+
|---|---|
|
|
93
|
+
| **Critical** | Remote code execution, auth bypass, data exfiltration — exploit is trivial |
|
|
94
|
+
| **High** | Significant data exposure, privilege escalation — exploit is moderate |
|
|
95
|
+
| **Medium** | Information disclosure, denial of service — exploit requires chaining |
|
|
96
|
+
| **Low** | Best practice violation with no direct exploit path |
|
|
97
|
+
|
|
98
|
+
## Output Format
|
|
99
|
+
|
|
100
|
+
```
|
|
101
|
+
## [Catalyst → Vulnerability Scan]
|
|
102
|
+
|
|
103
|
+
### Attack Surface
|
|
104
|
+
- Entry points: {N}
|
|
105
|
+
- Trust boundaries: {list}
|
|
106
|
+
- Dependencies: {N} total, {N} flagged
|
|
107
|
+
|
|
108
|
+
### Findings
|
|
109
|
+
|
|
110
|
+
#### [{severity}] {OWASP-ID} — {title} (CWE-{NNN})
|
|
111
|
+
**File**: {path}:{line}
|
|
112
|
+
**Vulnerability**: {plain language explanation}
|
|
113
|
+
**Exploitability**: {trivial/moderate/complex}
|
|
114
|
+
**Vulnerable code**:
|
|
115
|
+
\`\`\`{lang}
|
|
116
|
+
{code}
|
|
117
|
+
\`\`\`
|
|
118
|
+
**Remediation**:
|
|
119
|
+
\`\`\`{lang}
|
|
120
|
+
{fixed code}
|
|
121
|
+
\`\`\`
|
|
122
|
+
**Why this fixes it**: {explanation}
|
|
123
|
+
|
|
124
|
+
---
|
|
125
|
+
(repeat per finding)
|
|
126
|
+
|
|
127
|
+
### Dependency Alerts
|
|
128
|
+
| Package | Current | Vulnerable | Fixed In | CVE |
|
|
129
|
+
|---|---|---|---|---|
|
|
130
|
+
| | | | | |
|
|
131
|
+
|
|
132
|
+
### Summary
|
|
133
|
+
{critical}/{high}/{medium}/{low} findings | Exploitability: {overall risk}
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
## Chains To
|
|
137
|
+
|
|
138
|
+
- `code-quality` — For non-security improvements found during scan
|
|
139
|
+
- `deploy-guard` — Security findings should block deployment
|
|
140
|
+
|
|
141
|
+
## Anti-Patterns
|
|
142
|
+
|
|
143
|
+
- Do NOT report theoretical vulnerabilities in unreachable code
|
|
144
|
+
- Do NOT flag every dependency without checking actual CVE relevance
|
|
145
|
+
- Do NOT provide fixes that break functionality to achieve security
|
|
146
|
+
- Do NOT skip the "why this fixes it" explanation — it's educational
|
|
@@ -0,0 +1,407 @@
|
|
|
1
|
+
# Autopilot Meeting
|
|
2
|
+
|
|
3
|
+
> **Pillar**: Orchestrate | **ID**: `autopilot-meeting`
|
|
4
|
+
|
|
5
|
+
## Purpose
|
|
6
|
+
|
|
7
|
+
Parse a meeting transcript (standup, planning, retro, customer call) to extract work items — then create **user stories with acceptance criteria and subtasks**, group them under **epics**, and push everything to the board. Turns a 30-minute meeting into a fully structured backlog with zero manual data entry.
|
|
8
|
+
|
|
9
|
+
Specifically supports the **PM workflow**: customer meeting → epics → user stories → subtasks → sized & prioritized → sprint-ready.
|
|
10
|
+
|
|
11
|
+
## Activation Triggers
|
|
12
|
+
|
|
13
|
+
- meeting, transcript, standup, planning, retro, parse meeting, meeting notes, action items, from meeting, customer call, user stories from meeting, create stories, backlog from meeting
|
|
14
|
+
|
|
15
|
+
## Tools Required
|
|
16
|
+
|
|
17
|
+
- `catalyst_board_create` — create issues / user stories on board
|
|
18
|
+
- `catalyst_board_create_epic` — create epics to group related stories
|
|
19
|
+
- `catalyst_board_create_subtask` — create subtasks linked to a parent story
|
|
20
|
+
- `catalyst_board_move` — update issue status for status updates
|
|
21
|
+
- `catalyst_board_comment` — log blockers and decisions on existing issues
|
|
22
|
+
- `catalyst_board_assign` — assign tasks to people mentioned in transcript
|
|
23
|
+
- `catalyst_knowledge_store` — store decisions, customer context, and action items
|
|
24
|
+
- `catalyst_worker_start` — optionally kick off autopilot for created tasks
|
|
25
|
+
|
|
26
|
+
## Methodology
|
|
27
|
+
|
|
28
|
+
### Process Flow
|
|
29
|
+
|
|
30
|
+
```dot
|
|
31
|
+
digraph autopilot_meeting {
|
|
32
|
+
rankdir=TB;
|
|
33
|
+
node [shape=box];
|
|
34
|
+
|
|
35
|
+
ingest [label="Phase 1\nTranscript Ingestion"];
|
|
36
|
+
extract [label="Phase 2\nExtraction & Classification"];
|
|
37
|
+
structure [label="Phase 3\nUser Story Structuring\n(stories, criteria, subtasks,\nsizing, epics)"];
|
|
38
|
+
review_gate [label="Phase 4\nHUMAN GATE:\nReview Backlog", shape=diamond, style=filled, fillcolor="#ffcccc"];
|
|
39
|
+
create [label="Phase 5\nBoard Creation Pipeline"];
|
|
40
|
+
summary [label="Phase 6\nSummary", shape=doublecircle];
|
|
41
|
+
|
|
42
|
+
ingest -> extract;
|
|
43
|
+
extract -> structure;
|
|
44
|
+
structure -> review_gate;
|
|
45
|
+
review_gate -> create [label="approve"];
|
|
46
|
+
review_gate -> structure [label="edit/split/merge"];
|
|
47
|
+
review_gate -> summary [label="cancel"];
|
|
48
|
+
create -> summary;
|
|
49
|
+
}
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
### Phase 1 — Transcript Ingestion
|
|
53
|
+
|
|
54
|
+
Accept transcript in any format:
|
|
55
|
+
- Pasted text (most common)
|
|
56
|
+
- File path to `.vtt`, `.txt`, or `.md` file (read via tools)
|
|
57
|
+
- Structured notes with speaker labels
|
|
58
|
+
|
|
59
|
+
Identify:
|
|
60
|
+
- **Speaker labels** — look for "Name:", "Speaker 1:", timestamps with names
|
|
61
|
+
- **Meeting type** — standup (short updates), planning (task creation), retro (action items), **customer call** (feature requests, requirements)
|
|
62
|
+
- If no speaker labels, treat as unstructured notes and extract items without assignee attribution
|
|
63
|
+
- **Customer context** — if this is a customer/stakeholder meeting, note: who the customer is, what their role is, business justification for requests
|
|
64
|
+
|
|
65
|
+
### Phase 2 — Extraction & Classification
|
|
66
|
+
|
|
67
|
+
For each speaker turn or paragraph, classify content into:
|
|
68
|
+
|
|
69
|
+
| Type | Pattern Signals |
|
|
70
|
+
|---|---|
|
|
71
|
+
| **FEATURE_REQUEST** | "we need", "customers want", "can we add", "requirement is", "must have", "should support" |
|
|
72
|
+
| **USER_STORY** | "as a user", "when I", "so that", "use case", "scenario", "workflow" |
|
|
73
|
+
| **NEW_TASK** | "we need to", "can you", "let's build", "should implement", "create a", "add support for" |
|
|
74
|
+
| **STATUS_UPDATE** | "I finished", "almost done", "completed", "working on", "made progress on" |
|
|
75
|
+
| **BLOCKER** | "blocked on", "stuck", "waiting for", "can't proceed", "need access to", "depends on" |
|
|
76
|
+
| **DECISION** | "we decided", "agreed to", "let's go with", "consensus is", "chose X over Y" |
|
|
77
|
+
| **ACTION_ITEM** | "will do", "I'll take", "by Friday", "follow up on", name + commitment |
|
|
78
|
+
| **NOISE** | "can you hear me", "you're muted", greetings, filler, tangents — SKIP these |
|
|
79
|
+
| **BUG_REPORT** | "crashes", "broken", "doesn't work", "error", "500", "blank page", "regression", "users reporting", "intermittent", "something's wrong", "used to work", "data is wrong", "wrong result", "security issue", "vulnerability", "can't access", "slow", "performance degraded", "memory", "leak" |
|
|
80
|
+
| **NEEDS_DESIGN** | "figure out the approach", "evaluate options", "which technology", "trade-offs", "compare solutions", "design doc needed", "need to think through", "spike on", "investigate how", "multiple ways to" |
|
|
81
|
+
| **NEEDS_ARCHITECTURE** | "new system", "new module", "architecture plan", "system design", "how do components interact", "service boundary", "data flow", "new service", "infrastructure change", "cross-cutting concern" |
|
|
82
|
+
|
|
83
|
+
### Phase 3 — User Story Structuring
|
|
84
|
+
|
|
85
|
+
For each FEATURE_REQUEST, USER_STORY, or NEW_TASK, generate a **structured user story**.
|
|
86
|
+
For each BUG_REPORT, generate a **structured bug report** instead (see 3a-bug below).
|
|
87
|
+
|
|
88
|
+
#### 3a. User Story Format (for features/tasks)
|
|
89
|
+
```
|
|
90
|
+
Title: <concise action-oriented title, max 10 words>
|
|
91
|
+
|
|
92
|
+
As a [persona/role],
|
|
93
|
+
I want [capability/action],
|
|
94
|
+
So that [business value/outcome].
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
#### 3a-bug. Bug Report Format (for BUG_REPORT items)
|
|
98
|
+
|
|
99
|
+
Bugs are NOT user stories. They follow a different structure optimized for investigation:
|
|
100
|
+
|
|
101
|
+
```
|
|
102
|
+
Title: "Fix: <symptom in plain language>" (e.g., "Fix: Order history crashes for some users")
|
|
103
|
+
|
|
104
|
+
## Symptoms
|
|
105
|
+
- What users are seeing (exact error messages, behavior)
|
|
106
|
+
- When it started / how often it happens
|
|
107
|
+
- How many users are affected
|
|
108
|
+
|
|
109
|
+
## Reproduction Steps (extracted from transcript)
|
|
110
|
+
1. [Step extracted from discussion, or "Needs investigation" if not described]
|
|
111
|
+
2. ...
|
|
112
|
+
|
|
113
|
+
## Suspected Area
|
|
114
|
+
- Module/component mentioned in discussion (if any)
|
|
115
|
+
- Related recent changes (if mentioned)
|
|
116
|
+
|
|
117
|
+
## Severity
|
|
118
|
+
- P0: Security vulnerability, data loss, full outage
|
|
119
|
+
- P1: Feature broken for subset of users, data integrity issue
|
|
120
|
+
- P2: Degraded experience, workaround exists
|
|
121
|
+
- P3: Minor annoyance, cosmetic, performance nit
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
**Critical rule for bugs**: The first stage when a worker picks up a bug is **Root Cause Analysis (Phase 2.5c)**, NOT implementation. The task description must frame the work as "Investigate and fix" — never "Implement" or "Build". This ensures the worker runs the RCA skill (hypothesis-driven debugging) before writing any code.
|
|
125
|
+
|
|
126
|
+
**Bug severity auto-mapping** (extracted from transcript signals):
|
|
127
|
+
| Signal in Transcript | Severity | Label |
|
|
128
|
+
|---|---|---|
|
|
129
|
+
| "security", "vulnerability", "unauthorized", "bypass", "data exposed" | P0 | `bug`, `security` |
|
|
130
|
+
| "crashes", "500 error", "blank page", "data loss", "wrong totals" | P1 | `bug` |
|
|
131
|
+
| "slow", "degraded", "intermittent", "workaround" | P2 | `bug` |
|
|
132
|
+
| "annoying", "cosmetic", "minor", "eventually" | P3 | `bug` |
|
|
133
|
+
|
|
134
|
+
#### 3b. Acceptance Criteria (generate 3-5 per story)
|
|
135
|
+
```
|
|
136
|
+
## Acceptance Criteria
|
|
137
|
+
- [ ] Given [precondition], when [action], then [expected result]
|
|
138
|
+
- [ ] Given [precondition], when [action], then [expected result]
|
|
139
|
+
- [ ] Edge case: [scenario] is handled gracefully
|
|
140
|
+
- [ ] Error state: [failure mode] shows appropriate message
|
|
141
|
+
- [ ] Performance: [action] completes within [threshold] (if applicable)
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
#### 3c. Subtask Decomposition (generate 3-6 subtasks per story)
|
|
145
|
+
Break each story into implementation subtasks:
|
|
146
|
+
```
|
|
147
|
+
Subtasks:
|
|
148
|
+
1. [Backend] <API/data layer work>
|
|
149
|
+
2. [Frontend] <UI component work> (if applicable)
|
|
150
|
+
3. [Validation] <input validation, error handling>
|
|
151
|
+
4. [Tests] <unit + integration tests>
|
|
152
|
+
5. [Docs] <API docs, user docs> (if applicable)
|
|
153
|
+
6. [Migration] <data migration, schema changes> (if applicable)
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
#### 3d. Sizing & Priority
|
|
157
|
+
For each story, estimate:
|
|
158
|
+
- **T-shirt size**: XS (< 2h) | S (half day) | M (1-2 days) | L (3-5 days) | XL (1+ week)
|
|
159
|
+
- **Story points**: 1 | 2 | 3 | 5 | 8 | 13 (Fibonacci, based on complexity + uncertainty)
|
|
160
|
+
- **Priority**: P0 (critical/blocking) | P1 (must-have this sprint) | P2 (should-have) | P3 (nice-to-have)
|
|
161
|
+
- **Priority rationale**: one sentence explaining why this priority
|
|
162
|
+
|
|
163
|
+
Use these signals for priority:
|
|
164
|
+
- P0: "urgent", "blocking", "production issue", "customer escalation"
|
|
165
|
+
- P1: "important", "committed", "this sprint", "promised to customer"
|
|
166
|
+
- P2: "should do", "next sprint candidate", "good improvement"
|
|
167
|
+
- P3: "nice to have", "someday", "low impact"
|
|
168
|
+
|
|
169
|
+
#### 3e. Epic Grouping
|
|
170
|
+
Group related stories under an epic:
|
|
171
|
+
- If 3+ stories share a theme (e.g., "authentication", "dashboard", "API v2") → create an epic
|
|
172
|
+
- Epic title format: `[Epic] <theme name>`
|
|
173
|
+
- Each epic gets a high-level description summarizing the business goal
|
|
174
|
+
- Stories reference their parent epic via label `epic:<epic-title-slug>`
|
|
175
|
+
|
|
176
|
+
#### 3f. Dependency Detection
|
|
177
|
+
Identify dependencies between stories:
|
|
178
|
+
- "before we can do X, we need Y" → Y blocks X
|
|
179
|
+
- "this depends on the API being ready" → dependency noted
|
|
180
|
+
- Add dependency info to the Technical Notes section of the story
|
|
181
|
+
|
|
182
|
+
#### 3g. Customer Context (for customer/stakeholder meetings)
|
|
183
|
+
If customer context was detected in Phase 1, attach to each relevant story:
|
|
184
|
+
```
|
|
185
|
+
## Customer Context
|
|
186
|
+
- **Requested by**: [customer name/company]
|
|
187
|
+
- **Business justification**: [why they need this]
|
|
188
|
+
- **Commitment**: [was anything promised? timeline?]
|
|
189
|
+
- **Impact**: [how many users/accounts affected]
|
|
190
|
+
```
|
|
191
|
+
|
|
192
|
+
### Phase 4 — HUMAN GATE: Review Structured Backlog
|
|
193
|
+
|
|
194
|
+
<HARD-GATE>
|
|
195
|
+
Do NOT create any issues, epics, or stories on the board until the user has reviewed and approved the structured backlog.
|
|
196
|
+
Do NOT skip this gate even if the user says "just create everything" before seeing the structured output.
|
|
197
|
+
Present the full backlog first, then wait for explicit approval.
|
|
198
|
+
</HARD-GATE>
|
|
199
|
+
|
|
200
|
+
**STOP. Present the full structured backlog for approval:**
|
|
201
|
+
|
|
202
|
+
```
|
|
203
|
+
📋 Meeting → Backlog Results
|
|
204
|
+
|
|
205
|
+
Meeting type: {standup|planning|retro|customer-call}
|
|
206
|
+
Speakers identified: {list}
|
|
207
|
+
Customer: {customer name, if applicable}
|
|
208
|
+
|
|
209
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
210
|
+
EPICS ({count}):
|
|
211
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
212
|
+
|
|
213
|
+
📦 Epic 1: "{epic title}"
|
|
214
|
+
{epic description}
|
|
215
|
+
Stories: {count} | Total points: {sum}
|
|
216
|
+
|
|
217
|
+
📝 Story 1.1: "{title}" [{T-shirt}] [{points}pts] [P{priority}]
|
|
218
|
+
As a {persona}, I want {X}, so that {Y}
|
|
219
|
+
Acceptance Criteria: {count} items
|
|
220
|
+
Subtasks: {count} items
|
|
221
|
+
Assignee: @{assignee} (or unassigned)
|
|
222
|
+
Dependencies: {list or "none"}
|
|
223
|
+
|
|
224
|
+
📝 Story 1.2: "{title}" [{T-shirt}] [{points}pts] [P{priority}]
|
|
225
|
+
...
|
|
226
|
+
|
|
227
|
+
📦 Epic 2: "{epic title}"
|
|
228
|
+
...
|
|
229
|
+
|
|
230
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
231
|
+
STANDALONE ITEMS:
|
|
232
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
233
|
+
|
|
234
|
+
BUG REPORTS ({count}):
|
|
235
|
+
1. 🐛 [P{severity}] "{title}" — {symptom summary}
|
|
236
|
+
Labels: bug{, security if applicable}
|
|
237
|
+
Suspected area: {module}
|
|
238
|
+
Worker flow: RCA (Phase 2.5c) → Fix → Test → PR
|
|
239
|
+
|
|
240
|
+
STATUS UPDATES ({count}):
|
|
241
|
+
1. 🔄 @{person}: {task} — {update}
|
|
242
|
+
|
|
243
|
+
BLOCKERS ({count}):
|
|
244
|
+
1. 🚫 @{person}: {blocker description}
|
|
245
|
+
|
|
246
|
+
DECISIONS ({count}):
|
|
247
|
+
1. 💡 {decision} — agreed by: {participants}
|
|
248
|
+
|
|
249
|
+
ACTION ITEMS ({count}):
|
|
250
|
+
1. ⏰ @{person}: {action} — due: {date if mentioned}
|
|
251
|
+
|
|
252
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
253
|
+
SUMMARY:
|
|
254
|
+
Epics: {N} | Stories: {N} | Bugs: {N} | Subtasks: {N}
|
|
255
|
+
Total points: {N} | Avg priority: P{N}
|
|
256
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
257
|
+
|
|
258
|
+
Options:
|
|
259
|
+
[A] Approve all → create everything on board
|
|
260
|
+
[E] Edit → modify specific items
|
|
261
|
+
[S] Split → break a story into smaller stories
|
|
262
|
+
[M] Merge → combine similar stories
|
|
263
|
+
[R] Re-prioritize → change priorities
|
|
264
|
+
[C] Cancel → discard
|
|
265
|
+
```
|
|
266
|
+
|
|
267
|
+
User can:
|
|
268
|
+
- **Approve all** → proceed to create everything
|
|
269
|
+
- **Edit** → modify specific items (change title, acceptance criteria, reassign, resize, re-prioritize, remove)
|
|
270
|
+
- **Split** → break a large story into smaller ones
|
|
271
|
+
- **Merge** → combine duplicate or overlapping stories
|
|
272
|
+
- **Re-prioritize** → adjust priority assignments
|
|
273
|
+
- **Cancel** → stop
|
|
274
|
+
|
|
275
|
+
### Phase 5 — Board Creation Pipeline
|
|
276
|
+
|
|
277
|
+
Execute in this order:
|
|
278
|
+
|
|
279
|
+
**Step 1: Create Epics**
|
|
280
|
+
For each epic:
|
|
281
|
+
1. Call `catalyst_board_create_epic` with title, description, labels
|
|
282
|
+
2. Note the created epic issue ID
|
|
283
|
+
|
|
284
|
+
**Step 2: Create User Stories**
|
|
285
|
+
For each story:
|
|
286
|
+
1. Build the full description with Summary, User Story statement, Acceptance Criteria, Technical Notes, Customer Context (if applicable), Dependencies
|
|
287
|
+
2. Call `catalyst_board_create` with:
|
|
288
|
+
- title
|
|
289
|
+
- structured description (see format below)
|
|
290
|
+
- assignee
|
|
291
|
+
- labels: `["user-story", "epic:<epic-slug>", "size:<t-shirt>", "priority:P{N}"]`
|
|
292
|
+
- **If the story was tagged NEEDS_DESIGN in Phase 2**, add `needs-design` to labels
|
|
293
|
+
- **If the story was tagged NEEDS_ARCHITECTURE in Phase 2**, add `needs-architecture` to labels
|
|
294
|
+
- **If the story was tagged BUG_REPORT in Phase 2**, add `bug` to labels (and `security` if it's a security bug). Use `"bug"` instead of `"user-story"` as the first label. **This is critical** — without the `bug` label, the worker will skip RCA (Phase 2.5c) and jump straight to implementation, meaning the root cause is never properly diagnosed.
|
|
295
|
+
- A story can have multiple signal labels (e.g., `bug` + `needs-design` if fixing requires design evaluation)
|
|
296
|
+
- priority
|
|
297
|
+
- points (Fibonacci story points)
|
|
298
|
+
3. Note the created story issue ID
|
|
299
|
+
|
|
300
|
+
**Story description format for board_create (features):**
|
|
301
|
+
```markdown
|
|
302
|
+
## Summary
|
|
303
|
+
{what and why — 2-3 sentences}
|
|
304
|
+
|
|
305
|
+
## User Story
|
|
306
|
+
As a {persona}, I want {capability}, so that {business value}.
|
|
307
|
+
|
|
308
|
+
## Acceptance Criteria
|
|
309
|
+
- [ ] Given {precondition}, when {action}, then {expected result}
|
|
310
|
+
- [ ] ...
|
|
311
|
+
|
|
312
|
+
## Technical Notes
|
|
313
|
+
- Stack: {relevant technologies}
|
|
314
|
+
- Dependencies: {blocking stories or external deps}
|
|
315
|
+
- Constraints: {performance, security, compatibility requirements}
|
|
316
|
+
```
|
|
317
|
+
|
|
318
|
+
**Bug description format for board_create (BUG_REPORT items):**
|
|
319
|
+
```markdown
|
|
320
|
+
## Summary
|
|
321
|
+
Investigate and fix: {symptom description — 1-2 sentences}
|
|
322
|
+
|
|
323
|
+
## Symptoms
|
|
324
|
+
- {what users are experiencing}
|
|
325
|
+
- {frequency / affected user count if mentioned}
|
|
326
|
+
|
|
327
|
+
## Reproduction Steps
|
|
328
|
+
1. {step from transcript or "Needs investigation"}
|
|
329
|
+
2. ...
|
|
330
|
+
|
|
331
|
+
## Suspected Area
|
|
332
|
+
- {module/file/component mentioned in discussion}
|
|
333
|
+
- {related recent changes if mentioned}
|
|
334
|
+
|
|
335
|
+
## Technical Notes
|
|
336
|
+
- Severity: {P0-P3 with rationale}
|
|
337
|
+
- Stack: {relevant technologies}
|
|
338
|
+
- Dependencies: {blocking issues or external deps}
|
|
339
|
+
|
|
340
|
+
## Customer Context
|
|
341
|
+
- Requested by: {customer} (if applicable)
|
|
342
|
+
- Business justification: {why}
|
|
343
|
+
```
|
|
344
|
+
|
|
345
|
+
**Step 3: Create Subtasks**
|
|
346
|
+
For each story's subtasks:
|
|
347
|
+
1. Call `catalyst_board_create_subtask` with:
|
|
348
|
+
- parent_id: the story's issue ID
|
|
349
|
+
- title: `[Backend] Implement user authentication endpoint`
|
|
350
|
+
- description: implementation details
|
|
351
|
+
- labels: `["subtask", "epic:<epic-slug>"]`
|
|
352
|
+
2. Note created subtask IDs
|
|
353
|
+
|
|
354
|
+
**Step 4: Status Updates, Blockers, Decisions**
|
|
355
|
+
Same as before:
|
|
356
|
+
- STATUS_UPDATE → `catalyst_board_comment` or `catalyst_board_move`
|
|
357
|
+
- BLOCKER → `catalyst_board_comment` or create blocker issue
|
|
358
|
+
- DECISION → `catalyst_knowledge_store` with type: "decision"
|
|
359
|
+
- ACTION_ITEM → board issue or knowledge store
|
|
360
|
+
|
|
361
|
+
**Step 5: Autopilot (optional)**
|
|
362
|
+
If user requested autopilot → call `catalyst_worker_start` for each created story
|
|
363
|
+
|
|
364
|
+
### Phase 6 — Summary
|
|
365
|
+
|
|
366
|
+
Present final summary:
|
|
367
|
+
|
|
368
|
+
```
|
|
369
|
+
✅ Meeting → Backlog Complete
|
|
370
|
+
|
|
371
|
+
Epics created: {N} (#{ids})
|
|
372
|
+
Stories created: {N} (#{ids})
|
|
373
|
+
Subtasks created: {N} (#{ids})
|
|
374
|
+
Total points: {N}
|
|
375
|
+
Updated: {N} existing items
|
|
376
|
+
Blockers: {N} logged
|
|
377
|
+
Decisions: {N} stored in knowledge base
|
|
378
|
+
Autopilot: {N} workflows started (if any)
|
|
379
|
+
|
|
380
|
+
Board: Use catalyst_board_view to see the full board
|
|
381
|
+
|
|
382
|
+
Dependency chain:
|
|
383
|
+
Story #{X} → blocks → Story #{Y}
|
|
384
|
+
Story #{Z} → blocks → Story #{W}
|
|
385
|
+
```
|
|
386
|
+
|
|
387
|
+
## Output Format
|
|
388
|
+
|
|
389
|
+
Use the structured formats shown in each phase. Group by epic → story → subtask. Always show counts and point totals.
|
|
390
|
+
|
|
391
|
+
## Anti-Patterns
|
|
392
|
+
|
|
393
|
+
- Do NOT create issues without showing them to the user first (Phase 4 gate is mandatory)
|
|
394
|
+
- Do NOT guess assignees if the transcript doesn't mention names — leave unassigned
|
|
395
|
+
- Do NOT extract noise/filler as tasks
|
|
396
|
+
- Do NOT create duplicate issues — if the transcript mentions an existing task, UPDATE it
|
|
397
|
+
- Do NOT auto-start autopilot without explicit user consent
|
|
398
|
+
- Do NOT include meeting transcript verbatim in issue descriptions — summarize
|
|
399
|
+
- Do NOT create stories without acceptance criteria — every story needs at least 3 criteria
|
|
400
|
+
- Do NOT skip subtask decomposition — every story gets 3-6 subtasks
|
|
401
|
+
- Do NOT assign arbitrary story points — use complexity signals from the transcript
|
|
402
|
+
- Do NOT create an epic for a single story — epics need 3+ related stories (otherwise standalone)
|
|
403
|
+
|
|
404
|
+
## Chains To
|
|
405
|
+
|
|
406
|
+
- `autopilot-worker` — for stories that should be implemented automatically
|
|
407
|
+
- `knowledge-base` — decisions and customer context are always stored
|