@crewpilot/agent 1.0.0 → 3.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.
Files changed (27) hide show
  1. package/README.md +35 -11
  2. package/dist-npm/cli.js +5 -5
  3. package/dist-npm/index.js +171 -138
  4. package/package.json +2 -2
  5. package/prompts/agent.md +38 -22
  6. package/prompts/copilot-instructions.md +8 -8
  7. package/prompts/{catalyst.config.json → crewpilot.config.json} +1 -1
  8. package/prompts/skills/assure-code-quality/SKILL.md +3 -3
  9. package/prompts/skills/assure-pr-intelligence/SKILL.md +4 -4
  10. package/prompts/skills/assure-review-functional/SKILL.md +114 -0
  11. package/prompts/skills/assure-review-standards/SKILL.md +106 -0
  12. package/prompts/skills/assure-threat-model/SKILL.md +182 -0
  13. package/prompts/skills/assure-vulnerability-scan/SKILL.md +1 -1
  14. package/prompts/skills/autopilot-meeting/SKILL.md +43 -16
  15. package/prompts/skills/autopilot-worker/SKILL.md +177 -63
  16. package/prompts/skills/daily-digest/SKILL.md +35 -14
  17. package/prompts/skills/deliver-change-management/SKILL.md +6 -6
  18. package/prompts/skills/deliver-deploy-guard/SKILL.md +6 -6
  19. package/prompts/skills/deliver-doc-governance/SKILL.md +2 -2
  20. package/prompts/skills/engineer-feature-builder/SKILL.md +3 -3
  21. package/prompts/skills/engineer-root-cause-analysis/SKILL.md +3 -3
  22. package/prompts/skills/engineer-test-first/SKILL.md +2 -2
  23. package/prompts/skills/insights-knowledge-base/SKILL.md +32 -11
  24. package/prompts/skills/insights-pattern-detection/SKILL.md +5 -5
  25. package/prompts/skills/strategize-architecture-planner/SKILL.md +2 -2
  26. package/prompts/skills/strategize-solution-design/SKILL.md +2 -2
  27. package/scripts/postinstall.js +4 -4
