@qball-inc/the-bulwark 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/.claude-plugin/plugin.json +43 -0
- package/agents/bulwark-fix-validator.md +633 -0
- package/agents/bulwark-implementer.md +391 -0
- package/agents/bulwark-issue-analyzer.md +308 -0
- package/agents/bulwark-standards-reviewer.md +221 -0
- package/agents/plan-creation-architect.md +323 -0
- package/agents/plan-creation-eng-lead.md +352 -0
- package/agents/plan-creation-po.md +300 -0
- package/agents/plan-creation-qa-critic.md +334 -0
- package/agents/product-ideation-competitive-analyzer.md +298 -0
- package/agents/product-ideation-idea-validator.md +268 -0
- package/agents/product-ideation-market-researcher.md +292 -0
- package/agents/product-ideation-pattern-documenter.md +308 -0
- package/agents/product-ideation-segment-analyzer.md +303 -0
- package/agents/product-ideation-strategist.md +259 -0
- package/agents/statusline-setup.md +97 -0
- package/hooks/hooks.json +59 -0
- package/package.json +45 -0
- package/scripts/hooks/cleanup-stale.sh +13 -0
- package/scripts/hooks/enforce-quality.sh +166 -0
- package/scripts/hooks/implementer-quality.sh +256 -0
- package/scripts/hooks/inject-protocol.sh +52 -0
- package/scripts/hooks/suggest-pipeline.sh +175 -0
- package/scripts/hooks/track-pipeline-start.sh +37 -0
- package/scripts/hooks/track-pipeline-stop.sh +52 -0
- package/scripts/init-rules.sh +35 -0
- package/scripts/init.sh +151 -0
- package/skills/anthropic-validator/SKILL.md +607 -0
- package/skills/anthropic-validator/references/agents-checklist.md +131 -0
- package/skills/anthropic-validator/references/commands-checklist.md +102 -0
- package/skills/anthropic-validator/references/hooks-checklist.md +151 -0
- package/skills/anthropic-validator/references/mcp-checklist.md +136 -0
- package/skills/anthropic-validator/references/plugins-checklist.md +148 -0
- package/skills/anthropic-validator/references/skills-checklist.md +85 -0
- package/skills/assertion-patterns/SKILL.md +296 -0
- package/skills/bug-magnet-data/SKILL.md +284 -0
- package/skills/bug-magnet-data/context/cli-args.md +91 -0
- package/skills/bug-magnet-data/context/db-query.md +104 -0
- package/skills/bug-magnet-data/context/file-contents.md +103 -0
- package/skills/bug-magnet-data/context/http-body.md +91 -0
- package/skills/bug-magnet-data/context/process-spawn.md +123 -0
- package/skills/bug-magnet-data/data/booleans/boundaries.yaml +143 -0
- package/skills/bug-magnet-data/data/collections/arrays.yaml +114 -0
- package/skills/bug-magnet-data/data/collections/objects.yaml +123 -0
- package/skills/bug-magnet-data/data/concurrency/race-conditions.yaml +118 -0
- package/skills/bug-magnet-data/data/concurrency/state-machines.yaml +115 -0
- package/skills/bug-magnet-data/data/dates/boundaries.yaml +137 -0
- package/skills/bug-magnet-data/data/dates/invalid.yaml +132 -0
- package/skills/bug-magnet-data/data/dates/timezone.yaml +118 -0
- package/skills/bug-magnet-data/data/encoding/charset.yaml +79 -0
- package/skills/bug-magnet-data/data/encoding/normalization.yaml +105 -0
- package/skills/bug-magnet-data/data/formats/email.yaml +154 -0
- package/skills/bug-magnet-data/data/formats/json.yaml +187 -0
- package/skills/bug-magnet-data/data/formats/url.yaml +165 -0
- package/skills/bug-magnet-data/data/language-specific/javascript.yaml +182 -0
- package/skills/bug-magnet-data/data/language-specific/python.yaml +174 -0
- package/skills/bug-magnet-data/data/language-specific/rust.yaml +148 -0
- package/skills/bug-magnet-data/data/numbers/boundaries.yaml +161 -0
- package/skills/bug-magnet-data/data/numbers/precision.yaml +89 -0
- package/skills/bug-magnet-data/data/numbers/special.yaml +69 -0
- package/skills/bug-magnet-data/data/strings/boundaries.yaml +109 -0
- package/skills/bug-magnet-data/data/strings/injection.yaml +208 -0
- package/skills/bug-magnet-data/data/strings/special-chars.yaml +190 -0
- package/skills/bug-magnet-data/data/strings/unicode.yaml +139 -0
- package/skills/bug-magnet-data/references/external-lists.md +115 -0
- package/skills/bulwark-brainstorm/SKILL.md +563 -0
- package/skills/bulwark-brainstorm/references/at-teammate-prompts.md +60 -0
- package/skills/bulwark-brainstorm/references/role-critical-analyst.md +78 -0
- package/skills/bulwark-brainstorm/references/role-development-lead.md +66 -0
- package/skills/bulwark-brainstorm/references/role-product-delivery-lead.md +79 -0
- package/skills/bulwark-brainstorm/references/role-product-manager.md +62 -0
- package/skills/bulwark-brainstorm/references/role-project-sme.md +59 -0
- package/skills/bulwark-brainstorm/references/role-technical-architect.md +66 -0
- package/skills/bulwark-research/SKILL.md +298 -0
- package/skills/bulwark-research/references/viewpoint-contrarian.md +63 -0
- package/skills/bulwark-research/references/viewpoint-direct-investigation.md +62 -0
- package/skills/bulwark-research/references/viewpoint-first-principles.md +65 -0
- package/skills/bulwark-research/references/viewpoint-practitioner.md +62 -0
- package/skills/bulwark-research/references/viewpoint-prior-art.md +66 -0
- package/skills/bulwark-scaffold/SKILL.md +330 -0
- package/skills/bulwark-statusline/SKILL.md +161 -0
- package/skills/bulwark-statusline/scripts/statusline.sh +144 -0
- package/skills/bulwark-verify/SKILL.md +519 -0
- package/skills/code-review/SKILL.md +428 -0
- package/skills/code-review/examples/anti-patterns/linting.ts +181 -0
- package/skills/code-review/examples/anti-patterns/security.ts +91 -0
- package/skills/code-review/examples/anti-patterns/standards.ts +195 -0
- package/skills/code-review/examples/anti-patterns/type-safety.ts +108 -0
- package/skills/code-review/examples/recommended/linting.ts +195 -0
- package/skills/code-review/examples/recommended/security.ts +154 -0
- package/skills/code-review/examples/recommended/standards.ts +231 -0
- package/skills/code-review/examples/recommended/type-safety.ts +181 -0
- package/skills/code-review/frameworks/angular.md +218 -0
- package/skills/code-review/frameworks/django.md +235 -0
- package/skills/code-review/frameworks/express.md +207 -0
- package/skills/code-review/frameworks/flask.md +298 -0
- package/skills/code-review/frameworks/generic.md +146 -0
- package/skills/code-review/frameworks/react.md +152 -0
- package/skills/code-review/frameworks/vue.md +244 -0
- package/skills/code-review/references/linting-patterns.md +221 -0
- package/skills/code-review/references/security-patterns.md +125 -0
- package/skills/code-review/references/standards-patterns.md +246 -0
- package/skills/code-review/references/type-safety-patterns.md +130 -0
- package/skills/component-patterns/SKILL.md +131 -0
- package/skills/component-patterns/references/pattern-cli-command.md +118 -0
- package/skills/component-patterns/references/pattern-database.md +166 -0
- package/skills/component-patterns/references/pattern-external-api.md +139 -0
- package/skills/component-patterns/references/pattern-file-parser.md +168 -0
- package/skills/component-patterns/references/pattern-http-server.md +162 -0
- package/skills/component-patterns/references/pattern-process-spawner.md +133 -0
- package/skills/continuous-feedback/SKILL.md +327 -0
- package/skills/continuous-feedback/references/collect-instructions.md +81 -0
- package/skills/continuous-feedback/references/specialize-code-review.md +82 -0
- package/skills/continuous-feedback/references/specialize-general.md +98 -0
- package/skills/continuous-feedback/references/specialize-test-audit.md +81 -0
- package/skills/create-skill/SKILL.md +359 -0
- package/skills/create-skill/references/agent-conventions.md +194 -0
- package/skills/create-skill/references/agent-template.md +195 -0
- package/skills/create-skill/references/content-guidance.md +291 -0
- package/skills/create-skill/references/decision-framework.md +124 -0
- package/skills/create-skill/references/template-pipeline.md +217 -0
- package/skills/create-skill/references/template-reference-heavy.md +111 -0
- package/skills/create-skill/references/template-research.md +210 -0
- package/skills/create-skill/references/template-script-driven.md +172 -0
- package/skills/create-skill/references/template-simple.md +80 -0
- package/skills/create-subagent/SKILL.md +353 -0
- package/skills/create-subagent/references/agent-conventions.md +268 -0
- package/skills/create-subagent/references/content-guidance.md +232 -0
- package/skills/create-subagent/references/decision-framework.md +134 -0
- package/skills/create-subagent/references/template-single-agent.md +192 -0
- package/skills/fix-bug/SKILL.md +241 -0
- package/skills/governance-protocol/SKILL.md +116 -0
- package/skills/init/SKILL.md +341 -0
- package/skills/issue-debugging/SKILL.md +385 -0
- package/skills/issue-debugging/references/anti-patterns.md +245 -0
- package/skills/issue-debugging/references/debug-report-schema.md +227 -0
- package/skills/mock-detection/SKILL.md +511 -0
- package/skills/mock-detection/references/false-positive-prevention.md +402 -0
- package/skills/mock-detection/references/stub-patterns.md +236 -0
- package/skills/pipeline-templates/SKILL.md +215 -0
- package/skills/pipeline-templates/references/code-change-workflow.md +277 -0
- package/skills/pipeline-templates/references/code-review.md +336 -0
- package/skills/pipeline-templates/references/fix-validation.md +421 -0
- package/skills/pipeline-templates/references/new-feature.md +335 -0
- package/skills/pipeline-templates/references/research-brainstorm.md +161 -0
- package/skills/pipeline-templates/references/research-planning.md +257 -0
- package/skills/pipeline-templates/references/test-audit.md +389 -0
- package/skills/pipeline-templates/references/test-execution-fix.md +238 -0
- package/skills/plan-creation/SKILL.md +497 -0
- package/skills/product-ideation/SKILL.md +372 -0
- package/skills/product-ideation/references/analysis-frameworks.md +161 -0
- package/skills/session-handoff/SKILL.md +139 -0
- package/skills/session-handoff/references/examples.md +223 -0
- package/skills/setup-lsp/SKILL.md +312 -0
- package/skills/setup-lsp/references/server-registry.md +85 -0
- package/skills/setup-lsp/references/troubleshooting.md +135 -0
- package/skills/subagent-output-templating/SKILL.md +415 -0
- package/skills/subagent-output-templating/references/examples.md +440 -0
- package/skills/subagent-prompting/SKILL.md +364 -0
- package/skills/subagent-prompting/references/examples.md +342 -0
- package/skills/test-audit/SKILL.md +531 -0
- package/skills/test-audit/references/known-limitations.md +41 -0
- package/skills/test-audit/references/priority-classification.md +30 -0
- package/skills/test-audit/references/prompts/deep-mode-detection.md +83 -0
- package/skills/test-audit/references/prompts/synthesis.md +57 -0
- package/skills/test-audit/references/rewrite-instructions.md +46 -0
- package/skills/test-audit/references/schemas/audit-output.yaml +100 -0
- package/skills/test-audit/references/schemas/diagnostic-output.yaml +49 -0
- package/skills/test-audit/scripts/data-flow-analyzer.ts +509 -0
- package/skills/test-audit/scripts/integration-mock-detector.ts +462 -0
- package/skills/test-audit/scripts/package.json +20 -0
- package/skills/test-audit/scripts/skip-detector.ts +211 -0
- package/skills/test-audit/scripts/verification-counter.ts +295 -0
- package/skills/test-classification/SKILL.md +310 -0
- package/skills/test-fixture-creation/SKILL.md +295 -0
|
@@ -0,0 +1,341 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: init
|
|
3
|
+
description: Initialize Bulwark governance in a project. Sets up CLAUDE.md, rules.md, and optional tooling (statusline, LSP, scaffold).
|
|
4
|
+
user-invocable: true
|
|
5
|
+
argument-hint: "[--scope=project|user] [--verify] [target-dir]"
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Bulwark Init
|
|
9
|
+
|
|
10
|
+
Initialize Bulwark governance for a project or user. Installs governance files and optionally configures statusline, LSP, and project scaffolding.
|
|
11
|
+
|
|
12
|
+
## Usage
|
|
13
|
+
|
|
14
|
+
```
|
|
15
|
+
/the-bulwark:init # Interactive setup
|
|
16
|
+
/the-bulwark:init --scope=project # Project scope, skip prompt
|
|
17
|
+
/the-bulwark:init --scope=user # User scope
|
|
18
|
+
/the-bulwark:init --verify # Verify previous init completed
|
|
19
|
+
/the-bulwark:init --scope=project /path # Project scope at specific path
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
---
|
|
23
|
+
|
|
24
|
+
## Mode Routing
|
|
25
|
+
|
|
26
|
+
```
|
|
27
|
+
IF $ARGUMENTS contains "--verify":
|
|
28
|
+
→ Jump to VERIFY MODE (Stage 8)
|
|
29
|
+
ELSE:
|
|
30
|
+
→ Continue with INIT MODE (Stage 1)
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
---
|
|
34
|
+
|
|
35
|
+
## INIT MODE
|
|
36
|
+
|
|
37
|
+
### Stage 1: Parse Arguments
|
|
38
|
+
|
|
39
|
+
Extract from `$ARGUMENTS`:
|
|
40
|
+
- `--scope=project` or `--scope=user` → SCOPE
|
|
41
|
+
- Remaining positional argument → TARGET_DIR (optional, defaults to current directory for project scope)
|
|
42
|
+
|
|
43
|
+
### Stage 2: Pre-Flight — Cross-Scope Initialization Check
|
|
44
|
+
|
|
45
|
+
**Check BOTH scopes regardless of which scope the user selected.** This prevents silent conflicts where governance files exist at one scope and the user initializes at another.
|
|
46
|
+
|
|
47
|
+
Detect existing files at **project scope**:
|
|
48
|
+
- `./CLAUDE.md` (or `<target-dir>/CLAUDE.md`)
|
|
49
|
+
- `./.claude/rules/rules.md` (or `<target-dir>/.claude/rules/rules.md`)
|
|
50
|
+
|
|
51
|
+
Detect existing files at **user scope**:
|
|
52
|
+
- `~/.claude/CLAUDE.md`
|
|
53
|
+
- `~/.claude/rules/rules.md`
|
|
54
|
+
|
|
55
|
+
**Report findings to the user based on what was detected:**
|
|
56
|
+
|
|
57
|
+
#### Case A: No files found at either scope
|
|
58
|
+
Proceed to Stage 3. No warnings needed.
|
|
59
|
+
|
|
60
|
+
#### Case B: Files found at the SELECTED scope only
|
|
61
|
+
Warn the user:
|
|
62
|
+
|
|
63
|
+
```
|
|
64
|
+
Existing Bulwark files detected at [selected] scope:
|
|
65
|
+
- [list files found]
|
|
66
|
+
|
|
67
|
+
The init script will create .bak backups of these files before overwriting.
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
Ask: "Proceed with initialization? (existing files will be backed up)"
|
|
71
|
+
|
|
72
|
+
#### Case C: Files found at the OTHER scope (not the selected one)
|
|
73
|
+
Warn the user:
|
|
74
|
+
|
|
75
|
+
```
|
|
76
|
+
Existing Bulwark files detected at [other] scope:
|
|
77
|
+
- [list files found]
|
|
78
|
+
|
|
79
|
+
You are initializing at [selected] scope. The files at [other] scope will
|
|
80
|
+
NOT be modified, but having governance files at both scopes may cause
|
|
81
|
+
conflicting instructions that impact accurate functioning.
|
|
82
|
+
|
|
83
|
+
Options:
|
|
84
|
+
1. Proceed — keep files at both scopes (you manage consistency)
|
|
85
|
+
2. Cancel — remove or descope the [other] scope files first, then re-run
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
Ask the user to choose before proceeding.
|
|
89
|
+
|
|
90
|
+
#### Case D: Files found at BOTH scopes
|
|
91
|
+
Combine warnings from Case B and Case C:
|
|
92
|
+
|
|
93
|
+
```
|
|
94
|
+
Existing Bulwark files detected at BOTH scopes:
|
|
95
|
+
|
|
96
|
+
Project scope:
|
|
97
|
+
- [list files found]
|
|
98
|
+
|
|
99
|
+
User scope:
|
|
100
|
+
- [list files found]
|
|
101
|
+
|
|
102
|
+
You are initializing at [selected] scope:
|
|
103
|
+
- Files at [selected] scope will be backed up (.bak) and overwritten.
|
|
104
|
+
- Files at [other] scope will NOT be modified.
|
|
105
|
+
|
|
106
|
+
Having governance files at both scopes may cause conflicting instructions
|
|
107
|
+
that impact accurate functioning.
|
|
108
|
+
|
|
109
|
+
Options:
|
|
110
|
+
1. Proceed — overwrite [selected] scope (backed up), keep [other] scope as-is
|
|
111
|
+
2. Cancel — clean up the [other] scope files first, then re-run
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
Ask the user to choose before proceeding.
|
|
115
|
+
|
|
116
|
+
### Stage 3: Run Init Script
|
|
117
|
+
|
|
118
|
+
Execute the init script using the plugin directory path. First verify the environment variable is set:
|
|
119
|
+
|
|
120
|
+
```bash
|
|
121
|
+
if [ -z "$CLAUDE_PLUGIN_DIR" ]; then
|
|
122
|
+
echo "ERROR: CLAUDE_PLUGIN_DIR is not set. This skill must be run as a plugin."
|
|
123
|
+
exit 1
|
|
124
|
+
fi
|
|
125
|
+
"$CLAUDE_PLUGIN_DIR/scripts/init.sh" [arguments]
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
`$CLAUDE_PLUGIN_DIR` is set by the Claude Code plugin runtime and resolves to the installed plugin root. If unset, the skill is not running in a plugin context.
|
|
129
|
+
|
|
130
|
+
Where `[arguments]` is the original `$ARGUMENTS` string (excluding `--verify`) passed through verbatim. This preserves `--scope=` and any target directory the user provided.
|
|
131
|
+
|
|
132
|
+
If `--scope` was not provided, init.sh will present its own interactive scope selection prompt.
|
|
133
|
+
|
|
134
|
+
### Stage 4: Report Results and Restart Warning
|
|
135
|
+
|
|
136
|
+
After init.sh completes successfully, present to the user as visible text (NOT hidden in bash output):
|
|
137
|
+
|
|
138
|
+
```
|
|
139
|
+
Bulwark governance initialized!
|
|
140
|
+
|
|
141
|
+
Files created:
|
|
142
|
+
- [CLAUDE.md path]
|
|
143
|
+
- [rules.md path]
|
|
144
|
+
|
|
145
|
+
IMPORTANT: Hooks do not activate until you restart your Claude Code session.
|
|
146
|
+
This is a known Claude Code limitation (#10997). After restarting, Bulwark's
|
|
147
|
+
quality gates (typecheck, lint, build) will enforce automatically on every
|
|
148
|
+
code change.
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
If init.sh exits with a non-zero status, report the error output to the user and stop.
|
|
152
|
+
|
|
153
|
+
### Stage 5: Post-Init Setup Selection
|
|
154
|
+
|
|
155
|
+
Use AskUserQuestion to present optional setup choices:
|
|
156
|
+
|
|
157
|
+
**Question:** "Which additional setup would you like to configure?"
|
|
158
|
+
**multiSelect:** true
|
|
159
|
+
**Options:**
|
|
160
|
+
1. **Status line** — Configure the Bulwark status line display (quick, no dependencies)
|
|
161
|
+
2. **LSP integration** — Set up Language Server Protocol for code intelligence (requires language servers)
|
|
162
|
+
3. **Project scaffold** — Generate Justfile with build/test/lint recipes (requires project manifest)
|
|
163
|
+
|
|
164
|
+
If the user selects nothing (skips), proceed to Stage 7 (write state and finish).
|
|
165
|
+
|
|
166
|
+
### Stage 6: Execute Selected Setup
|
|
167
|
+
|
|
168
|
+
Follow this order strictly:
|
|
169
|
+
|
|
170
|
+
#### 6a: Statusline (if selected)
|
|
171
|
+
|
|
172
|
+
Invoke the statusline skill immediately — it has no language dependencies:
|
|
173
|
+
|
|
174
|
+
```
|
|
175
|
+
/the-bulwark:bulwark-statusline
|
|
176
|
+
```
|
|
177
|
+
|
|
178
|
+
Follow the bulwark-statusline skill instructions completely. Once done, continue.
|
|
179
|
+
|
|
180
|
+
#### 6b: Language Selection (if LSP or scaffold selected)
|
|
181
|
+
|
|
182
|
+
If the user selected LSP, scaffold, or both, use AskUserQuestion to determine the tech stack:
|
|
183
|
+
|
|
184
|
+
**Question:** "What languages/frameworks does this project use?"
|
|
185
|
+
**multiSelect:** true
|
|
186
|
+
**Options:**
|
|
187
|
+
1. **Node/TypeScript** — JavaScript, TypeScript, React, Vue, etc.
|
|
188
|
+
2. **Python** — Python with pip, poetry, or uv
|
|
189
|
+
3. **Rust** — Rust with Cargo
|
|
190
|
+
4. **Other** — User specifies manually
|
|
191
|
+
|
|
192
|
+
Based on the selection, ensure the language toolchain is installed:
|
|
193
|
+
- **Node/TypeScript**: Check for `node`, `npm`/`bun`. If missing, guide installation.
|
|
194
|
+
- **Python**: Check for `python3`, `pip`/`poetry`/`uv`. If missing, guide installation.
|
|
195
|
+
- **Rust**: Check for `rustc`, `cargo`. If missing, guide installation.
|
|
196
|
+
- **Other**: Ask the user what package manager and build tools they use.
|
|
197
|
+
|
|
198
|
+
Also check for project manifest files (`package.json`, `pyproject.toml`, `Cargo.toml`). If none exist, ask the user if they want to initialize one (e.g., `npm init`, `cargo init`).
|
|
199
|
+
|
|
200
|
+
Once the language toolchain is confirmed present, proceed with the selected skills.
|
|
201
|
+
|
|
202
|
+
#### 6c: Scaffold (if selected)
|
|
203
|
+
|
|
204
|
+
Map the language selection to the scaffold `--lang` argument:
|
|
205
|
+
- Node/TypeScript → `--lang=node`
|
|
206
|
+
- Python → `--lang=python`
|
|
207
|
+
- Rust → `--lang=rust`
|
|
208
|
+
- Other/generic → `--lang=generic`
|
|
209
|
+
|
|
210
|
+
Invoke:
|
|
211
|
+
|
|
212
|
+
```
|
|
213
|
+
/the-bulwark:bulwark-scaffold --lang=<detected>
|
|
214
|
+
```
|
|
215
|
+
|
|
216
|
+
Follow the bulwark-scaffold skill instructions completely. Once done, continue.
|
|
217
|
+
|
|
218
|
+
#### 6d: LSP (if selected)
|
|
219
|
+
|
|
220
|
+
Map the language selection to the LSP `--lang` argument:
|
|
221
|
+
- Node/TypeScript → `--lang typescript`
|
|
222
|
+
- Python → `--lang python`
|
|
223
|
+
- Rust → `--lang rust`
|
|
224
|
+
- Other → `--lang <user-specified>`
|
|
225
|
+
|
|
226
|
+
Invoke:
|
|
227
|
+
|
|
228
|
+
```
|
|
229
|
+
/the-bulwark:setup-lsp --lang <languages>
|
|
230
|
+
```
|
|
231
|
+
|
|
232
|
+
Follow the setup-lsp skill instructions completely. Note: setup-lsp has its own restart checkpoint at Stage 6. That restart is separate from the init restart.
|
|
233
|
+
|
|
234
|
+
### Stage 7: Write State and Finish
|
|
235
|
+
|
|
236
|
+
Write a state file for `--verify` mode to use later:
|
|
237
|
+
|
|
238
|
+
```bash
|
|
239
|
+
mkdir -p "$CLAUDE_PROJECT_DIR/tmp/init"
|
|
240
|
+
```
|
|
241
|
+
|
|
242
|
+
Write to `$CLAUDE_PROJECT_DIR/tmp/init/init-state.yaml` using the schema from [templates/init-state.yaml](templates/init-state.yaml). Populate all placeholder values with actual data from this session.
|
|
243
|
+
|
|
244
|
+
Present final summary to the user:
|
|
245
|
+
|
|
246
|
+
```
|
|
247
|
+
Bulwark initialization complete!
|
|
248
|
+
|
|
249
|
+
Governance: CLAUDE.md + rules.md installed
|
|
250
|
+
Statusline: [configured / skipped]
|
|
251
|
+
LSP: [configured / skipped]
|
|
252
|
+
Scaffold: [configured / skipped]
|
|
253
|
+
|
|
254
|
+
Next step: Restart your Claude Code session, then run:
|
|
255
|
+
|
|
256
|
+
/the-bulwark:init --verify
|
|
257
|
+
|
|
258
|
+
This will confirm all components are working correctly.
|
|
259
|
+
```
|
|
260
|
+
|
|
261
|
+
---
|
|
262
|
+
|
|
263
|
+
## VERIFY MODE
|
|
264
|
+
|
|
265
|
+
### Stage 8: Verify Previous Init
|
|
266
|
+
|
|
267
|
+
Triggered by `--verify` flag. Reads the state file from the previous init run and checks each component.
|
|
268
|
+
|
|
269
|
+
#### 8a: Read State File
|
|
270
|
+
|
|
271
|
+
Read `$CLAUDE_PROJECT_DIR/tmp/init/init-state.yaml`. If it does not exist:
|
|
272
|
+
|
|
273
|
+
```
|
|
274
|
+
No init state found. Run /the-bulwark:init first to initialize Bulwark governance.
|
|
275
|
+
```
|
|
276
|
+
|
|
277
|
+
Stop.
|
|
278
|
+
|
|
279
|
+
#### 8b: Verify Governance Files
|
|
280
|
+
|
|
281
|
+
Check that the governance files exist at the scope recorded in the state file:
|
|
282
|
+
|
|
283
|
+
- **Project scope**: Check `./CLAUDE.md` and `./.claude/rules/rules.md`
|
|
284
|
+
- **User scope**: Check `~/.claude/CLAUDE.md` and `~/.claude/rules/rules.md`
|
|
285
|
+
|
|
286
|
+
Report: pass or fail for each file.
|
|
287
|
+
|
|
288
|
+
#### 8c: Verify Hooks Active
|
|
289
|
+
|
|
290
|
+
Check that hooks are firing. The simplest check: read the session's hook execution by looking for the governance protocol in the current session context. If this skill was invoked and Bulwark governance protocol was displayed at session start, hooks are active.
|
|
291
|
+
|
|
292
|
+
Report: pass or fail.
|
|
293
|
+
|
|
294
|
+
#### 8d: Verify Statusline (if selected)
|
|
295
|
+
|
|
296
|
+
If `statusline: true` in state file, check that `~/.claude/settings.json` contains statusline configuration.
|
|
297
|
+
|
|
298
|
+
Report: pass or fail.
|
|
299
|
+
|
|
300
|
+
#### 8e: Verify LSP (if selected)
|
|
301
|
+
|
|
302
|
+
If `lsp: true` in state file, invoke the LSP verification:
|
|
303
|
+
|
|
304
|
+
```
|
|
305
|
+
/the-bulwark:setup-lsp --verify
|
|
306
|
+
```
|
|
307
|
+
|
|
308
|
+
Follow the setup-lsp verification flow. Report result.
|
|
309
|
+
|
|
310
|
+
#### 8f: Verify Scaffold (if selected)
|
|
311
|
+
|
|
312
|
+
If `scaffold: true` in state file, check that:
|
|
313
|
+
- `Justfile` exists in the project root
|
|
314
|
+
- `logs/` directory exists
|
|
315
|
+
|
|
316
|
+
Report: pass or fail.
|
|
317
|
+
|
|
318
|
+
#### 8g: Verification Summary
|
|
319
|
+
|
|
320
|
+
Present results:
|
|
321
|
+
|
|
322
|
+
```
|
|
323
|
+
Bulwark Init Verification
|
|
324
|
+
=========================
|
|
325
|
+
|
|
326
|
+
Governance files: [PASS / FAIL]
|
|
327
|
+
Hooks active: [PASS / FAIL]
|
|
328
|
+
Statusline: [PASS / FAIL / SKIPPED]
|
|
329
|
+
LSP: [PASS / FAIL / SKIPPED]
|
|
330
|
+
Scaffold: [PASS / FAIL / SKIPPED]
|
|
331
|
+
|
|
332
|
+
Overall: [ALL PASS / X failures]
|
|
333
|
+
```
|
|
334
|
+
|
|
335
|
+
If any failures, provide specific remediation steps for each.
|
|
336
|
+
|
|
337
|
+
Clean up the state file after successful verification:
|
|
338
|
+
|
|
339
|
+
```bash
|
|
340
|
+
rm $CLAUDE_PROJECT_DIR/tmp/init/init-state.yaml
|
|
341
|
+
```
|