bastard-framework 1.0.0 → 1.2.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 (4) hide show
  1. package/CHANGELOG.md +22 -0
  2. package/README.md +273 -103
  3. package/dist/cli.js +145 -11
  4. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -5,6 +5,28 @@ All notable changes to BASTARD will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/).
7
7
 
8
+ ## [1.2.0] - 2026-04-03
9
+
10
+ ### Added
11
+ - `bastard onboard [name]` — one-command setup (init + parents + hooks + status + workflow)
12
+ - ASCII art pipeline diagram in README
13
+ - "Built with BASTARD" section with 5 SaaS starter templates
14
+ - 👹 emoji branding, new tagline: "The bastard framework that kills AI slop"
15
+ - GitHub topics: ai-agents, claude-code, saas-builder, anti-slop, gated-workflow, meta-framework
16
+
17
+ ### Changed
18
+ - Complete README overhaul (OpenClaw-inspired layout, centered header, navigation bar)
19
+ - Reorganized command tables into Pipeline / Quality / Setup categories
20
+
21
+ ## [1.1.0] - 2026-04-03
22
+
23
+ ### Added
24
+ - `--json` flag on `slop`, `score`, `audit` commands for machine-readable output
25
+ - `--fail-below <grade>` flag on `slop`, `score`, `audit` for CI enforcement (exit 1 if below threshold)
26
+ - `bastard badge [path]` command — generates shields.io badge with Slop + Design scores
27
+ - GitHub Action (`action/action.yml`) — run BASTARD audit in CI, post PR comments, fail checks
28
+ - Example project: `examples/todo-app/` — complete 8-round reference with all pipeline artifacts
29
+
8
30
  ## [1.0.0] - 2026-04-02
9
31
 
10
32
  ### Added