@@ -0,0 +1,182 @@
1
+ # Threat Model — STRIDE
2
+
3
+ > **Pillar**: Assure | **ID**: `assure-threat-model`
4
+
5
+ ## Purpose
6
+
7
+ Systematic threat modeling using the STRIDE framework. Identifies threats across Spoofing, Tampering, Repudiation, Information Disclosure, Denial of Service, and Elevation of Privilege. Produces a threat register with risk scores and mitigations that informs design decisions and security reviews.
8
+
9
+ ## Activation Triggers
10
+
11
+ - "threat model", "stride", "threat analysis", "security architecture"
12
+ - "what could go wrong", "attack vectors", "threat register"
13
+ - Label-gated: automatically invoked by autopilot-worker Phase 2.5d when `needs-threat-model` or `security-sensitive` label detected
14
+ - Routed from `security-auditor` subagent role for architecture-level security analysis
15
+
16
+ ## Methodology
17
+
18
+ ### Process Flow
19
+
20
+ ```dot
21
+ digraph threat_model {
22
+ rankdir=TB;
23
+ node [shape=box];
24
+
25
+ scope [label="Phase 1\nScope & Data Flow"];
26
+ decompose [label="Phase 2\nComponent Decomposition"];
27
+ stride [label="Phase 3\nSTRIDE Analysis"];
28
+ risk [label="Phase 4\nRisk Assessment"];
29
+ mitigate [label="Phase 5\nMitigation Planning"];
30
+ register [label="Phase 6\nThreat Register", shape=doublecircle];
31
+
32
+ scope -> decompose;
33
+ decompose -> stride;
34
+ stride -> risk;
35
+ risk -> mitigate;
36
+ mitigate -> register;
37
+ }
38
+ ```
39
+
40
+ ### Phase 1 — Scope & Data Flow
41
+
42
+ 1. Define the system boundary — what's being threat-modeled (entire system, single feature, or API surface)
43
+ 2. Identify actors: end users, admins, external services, background jobs
44
+ 3. Map data flows:
45
+ - User input → processing → storage → output
46
+ - Service-to-service communication
47
+ - External API calls
48
+ 4. Identify trust boundaries:
49
+ - Authenticated vs unauthenticated zones
50
+ - Internal vs external network
51
+ - Client-side vs server-side
52
+ - Different privilege levels
53
+ 5. **(Optional) Fetch security context from M365**: If `mcp_workiq_ask_work_iq` is available, query for relevant compliance and security context:
54
+ - Call `mcp_workiq_accept_eula` with `eulaUrl: "https://github.com/microsoft/work-iq-mcp"` (idempotent)
55
+ - **Compliance requirements**: `mcp_workiq_ask_work_iq` → "What compliance requirements, security policies, or regulatory constraints apply to {system/feature}? Check emails, docs, and Teams messages."
56
+ - **Past security discussions**: `mcp_workiq_ask_work_iq` → "What security concerns or vulnerabilities have been discussed about {system/feature} in recent emails and meetings?"
57
+ - **Architecture decisions**: `mcp_workiq_ask_work_iq` → "What architecture or security design decisions were made about {system/feature} in meetings or design docs?"
58
+ - Feed this context into the STRIDE analysis to ensure threats are evaluated against the organization's actual compliance posture and known security concerns.
59
+ - If unavailable, proceed without — the threat model works from code analysis alone.
60
+
61
+ ### Phase 2 — Component Decomposition
62
+
63
+ 1. List each component in the data flow:
64
+ - Frontend (SPA, mobile app, CLI)
65
+ - API gateway / load balancer
66
+ - Application server(s)
67
+ - Database(s)
68
+ - Cache layer
69
+ - Message queue / event bus
70
+ - External services / third-party APIs
71
+ - File storage / CDN
72
+ 2. For each component, note:
73
+ - Technology stack
74
+ - Authentication mechanism
75
+ - Data stored/processed
76
+ - Network exposure (public, internal, VPN)
77
+
78
+ ### Phase 3 — STRIDE Analysis
79
+
80
+ For each component and each data flow crossing a trust boundary, evaluate all six STRIDE categories:
81
+
82
+ | Category | Threat | Key Questions |
83
+ |----------|--------|---------------|
84
+ | **S**poofing | Identity impersonation | Can an attacker pretend to be another user/service? Is authentication enforced at every entry point? Are tokens/sessions properly validated? |
85
+ | **T**ampering | Data modification | Can data be modified in transit or at rest? Are inputs validated? Is there integrity checking (HMAC, checksums)? Can request parameters be manipulated? |
86
+ | **R**epudiation | Deniability of actions | Are actions logged with sufficient detail? Can a user deny performing an action? Are audit logs tamper-proof? |
87
+ | **I**nformation Disclosure | Data exposure | Can sensitive data leak through error messages, logs, API responses, or side channels? Is PII/secrets encrypted at rest and in transit? |
88
+ | **D**enial of Service | Availability threats | Are there rate limits? Can a single request exhaust resources (memory, CPU, disk)? Are there circuit breakers? Can an attacker trigger expensive operations? |
89
+ | **E**levation of Privilege | Unauthorized access | Can a regular user access admin functions? Are authorization checks at every layer (not just frontend)? Can parameters be manipulated to bypass access controls? |
90
+
91
+ ### Phase 4 — Risk Assessment
92
+
93
+ For each identified threat, assess:
94
+
95
+ 1. **Likelihood** (1-5): How easy is this to exploit?
96
+ - 1 = Requires deep insider knowledge + sophisticated tools
97
+ - 3 = Moderately skilled attacker with publicly available tools
98
+ - 5 = Trivial exploitation, automated scanners can find it
99
+ 2. **Impact** (1-5): What's the damage if exploited?
100
+ - 1 = Minor inconvenience, no data loss
101
+ - 3 = Service disruption, limited data exposure
102
+ - 5 = Full data breach, system compromise, regulatory impact
103
+ 3. **Risk Score** = Likelihood × Impact (1-25)
104
+ - 1-6: Low → Accept or monitor
105
+ - 7-14: Medium → Mitigate within normal development
106
+ - 15-25: High/Critical → Block release until mitigated
107
+
108
+ ### Phase 5 — Mitigation Planning
109
+
110
+ For each threat with risk score ≥ 7:
111
+
112
+ 1. Propose a specific mitigation (not generic "add security")
113
+ 2. Classify the mitigation:
114
+ - **Prevent**: Eliminate the threat entirely (e.g., parameterized queries for SQLi)
115
+ - **Detect**: Monitor and alert (e.g., anomaly detection for DoS)
116
+ - **Respond**: Limit damage (e.g., circuit breakers, rate limits)
117
+ - **Transfer**: Shift risk (e.g., use managed service with SLA)
118
+ 3. Estimate implementation effort: Low / Medium / High
119
+ 4. Identify which phase of the worker pipeline should implement the mitigation:
120
+ - Phase 4 (Implementation): Code-level fixes
121
+ - Phase 5 (Change Mgmt): Configuration changes
122
+ - Phase 7 (Deploy Guard): Operational checks
123
+
124
+ ### Phase 6 — Threat Register
125
+
126
+ Compile all findings into a structured threat register and:
127
+ 1. Store via `crewpilot_knowledge_store` (type: `threat-model`) for future reference
128
+ 2. Write as artifact via `crewpilot_artifact_write` (phase: `threat-model`)
129
+ 3. Feed high-risk items into the Phase 3 plan as mandatory implementation steps
130
+
131
+ ## Tools Required
132
+
133
+ - `crewpilot_knowledge_store` — Store threat model for future reference
134
+ - `crewpilot_knowledge_search` — Query past threat models and security findings
135
+ - `crewpilot_artifact_write` — Persist threat register as workflow artifact
136
+ - `crewpilot_artifact_read` — Read analysis/architecture artifacts for context
137
+ - `crewpilot_metrics_complexity` — Identify complex code that may have more attack surface
138
+ - `mcp_workiq_accept_eula` — (optional) Accept Work IQ EULA before first query
139
+ - `mcp_workiq_ask_work_iq` — (optional) Query M365 for compliance requirements, security discussions, and architecture decisions
140
+
141
+ ## Output Format
142
+
143
+ ```
144
+ ## [CrewPilot → Threat Model (STRIDE)]
145
+
146
+ ### Scope
147
+ **System**: {what's being modeled}
148
+ **Actors**: {user types}
149
+ **Trust Boundaries**: {boundary list}
150
+
151
+ ### Data Flow Diagram
152
+ ```
153
+ {text-based data flow: Actor → Component → Data Store → Output}
154
+ ```
155
+
156
+ ### Threat Register
157
+
158
+ | ID | STRIDE | Component | Threat | Likelihood | Impact | Risk | Mitigation | Effort |
159
+ |----|--------|-----------|--------|------------|--------|------|------------|--------|
160
+ | T1 | S | Auth API | ... | 4 | 5 | 20 | ... | Medium |
161
+ | T2 | T | ... | ... | 3 | 3 | 9 | ... | Low |
162
+ | ...| ... | ... | ... | ... | ... | ... | ... | ... |
163
+
164
+ ### Risk Summary
165
+ - **Critical** (15-25): {count} threats → Must mitigate before release
166
+ - **Medium** (7-14): {count} threats → Mitigate within sprint
167
+ - **Low** (1-6): {count} threats → Accept/monitor
168
+
169
+ ### Recommended Mitigations (Priority Order)
170
+ 1. {T-ID}: {mitigation} — {effort} — Phase {N}
171
+ 2. {T-ID}: {mitigation} — {effort} — Phase {N}
172
+ 3. ...
173
+
174
+ ### Confidence: {N}/10
175
+ ```
176
+
177
+ ## Chains To
178
+
179
+ - `assure-vulnerability-scan` — Complements STRIDE with OWASP/CWE code-level scanning
180
+ - `assure-review-functional` — Security pass covers code-level implementation of mitigations
181
+ - `strategize-architecture-planner` — Architecture decisions should reference the threat model
182
+ - `insights-knowledge-base` — Past threat models inform future analysis
@@ -98,7 +98,7 @@ Critical findings MUST be remediated before code is shipped.
98
98
  ## Output Format
