@slamb2k/mad-skills 2.0.6
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/LICENSE +21 -0
- package/README.md +129 -0
- package/package.json +42 -0
- package/skills/brace/SKILL.md +51 -0
- package/skills/brace/assets/gitignore-template +28 -0
- package/skills/brace/assets/global-preferences-template.md +53 -0
- package/skills/brace/instructions.md +229 -0
- package/skills/brace/references/brace-workflow.md +109 -0
- package/skills/brace/references/claude-md-template.md +91 -0
- package/skills/brace/references/gotcha-principles.md +113 -0
- package/skills/brace/references/phase-prompts.md +228 -0
- package/skills/brace/references/report-template.md +38 -0
- package/skills/brace/references/scaffold-manifest.md +68 -0
- package/skills/brace/tests/evals.json +29 -0
- package/skills/build/SKILL.md +48 -0
- package/skills/build/instructions.md +293 -0
- package/skills/build/references/architecture-notes.md +34 -0
- package/skills/build/references/project-detection.md +45 -0
- package/skills/build/references/report-contracts.md +21 -0
- package/skills/build/references/stage-prompts.md +405 -0
- package/skills/build/tests/evals.json +28 -0
- package/skills/distil/SKILL.md +38 -0
- package/skills/distil/assets/DesignNav.tsx +54 -0
- package/skills/distil/instructions.md +255 -0
- package/skills/distil/references/design-guide.md +118 -0
- package/skills/distil/references/iteration-mode.md +186 -0
- package/skills/distil/references/project-setup.md +92 -0
- package/skills/distil/tests/evals.json +28 -0
- package/skills/manifest.json +76 -0
- package/skills/prime/SKILL.md +39 -0
- package/skills/prime/instructions.md +73 -0
- package/skills/prime/references/domains.md +38 -0
- package/skills/prime/tests/evals.json +28 -0
- package/skills/rig/SKILL.md +38 -0
- package/skills/rig/assets/azure-pipelines.yml +91 -0
- package/skills/rig/assets/ci.yml +104 -0
- package/skills/rig/assets/gitmessage +38 -0
- package/skills/rig/assets/lefthook.yml +29 -0
- package/skills/rig/assets/pull_request_template.md +24 -0
- package/skills/rig/instructions.md +162 -0
- package/skills/rig/references/configuration-steps.md +124 -0
- package/skills/rig/references/phase-prompts.md +180 -0
- package/skills/rig/references/report-template.md +28 -0
- package/skills/rig/tests/evals.json +29 -0
- package/skills/ship/SKILL.md +55 -0
- package/skills/ship/instructions.md +192 -0
- package/skills/ship/references/stage-prompts.md +322 -0
- package/skills/ship/tests/evals.json +30 -0
- package/skills/sync/SKILL.md +54 -0
- package/skills/sync/instructions.md +178 -0
- package/skills/sync/tests/evals.json +29 -0
- package/src/cli.js +419 -0
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
# Rig Instructions
|
|
2
|
+
|
|
3
|
+
Idempotently bootstrap repositories with standard development infrastructure.
|
|
4
|
+
Prompts and report schemas are in `references/`. Configuration procedures are
|
|
5
|
+
in `references/configuration-steps.md`.
|
|
6
|
+
|
|
7
|
+
**Key principle:** Prompt user before making changes. Report findings first,
|
|
8
|
+
get approval, then act.
|
|
9
|
+
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
## Pre-flight
|
|
13
|
+
|
|
14
|
+
Before starting, check all dependencies in this table:
|
|
15
|
+
|
|
16
|
+
| Dependency | Type | Check | Required | Resolution | Detail |
|
|
17
|
+
|-----------|------|-------|----------|------------|--------|
|
|
18
|
+
| git | cli | `git --version` | yes | stop | Install from https://git-scm.com |
|
|
19
|
+
| lefthook | npm | `npx lefthook --help` | yes | install | `npm install -g lefthook` |
|
|
20
|
+
| gh | cli | `gh --version` | yes | url | https://cli.github.com |
|
|
21
|
+
|
|
22
|
+
For each row, in order:
|
|
23
|
+
1. Run the Check command (for cli/npm) or test file existence (for agent/skill)
|
|
24
|
+
2. If found: continue silently
|
|
25
|
+
3. If missing: apply Resolution strategy
|
|
26
|
+
- **stop**: notify user with Detail, halt execution
|
|
27
|
+
- **url**: notify user with Detail (install link), halt execution
|
|
28
|
+
- **install**: notify user, run the command in Detail, continue if successful
|
|
29
|
+
- **ask**: notify user, offer to run command in Detail, continue either way (or halt if required)
|
|
30
|
+
- **fallback**: notify user with Detail, continue with degraded behavior
|
|
31
|
+
4. After all checks: summarize what's available and what's degraded
|
|
32
|
+
|
|
33
|
+
---
|
|
34
|
+
|
|
35
|
+
## Phase 1: System Requirements Check
|
|
36
|
+
|
|
37
|
+
Launch **Bash subagent** (haiku — simple checks):
|
|
38
|
+
|
|
39
|
+
```
|
|
40
|
+
Task(
|
|
41
|
+
subagent_type: "Bash",
|
|
42
|
+
model: "haiku",
|
|
43
|
+
description: "Check system requirements",
|
|
44
|
+
prompt: <read from references/phase-prompts.md#phase-1>
|
|
45
|
+
)
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
Parse SYSTEM_REPORT. If any requirement fails, use **AskUserQuestion**:
|
|
49
|
+
|
|
50
|
+
Options for missing git config:
|
|
51
|
+
- "I'll configure it manually"
|
|
52
|
+
- "Configure for me with: [email] / [name]"
|
|
53
|
+
|
|
54
|
+
**Stop if user chooses manual. Configure if values provided.**
|
|
55
|
+
|
|
56
|
+
---
|
|
57
|
+
|
|
58
|
+
## Phase 2: Repository Analysis
|
|
59
|
+
|
|
60
|
+
Launch **Bash subagent** (haiku):
|
|
61
|
+
|
|
62
|
+
```
|
|
63
|
+
Task(
|
|
64
|
+
subagent_type: "Bash",
|
|
65
|
+
model: "haiku",
|
|
66
|
+
description: "Analyze repository",
|
|
67
|
+
prompt: <read from references/phase-prompts.md#phase-2>
|
|
68
|
+
)
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
Parse REPO_REPORT.
|
|
72
|
+
|
|
73
|
+
---
|
|
74
|
+
|
|
75
|
+
## Phase 3: Present Findings & Get Approval
|
|
76
|
+
|
|
77
|
+
Present analysis to user with **AskUserQuestion**:
|
|
78
|
+
|
|
79
|
+
```
|
|
80
|
+
Repository Analysis Complete
|
|
81
|
+
|
|
82
|
+
Current State:
|
|
83
|
+
Git initialized: {status}
|
|
84
|
+
Branch: {branch}
|
|
85
|
+
Lefthook: {status}
|
|
86
|
+
Commit template: {status}
|
|
87
|
+
PR template: {status}
|
|
88
|
+
CI workflow: {status}
|
|
89
|
+
{if azdo and unregistered_pipelines:}
|
|
90
|
+
Azure Pipelines: {N} YAML file(s) found, {M} not yet registered
|
|
91
|
+
|
|
92
|
+
Detected Stack:
|
|
93
|
+
Type: {project_type}
|
|
94
|
+
Components: {detected_components}
|
|
95
|
+
Available scripts: {available_scripts}
|
|
96
|
+
|
|
97
|
+
Proposed Changes:
|
|
98
|
+
{numbered list of what will be added/configured}
|
|
99
|
+
{if azdo and unregistered_pipelines: "Register Azure Pipelines: {list of YAML paths}"}
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
Options:
|
|
103
|
+
- "Yes, configure everything"
|
|
104
|
+
- "Let me choose what to configure"
|
|
105
|
+
- "Cancel"
|
|
106
|
+
|
|
107
|
+
If "Let me choose", present individual options as multi-select.
|
|
108
|
+
|
|
109
|
+
---
|
|
110
|
+
|
|
111
|
+
## Phase 4: Execute Configuration
|
|
112
|
+
|
|
113
|
+
For each approved item, follow the procedures in
|
|
114
|
+
`references/configuration-steps.md`.
|
|
115
|
+
|
|
116
|
+
---
|
|
117
|
+
|
|
118
|
+
## Phase 5: Verification
|
|
119
|
+
|
|
120
|
+
Launch **Bash subagent** (haiku):
|
|
121
|
+
|
|
122
|
+
```
|
|
123
|
+
Task(
|
|
124
|
+
subagent_type: "Bash",
|
|
125
|
+
model: "haiku",
|
|
126
|
+
description: "Verify configuration",
|
|
127
|
+
prompt: <read from references/phase-prompts.md#phase-5>
|
|
128
|
+
)
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
Parse VERIFY_REPORT.
|
|
132
|
+
|
|
133
|
+
---
|
|
134
|
+
|
|
135
|
+
## Phase 6: Final Report
|
|
136
|
+
|
|
137
|
+
Present summary using the template in `references/report-template.md`.
|
|
138
|
+
|
|
139
|
+
---
|
|
140
|
+
|
|
141
|
+
## Idempotency Rules
|
|
142
|
+
|
|
143
|
+
- **Skip** items already correctly configured
|
|
144
|
+
- **Update** items that exist but are outdated (prompt user first)
|
|
145
|
+
- **Add** items that are missing
|
|
146
|
+
- **Never delete** user's existing configuration without explicit approval
|
|
147
|
+
- **Merge** rather than replace when possible (e.g., add missing hooks)
|
|
148
|
+
|
|
149
|
+
---
|
|
150
|
+
|
|
151
|
+
## Error Handling
|
|
152
|
+
|
|
153
|
+
If any step fails:
|
|
154
|
+
1. Report the specific failure
|
|
155
|
+
2. Offer to skip and continue, or abort
|
|
156
|
+
3. Include troubleshooting suggestions
|
|
157
|
+
|
|
158
|
+
Common issues:
|
|
159
|
+
- No package manager -> suggest installing npm/bun
|
|
160
|
+
- Permission denied -> check file permissions
|
|
161
|
+
- Lefthook install fails -> try global install
|
|
162
|
+
- Git not initialized -> offer to initialize
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
# Rig Configuration Steps
|
|
2
|
+
|
|
3
|
+
Procedural reference for Phase 4 — execute each approved item.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## 4a: Git Init (if needed)
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
git init
|
|
11
|
+
git checkout -b main
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
## 4b: Install Lefthook (if needed)
|
|
15
|
+
|
|
16
|
+
Detect package manager and install:
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
# Node projects
|
|
20
|
+
npm install --save-dev lefthook || bun add -d lefthook || yarn add -D lefthook || pnpm add -D lefthook
|
|
21
|
+
|
|
22
|
+
# Or global install
|
|
23
|
+
npm install -g lefthook
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
## 4c: Configure Lefthook
|
|
27
|
+
|
|
28
|
+
Read template from: `~/.claude/skills/rig/assets/lefthook.yml`
|
|
29
|
+
|
|
30
|
+
Customize based on detected scripts:
|
|
31
|
+
- If `lint` script exists -> use `npm run lint`
|
|
32
|
+
- If `format:check` script exists -> use `npm run format:check`
|
|
33
|
+
- If `typecheck` or `type-check` exists -> use that
|
|
34
|
+
- If `test` or `test:unit` exists -> use for pre-push
|
|
35
|
+
|
|
36
|
+
Write customized `lefthook.yml` to repo root.
|
|
37
|
+
|
|
38
|
+
Run: `lefthook install`
|
|
39
|
+
|
|
40
|
+
## 4d: Commit Template
|
|
41
|
+
|
|
42
|
+
Read template from: `~/.claude/skills/rig/assets/gitmessage`
|
|
43
|
+
|
|
44
|
+
Write to `.gitmessage` in repo root.
|
|
45
|
+
|
|
46
|
+
Configure git: `git config commit.template .gitmessage`
|
|
47
|
+
|
|
48
|
+
## 4e: PR Template
|
|
49
|
+
|
|
50
|
+
Read template from: `~/.claude/skills/rig/assets/pull_request_template.md`
|
|
51
|
+
|
|
52
|
+
Detect platform from remote URL (same pattern as ship skill):
|
|
53
|
+
```bash
|
|
54
|
+
REMOTE_URL=$(git remote get-url origin 2>/dev/null)
|
|
55
|
+
if echo "$REMOTE_URL" | grep -qiE 'dev\.azure\.com|visualstudio\.com'; then
|
|
56
|
+
PLATFORM="azdo"
|
|
57
|
+
else
|
|
58
|
+
PLATFORM="github"
|
|
59
|
+
fi
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
**If PLATFORM == github:**
|
|
63
|
+
Create `.github/` directory if needed.
|
|
64
|
+
Write to `.github/pull_request_template.md`
|
|
65
|
+
|
|
66
|
+
**If PLATFORM == azdo:**
|
|
67
|
+
Create `.azuredevops/` directory if needed.
|
|
68
|
+
Write to `.azuredevops/pull_request_template.md`
|
|
69
|
+
(Azure DevOps also supports root-level `pull_request_template.md`)
|
|
70
|
+
|
|
71
|
+
## 4f: CI Workflow
|
|
72
|
+
|
|
73
|
+
Customize based on project:
|
|
74
|
+
- Set correct package manager (npm/bun/yarn/pnpm)
|
|
75
|
+
- Add build steps for detected components
|
|
76
|
+
- Configure test jobs appropriately
|
|
77
|
+
|
|
78
|
+
**If PLATFORM == github:**
|
|
79
|
+
Read template from: `~/.claude/skills/rig/assets/ci.yml`
|
|
80
|
+
Create `.github/workflows/` directory if needed.
|
|
81
|
+
Write customized workflow to `.github/workflows/ci.yml`
|
|
82
|
+
|
|
83
|
+
**If PLATFORM == azdo:**
|
|
84
|
+
Read template from: `~/.claude/skills/rig/assets/azure-pipelines.yml`
|
|
85
|
+
Write customized pipeline to `azure-pipelines.yml` (repo root)
|
|
86
|
+
|
|
87
|
+
## 4g: Register Azure Pipelines (azdo only, if approved)
|
|
88
|
+
|
|
89
|
+
For each unregistered pipeline YAML file discovered in Phase 2, create the
|
|
90
|
+
pipeline in Azure DevOps. Only runs if the user approved this in Phase 3.
|
|
91
|
+
|
|
92
|
+
**Prerequisites:** `az devops` extension installed and configured with
|
|
93
|
+
`az devops configure --defaults organization=... project=...`.
|
|
94
|
+
If `az pipelines` commands fail, report the setup requirement and skip.
|
|
95
|
+
|
|
96
|
+
```bash
|
|
97
|
+
# Derive a pipeline name from the YAML filename
|
|
98
|
+
# azure-pipelines.yml -> "CI" (default)
|
|
99
|
+
# build.azure-pipelines.yml -> "Build"
|
|
100
|
+
# deploy.azure-pipelines.yml -> "Deploy"
|
|
101
|
+
YAML_PATH="azure-pipelines.yml" # each discovered file
|
|
102
|
+
PIPELINE_NAME="CI" # derived from filename, or ask user
|
|
103
|
+
|
|
104
|
+
# Get the repo name from the remote URL
|
|
105
|
+
REPO_NAME=$(basename -s .git "$(git remote get-url origin)")
|
|
106
|
+
|
|
107
|
+
az pipelines create \
|
|
108
|
+
--name "$PIPELINE_NAME" \
|
|
109
|
+
--yaml-path "$YAML_PATH" \
|
|
110
|
+
--repository "$REPO_NAME" \
|
|
111
|
+
--repository-type tfsgit \
|
|
112
|
+
--branch main \
|
|
113
|
+
--skip-first-run
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
**Naming convention:**
|
|
117
|
+
- `azure-pipelines.yml` -> pipeline name: `"CI"`
|
|
118
|
+
- `<name>.azure-pipelines.yml` -> pipeline name: capitalize `<name>`
|
|
119
|
+
- If the user chose a custom name in Phase 3, use that instead
|
|
120
|
+
|
|
121
|
+
**Error handling:**
|
|
122
|
+
- If `az pipelines create` fails with auth error -> report: `az login` required
|
|
123
|
+
- If it fails with "already exists" -> skip (idempotent)
|
|
124
|
+
- If `az devops` extension not installed -> report and skip
|
|
@@ -0,0 +1,180 @@
|
|
|
1
|
+
# Rig Phase Prompts
|
|
2
|
+
|
|
3
|
+
Subagent prompts for system check, repo analysis, and verification phases.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Phase 1: System Requirements Check
|
|
8
|
+
|
|
9
|
+
**Agent:** Bash (haiku)
|
|
10
|
+
|
|
11
|
+
```
|
|
12
|
+
Check system requirements for repository bootstrapping.
|
|
13
|
+
|
|
14
|
+
Limit SYSTEM_REPORT to 10 lines maximum.
|
|
15
|
+
|
|
16
|
+
## Checks
|
|
17
|
+
|
|
18
|
+
1. **Git installed**
|
|
19
|
+
git --version
|
|
20
|
+
Record: git_installed, git_version
|
|
21
|
+
|
|
22
|
+
2. **Git global config**
|
|
23
|
+
git config --global user.email
|
|
24
|
+
git config --global user.name
|
|
25
|
+
Record: email_configured, name_configured, email_value, name_value
|
|
26
|
+
|
|
27
|
+
## Output Format
|
|
28
|
+
|
|
29
|
+
SYSTEM_REPORT:
|
|
30
|
+
- git_installed: true|false
|
|
31
|
+
- git_version: {version}
|
|
32
|
+
- email_configured: true|false
|
|
33
|
+
- email_value: {email or "not set"}
|
|
34
|
+
- name_configured: true|false
|
|
35
|
+
- name_value: {name or "not set"}
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
---
|
|
39
|
+
|
|
40
|
+
## Phase 2: Repository Analysis
|
|
41
|
+
|
|
42
|
+
**Agent:** Bash (haiku)
|
|
43
|
+
|
|
44
|
+
```
|
|
45
|
+
Analyze repository structure and current configuration.
|
|
46
|
+
|
|
47
|
+
Limit REPO_REPORT to 20 lines maximum.
|
|
48
|
+
|
|
49
|
+
## Checks
|
|
50
|
+
|
|
51
|
+
1. **Git initialization**
|
|
52
|
+
[ -d .git ] && echo "initialized" || echo "not initialized"
|
|
53
|
+
Record: git_initialized
|
|
54
|
+
|
|
55
|
+
2. **Branch name** (if initialized)
|
|
56
|
+
git branch --show-current 2>/dev/null || git symbolic-ref --short HEAD 2>/dev/null
|
|
57
|
+
Record: current_branch, is_main=(branch == "main")
|
|
58
|
+
|
|
59
|
+
3. **Lefthook**
|
|
60
|
+
command -v lefthook >/dev/null && echo "installed" || echo "not installed"
|
|
61
|
+
[ -f lefthook.yml ] && echo "configured" || echo "not configured"
|
|
62
|
+
Record: lefthook_installed, lefthook_configured
|
|
63
|
+
|
|
64
|
+
4. **Commit template**
|
|
65
|
+
[ -f .gitmessage ] && echo "exists" || echo "missing"
|
|
66
|
+
git config commit.template 2>/dev/null
|
|
67
|
+
Record: commit_template_exists, commit_template_configured
|
|
68
|
+
|
|
69
|
+
5. **Platform detection**
|
|
70
|
+
REMOTE_URL=$(git remote get-url origin 2>/dev/null)
|
|
71
|
+
if echo "$REMOTE_URL" | grep -qiE 'dev\.azure\.com|visualstudio\.com'; then
|
|
72
|
+
PLATFORM="azdo"
|
|
73
|
+
elif echo "$REMOTE_URL" | grep -qi 'github\.com'; then
|
|
74
|
+
PLATFORM="github"
|
|
75
|
+
else
|
|
76
|
+
PLATFORM="github"
|
|
77
|
+
fi
|
|
78
|
+
Record: platform
|
|
79
|
+
|
|
80
|
+
6. **PR template**
|
|
81
|
+
If PLATFORM == github:
|
|
82
|
+
[ -f .github/pull_request_template.md ] && echo "exists" || echo "missing"
|
|
83
|
+
If PLATFORM == azdo:
|
|
84
|
+
([ -f .azuredevops/pull_request_template.md ] || [ -f pull_request_template.md ]) && echo "exists" || echo "missing"
|
|
85
|
+
Record: pr_template_exists
|
|
86
|
+
|
|
87
|
+
7. **CI workflow**
|
|
88
|
+
If PLATFORM == github:
|
|
89
|
+
[ -f .github/workflows/ci.yml ] && echo "exists" || echo "missing"
|
|
90
|
+
If PLATFORM == azdo:
|
|
91
|
+
[ -f azure-pipelines.yml ] && echo "exists" || echo "missing"
|
|
92
|
+
Record: ci_workflow_exists
|
|
93
|
+
|
|
94
|
+
8. **Azure pipeline YAML files** (if PLATFORM == azdo)
|
|
95
|
+
Find pipeline YAML files in the repo:
|
|
96
|
+
```
|
|
97
|
+
find . -maxdepth 3 \( -name "azure-pipelines.yml" -o -name "*.azure-pipelines.yml" \) -not -path "./.git/*" 2>/dev/null
|
|
98
|
+
```
|
|
99
|
+
For each file found, check if a matching pipeline already exists in Azure DevOps:
|
|
100
|
+
```
|
|
101
|
+
az pipelines list --query "[].{name:name, path:process.yamlFilename}" -o tsv 2>/dev/null
|
|
102
|
+
```
|
|
103
|
+
Record: pipeline_yaml_files, existing_pipelines
|
|
104
|
+
|
|
105
|
+
9. **Project structure**
|
|
106
|
+
ls package.json 2>/dev/null && echo "has_package_json"
|
|
107
|
+
ls requirements.txt pyproject.toml setup.py 2>/dev/null && echo "has_python"
|
|
108
|
+
ls go.mod 2>/dev/null && echo "has_go"
|
|
109
|
+
ls Cargo.toml 2>/dev/null && echo "has_rust"
|
|
110
|
+
Find frontend dirs: src/components, frontend/, client/, app/
|
|
111
|
+
Find backend dirs: src/api, backend/, server/, api/
|
|
112
|
+
Record: project_type, has_frontend, has_backend, detected_components
|
|
113
|
+
|
|
114
|
+
9. **Existing scripts** (for hook configuration)
|
|
115
|
+
Parse package.json scripts if exists: lint, format, format:check, typecheck, type-check, test
|
|
116
|
+
Record: available_scripts
|
|
117
|
+
|
|
118
|
+
## Output Format
|
|
119
|
+
|
|
120
|
+
REPO_REPORT:
|
|
121
|
+
- git_initialized: true|false
|
|
122
|
+
- current_branch: {branch or "N/A"}
|
|
123
|
+
- is_main_branch: true|false
|
|
124
|
+
- platform: github|azdo
|
|
125
|
+
- lefthook_installed: true|false
|
|
126
|
+
- lefthook_configured: true|false
|
|
127
|
+
- commit_template_exists: true|false
|
|
128
|
+
- commit_template_configured: true|false
|
|
129
|
+
- pr_template_exists: true|false
|
|
130
|
+
- ci_workflow_exists: true|false
|
|
131
|
+
- pipeline_yaml_files: [list of paths, or "none"] (azdo only)
|
|
132
|
+
- existing_pipelines: [list of registered pipeline names, or "none"] (azdo only)
|
|
133
|
+
- unregistered_pipelines: [pipeline YAMLs not yet registered, or "none"] (azdo only)
|
|
134
|
+
- project_type: node|python|go|rust|unknown
|
|
135
|
+
- has_frontend: true|false
|
|
136
|
+
- has_backend: true|false
|
|
137
|
+
- detected_components: [list]
|
|
138
|
+
- available_scripts: {scripts from package.json}
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
---
|
|
142
|
+
|
|
143
|
+
## Phase 5: Verification
|
|
144
|
+
|
|
145
|
+
**Agent:** Bash (haiku)
|
|
146
|
+
|
|
147
|
+
```
|
|
148
|
+
Verify rig configuration was applied correctly.
|
|
149
|
+
|
|
150
|
+
Limit VERIFY_REPORT to 10 lines maximum.
|
|
151
|
+
|
|
152
|
+
## Checks
|
|
153
|
+
|
|
154
|
+
1. Test lefthook
|
|
155
|
+
lefthook run pre-commit --dry-run 2>&1
|
|
156
|
+
|
|
157
|
+
2. Verify files exist
|
|
158
|
+
Detect platform from remote URL (same pattern as Phase 2).
|
|
159
|
+
If PLATFORM == github:
|
|
160
|
+
ls -la .gitmessage lefthook.yml .github/pull_request_template.md .github/workflows/ci.yml
|
|
161
|
+
If PLATFORM == azdo:
|
|
162
|
+
ls -la .gitmessage lefthook.yml .azuredevops/pull_request_template.md azure-pipelines.yml
|
|
163
|
+
(Also check root-level pull_request_template.md as fallback)
|
|
164
|
+
|
|
165
|
+
3. Check git config
|
|
166
|
+
git config --local commit.template
|
|
167
|
+
|
|
168
|
+
4. Verify Azure Pipelines registered (if PLATFORM == azdo and pipelines were created in Phase 4)
|
|
169
|
+
az pipelines list --query "[].{name:name, id:id}" -o table 2>/dev/null
|
|
170
|
+
Record: registered_pipelines
|
|
171
|
+
|
|
172
|
+
## Output Format
|
|
173
|
+
|
|
174
|
+
VERIFY_REPORT:
|
|
175
|
+
- lefthook_working: true|false
|
|
176
|
+
- lefthook_error: {error if any}
|
|
177
|
+
- files_created: [list]
|
|
178
|
+
- git_config_set: true|false
|
|
179
|
+
- registered_pipelines: [list of pipeline names, or "N/A"] (azdo only)
|
|
180
|
+
```
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# Rig Final Report Template
|
|
2
|
+
|
|
3
|
+
Present this summary after all configuration is complete:
|
|
4
|
+
|
|
5
|
+
```
|
|
6
|
+
Rig Complete!
|
|
7
|
+
|
|
8
|
+
Repository: {repo_name}
|
|
9
|
+
Branch: {branch}
|
|
10
|
+
|
|
11
|
+
Configured:
|
|
12
|
+
{status} Lefthook installed and configured
|
|
13
|
+
{status} Pre-commit hooks: {list of hooks}
|
|
14
|
+
{status} Pre-push hooks: {list of hooks}
|
|
15
|
+
{status} Commit template: .gitmessage
|
|
16
|
+
{status} PR template: {.github/pull_request_template.md | .azuredevops/pull_request_template.md}
|
|
17
|
+
{status} CI workflow: {.github/workflows/ci.yml | azure-pipelines.yml}
|
|
18
|
+
{if azdo and pipelines registered:}
|
|
19
|
+
{status} Azure Pipelines registered: {list of pipeline names}
|
|
20
|
+
|
|
21
|
+
Notes:
|
|
22
|
+
{any warnings, e.g., "Branch is 'master', consider renaming to 'main'"}
|
|
23
|
+
|
|
24
|
+
Next steps:
|
|
25
|
+
1. Review generated files and commit them
|
|
26
|
+
2. Push to remote to activate CI
|
|
27
|
+
3. Test hooks with: lefthook run pre-commit
|
|
28
|
+
```
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
[
|
|
2
|
+
{
|
|
3
|
+
"name": "banner-and-tagline",
|
|
4
|
+
"prompt": "Bootstrap this repo with standard tools",
|
|
5
|
+
"assertions": [
|
|
6
|
+
{ "type": "contains", "value": "██" },
|
|
7
|
+
{ "type": "regex", "value": "(Rigging up|Bolting down|Assembling the|Hoisting the|Locking in|Wiring up|Setting up the drill|blueprint to build)" },
|
|
8
|
+
{ "type": "semantic", "value": "The response begins with an ASCII art banner displayed BEFORE any explanation or workflow steps" }
|
|
9
|
+
]
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
"name": "tooling-awareness",
|
|
13
|
+
"prompt": "Set up hooks and CI for this project",
|
|
14
|
+
"assertions": [
|
|
15
|
+
{ "type": "contains", "value": "██" },
|
|
16
|
+
{ "type": "regex", "value": "lefthook", "flags": "i" },
|
|
17
|
+
{ "type": "regex", "value": "(GitHub Actions|CI|workflow)", "flags": "i" },
|
|
18
|
+
{ "type": "semantic", "value": "Describes setting up git hooks (via lefthook), commit templates, PR templates, and GitHub Actions workflows for lint/format/type-check/build" }
|
|
19
|
+
]
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
"name": "idempotency-and-confirmation",
|
|
23
|
+
"prompt": "Rig my repository",
|
|
24
|
+
"assertions": [
|
|
25
|
+
{ "type": "contains", "value": "██" },
|
|
26
|
+
{ "type": "semantic", "value": "Mentions that the process is idempotent (safe to run multiple times) and will prompt the user for confirmation before making changes" }
|
|
27
|
+
]
|
|
28
|
+
}
|
|
29
|
+
]
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: ship
|
|
3
|
+
description: >
|
|
4
|
+
Ship changes through the full PR lifecycle. Use after completing feature work
|
|
5
|
+
to commit, push, create PR, wait for checks, and merge. Handles the entire
|
|
6
|
+
workflow: syncs with main, creates feature branch if needed, groups commits
|
|
7
|
+
logically with semantic messages, creates detailed PR, monitors CI, fixes
|
|
8
|
+
issues, squash merges, and cleans up. Invoke when work is ready to ship.
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
# Ship - Full PR Lifecycle
|
|
12
|
+
|
|
13
|
+
When this skill is invoked, IMMEDIATELY output the banner below before doing anything else.
|
|
14
|
+
Pick ONE tagline at random — vary your choice each time:
|
|
15
|
+
|
|
16
|
+
```
|
|
17
|
+
{tagline}
|
|
18
|
+
|
|
19
|
+
██╗███████╗██╗ ██╗██╗██████╗
|
|
20
|
+
██╔╝██╔════╝██║ ██║██║██╔══██╗
|
|
21
|
+
██╔╝ ███████╗███████║██║██████╔╝
|
|
22
|
+
██╔╝ ╚════██║██╔══██║██║██╔═══╝
|
|
23
|
+
██╔╝ ███████║██║ ██║██║██║
|
|
24
|
+
╚═╝ ╚══════╝╚═╝ ╚═╝╚═╝╚═╝
|
|
25
|
+
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
Taglines:
|
|
29
|
+
- 🚚 Special delivery!!!
|
|
30
|
+
- 📦 If it compiles, it ships!
|
|
31
|
+
- 🚢 Anchors aweigh!
|
|
32
|
+
- 🙏 git push and pray!
|
|
33
|
+
- ⚡ Shipping faster than Amazon Prime!
|
|
34
|
+
- 🏀 Yeet the code into production!
|
|
35
|
+
- 📬 Another one for the merge queue!
|
|
36
|
+
- 🟢 LGTM — Let's Get This Merged!
|
|
37
|
+
|
|
38
|
+
Follow instructions in: [instructions.md](instructions.md)
|
|
39
|
+
|
|
40
|
+
## Subagent Architecture
|
|
41
|
+
|
|
42
|
+
All work runs in subagents to keep the primary conversation context clean:
|
|
43
|
+
|
|
44
|
+
| Stage | Agent Type | Model | Purpose |
|
|
45
|
+
|-------|-----------|-------|---------|
|
|
46
|
+
| Sync | Bash | haiku | Git sync (cheap, fast) |
|
|
47
|
+
| Ship | ship-analyzer | sonnet | Analyze code, commit, push, create PR |
|
|
48
|
+
| CI | Bash (background) | haiku | Poll checks without blocking |
|
|
49
|
+
| Fix CI | general-purpose | default | Read code, fix failures |
|
|
50
|
+
| Land | Bash | haiku | Merge + final sync |
|
|
51
|
+
|
|
52
|
+
The `ship-analyzer` custom agent (`~/.claude/agents/ship-analyzer.md`) reads
|
|
53
|
+
source files to write meaningful commit messages and PR descriptions.
|
|
54
|
+
Falls back to `general-purpose` if not installed.
|
|
55
|
+
|