@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.
@@ -0,0 +1,167 @@
1
+ # Daily Digest
2
+
3
+ > **Pillar**: Orchestrate | **ID**: `daily-digest`
4
+
5
+ ## Purpose
6
+
7
+ Generate a comprehensive daily/weekly work summary by aggregating git activity, board changes, PR status, workflow completions, and knowledge entries — then deliver it via SMTP email or display in chat. Replaces manual status reporting entirely.
8
+
9
+ ## Activation Triggers
10
+
11
+ - digest, daily report, daily summary, end of day, eod report, what did I do today, status report, send update, update PM, weekly summary, send email, standup report
12
+
13
+ ## Tools Required
14
+
15
+ - `catalyst_git_log` — get commits for the time period
16
+ - `catalyst_board_my_items` — get board items (opened, closed, in-progress)
17
+ - `catalyst_worker_dashboard` — workflow completions and stats
18
+ - `catalyst_knowledge_timeline` — decisions made in the period
19
+ - `catalyst_exec` — run git/gh commands for additional data
20
+ - `catalyst_notify_send` — deliver the report via email
21
+
22
+ ## Methodology
23
+
24
+ ### Process Flow
25
+
26
+ ```dot
27
+ digraph daily_digest {
28
+ rankdir=LR;
29
+ node [shape=box];
30
+
31
+ collect [label="Phase 1\nData Collection\n(git, board, PRs,\nworkflows, knowledge)"];
32
+ generate [label="Phase 2\nReport Generation"];
33
+ deliver [label="Phase 3\nDelivery\n(email or chat)", shape=doublecircle];
34
+
35
+ collect -> generate;
36
+ generate -> deliver;
37
+ }
38
+ ```
39
+
40
+ ### Phase 1 — Data Collection
41
+
42
+ Gather from all sources for the requested time period (default: today):
43
+
44
+ **Git Activity:**
45
+ 1. Call `catalyst_git_log` with `--since="today 00:00"` (or requested range)
46
+ 2. Extract: commit count, files changed, insertions/deletions, branches touched
47
+ 3. Group commits by scope/type (feat, fix, refactor, test, docs)
48
+
49
+ **Board Activity:**
50
+ 1. Call `catalyst_exec` with `gh issue list --author=@me --state=all --json number,title,state,updatedAt,labels`
51
+ 2. Filter to items updated in the time period
52
+ 3. Categorize: created, moved to in-progress, closed/done, commented on
53
+
54
+ **PR Activity:**
55
+ 1. Call `catalyst_exec` with `gh pr list --author=@me --state=all --json number,title,state,createdAt,mergedAt,reviewDecision`
56
+ 2. Filter to time period
57
+ 3. Categorize: opened, merged, review pending, changes requested
58
+
59
+ **Workflow Activity:**
60
+ 1. Call `catalyst_worker_dashboard` for digital worker stats
61
+ 2. Filter completed/failed workflows in the period
62
+
63
+ **Knowledge:**
64
+ 1. Call `catalyst_knowledge_timeline` for decisions and lessons stored today
65
+
66
+ ### Phase 2 — Report Generation
67
+
68
+ Compose the report in this structure:
69
+
70
+ ```
71
+ 📊 Daily Digest — {date} — @{username}
72
+ ═══════════════════════════════════════
73
+
74
+ 📝 COMMITS ({count})
75
+ feat: {count} — {summary of features}
76
+ fix: {count} — {summary of fixes}
77
+ refactor: {count}
78
+ test: {count}
79
+ other: {count}
80
+
81
+ Files changed: {N} | +{insertions} / -{deletions}
82
+
83
+ 📋 BOARD ACTIVITY
84
+ Created: {N} items ({titles})
85
+ In Progress: {N} items ({titles})
86
+ Completed: {N} items ({titles})
87
+ Blocked: {N} items ({titles + reason})
88
+
89
+ 🔀 PULL REQUESTS
90
+ Opened: {N} — {PR titles with numbers}
91
+ Merged: {N} — {PR titles}
92
+ Pending: {N} — {waiting on review / changes requested}
93
+
94
+ 🤖 DIGITAL WORKER
95
+ Workflows completed: {N}
96
+ Workflows in progress: {N}
97
+ Workflows failed: {N}
98
+
99
+ 💡 DECISIONS MADE
100
+ - {decision 1}
101
+ - {decision 2}
102
+
103
+ ───────────────────────────────────────
104
+ Tomorrow's focus:
105
+ - {open items in-progress}
106
+ - {PRs waiting for review}
107
+ - {blockers to resolve}
108
+ ```
109
+
110
+ ### Phase 3 — Delivery
111
+
112
+ Based on notification configuration:
113
+
114
+ **Email (default when recipients configured):**
115
+ 1. Call `catalyst_notify_send` with subject: "Daily Digest — {date} — {project name}", body: full report
116
+ 2. Email sent automatically via SMTP (no manual interaction needed)
117
+ 3. Requires SMTP env vars or `catalyst_notify_configure` to be set up
118
+
119
+ **Console (fallback when no recipients configured):**
120
+ 1. Just display the report in chat
121
+ 2. User can copy-paste to email manually
122
+
123
+ ### Phase 4 — Preview & Send
124
+
125
+ **ALWAYS preview before sending:**
126
+
127
+ ```
128
+ 📊 Digest Preview:
129
+
130
+ {full report}
131
+
132
+ ──────────────
133
+ Send to: {recipient} via email?
134
+ (yes / edit / just show)
135
+ ```
136
+
137
+ - **yes** → send via email (opens mail client with pre-filled content)
138
+ - **edit** → user modifies, re-preview
139
+ - **just show** → output only, don't send (default if no recipients configured)
140
+
141
+ ## Weekly Summary Mode
142
+
143
+ When triggered with "weekly summary" or "weekly digest":
144
+
145
+ 1. Aggregate across the full week (Mon-Fri)
146
+ 2. Add a "Week Highlights" section at the top
147
+ 3. Add trend comparison: "vs last week: +3 commits, +2 PRs, -1 blocker"
148
+ 4. Include sprint velocity trend chart (text-based)
149
+
150
+ ## Output Format
151
+
152
+ - Use the structured template shown in Phase 2
153
+ - Numbers first, details second
154
+ - Emoji prefixes for quick scanning
155
+ - Keep total report under 100 lines — summarize, don't enumerate every commit
156
+
157
+ ## Anti-Patterns
158
+
159
+ - Do NOT send email without showing preview first
160
+ - Do NOT include sensitive data (secrets, tokens, passwords found in code)
161
+ - Do NOT fabricate activity — if nothing happened, say "quiet day"
162
+ - Do NOT include full commit messages — summarize by category
163
+ - Do NOT send to recipients not configured via catalyst_notify_configure
164
+
165
+ ## Chains To
166
+
167
+ - `knowledge-base` — the digest itself can be stored as a daily record
@@ -0,0 +1,132 @@
1
+ # Change Management
2
+
3
+ > **Pillar**: Deliver | **ID**: `deliver-change-management`
4
+
5
+ ## Purpose
6
+
7
+ Structured commit and release workflow. Enforces conventional commits, generates changelogs, manages semantic versioning, and ensures every change is traceable.
8
+
9
+ ## Activation Triggers
10
+
11
+ - "commit this", "write a commit message", "what should the commit be"
12
+ - "changelog", "release notes", "version bump"
13
+ - Automatically chained after any skill that modifies code
14
+
15
+ ## Methodology
16
+
17
+ ### Process Flow
18
+
19
+ ```dot
20
+ digraph change_management {
21
+ rankdir=TB;
22
+ node [shape=box];
23
+
24
+ analyze [label="Phase 1\nChange Analysis"];
25
+ message [label="Phase 2\nCommit Message Generation"];
26
+ group [label="Phase 3\nCommit Grouping", shape=diamond];
27
+ release [label="Phase 4\nRelease Notes", style=dashed];
28
+ done [label="Committed", shape=doublecircle];
29
+
30
+ analyze -> message;
31
+ message -> group;
32
+ group -> message [label="split into\nseparate commits"];
33
+ group -> done [label="single commit"];
34
+ done -> release [label="release requested"];
35
+ }
36
+ ```
37
+
38
+ ### Phase 1 — Change Analysis
39
+ 1. Run `git status` and `git diff --staged` to understand what's changed
40
+ 2. If nothing is staged, analyze the working tree diff
41
+ 3. Categorize changes:
42
+ - **feat**: New functionality
43
+ - **fix**: Bug fix
44
+ - **refactor**: Code restructuring (no behavior change)
45
+ - **test**: Adding/modifying tests
46
+ - **docs**: Documentation only
47
+ - **perf**: Performance improvement
48
+ - **chore**: Build, CI, dependencies
49
+ - **security**: Security fix
50
+
51
+ ### Phase 2 — Commit Message Generation
52
+ Follow the conventional commit format configured in `commit_format`:
53
+
54
+ ```
55
+ {type}({scope}): {description}
56
+
57
+ {body — what and why, not how}
58
+
59
+ {footer — breaking changes, issue references}
60
+ ```
61
+
62
+ Rules:
63
+ - Subject line ≤ 72 characters
64
+ - Scope is the affected module/component (inferred from file paths)
65
+ - Body explains motivation if the change isn't obvious
66
+ - `BREAKING CHANGE:` footer for breaking changes
67
+ - Reference issues: `Closes #123`, `Fixes #456`
68
+
69
+ ### Phase 3 — Commit Grouping
70
+ If multiple logical changes are staged:
71
+ 1. Suggest splitting into separate commits
72
+ 2. Provide the staging commands (`git add -p` guidance)
73
+ 3. Generate a commit message for each logical unit
74
+
75
+ ### Phase 4 — Release Notes (when requested)
76
+ 1. Parse commits since last tag
77
+ 2. Group by type (Features, Fixes, Breaking Changes, etc.)
78
+ 3. Generate human-readable release notes
79
+ 4. Suggest version bump based on commit types:
80
+ - `BREAKING CHANGE` → major
81
+ - `feat` → minor
82
+ - `fix`, `perf` → patch
83
+
84
+ ## Tools Required
85
+
86
+ - `terminal` — Run git commands
87
+ - `catalyst_git_status` — Get current state
88
+ - `catalyst_git_diff` — Get detailed diff
89
+ - `catalyst_git_log` — Parse commit history
90
+ - `catalyst_git_stage` — Stage files
91
+ - `catalyst_git_commit` — Execute commit
92
+
93
+ ## Output Format
94
+
95
+ ```
96
+ ## [Catalyst → Change Management]
97
+
98
+ ### Changes Detected
99
+ | Type | Scope | Files |
100
+ |---|---|---|
101
+ | {type} | {scope} | {file list} |
102
+
103
+ ### Suggested Commit
104
+ \`\`\`
105
+ {type}({scope}): {description}
106
+
107
+ {body}
108
+
109
+ {footer}
110
+ \`\`\`
111
+
112
+ ### Release Notes (if requested)
113
+ ## v{X.Y.Z}
114
+ ### Features
115
+ - {description} ({hash})
116
+ ### Fixes
117
+ - {description} ({hash})
118
+ ### Breaking Changes
119
+ - {description} ({hash})
120
+ ```
121
+
122
+ ## Chains To
123
+
124
+ - `doc-governance` — Check if changed code needs doc updates
125
+ - `deploy-guard` — Pre-deployment safety after committing
126
+
127
+ ## Anti-Patterns
128
+
129
+ - Do NOT write generic commit messages ("update code", "fix things")
130
+ - Do NOT combine unrelated changes in one commit
131
+ - Do NOT skip the body for non-obvious changes
132
+ - Do NOT version bump without analyzing the commit history
@@ -0,0 +1,144 @@
1
+ # Deploy Guard
2
+
3
+ > **Pillar**: Deliver | **ID**: `deliver-deploy-guard`
4
+
5
+ ## Purpose
6
+
7
+ Pre-deployment safety validation. Runs a structured checklist of quality gates before any code ships — catches what CI/CD pipelines often miss. Acts as the last line of defense.
8
+
9
+ ## Activation Triggers
10
+
11
+ - "ready to deploy?", "pre-deploy check", "can I ship this?"
12
+ - "safety check", "deploy guard", "go/no-go"
13
+ - Automatically chained after `change-management` when `phase_gates` is `strict`
14
+
15
+ ## Methodology
16
+
17
+ ### Process Flow
18
+
19
+ ```dot
20
+ digraph deploy_guard {
21
+ rankdir=TB;
22
+ node [shape=box];
23
+
24
+ g1 [label="Gate 1\nCode Quality"];
25
+ g2 [label="Gate 2\nTest Integrity"];
26
+ g3 [label="Gate 3\nSecurity"];
27
+ g4 [label="Gate 4\nConfiguration"];
28
+ g5 [label="Gate 5\nBreaking Changes"];
29
+ g6 [label="Gate 6\nOperational Readiness"];
30
+ verdict [label="Verdict", shape=diamond, style=filled, fillcolor="#ffcccc"];
31
+ go [label="GO \u2705", shape=doublecircle, style=filled, fillcolor="#ccffcc"];
32
+ nogo [label="NO-GO \u274c", shape=octagon, style=filled, fillcolor="#ff9999"];
33
+ conditional [label="CONDITIONAL \u26a0\ufe0f", shape=box, style=filled, fillcolor="#ffffcc"];
34
+
35
+ g1 -> g2;
36
+ g2 -> g3;
37
+ g3 -> g4;
38
+ g4 -> g5;
39
+ g5 -> g6;
40
+ g6 -> verdict;
41
+ verdict -> go [label="all pass"];
42
+ verdict -> nogo [label="critical blocker"];
43
+ verdict -> conditional [label="non-critical\nwarnings"];
44
+ }
45
+ ```
46
+
47
+ ### Gate 1 — Code Quality
48
+ - [ ] All linting passes (zero errors)
49
+ - [ ] No `TODO`/`FIXME`/`HACK` in files changed since last deploy
50
+ - [ ] No `console.log`/`print`/debug statements in production paths
51
+ - [ ] No commented-out code blocks
52
+ - Run: `catalyst_metrics_complexity` on changed files — flag any high-complexity additions
53
+
54
+ ### Gate 2 — Test Integrity
55
+ - [ ] All tests pass
56
+ - [ ] Test coverage meets minimum threshold
57
+ - [ ] No skipped tests (`.skip`, `@disabled`, `@pytest.mark.skip`)
58
+ - [ ] No test files with zero assertions
59
+ - Run: `catalyst_metrics_coverage` to validate
60
+
61
+ ### Gate 3 — Security
62
+ - [ ] No new vulnerabilities from `vulnerability-scan`
63
+ - [ ] No hardcoded secrets (API keys, passwords, tokens)
64
+ - [ ] Dependencies have no critical CVEs
65
+ - [ ] No `eval()`, `exec()`, `dangerouslySetInnerHTML` without sanitization
66
+ - Run: `terminal` for `npm audit` / `pip audit` / equivalent
67
+
68
+ ### Gate 4 — Configuration
69
+ - [ ] Environment variables documented and present
70
+ - [ ] No development-only configuration in production paths
71
+ - [ ] Database migrations are forward-compatible and reversible
72
+ - [ ] Feature flags set correctly for this deployment
73
+
74
+ ### Gate 5 — Breaking Changes
75
+ - [ ] API contract changes are backward-compatible (or versioned)
76
+ - [ ] Database schema changes are additive (no column drops without migration)
77
+ - [ ] No removed public exports/endpoints without deprecation period
78
+ - [ ] Breaking changes documented in CHANGELOG
79
+
80
+ ### Gate 6 — Operational Readiness
81
+ - [ ] Health check endpoint exists and responds
82
+ - [ ] Logging is adequate for debugging production issues
83
+ - [ ] Error handling returns appropriate HTTP status codes
84
+ - [ ] Rate limiting is configured for public endpoints
85
+
86
+ ### Verdict
87
+
88
+ <HARD-GATE>
89
+ If the verdict is NO-GO, do NOT proceed with deployment, merge, or marking as ready.
90
+ All critical blockers MUST be resolved and gates re-run before proceeding.
91
+ Do NOT downgrade a NO-GO to CONDITIONAL without fixing the underlying issue.
92
+ </HARD-GATE>
93
+
94
+ Produce a clear GO / NO-GO / CONDITIONAL decision:
95
+ - **GO**: All gates pass
96
+ - **CONDITIONAL**: Non-critical issues found — list what to fix or accept
97
+ - **NO-GO**: Critical blocker found — must fix before deployment
98
+
99
+ ## Tools Required
100
+
101
+ - `terminal` — Run tests, linters, audit tools
102
+ - `codebase` — Scan for anti-patterns, secrets, debug statements
103
+ - `catalyst_metrics_coverage` — Coverage report
104
+ - `catalyst_metrics_complexity` — Complexity scores
105
+ - `catalyst_git_diff` — Changes since last deploy/tag
106
+
107
+ ## Output Format
108
+
109
+ ```
110
+ ## [Catalyst → Deploy Guard]
111
+
112
+ ### Gate Results
113
+
114
+ | Gate | Status | Issues |
115
+ |---|---|---|
116
+ | Code Quality | {pass/warn/fail} | {count} |
117
+ | Test Integrity | {pass/warn/fail} | {count} |
118
+ | Security | {pass/warn/fail} | {count} |
119
+ | Configuration | {pass/warn/fail} | {count} |
120
+ | Breaking Changes | {pass/warn/fail} | {count} |
121
+ | Operational Readiness | {pass/warn/fail} | {count} |
122
+
123
+ ### Blockers (if any)
124
+ {critical issues that block deployment}
125
+
126
+ ### Warnings (if any)
127
+ {non-critical issues to be aware of}
128
+
129
+ ### Verdict: {GO / NO-GO / CONDITIONAL}
130
+ {reasoning}
131
+ ```
132
+
133
+ ## Chains To
134
+
135
+ - `vulnerability-scan` — If security gate needs deeper analysis
136
+ - `change-management` — Fix and recommit if issues found
137
+ - `knowledge-base` — Record deployment decision and any exceptions made
138
+
139
+ ## Anti-Patterns
140
+
141
+ - Do NOT always say GO — be honest about risks
142
+ - Do NOT block on style issues — only on functional and security concerns
143
+ - Do NOT check gates that aren't relevant (no DB gate for a pure frontend change)
144
+ - Do NOT skip the verdict — always provide a clear decision
@@ -0,0 +1,130 @@
1
+ # Doc Governance
2
+
3
+ > **Pillar**: Deliver | **ID**: `deliver-doc-governance`
4
+
5
+ ## Purpose
6
+
7
+ Documentation drift detection and synchronization. Ensures READMEs, API docs, and inline documentation stay accurate as code evolves. Treats documentation as a first-class deliverable.
8
+
9
+ ## Activation Triggers
10
+
11
+ - "update docs", "docs are stale", "check documentation"
12
+ - "sync README", "API docs", "documentation drift"
13
+ - Automatically chained after `feature-builder` or `architecture-planner` when public APIs change
14
+
15
+ ## Methodology
16
+
17
+ ### Process Flow
18
+
19
+ ```dot
20
+ digraph doc_governance {
21
+ rankdir=TB;
22
+ node [shape=box];
23
+
24
+ inventory [label="Phase 1\nDocumentation Inventory"];
25
+ drift [label="Phase 2\nDrift Detection"];
26
+ classify [label="Phase 3\nImpact Classification"];
27
+ fix [label="Phase 4\nRemediation"];
28
+ complete [label="Phase 5\nCompleteness Check", shape=doublecircle];
29
+
30
+ inventory -> drift;
31
+ drift -> classify [label="drift found"];
32
+ drift -> complete [label="no drift"];
33
+ classify -> fix;
34
+ fix -> complete;
35
+ }
36
+ ```
37
+
38
+ ### Phase 1 — Documentation Inventory
39
+ 1. Locate all documentation files:
40
+ - `README.md` at root and in subdirectories
41
+ - `docs/` folder content
42
+ - API documentation (OpenAPI/Swagger, JSDoc, docstrings)
43
+ - Inline code comments in public interfaces
44
+ - `CHANGELOG.md`, `CONTRIBUTING.md`
45
+ 2. Map documentation → code relationships
46
+
47
+ ### Phase 2 — Drift Detection
48
+ Compare documentation against current code:
49
+
50
+ | Check | Method |
51
+ |---|---|
52
+ | **API signatures** | Compare documented function signatures vs. actual |
53
+ | **Configuration** | Compare documented env vars/config vs. actual usage |
54
+ | **Installation** | Verify documented install steps still work |
55
+ | **Examples** | Check if code examples still compile/run |
56
+ | **Architecture** | Compare documented structure vs. actual file tree |
57
+ | **Dependencies** | Compare documented requirements vs. actual manifests |
58
+
59
+ For each drift found:
60
+ ```
61
+ DRIFT: {doc file}:{line} — {what's documented} ≠ {what's actual}
62
+ ```
63
+
64
+ ### Phase 3 — Impact Classification
65
+
66
+ | Severity | Criteria |
67
+ |---|---|
68
+ | **Critical** | Wrong API usage instructions — will cause errors for users |
69
+ | **High** | Missing documentation for new public features |
70
+ | **Medium** | Outdated examples, stale screenshots, wrong file paths |
71
+ | **Low** | Minor wording inaccuracies, formatting issues |
72
+
73
+ ### Phase 4 — Remediation
74
+ For each drift:
75
+ 1. Generate the corrected documentation
76
+ 2. Preserve the existing documentation style and voice
77
+ 3. Add/update code examples that are verified to work
78
+ 4. Update any auto-generated content (table of contents, API reference)
79
+
80
+ ### Phase 5 — Completeness Check
81
+ Verify minimum documentation exists:
82
+ - [ ] README with project description, setup, usage
83
+ - [ ] API documentation for all public interfaces
84
+ - [ ] Configuration reference for all env vars/settings
85
+ - [ ] Contributing guide (for open source)
86
+ - [ ] Changelog (if releases are managed)
87
+
88
+ ## Tools Required
89
+
90
+ - `codebase` — Read source code and documentation files
91
+ - `terminal` — Verify install steps, run examples
92
+ - `catalyst_knowledge_search` — Check if documentation decisions were previously recorded
93
+
94
+ ## Output Format
95
+
96
+ ```
97
+ ## [Catalyst → Doc Governance]
98
+
99
+ ### Documentation Map
100
+ | Doc File | Covers | Status |
101
+ |---|---|---|
102
+ | {path} | {what it documents} | {current/stale/missing} |
103
+
104
+ ### Drift Detected
105
+ #### [{severity}] {doc file}:{line}
106
+ **Documented**: {what the doc says}
107
+ **Actual**: {what the code does}
108
+ **Fix**: {corrected content}
109
+
110
+ ---
111
+ (repeat per drift)
112
+
113
+ ### Completeness
114
+ {checklist with status}
115
+
116
+ ### Summary
117
+ {N} drifts found: {critical}/{high}/{medium}/{low}
118
+ ```
119
+
120
+ ## Chains To
121
+
122
+ - `change-management` — Commit documentation updates
123
+ - `architecture-planner` — If architecture docs need major restructuring
124
+
125
+ ## Anti-Patterns
126
+
127
+ - Do NOT rewrite documentation in a different voice/style
128
+ - Do NOT add documentation for internal/private APIs unless asked
129
+ - Do NOT remove valid documentation just because it's verbose
130
+ - Do NOT generate placeholder documentation ("TODO: add docs")