99
99
 
100
100
  ```
101
- ## [Catalyst → Vulnerability Scan]
101
+ ## [CrewPilot → Vulnerability Scan]
102
102
 
103
103
  ### Attack Surface
104
104
  - Entry points: {N}
@@ -14,14 +14,17 @@ Specifically supports the **PM workflow**: customer meeting → epics → user s
14
14
 
15
15
  ## Tools Required
16
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
17
+ - `crewpilot_board_create` — create issues / user stories on board
18
+ - `crewpilot_board_create_epic` — create epics to group related stories
19
+ - `crewpilot_board_create_subtask` — create subtasks linked to a parent story
20
+ - `crewpilot_board_move` — update issue status for status updates
21
+ - `crewpilot_board_comment` — log blockers and decisions on existing issues
22
+ - `crewpilot_board_assign` — assign tasks to people mentioned in transcript
23
+ - `crewpilot_knowledge_store` — store decisions, customer context, and action items
24
+ - `crewpilot_worker_start` — optionally kick off autopilot for created tasks
25
+ - `mcp_workiq_accept_eula` — (optional) accept Work IQ EULA before first query
26
+ - `mcp_workiq_ask_work_iq` — (optional, requires Work IQ extension) fetch meeting transcript and details from M365
27
+ - `crewpilot_artifact_write` — persist extracted meeting data as artifacts
25
28
 
26
29
  ## Methodology
27
30
 
@@ -51,6 +54,30 @@ digraph autopilot_meeting {
51
54
 
52
55
  ### Phase 1 — Transcript Ingestion
53
56
 
57
+ **Work IQ integration (zero-copy flow):** If the user specifies a meeting by name/date/subject (e.g. "parse yesterday's sprint planning" or "check my meeting discussion"):
58
+
59
+ 1. **Accept EULA first**: Call `mcp_workiq_accept_eula` with `eulaUrl: "https://github.com/microsoft/work-iq-mcp"`. This is idempotent — safe to call every time.
60
+ 2. **Query the meeting**: Call `mcp_workiq_ask_work_iq` with a focused question. Use targeted queries for better results:
61
+ - "What was discussed in the {meeting name} meeting on {date}?"
62
+ - "Summarize the transcript from my meeting with {person} on {date}"
63
+ - "What action items came out of the {project} meeting?"
64
+ - "What decisions were made in the {topic} meeting?"
65
+ 3. If Work IQ is available, the transcript, attendees, and action items are fetched automatically — no manual paste needed.
66
+ 4. **Cross-meeting context**: Query for prior decisions related to the same topic:
67
+ - "What decisions were made about {topic} in previous meetings?"
68
+ - "What was discussed about {feature/project} in earlier meetings this month?"
69
+ - This surfaces continuity across meetings — ensures new items don't contradict prior agreements.
70
+ 5. **Speaker identity enrichment**: Query the org chart for real names and roles:
71
+ - "Who is {speaker name}? What is their role and team?"
72
+ - Map speaker labels to real identities for accurate assignee attribution and RACI context.
73
+ 6. **Linked document references**: Query for documents referenced or shared during the meeting:
74
+ - "What documents, specs, or design docs were shared in the {meeting name} meeting?"
75
+ - "Find SharePoint/OneDrive documents related to {topic} shared recently"
76
+ - Attach linked docs to the relevant stories as context references.
77
+ 7. If `mcp_workiq_ask_work_iq` is unavailable or errors, fall back to the manual flow below.
78
+
79
+ > **Data sensitivity**: Meeting transcripts may contain confidential information or PII. Do not include raw transcript excerpts with names or customer-identifying details in board items — summarize and anonymize.
80
+
54
81
  Accept transcript in any format:
55
82
  - Pasted text (most common)
56
83
  - File path to `.vtt`, `.txt`, or `.md` file (read via tools)
@@ -278,13 +305,13 @@ Execute in this order:
278
305
 
279
306
  **Step 1: Create Epics**
280
307
  For each epic:
281
- 1. Call `catalyst_board_create_epic` with title, description, labels
308
+ 1. Call `crewpilot_board_create_epic` with title, description, labels
282
309
  2. Note the created epic issue ID
283
310
 
284
311
  **Step 2: Create User Stories**
285
312
  For each story:
286
313
  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:
314
+ 2. Call `crewpilot_board_create` with:
288
315
  - title
289
316
  - structured description (see format below)
290
317
  - assignee
@@ -344,7 +371,7 @@ Investigate and fix: {symptom description — 1-2 sentences}
344
371
 
345
372
  **Step 3: Create Subtasks**
346
373
  For each story's subtasks:
347
- 1. Call `catalyst_board_create_subtask` with:
374
+ 1. Call `crewpilot_board_create_subtask` with:
348
375
  - parent_id: the story's issue ID
349
376
  - title: `[Backend] Implement user authentication endpoint`
350
377
  - description: implementation details
@@ -353,13 +380,13 @@ For each story's subtasks:
353
380
 
354
381
  **Step 4: Status Updates, Blockers, Decisions**
355
382
  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"
383
+ - STATUS_UPDATE → `crewpilot_board_comment` or `crewpilot_board_move`
384
+ - BLOCKER → `crewpilot_board_comment` or create blocker issue
385
+ - DECISION → `crewpilot_knowledge_store` with type: "decision"
359
386
  - ACTION_ITEM → board issue or knowledge store
360
387
 
361
388
  **Step 5: Autopilot (optional)**
362
- If user requested autopilot → call `catalyst_worker_start` for each created story
389
+ If user requested autopilot → call `crewpilot_worker_start` for each created story
363
390
 
364
391
  ### Phase 6 — Summary
365
392
 
@@ -377,7 +404,7 @@ Blockers: {N} logged
377
404
  Decisions: {N} stored in knowledge base
378
405
  Autopilot: {N} workflows started (if any)
379
406
 
380
- Board: Use catalyst_board_view to see the full board
407
+ Board: Use crewpilot_board_view to see the full board
381
408
 
382
409
  Dependency chain:
383
410
  Story #{X} → blocks → Story #{Y}