package/README.md CHANGED
@@ -1,166 +1,333 @@
1
- [![npm version](https://img.shields.io/npm/v/bastard-framework)](https://www.npmjs.com/package/bastard-framework)
2
- [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
1
+ <p align="center">
2
+ <br>
3
+ <span style="font-size: 64px">👹</span>
4
+ <br>
5
+ </p>
6
+
7
+ <h1 align="center">BASTARD</h1>
8
+
9
+ <p align="center">
10
+ <b>The bastard framework that kills AI slop.</b><br>
11
+ <i>Born from many. Better than all.</i>
12
+ </p>
13
+
14
+ <p align="center">
15
+ <a href="https://www.npmjs.com/package/bastard-framework"><img src="https://img.shields.io/npm/v/bastard-framework?style=flat-square&color=cb3837" alt="npm"></a>
16
+ <a href="https://github.com/Denis-hamon/bastard/blob/main/LICENSE"><img src="https://img.shields.io/badge/license-MIT-blue?style=flat-square" alt="license"></a>
17
+ <a href="https://github.com/Denis-hamon/bastard/actions"><img src="https://img.shields.io/github/actions/workflow/status/Denis-hamon/bastard/ci.yml?style=flat-square&label=CI" alt="CI"></a>
18
+ <img src="https://img.shields.io/badge/AI_Slop_Score-A-brightgreen?style=flat-square" alt="slop score">
19
+ <img src="https://img.shields.io/badge/node-%3E%3D20-green?style=flat-square" alt="node">
20
+ </p>
21
+
22
+ <p align="center">
23
+ <a href="#-one-command-setup">Setup</a> &bull;
24
+ <a href="#-the-pipeline">Pipeline</a> &bull;
25
+ <a href="#-no-code-before-round-5-ever">Gates</a> &bull;
26
+ <a href="#-ai-slop-detection">Slop Detector</a> &bull;
27
+ <a href="#-built-with-bastard">Templates</a> &bull;
28
+ <a href="#-github-action">CI Action</a>
29
+ </p>
3
30
 
4
- # BASTARD
31
+ ---
32
+
33
+ ## 👹 What is BASTARD?
34
+
35
+ **B**uild **A**ny **S**aaS **T**hrough **A**gent **R**oles & **D**iscipline.
5
36
 
6
- > **The guardrails between your favorite Claude Code frameworks.**
37
+ BASTARD is a meta-framework that orchestrates **7 parent Claude Code frameworks** into an **8-round gated pipeline**. It doesn't replace any of them — it tells them when to speak and when to shut up.
7
38
 
8
- Every framework tells Claude what to do. BASTARD is the only one that tells Claude what it **cannot** do.
39
+ > Every framework tells Claude what to do.
40
+ > BASTARD is the only one that tells Claude what it **cannot** do.
9
41
 
10
- ## Try It Now (No Setup Needed)
42
+ ## 🔥 Try It Now (Zero Setup)
11
43
 
12
- Score any project for AI slop — no install, no init, no commitment:
44
+ Score any project for AI slop — no install, no config, no commitment:
13
45
 
14
46
  ```bash
15
47
  npx bastard-framework audit .
16
48
  ```
17
49
 
18
- ## The Problem
19
-
20
- The Claude Code ecosystem has amazing frameworks: BMAD for PRDs, gstack for design, GSD for execution, TaskMaster for planning. But **nobody enforces the transitions**. You write a beautiful PRD with BMAD, then ignore it when coding. You skip security review. You ship with generic AI-generated UI.
21
-
22
- BASTARD wires the genius zones of 7 frameworks into a gated pipeline where you literally cannot code before a PRD is approved, cannot style before a design system exists, and cannot ship before acceptance criteria are verified.
50
+ That's it. Works on **any** codebase.
23
51
 
24
- ## Quick Start
52
+ ## 🚀 One-Command Setup
25
53
 
26
54
  ```bash
27
- # Initialize a BASTARD project (scaffolds templates + state machine)
28
- npx bastard-framework init my-saas
29
-
30
- # Install all 7 parent frameworks (always fetches latest)
31
- bastard parents install
55
+ npx bastard-framework onboard my-saas
56
+ ```
32
57
 
33
- # Install Claude Code hooks (blocks code writes before Round 5)
34
- bastard hooks install
58
+ This single command:
59
+ 1. **Scaffolds** your project with 9 pre-structured templates
60
+ 2. **Installs** all 7 parent frameworks (latest versions)
61
+ 3. **Activates** Claude Code guard hooks
62
+ 4. **Shows** your pipeline status + first round workflow
35
63
 
36
- # See your pipeline
37
- bastard status
64
+ <details>
65
+ <summary><b>📺 See what it looks like</b></summary>
38
66
 
39
- # Start working — Round 1 workflow with step-by-step guidance
40
- bastard run
41
67
  ```
68
+ ╔══════════════════════════════════════════════════════════╗
69
+ ║ ║
70
+ ║ 👹 BASTARD ONBOARDING ║
71
+ ║ ║
72
+ ║ The bastard framework that kills AI slop. ║
73
+ ║ Born from many. Better than all. ║
74
+ ║ ║
75
+ ╚══════════════════════════════════════════════════════════╝
76
+
77
+ [1/4] Initializing project...
78
+ ✓ Project "my-saas" initialized (9 templates)
79
+
80
+ [2/4] Installing parent frameworks (latest)...
81
+ [1/7] ✓ BMAD Method — installed
82
+ [2/7] ✓ Get Shit Done — installed
83
+ ...
84
+
85
+ [3/4] Installing Claude Code guard hooks...
86
+ ✓ Hooks installed
87
+
88
+ [4/4] You're ready.
89
+
90
+ Pipeline:
91
+
92
+ ► Round 1 — Vision & Product [bmad]
93
+ ◌ Round 2 — Design System & UX [gstack + turbo]
94
+ ◌ Round 3 — Architecture [bmad + super]
95
+ ◌ Round 4 — Decomposition & Planification [taskm + gsd]
96
+ ◌ Round 5 — Execution du Code [gsd + super]
97
+ ◌ Round 6 — Securite [tob + super]
98
+ ◌ Round 7 — QA & Tests [gstack]
99
+ ◌ Round 8 — Review & Livraison [gstack + gsd]
100
+
101
+ ┌──────────────────────────────────────────────────────────┐
102
+ │ │
103
+ │ 👹 BASTARD is watching. │
104
+ │ │
105
+ │ NO CODE BEFORE ROUND 5. EVER. │
106
+ │ │
107
+ │ Your guard hooks are active. │
108
+ │ Write to src/ before Round 5 │
109
+ │ and BASTARD will block you. │
110
+ │ │
111
+ └──────────────────────────────────────────────────────────┘
112
+ ```
113
+ </details>
42
114
 
43
- ## The Pipeline
115
+ ## 🔒 The Pipeline
44
116
 
45
117
  ```
46
- Round 1 Vision & Product [bmad] PRD, personas, acceptance criteria
47
- Round 2 Design System & UX [gstack + turbo] Design tokens, mockups, slop-free UI
48
- Round 3 Architecture [bmad + super] ADRs, infra schema, API contracts
49
- Round 4 Decomposition [taskm + gsd] Task graph, waves, context docs
50
- Round 5 Code Execution [gsd + super] Wave execution, atomic commits, TDD
51
- Round 6 Security [tob + super] STRIDE, OWASP, crypto review
52
- Round 7 QA & Tests [gstack] Browser QA, design score, regression
53
- Round 8 Review & Ship [gstack + gsd] Adversarial review, acceptance verify
118
+ ┌─────────┐ ┌─────────┐ ┌─────────┐ ┌─────────┐
119
+ Round 1 │───▶│ Round 2 │───▶│ Round 3 │───▶│ Round 4
120
+ Product │ │ Design │ │ Arch │ │ Planning│
121
+ [bmad] │ │[gstack] │ │ [bmad] [taskm]
122
+ └────┬────┘ └────┬────┘ └────┬────┘ └────┬────┘
123
+ │GATE │GATE │GATE │GATE
124
+ ▼ ▼ ▼ ▼
125
+ ┌─────────┐ ┌─────────┐ ┌─────────┐ ┌─────────┐
126
+ │ Round 5 │───▶│ Round 6 │───▶│ Round 7 │───▶│ Round 8 │
127
+ │ Code │ │Security │ │ QA │ │ Ship │
128
+ │ [gsd] │ │ [tob] │ │[gstack] │ │ [gsd] │
129
+ └────┬────┘ └────┬────┘ └────┬────┘ └────┬────┘
130
+ │GATE │GATE │GATE │GATE
131
+ ▼ ▼ ▼ ▼
132
+ ✅ SHIPPED
54
133
  ```
55
134
 
56
- Each round has a **gate**. The gate must pass before you advance. No exceptions.
135
+ Each round has a **hard gate**. Not a suggestion — an actual enforcement mechanism. The gate must pass before you advance.
57
136
 
58
- ## What Makes BASTARD Different
137
+ | Round | What happens | Frameworks | Gate checks |
138
+ |:---:|---|---|---|
139
+ | 1 | Product vision, PRD, personas | bmad | Content validated (100+ chars, user story format) |
140
+ | 2 | Design system, tokens, mockups | gstack + turbo | CSS custom properties defined, human approved |
141
+ | 3 | Architecture, ADRs, API contracts | bmad + super | ADR structure validated (Status/Context/Decision) |
142
+ | 4 | Task decomposition, wave planning | taskm + gsd | Task files exist, context documented |
143
+ | 5 | Code execution, TDD, atomic commits | gsd + super | Source + tests exist |
144
+ | 6 | STRIDE threat model, OWASP review | tob + super | Threat model + security review content validated |
145
+ | 7 | Browser QA, design score, regression | gstack | AI Slop Score = A, Design Score >= B |
146
+ | 8 | Adversarial review, acceptance verify | gstack + gsd | 100% acceptance criteria green |
59
147
 
60
- ### Hard Gates, Not Suggestions
148
+ ## 🚫 No Code Before Round 5. Ever.
61
149
 
62
- ```bash
63
- bastard gate # Run automated checks (content validation, not just file existence)
64
- bastard approve 1 # Human sign-off
65
- bastard next # Advance — BLOCKED if gate fails
66
- ```
150
+ This is not a guideline. This is **enforced by Claude Code hooks**.
67
151
 
68
- ### Claude Code Guard Hooks
152
+ ```
153
+ ┌──────────────────────────────────────────────────────────────┐
154
+ │ │
155
+ │ $ claude "write src/app.ts" │
156
+ │ │
157
+ │ ██████╗ BLOCKED │
158
+ │ ██╔══██╗ │
159
+ │ ██████╔╝ BASTARD: No source code before Round 5 │
160
+ │ ██╔══██╗ (currently Round 1). │
161
+ │ ██████╔╝ │
162
+ │ ╚═════╝ Complete Rounds 1-4 first: │
163
+ │ product → design → architecture → planning │
164
+ │ │
165
+ └──────────────────────────────────────────────────────────────┘
166
+ ```
69
167
 
70
- Once installed, Claude Code **physically cannot** write source code before Round 5:
168
+ **What the guard blocks:**
169
+ - Source code writes (`src/`, `lib/`, `app/`) before Round 5
170
+ - CSS/styling files before Round 2 gate passes
171
+ - Task/planning files before Round 4
172
+ - `git add .` and `git add -A` (per-file staging only)
173
+ - Direct commits to `main`/`master`
174
+ - Security-sensitive files without Round 6 review
71
175
 
72
- ```
73
- $ echo '{"tool_name":"Write","tool_input":{"file_path":"src/app.ts"}}' | bastard guard
74
- BASTARD: No source code before Round 5 (currently Round 1).
75
- Complete Rounds 1-4 first: product vision → design → architecture → planning.
176
+ ```bash
177
+ bastard hooks install # Activate the guard
178
+ bastard hooks remove # Deactivate (you rebel)
76
179
  ```
77
180
 
78
- ### AI Slop Detection
181
+ ## 🔍 AI Slop Detection
79
182
 
80
183
  9 pattern detectors that catch the telltale signs of AI-generated UI:
81
184
 
185
+ ```
186
+ ┌──────────────────────────────────────────────────────┐
187
+ │ AI SLOP BLACKLIST │
188
+ │ │
189
+ │ ██ Blue-purple gradients The #1 AI tell │
190
+ │ ██ 3-column icon grids Every AI landing page │
191
+ │ ██ Generic card grids Rounded + shadow + grid │
192
+ │ ██ Gradient text bg-clip-text chaos │
193
+ │ ██ Oversized heroes min-h-screen + overlay │
194
+ │ ██ Floating abstract shapes Blurred circles │
195
+ │ ██ Single font family No typographic depth │
196
+ │ ██ Generic CTAs only "Get Started" fatigue │
197
+ │ ██ Hero→Features→Pricing The AI playbook │
198
+ └──────────────────────────────────────────────────────┘
199
+ ```
200
+
82
201
  ```bash
83
- bastard slop src/ # Scan for slop patterns
84
- bastard score src/ # Check design token compliance
85
- bastard audit src/ # Combined report with merge verdict
202
+ bastard slop . # Scan any project
203
+ bastard slop . --json # Machine-readable output
204
+ bastard slop . --fail-below A # CI gate (exit 1 if below A)
205
+ bastard audit . # Slop + Design Score combined
206
+ bastard badge . # Generate shields.io badge
86
207
  ```
87
208
 
88
- Detected patterns: blue-purple gradients, 3-column icon grids, generic CTAs, floating blobs, single font families, oversized heroes, gradient text, generic section flows, card grid layouts.
209
+ ### 📊 AI Slop Leaderboard
89
210
 
90
- ### Content Validation
211
+ We scanned popular open-source SaaS projects:
91
212
 
92
- Templates aren't enough. BASTARD checks that documents have **real content**, not just empty headers:
213
+ | Project | Stars | Slop Score | Patterns |
214
+ |---------|:---:|:---:|---|
215
+ | [Maybe](https://github.com/maybe-finance/maybe) | 54k | **B** | Single Font (1) |
216
+ | [Twenty](https://github.com/twentyhq/twenty) | 44k | **C** | Single Font, Gradient Text (4) |
217
+ | [Cal.com](https://github.com/calcom/cal.com) | 41k | **D** | Hero, Card Grid, Gradient Text, Single Font (5) |
218
+ | [Formbricks](https://github.com/formbricks/formbricks) | 12k | **F** | Hero, Icon Grid, Card Grid (6) |
219
+
220
+ *Run it on yours:* `npx bastard-framework audit .`
221
+
222
+ ## 👹 The Seven Parents
223
+
224
+ | ID | Framework | What BASTARD steals | Rounds |
225
+ |:---:|---|---|:---:|
226
+ | `bmad` | [BMAD Method](https://github.com/bmad-code-org/BMAD-METHOD) | Product vision, PRD, Architecture | 1, 3 |
227
+ | `gsd` | [Get Shit Done](https://github.com/gsd-build/get-shit-done) | Context engineering, wave execution | 4, 5, 8 |
228
+ | `gstack` | [gstack](https://github.com/garrytan/gstack) | Design system, QA, shipping | 2, 7, 8 |
229
+ | `super` | [SuperClaude](https://github.com/SuperClaude-Org/SuperClaude_Framework) | Cognitive personas, token efficiency | 3, 5, 6 |
230
+ | `tob` | [Trail of Bits](https://github.com/trailofbits/skills) | Security review, threat modeling | 6 |
231
+ | `turbo` | [TurboDocx FD](https://github.com/turbodocx/frontend-design) | Frontend design, anti-AI-slop | 2 |
232
+ | `taskm` | [TaskMaster](https://github.com/eyaltoledano/claude-task-master) | Task decomposition, dependency graphs | 4 |
93
233
 
94
234
  ```bash
95
- bastard validate prd # PRD has 100+ chars in Problem section? User stories in proper format?
96
- bastard validate design # Design tokens defined with CSS custom properties?
97
- bastard validate # All documents at once
235
+ bastard parents # Who's installed?
236
+ bastard parents install # Get them all (always latest)
98
237
  ```
99
238
 
100
- ## The Seven Parents
239
+ ## 🏗️ Built with BASTARD
101
240
 
102
- | Framework | What BASTARD Uses It For | Rounds |
103
- |-----------|------------------------|--------|
104
- | [BMAD Method](https://github.com/bmad-code-org/BMAD-METHOD) | Product vision, PRD, Architecture | 1, 3 |
105
- | [Get Shit Done](https://github.com/gsd-build/get-shit-done) | Context engineering, wave execution | 4, 5, 8 |
106
- | [gstack](https://github.com/garrytan/gstack) | Design system, QA, shipping | 2, 7, 8 |
107
- | [SuperClaude](https://github.com/SuperClaude-Org/SuperClaude_Framework) | Cognitive personas, token efficiency | 3, 5, 6 |
108
- | [Trail of Bits](https://github.com/trailofbits/skills) | Security review, threat modeling | 6 |
109
- | [TurboDocx FD](https://github.com/turbodocx/frontend-design) | Frontend design, anti-AI-slop | 2 |
110
- | [TaskMaster](https://github.com/eyaltoledano/claude-task-master) | Task decomposition, dependency graphs | 4 |
241
+ ### Reference Project
111
242
 
112
- BASTARD doesn't replace any of them. It tells them when to speak and when to shut up.
243
+ See [`examples/todo-app/`](examples/todo-app/) a minimal todo app that went through all 8 rounds. Every document, every gate, every artifact. The code is < 200 LOC. The documents are the star.
113
244
 
114
- ```bash
115
- bastard parents # See which are installed
116
- bastard parents install # Install all (always latest)
117
- bastard parents install --force # Update all to latest
245
+ ### SaaS Starter Templates
246
+
247
+ Use BASTARD to build any of these. The pipeline is the same — the product changes:
248
+
249
+ | Template | What you build | Key rounds |
250
+ |----------|---------------|------------|
251
+ | **Waitlist SaaS** | Landing page + email capture + admin dashboard | R2 (design), R5 (code), R6 (data privacy) |
252
+ | **Feedback Widget** | Embeddable widget + dashboard + analytics | R2 (design), R3 (embed architecture), R5 (widget + API) |
253
+ | **Booking Platform** | Calendly-like scheduling + notifications | R1 (complex PRD), R3 (real-time arch), R6 (auth security) |
254
+ | **AI Chat Interface** | LLM-powered chatbot + conversation history | R3 (LLM architecture), R5 (streaming), R6 (prompt injection) |
255
+ | **Internal Tool** | CRUD dashboard + RBAC + audit logs | R3 (multi-tenant arch), R6 (access control), R7 (E2E tests) |
256
+
257
+ Every template follows the same 8-round pipeline. Start with `bastard onboard my-saas` and fill the Round 1 documents for your specific product.
258
+
259
+ ## ⚡ GitHub Action
260
+
261
+ Block AI slop in your CI pipeline. One line:
262
+
263
+ ```yaml
264
+ - uses: Denis-hamon/bastard/action@main
265
+ with:
266
+ path: src/
267
+ fail-below: A # A, B, C, D, or F
118
268
  ```
119
269
 
120
- ## All Commands
270
+ The action:
271
+ - Runs AI Slop + Design Score audit
272
+ - Posts results as a PR comment (auto-updates, no spam)
273
+ - Fails the check if below threshold
274
+ - Outputs `slop-score`, `design-score`, `passed` for downstream steps
275
+
276
+ ## 📋 All Commands
277
+
278
+ ### Pipeline
121
279
 
122
- | Command | Description |
123
- |---------|------------|
124
- | `bastard init [name]` | Scaffold project + templates + state machine |
280
+ | Command | What it does |
281
+ |---------|-------------|
282
+ | `bastard onboard [name]` | **One command: init + parents + hooks + status** |
283
+ | `bastard init [name]` | Scaffold project + templates |
125
284
  | `bastard status` | Visual pipeline with round/gate status |
126
285
  | `bastard run [round]` | Step-by-step workflow with framework guidance |
127
- | `bastard prompt [round]` | Generate copy-pasteable prompt for a round |
286
+ | `bastard prompt [round]` | Generate copy-pasteable prompt |
128
287
  | `bastard gate [round]` | Run automated gate checks |
129
288
  | `bastard validate [doc]` | Deep content validation |
130
289
  | `bastard approve <N>` | Human sign-off on a round |
131
- | `bastard next` | Advance to next round (blocked if gate fails) |
132
- | `bastard round <N>` | Jump to a round (with warnings) |
133
- | `bastard parents` | Show installed/missing parent frameworks |
134
- | `bastard parents install` | Install all parents (latest versions) |
135
- | `bastard hooks install` | Install Claude Code guard hooks |
136
- | `bastard hooks remove` | Remove guard hooks |
137
- | `bastard slop [path]` | AI Slop detection (works on any project) |
138
- | `bastard score [path]` | Design token compliance (works on any project) |
139
- | `bastard audit [path]` | Combined slop + design report |
290
+ | `bastard next` | Advance (blocked if gate fails) |
291
+ | `bastard round <N>` | Jump with warnings |
140
292
  | `bastard history` | Action audit trail |
141
293
  | `bastard reset` | Reset pipeline (keeps files) |
142
294
 
143
- ## Standards
295
+ ### Quality
296
+
297
+ | Command | What it does |
298
+ |---------|-------------|
299
+ | `bastard slop [path]` | AI Slop detection (any project) |
300
+ | `bastard score [path]` | Design token compliance (any project) |
301
+ | `bastard audit [path]` | Combined report + merge verdict |
302
+ | `bastard badge [path]` | Generate shields.io badge |
303
+
304
+ All quality commands support `--json` and `--fail-below <grade>`.
305
+
306
+ ### Setup
307
+
308
+ | Command | What it does |
309
+ |---------|-------------|
310
+ | `bastard parents` | Show installed/missing frameworks |
311
+ | `bastard parents install` | Install all 7 parents (latest) |
312
+ | `bastard hooks install` | Activate Claude Code guard |
313
+ | `bastard hooks remove` | Deactivate guard |
144
314
 
145
- A SaaS exits BASTARD when all gates pass:
315
+ ## 🎯 Exit Standards
146
316
 
147
- | Metric | Minimum |
148
- |--------|---------|
149
- | Test coverage | >= 80% |
150
- | Design Score | >= B |
151
- | AI Slop Score | A |
152
- | OWASP vulnerabilities | 0 critical, 0 high |
153
- | Acceptance criteria | 100% green |
154
- | ADRs | 1 per major decision |
317
+ A SaaS exits BASTARD when all gates are green:
155
318
 
156
- ## Philosophy
319
+ | Metric | Minimum | Enforced by |
320
+ |--------|:---:|---|
321
+ | Test coverage | >= 80% | Round 5 gate |
322
+ | Design Score | >= B | Round 7 gate |
323
+ | AI Slop Score | A | Round 7 gate |
324
+ | OWASP vulnerabilities | 0 critical, 0 high | Round 6 gate |
325
+ | Acceptance criteria | 100% green | Round 8 gate |
326
+ | ADRs | 1 per major decision | Round 3 gate |
157
327
 
158
- **Principle:** Every framework has a zone of genius and a zone of ignorance. BASTARD wires the genius zones in sequence and ignores the rest.
328
+ ## 🤝 Contributing
159
329
 
160
- - No code before a validated PRD (Round 1 gate)
161
- - No CSS before an approved design system (Round 2 gate)
162
- - No merge on auth/payment without security review (Round 6)
163
- - No ship without acceptance verification (Round 8 closes the loop back to Round 1)
330
+ See [CONTRIBUTING.md](CONTRIBUTING.md). BASTARD is opinionated by design — contributions that dilute the pipeline will be rejected. But if you've found a framework better than one of the seven parents at its specific job, we want to hear about it.
164
331
 
165
332
  ## License
166
333
 
@@ -168,4 +335,7 @@ MIT
168
335
 
169
336
  ---
170
337
 
171
- *Born from many. Better than all.*
338
+ <p align="center">
339
+ <b>👹 BASTARD</b><br>
340
+ <i>The bastard framework that kills AI slop.<br>Born from many. Better than all.</i>
341
+ </p>
package/dist/cli.js CHANGED
@@ -2791,7 +2791,7 @@ function displayAudit(slop, design) {
2791
2791
 
2792
2792
  // src/cli.ts
2793
2793
  var program = new Command();
2794
- program.name("bastard").description("Build Any SaaS Through Agent Roles & Discipline").version("1.0.0");
2794
+ program.name("bastard").description("Build Any SaaS Through Agent Roles & Discipline").version("1.2.0");
2795
2795
  program.command("init [name]").description("Initialize a new BASTARD project").option("--install-parents", "Also install all parent frameworks").option("--with-hooks", "Also install Claude Code guard hooks").action(async (name, opts) => {
2796
2796
  const projectRoot = process.cwd();
2797
2797
  if (stateExists(projectRoot)) {
@@ -2837,6 +2837,85 @@ program.command("init [name]").description("Initialize a new BASTARD project").o
2837
2837
  displayHooksInstalled(hookResult);
2838
2838
  }
2839
2839
  });
2840
+ program.command("onboard [name]").description("One command to rule them all: init + parents + hooks + status + run").action(async (name) => {
2841
+ const projectRoot = process.cwd();
2842
+ const projectName = name ?? basename(projectRoot);
2843
+ console.log(chalk2.bold(`
2844
+ \u2554\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2557
2845
+ \u2551 \u2551
2846
+ \u2551 \u{1F479} BASTARD ONBOARDING \u2551
2847
+ \u2551 \u2551
2848
+ \u2551 The bastard framework that kills AI slop. \u2551
2849
+ \u2551 Born from many. Better than all. \u2551
2850
+ \u2551 \u2551
2851
+ \u255A\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u255D
2852
+ `));
2853
+ if (stateExists(projectRoot)) {
2854
+ console.log(chalk2.green(" \u2713 Project already initialized.\n"));
2855
+ } else {
2856
+ console.log(chalk2.bold(" [1/4] Initializing project...\n"));
2857
+ const dirs = [
2858
+ "docs/product",
2859
+ "docs/design/mockups",
2860
+ "docs/architecture/ADR",
2861
+ "docs/security",
2862
+ "docs/planning",
2863
+ ".planning",
2864
+ "tasks",
2865
+ "src",
2866
+ "tests",
2867
+ ".bastard"
2868
+ ];
2869
+ for (const dir of dirs) {
2870
+ const fullPath = resolve3(projectRoot, dir);
2871
+ if (!existsSync10(fullPath)) mkdirSync5(fullPath, { recursive: true });
2872
+ }
2873
+ const state2 = createInitialState(projectName);
2874
+ saveState(projectRoot, state2);
2875
+ const created = scaffoldTemplates(projectRoot, projectName);
2876
+ console.log(chalk2.green(` \u2713 Project "${projectName}" initialized (${created.length} templates)
2877
+ `));
2878
+ }
2879
+ console.log(chalk2.bold(" [2/4] Installing parent frameworks (latest)...\n"));
2880
+ const results = await installParents(
2881
+ projectRoot,
2882
+ {},
2883
+ (result, index, total) => displayInstallProgress(result, index, total)
2884
+ );
2885
+ displayInstallSummary(results);
2886
+ console.log(chalk2.bold(" [3/4] Installing Claude Code guard hooks...\n"));
2887
+ const hookResult = installHooks(projectRoot);
2888
+ displayHooksInstalled(hookResult);
2889
+ console.log(chalk2.bold(" [4/4] You're ready.\n"));
2890
+ const state = loadState(projectRoot);
2891
+ displayStatus(state);
2892
+ const workflow = getWorkflow(state.currentRound);
2893
+ if (workflow) {
2894
+ const statuses = detectParents(projectRoot);
2895
+ const installed = new Set(statuses.filter((s) => s.installed).map((s) => s.framework.id));
2896
+ displayWorkflow(workflow, installed);
2897
+ }
2898
+ console.log(chalk2.bold(`
2899
+ \u250C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510
2900
+ \u2502 \u2502
2901
+ \u2502 \u{1F479} BASTARD is watching. \u2502
2902
+ \u2502 \u2502
2903
+ \u2502 \u250C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510 \u2502
2904
+ \u2502 \u2502 \u2502 \u2502
2905
+ \u2502 \u2502 \u2588\u2588\u2588\u2588\u2588\u2588\u2557 NO CODE BEFORE ROUND 5. EVER. \u2502 \u2502
2906
+ \u2502 \u2502 \u2588\u2588\u2554\u2550\u2550\u2588\u2588\u2557 \u2502 \u2502
2907
+ \u2502 \u2502 \u2588\u2588\u2588\u2588\u2588\u2588\u2554\u255D Your guard hooks are active. \u2502 \u2502
2908
+ \u2502 \u2502 \u2588\u2588\u2554\u2550\u2550\u2588\u2588\u2557 Write to src/ before Round 5 \u2502 \u2502
2909
+ \u2502 \u2502 \u2588\u2588\u2588\u2588\u2588\u2588\u2554\u255D and BASTARD will block you. \u2502 \u2502
2910
+ \u2502 \u2502 \u255A\u2550\u2550\u2550\u2550\u2550\u255D \u2502 \u2502
2911
+ \u2502 \u2502 \u2502 \u2502
2912
+ \u2502 \u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518 \u2502
2913
+ \u2502 \u2502
2914
+ \u2502 Next: fill your PRD, then \`bastard gate\` \u2502
2915
+ \u2502 \u2502
2916
+ \u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518
2917
+ `));
2918
+ });
2840
2919
  program.command("status").description("Show current pipeline status").action(() => {
2841
2920
  const projectRoot = process.cwd();
2842
2921
  const state = loadState(projectRoot);
@@ -3117,26 +3196,81 @@ function resolveAuditTarget(pathArg) {
3117
3196
  const srcDir = resolve3(cwd, "src");
3118
3197
  return existsSync10(srcDir) ? srcDir : cwd;
3119
3198
  }
3120
- program.command("slop [path]").description("Scan for AI slop patterns \u2014 works on ANY project (default: src/ or cwd)").action((pathArg) => {
3199
+ var GRADE_ORDER = { "A": 1, "B": 2, "C": 3, "D": 4, "F": 5, "-": 0 };
3200
+ function isScoreBelow(score, threshold) {
3201
+ return (GRADE_ORDER[score] ?? 5) > (GRADE_ORDER[threshold] ?? 5);
3202
+ }
3203
+ program.command("slop [path]").description("Scan for AI slop patterns \u2014 works on ANY project (default: src/ or cwd)").option("--json", "Output as JSON").option("--fail-below <grade>", "Exit 1 if score is below this grade (A-F)").action((pathArg, opts) => {
3121
3204
  const targetDir = resolveAuditTarget(pathArg);
3122
3205
  const report = runSlopScan(targetDir);
3123
- displaySlopReport(report);
3206
+ if (opts.json) {
3207
+ console.log(JSON.stringify(report, null, 2));
3208
+ } else {
3209
+ displaySlopReport(report);
3210
+ }
3211
+ if (opts.failBelow && isScoreBelow(report.score, opts.failBelow)) {
3212
+ process.exit(1);
3213
+ }
3124
3214
  });
3125
- program.command("score [path]").description("Check design token compliance \u2014 works on ANY project").action((pathArg) => {
3215
+ program.command("score [path]").description("Check design token compliance \u2014 works on ANY project").option("--json", "Output as JSON").option("--fail-below <grade>", "Exit 1 if score is below this grade (A-F)").action((pathArg, opts) => {
3126
3216
  const targetDir = resolveAuditTarget(pathArg);
3127
3217
  const report = runDesignScore(targetDir, targetDir);
3128
- displayDesignScore(report);
3218
+ if (opts.json) {
3219
+ console.log(JSON.stringify(report, null, 2));
3220
+ } else {
3221
+ displayDesignScore(report);
3222
+ }
3223
+ if (opts.failBelow && isScoreBelow(report.score, opts.failBelow)) {
3224
+ process.exit(1);
3225
+ }
3129
3226
  });
3130
- program.command("audit [path]").description("AI Slop + Design Score audit \u2014 works on ANY project, no init needed").action((pathArg) => {
3227
+ program.command("audit [path]").description("AI Slop + Design Score audit \u2014 works on ANY project, no init needed").option("--json", "Output as JSON").option("--fail-below <grade>", "Exit 1 if slop score is below this grade (A-F)").action((pathArg, opts) => {
3131
3228
  const targetDir = resolveAuditTarget(pathArg);
3132
3229
  const slop = runSlopScan(targetDir);
3133
3230
  const design = runDesignScore(targetDir, targetDir);
3134
- displayAudit(slop, design);
3135
- if (slop.matches.length > 0) {
3136
- displaySlopReport(slop);
3231
+ if (opts.json) {
3232
+ console.log(JSON.stringify({ slop, design }, null, 2));
3233
+ } else {
3234
+ displayAudit(slop, design);
3235
+ if (slop.matches.length > 0) {
3236
+ displaySlopReport(slop);
3237
+ }
3238
+ if (design.violations.length > 0) {
3239
+ displayDesignScore(design);
3240
+ }
3137
3241
  }
3138
- if (design.violations.length > 0) {
3139
- displayDesignScore(design);
3242
+ if (opts.failBelow && isScoreBelow(slop.score, opts.failBelow)) {
3243
+ process.exit(1);
3140
3244
  }
3141
3245
  });
3246
+ program.command("badge [path]").description('Generate a "Shipped with BASTARD" badge for your README').action((pathArg) => {
3247
+ const targetDir = resolveAuditTarget(pathArg);
3248
+ const slop = runSlopScan(targetDir);
3249
+ const design = runDesignScore(targetDir, targetDir);
3250
+ const slopScore = slop.score;
3251
+ const designScore = design.score === "-" ? "N/A" : design.score;
3252
+ const colorMap = {
3253
+ "A": "brightgreen",
3254
+ "B": "green",
3255
+ "C": "yellow",
3256
+ "D": "orange",
3257
+ "F": "red",
3258
+ "-": "lightgrey",
3259
+ "N/A": "lightgrey"
3260
+ };
3261
+ const worstScore = isScoreBelow(slopScore, designScore === "N/A" ? "A" : designScore) ? slopScore : designScore === "N/A" ? slopScore : designScore;
3262
+ const color = colorMap[worstScore] ?? "lightgrey";
3263
+ const label = encodeURIComponent("BASTARD");
3264
+ const message = encodeURIComponent(`Slop: ${slopScore} | Design: ${designScore}`);
3265
+ const url = `https://img.shields.io/badge/${label}-${message}-${color}?style=flat-square`;
3266
+ console.log(chalk2.bold("\n Shipped with BASTARD\n"));
3267
+ console.log(` Slop Score: ${slopScore}`);
3268
+ console.log(` Design Score: ${designScore}`);
3269
+ console.log(chalk2.bold("\n Markdown:\n"));
3270
+ console.log(` [![Shipped with BASTARD](${url})](https://github.com/Denis-hamon/bastard)
3271
+ `);
3272
+ console.log(chalk2.bold(" HTML:\n"));
3273
+ console.log(` <a href="https://github.com/Denis-hamon/bastard"><img src="${url}" alt="Shipped with BASTARD"></a>
3274
+ `);
3275
+ });
3142
3276
  program.parse();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bastard-framework",
3
- "version": "1.0.0",
3
+ "version": "1.2.0",
4
4
  "description": "Build Any SaaS Through Agent Roles & Discipline — The guardrails between your favorite Claude Code frameworks.",
5
5
  "type": "module",
6
6
  "bin": {