bastard-framework 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/CHANGELOG.md +36 -0
- package/CLAUDE.md +416 -0
- package/LICENSE +21 -0
- package/README.md +171 -0
- package/dist/cli.js +3142 -0
- package/package.json +60 -0
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to BASTARD will be documented in this file.
|
|
4
|
+
|
|
5
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/),
|
|
6
|
+
and this project adheres to [Semantic Versioning](https://semver.org/).
|
|
7
|
+
|
|
8
|
+
## [1.0.0] - 2026-04-02
|
|
9
|
+
|
|
10
|
+
### Added
|
|
11
|
+
- 8-round gated pipeline with persistent state machine (`.bastard/state.json`)
|
|
12
|
+
- AI Slop detector with 9 pattern matchers: blue-purple gradients, 3-column icon grids, generic CTAs, floating blobs, single font families, oversized heroes, gradient text, generic section flows, card grid layouts
|
|
13
|
+
- Design token compliance scorer (validates CSS custom properties, typography hierarchy, spacing system)
|
|
14
|
+
- Combined `audit` command with merge verdict (Slop A + Design >= B required)
|
|
15
|
+
- All audit commands (`slop`, `score`, `audit`) work on ANY project without `bastard init`
|
|
16
|
+
- Claude Code guard hooks via `bastard hooks install`:
|
|
17
|
+
- Blocks source code writes before Round 5
|
|
18
|
+
- Blocks CSS/styling before Round 2 gate passes
|
|
19
|
+
- Blocks task files before Round 4
|
|
20
|
+
- Blocks `git add .` and `git add -A` (per-file staging only)
|
|
21
|
+
- Blocks direct commits to main/master
|
|
22
|
+
- Content validation schemas for PRD, Personas, Acceptance Criteria, Design, Architecture, ADRs, Threat Model, Security Review
|
|
23
|
+
- Parent framework installer: `bastard parents install` for all 7 frameworks (always-latest)
|
|
24
|
+
- Round workflow engine with framework-aware step-by-step guidance and fallbacks
|
|
25
|
+
- Prompt generator for copy-paste into Claude Code (`bastard prompt`)
|
|
26
|
+
- 4 Claude Code sub-agents: security-reviewer, design-auditor, acceptance-checker, adr-writer
|
|
27
|
+
- 9 document templates scaffolded on `bastard init`
|
|
28
|
+
- `bastard init --install-parents --with-hooks` for all-in-one setup
|
|
29
|
+
- GitHub Actions CI pipeline (Node 20 + 22, typecheck, build, test)
|
|
30
|
+
- 29 tests across 4 suites (state, slop, schemas, guard)
|
|
31
|
+
|
|
32
|
+
### Fixed
|
|
33
|
+
- ReDoS vulnerability in floating-shapes pattern detector
|
|
34
|
+
- Guard using absolute paths for file classification (caused false matches when project was inside a `/tests/` directory)
|
|
35
|
+
- Schema validation counting template boilerplate as real content
|
|
36
|
+
- `require()` calls replaced with ESM imports throughout
|
package/CLAUDE.md
ADDED
|
@@ -0,0 +1,416 @@
|
|
|
1
|
+
# CLAUDE.md — BASTARD
|
|
2
|
+
|
|
3
|
+
> Tu travailles sur **BASTARD** — un meta-framework open-source né de sept pères
|
|
4
|
+
> différents et qui n'en respecte aucun.
|
|
5
|
+
> Ce fichier est ta bible. Lis-le avant chaque session. Sans exception.
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## Ce qu'est BASTARD
|
|
10
|
+
|
|
11
|
+
**B**uild **A**ny **S**aaS **T**hrough **A**gent **R**oles & **D**iscipline.
|
|
12
|
+
|
|
13
|
+
BASTARD est un meta-framework qui vole le meilleur de chaque framework de
|
|
14
|
+
l'ecosysteme Claude Code et les assemble en un pipeline de production capable
|
|
15
|
+
de sortir des SaaS serieux. Il n'a pas de pere legitime. Il a sept geniteurs.
|
|
16
|
+
Il est meilleur que chacun d'eux.
|
|
17
|
+
|
|
18
|
+
Il ne remplace aucun des frameworks qu'il orchestre. Il leur dit quand parler
|
|
19
|
+
et quand se taire.
|
|
20
|
+
|
|
21
|
+
**Principe fondateur :** chaque framework a une zone de genie et une zone
|
|
22
|
+
d'ignorance. BASTARD cable les zones de genie en sequence et ignore le reste.
|
|
23
|
+
|
|
24
|
+
> "Born from many. Better than all."
|
|
25
|
+
|
|
26
|
+
---
|
|
27
|
+
|
|
28
|
+
## Les sept geniteurs
|
|
29
|
+
|
|
30
|
+
| ID | Framework | Ce qu'il apporte a BASTARD | Install |
|
|
31
|
+
|---------|--------------------|---------------------------------------|-------------------------------------|
|
|
32
|
+
| `bmad` | BMAD Method | Vision produit, PRD, Architecture | `npx bmad-method install` |
|
|
33
|
+
| `gsd` | Get Shit Done | Context engineering, wave execution | `npx gsd@latest install` |
|
|
34
|
+
| `gstack`| gstack (Garry Tan) | Design system, QA browser, livraison | `git clone garrytan/gstack` |
|
|
35
|
+
| `super` | SuperClaude | Cognitive personas, token efficiency | `./install.sh` (repo clone) |
|
|
36
|
+
| `tob` | Trail of Bits | Security review, threat modeling | `npx skills add trailofbits/skills` |
|
|
37
|
+
| `turbo` | TurboDocx FD | Frontend design anti-AI-slop | `npx skills add turbodocx/frontend-design` |
|
|
38
|
+
| `taskm` | TaskMaster | Task decomposition, dependency graph | `npx task-master-ai@latest` |
|
|
39
|
+
|
|
40
|
+
---
|
|
41
|
+
|
|
42
|
+
## Le pipeline en 8 rounds
|
|
43
|
+
|
|
44
|
+
### Round 1 — Vision & Product `[bmad]`
|
|
45
|
+
|
|
46
|
+
**Objectif :** transformer une idee en PRD actionnable. Zero code avant ca.
|
|
47
|
+
|
|
48
|
+
```
|
|
49
|
+
/bmad-analyst -> brief -> personas, pain points, jobs-to-be-done
|
|
50
|
+
/bmad-pm -> PRD structure avec user stories et criteres d'acceptance
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
**Outputs :**
|
|
54
|
+
- `docs/product/PRD.md`
|
|
55
|
+
- `docs/product/PERSONAS.md`
|
|
56
|
+
- `docs/product/ACCEPTANCE_CRITERIA.md`
|
|
57
|
+
|
|
58
|
+
**BASTARD CLI :** `bastard run 1` | `bastard gate 1` | `bastard approve 1` | `bastard next`
|
|
59
|
+
|
|
60
|
+
**Gate :** PRD valide par l'humain. Pas de gate, pas de Round 2.
|
|
61
|
+
|
|
62
|
+
---
|
|
63
|
+
|
|
64
|
+
### Round 2 — Design System & UX `[gstack + turbo]`
|
|
65
|
+
|
|
66
|
+
**Objectif :** poser l'identite visuelle avant de toucher au CSS.
|
|
67
|
+
|
|
68
|
+
```
|
|
69
|
+
/design-consultation -> design system from scratch -> DESIGN.md
|
|
70
|
+
/design-shotgun -> 3 variantes visuelles -> comparison board interactif
|
|
71
|
+
[turbo frontend-design] -> 4 dimensions (purpose, tone, constraints, diff)
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
**Ce qui est interdit dans BASTARD :**
|
|
75
|
+
- Layouts 3 colonnes avec icones generiques
|
|
76
|
+
- Hero sections avec gradient bleu-violet
|
|
77
|
+
- Un seul font pour tout le site
|
|
78
|
+
- Merger avec un AI Slop Score inferieur a A
|
|
79
|
+
|
|
80
|
+
**Outputs :**
|
|
81
|
+
- `docs/design/DESIGN.md` (design tokens, typography scale, spacing system)
|
|
82
|
+
- `docs/design/mockups/` (variantes approuvees)
|
|
83
|
+
|
|
84
|
+
**BASTARD CLI :** `bastard run 2` | `bastard gate 2` | `bastard approve 2` | `bastard next`
|
|
85
|
+
|
|
86
|
+
**Gate :** DESIGN.md signe par l'humain. Le CSS n'existe pas avant ca.
|
|
87
|
+
|
|
88
|
+
---
|
|
89
|
+
|
|
90
|
+
### Round 3 — Architecture `[bmad + super]`
|
|
91
|
+
|
|
92
|
+
**Objectif :** les decisions techniques ecrites avant d'etre codees.
|
|
93
|
+
|
|
94
|
+
```
|
|
95
|
+
/bmad-architect -> ADRs, schema d'infra, choix de stack
|
|
96
|
+
--persona-architect -> analyse trade-offs, detecte over-engineering et YAGNI
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
**Format ADR — non negociable :**
|
|
100
|
+
```markdown
|
|
101
|
+
# ADR-XXX: [Titre de la decision]
|
|
102
|
+
## Statut : Propose | Accepte | Rejete | Supersede
|
|
103
|
+
## Contexte : [Pourquoi cette decision est necessaire]
|
|
104
|
+
## Options considerees : [Liste des alternatives]
|
|
105
|
+
## Decision : [Ce qu'on a choisi et pourquoi]
|
|
106
|
+
## Consequences : [Trade-offs acceptes]
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
**Outputs :**
|
|
110
|
+
- `docs/architecture/ARCHITECTURE.md`
|
|
111
|
+
- `docs/architecture/ADR/ADR-001.md`, `ADR-002.md`, ...
|
|
112
|
+
- `docs/architecture/schema-db.md`
|
|
113
|
+
- `docs/architecture/api-contracts.md`
|
|
114
|
+
|
|
115
|
+
**BASTARD CLI :** `bastard run 3` | `bastard gate 3` | `bastard approve 3` | `bastard next`
|
|
116
|
+
|
|
117
|
+
**Gate :** architecture et ADRs valides. Pas de fondation, pas de maison.
|
|
118
|
+
|
|
119
|
+
---
|
|
120
|
+
|
|
121
|
+
### Round 4 — Decomposition & Planification `[taskm + gsd]`
|
|
122
|
+
|
|
123
|
+
**Objectif :** transformer l'architecture en taches executables sans ambiguite.
|
|
124
|
+
|
|
125
|
+
```
|
|
126
|
+
task-master parse-prd -> ingere PRD + archi -> graphe de taches pondere
|
|
127
|
+
task-master analyze -> complexity scores, dependances, ordre d'execution
|
|
128
|
+
/gsd:discuss -> tuer toutes les ambiguites -> CONTEXT.md
|
|
129
|
+
/gsd:plan -> plans detailles par wave
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
**Regles de decoupage :**
|
|
133
|
+
- Une tache = une responsabilite = un commit atomique
|
|
134
|
+
- Taches bloquantes -> Wave 1 (sequentiel)
|
|
135
|
+
- Taches independantes -> Wave 2+ (parallelisable)
|
|
136
|
+
- Aucune tache > 2h estimee. Si c'est le cas, elle se decoupe.
|
|
137
|
+
|
|
138
|
+
**Outputs :**
|
|
139
|
+
- `.planning/phases/` (structure GSD)
|
|
140
|
+
- `tasks/` (TaskMaster task files)
|
|
141
|
+
- `docs/planning/CONTEXT.md`
|
|
142
|
+
|
|
143
|
+
**BASTARD CLI :** `bastard run 4` | `bastard gate 4` | `bastard next`
|
|
144
|
+
|
|
145
|
+
---
|
|
146
|
+
|
|
147
|
+
### Round 5 — Execution du Code `[gsd + super]`
|
|
148
|
+
|
|
149
|
+
**Objectif :** builder sans context rot, avec le bon cerveau au bon moment.
|
|
150
|
+
|
|
151
|
+
```
|
|
152
|
+
/gsd:execute -> wave-based execution, sous-contextes frais, commits atomiques
|
|
153
|
+
--persona-backend -> APIs, services, logique metier
|
|
154
|
+
--persona-frontend -> composants UI, state management
|
|
155
|
+
--persona-performance -> queries DB, algorithmes critiques
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
**Regles d'execution :**
|
|
159
|
+
- `/clear` ou `/compact` entre chaque phase majeure
|
|
160
|
+
- Contexte principal : jamais au-dessus de 40%
|
|
161
|
+
- Chaque tache terminee = commit immediat, message conventionnel
|
|
162
|
+
- Format commit : `type(scope): description` — feat, fix, docs, refactor, test
|
|
163
|
+
- Interdit : `git add .` — staged au niveau fichier uniquement
|
|
164
|
+
|
|
165
|
+
**Regles de code :**
|
|
166
|
+
- TypeScript strict mode, toujours
|
|
167
|
+
- Tests ecrits avant l'implementation (TDD, pas de debat la-dessus)
|
|
168
|
+
- Coverage minimum 80% sur la logique metier
|
|
169
|
+
- Zero `any` sans commentaire justificatif
|
|
170
|
+
- Zero secret hardcode — variables d'environnement, point
|
|
171
|
+
|
|
172
|
+
**BASTARD CLI :** `bastard run 5` | `bastard gate 5` | `bastard next`
|
|
173
|
+
|
|
174
|
+
---
|
|
175
|
+
|
|
176
|
+
### Round 6 — Securite `[tob + super]`
|
|
177
|
+
|
|
178
|
+
**Objectif :** la securite est integree au build, pas ajoutee apres livraison.
|
|
179
|
+
|
|
180
|
+
```
|
|
181
|
+
/threat-modeling -> STRIDE methodology, DREAD/CVSS scoring
|
|
182
|
+
/security-review -> OWASP Top 10, auth, crypto, input validation
|
|
183
|
+
--persona-security -> s'active automatiquement sur auth/sessions/tokens
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
**Checklist avant tout merge touchant auth ou paiement :**
|
|
187
|
+
- [ ] Inputs valides et sanitises cote serveur
|
|
188
|
+
- [ ] Authentification et autorisation separees
|
|
189
|
+
- [ ] Zero secret dans le code ou les logs
|
|
190
|
+
- [ ] Queries DB parametrees — pas de string interpolation
|
|
191
|
+
- [ ] Headers de securite en place (CSP, HSTS, X-Frame-Options)
|
|
192
|
+
- [ ] Rate limiting sur les endpoints publics
|
|
193
|
+
- [ ] Logs d'audit sur les actions sensibles
|
|
194
|
+
|
|
195
|
+
**Outputs :**
|
|
196
|
+
- `docs/security/THREAT_MODEL.md`
|
|
197
|
+
- `docs/security/SECURITY_REVIEW.md`
|
|
198
|
+
|
|
199
|
+
**BASTARD CLI :** `bastard run 6` | `bastard gate 6` | `bastard next`
|
|
200
|
+
|
|
201
|
+
---
|
|
202
|
+
|
|
203
|
+
### Round 7 — QA & Tests `[gstack]`
|
|
204
|
+
|
|
205
|
+
**Objectif :** verifier que ce qu'on a bati marche vraiment dans un vrai browser.
|
|
206
|
+
|
|
207
|
+
```
|
|
208
|
+
/qa -> analyse le diff, teste les routes affectees, genere les tests de regression
|
|
209
|
+
/design-review [URL] -> audit visuel 80 points — Design Score + AI Slop Score
|
|
210
|
+
```
|
|
211
|
+
|
|
212
|
+
**Standards :**
|
|
213
|
+
- Chaque bug corrige = test de regression immediat, sans exception
|
|
214
|
+
- Design Score minimum : B pour merger sur main
|
|
215
|
+
- AI Slop Score : A obligatoire — en dessous, on refactorise
|
|
216
|
+
- Tests E2E sur les flows critiques : auth, onboarding, core feature, paiement
|
|
217
|
+
|
|
218
|
+
**Outputs :**
|
|
219
|
+
- Rapport QA dans la PR
|
|
220
|
+
- Design Score before/after documente
|
|
221
|
+
- Couverture de tests a jour
|
|
222
|
+
|
|
223
|
+
**BASTARD CLI :** `bastard run 7` | `bastard slop` | `bastard score` | `bastard gate 7` | `bastard approve 7` | `bastard next`
|
|
224
|
+
|
|
225
|
+
---
|
|
226
|
+
|
|
227
|
+
### Round 8 — Review & Livraison `[gstack + gsd]`
|
|
228
|
+
|
|
229
|
+
**Objectif :** shipper ce qu'on avait prevu de shipper, ni plus ni moins.
|
|
230
|
+
|
|
231
|
+
```
|
|
232
|
+
/plan-eng-review -> architecture, data flow, edge cases, failure modes
|
|
233
|
+
/review -> adversarial review (Claude + Codex — deux regards independants)
|
|
234
|
+
/ship -> scope drift detection, sync main, tests complets, PR
|
|
235
|
+
/gsd:verify -> verification contre les ACCEPTANCE_CRITERIA.md du Round 1
|
|
236
|
+
```
|
|
237
|
+
|
|
238
|
+
**La boucle fermee de BASTARD :**
|
|
239
|
+
`/gsd:verify` compare le code livre aux criteres d'acceptance definis en Round 1.
|
|
240
|
+
Si un critere n'est pas satisfait -> tache marquee incomplete -> retour Round 5.
|
|
241
|
+
C'est la seule garantie reelle que ce qui etait demande a ete livre.
|
|
242
|
+
|
|
243
|
+
**BASTARD CLI :** `bastard run 8` | `bastard audit` | `bastard gate 8` | `bastard approve 8` | `bastard next`
|
|
244
|
+
|
|
245
|
+
**Un SaaS sort de BASTARD quand tous les criteres du Round 1 sont verts.**
|
|
246
|
+
|
|
247
|
+
---
|
|
248
|
+
|
|
249
|
+
## Structure du repository
|
|
250
|
+
|
|
251
|
+
```
|
|
252
|
+
.
|
|
253
|
+
├── CLAUDE.md <- ce fichier. Lu avant chaque session.
|
|
254
|
+
├── README.md <- "Born from many. Better than all."
|
|
255
|
+
├── CONTRIBUTING.md <- comment contribuer a BASTARD
|
|
256
|
+
├── LICENSE <- MIT
|
|
257
|
+
│
|
|
258
|
+
├── docs/
|
|
259
|
+
│ ├── product/
|
|
260
|
+
│ │ ├── PRD.md
|
|
261
|
+
│ │ ├── PERSONAS.md
|
|
262
|
+
│ │ └── ACCEPTANCE_CRITERIA.md
|
|
263
|
+
│ ├── design/
|
|
264
|
+
│ │ ├── DESIGN.md
|
|
265
|
+
│ │ └── mockups/
|
|
266
|
+
│ ├── architecture/
|
|
267
|
+
│ │ ├── ARCHITECTURE.md
|
|
268
|
+
│ │ └── ADR/
|
|
269
|
+
│ ├── security/
|
|
270
|
+
│ │ ├── THREAT_MODEL.md
|
|
271
|
+
│ │ └── SECURITY_REVIEW.md
|
|
272
|
+
│ └── planning/
|
|
273
|
+
│ └── CONTEXT.md
|
|
274
|
+
│
|
|
275
|
+
├── .planning/ <- GSD phases (versionne en git)
|
|
276
|
+
├── tasks/ <- TaskMaster task files
|
|
277
|
+
│
|
|
278
|
+
├── src/ <- code source
|
|
279
|
+
├── tests/ <- tests unitaires et E2E
|
|
280
|
+
│
|
|
281
|
+
└── .claude/
|
|
282
|
+
├── skills/ <- gstack - TurboDocx FD - Trail of Bits
|
|
283
|
+
└── agents/ <- sous-agents definis ci-dessous
|
|
284
|
+
```
|
|
285
|
+
|
|
286
|
+
---
|
|
287
|
+
|
|
288
|
+
## Sous-agents
|
|
289
|
+
|
|
290
|
+
Disponibles dans `.claude/agents/`. Delegue-leur les taches isolees pour
|
|
291
|
+
garder le contexte principal propre.
|
|
292
|
+
|
|
293
|
+
### `security-reviewer`
|
|
294
|
+
```yaml
|
|
295
|
+
name: security-reviewer
|
|
296
|
+
description: Reviews code for security vulnerabilities — OWASP + Trail of Bits methodology. Called on every PR touching auth, sessions, payments, or user data.
|
|
297
|
+
tools: Read, Grep, Glob
|
|
298
|
+
model: opus
|
|
299
|
+
```
|
|
300
|
+
|
|
301
|
+
### `design-auditor`
|
|
302
|
+
```yaml
|
|
303
|
+
name: design-auditor
|
|
304
|
+
description: Audits UI components against DESIGN.md tokens and the AI Slop blacklist. Refuses to pass anything with generic 3-column grids or blue-purple gradients.
|
|
305
|
+
tools: Read, Glob, Bash
|
|
306
|
+
model: sonnet
|
|
307
|
+
```
|
|
308
|
+
|
|
309
|
+
### `acceptance-checker`
|
|
310
|
+
```yaml
|
|
311
|
+
name: acceptance-checker
|
|
312
|
+
description: Verifies implemented features against ACCEPTANCE_CRITERIA.md from Round 1. Returns PASS or FAIL with specific criteria references.
|
|
313
|
+
tools: Read, Grep, Glob, Bash
|
|
314
|
+
model: sonnet
|
|
315
|
+
```
|
|
316
|
+
|
|
317
|
+
### `adr-writer`
|
|
318
|
+
```yaml
|
|
319
|
+
name: adr-writer
|
|
320
|
+
description: Documents architecture decisions in ADR format. Called every time a significant technical choice is made.
|
|
321
|
+
tools: Read, Write
|
|
322
|
+
model: sonnet
|
|
323
|
+
```
|
|
324
|
+
|
|
325
|
+
---
|
|
326
|
+
|
|
327
|
+
## Regles permanentes
|
|
328
|
+
|
|
329
|
+
### Git
|
|
330
|
+
- Branches : `feat/`, `fix/`, `docs/`, `refactor/`, `security/`
|
|
331
|
+
- Jamais de commit direct sur `main`
|
|
332
|
+
- PR obligatoire — description avec lien vers la tache TaskMaster concernee
|
|
333
|
+
- Squash merge uniquement
|
|
334
|
+
|
|
335
|
+
### Modeles
|
|
336
|
+
- **Sonnet 4.6** — rounds 4, 5, 7, 8 (vitesse)
|
|
337
|
+
- **Opus 4.6** — rounds 1, 3, 6 (profondeur)
|
|
338
|
+
- **Haiku 4.5** — formatting, renommage, migrations mecaniques
|
|
339
|
+
|
|
340
|
+
### Contexte
|
|
341
|
+
- `/compact` des que l'utilisation depasse 60%
|
|
342
|
+
- `/clear` entre deux rounds differents
|
|
343
|
+
- Sous-agents pour toutes les taches read-heavy
|
|
344
|
+
|
|
345
|
+
### Communication
|
|
346
|
+
- Toujours indiquer le round courant en debut de reponse : `[Round X — Titre]`
|
|
347
|
+
- Toujours terminer par la prochaine action concrete
|
|
348
|
+
- Une ambiguite detectee = une question posee, pas dix
|
|
349
|
+
- Zero decision architecturale sans ADR correspondant
|
|
350
|
+
|
|
351
|
+
### Ce que BASTARD ne fait jamais
|
|
352
|
+
- Coder avant un PRD valide
|
|
353
|
+
- Toucher au CSS avant que DESIGN.md soit approuve
|
|
354
|
+
- Merger du code auth ou paiement sans `/security-review`
|
|
355
|
+
- Hardcoder des secrets, meme "temporairement"
|
|
356
|
+
- Considerer le Round 8 termine si `acceptance-checker` retourne FAIL
|
|
357
|
+
|
|
358
|
+
---
|
|
359
|
+
|
|
360
|
+
## Commandes de demarrage
|
|
361
|
+
|
|
362
|
+
> **Deux couches de commandes :**
|
|
363
|
+
> - `bastard <cmd>` — le pipeline CLI (state, gates, audit, orchestration)
|
|
364
|
+
> - `/slash-commands` — les commandes des parent frameworks (bmad, gsd, gstack, etc.)
|
|
365
|
+
>
|
|
366
|
+
> BASTARD orchestre les slash commands. Tu utilises `bastard run` pour savoir
|
|
367
|
+
> quels slash commands lancer a chaque round.
|
|
368
|
+
|
|
369
|
+
### Nouveau projet from scratch
|
|
370
|
+
```bash
|
|
371
|
+
bastard init "mon-saas"
|
|
372
|
+
bastard parents install
|
|
373
|
+
bastard hooks install
|
|
374
|
+
bastard run # affiche le workflow Round 1
|
|
375
|
+
/bmad-analyst "Decris ton idee en quelques phrases"
|
|
376
|
+
```
|
|
377
|
+
|
|
378
|
+
### Reprendre une session en cours
|
|
379
|
+
```bash
|
|
380
|
+
bastard status # ou est-on dans le pipeline ?
|
|
381
|
+
bastard run # quoi faire maintenant ?
|
|
382
|
+
```
|
|
383
|
+
|
|
384
|
+
### Auditer une feature existante
|
|
385
|
+
```bash
|
|
386
|
+
bastard audit src/ # AI Slop + Design Score (marche sans init)
|
|
387
|
+
bastard slop src/ # slop detection seule
|
|
388
|
+
bastard score src/ # design token compliance seule
|
|
389
|
+
```
|
|
390
|
+
|
|
391
|
+
### Livrer proprement
|
|
392
|
+
```bash
|
|
393
|
+
bastard gate # verifier la gate du round courant
|
|
394
|
+
bastard approve <N> # approbation humaine
|
|
395
|
+
bastard next # avancer au round suivant
|
|
396
|
+
```
|
|
397
|
+
|
|
398
|
+
---
|
|
399
|
+
|
|
400
|
+
## Standards de sortie
|
|
401
|
+
|
|
402
|
+
Un SaaS est considere pret a deployer quand il passe ces gates :
|
|
403
|
+
|
|
404
|
+
| Metrique | Minimum requis |
|
|
405
|
+
|-----------------------------|---------------------------|
|
|
406
|
+
| Couverture de tests | >= 80% |
|
|
407
|
+
| Design Score | >= B |
|
|
408
|
+
| AI Slop Score | A |
|
|
409
|
+
| Vulnerabilites OWASP | 0 critique - 0 high |
|
|
410
|
+
| Acceptance Criteria | 100% verts |
|
|
411
|
+
| ADRs | 1 par decision majeure |
|
|
412
|
+
| Contexte en fin de session | <= 40% |
|
|
413
|
+
|
|
414
|
+
---
|
|
415
|
+
|
|
416
|
+
*BASTARD — Born from many. Better than all. — MIT License*
|
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 BASTARD Contributors
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
[](https://www.npmjs.com/package/bastard-framework)
|
|
2
|
+
[](https://opensource.org/licenses/MIT)
|
|
3
|
+
|
|
4
|
+
# BASTARD
|
|
5
|
+
|
|
6
|
+
> **The guardrails between your favorite Claude Code frameworks.**
|
|
7
|
+
|
|
8
|
+
Every framework tells Claude what to do. BASTARD is the only one that tells Claude what it **cannot** do.
|
|
9
|
+
|
|
10
|
+
## Try It Now (No Setup Needed)
|
|
11
|
+
|
|
12
|
+
Score any project for AI slop — no install, no init, no commitment:
|
|
13
|
+
|
|
14
|
+
```bash
|
|
15
|
+
npx bastard-framework audit .
|
|
16
|
+
```
|
|
17
|
+
|
|
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.
|
|
23
|
+
|
|
24
|
+
## Quick Start
|
|
25
|
+
|
|
26
|
+
```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
|
|
32
|
+
|
|
33
|
+
# Install Claude Code hooks (blocks code writes before Round 5)
|
|
34
|
+
bastard hooks install
|
|
35
|
+
|
|
36
|
+
# See your pipeline
|
|
37
|
+
bastard status
|
|
38
|
+
|
|
39
|
+
# Start working — Round 1 workflow with step-by-step guidance
|
|
40
|
+
bastard run
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
## The Pipeline
|
|
44
|
+
|
|
45
|
+
```
|
|
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
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
Each round has a **gate**. The gate must pass before you advance. No exceptions.
|
|
57
|
+
|
|
58
|
+
## What Makes BASTARD Different
|
|
59
|
+
|
|
60
|
+
### Hard Gates, Not Suggestions
|
|
61
|
+
|
|
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
|
+
```
|
|
67
|
+
|
|
68
|
+
### Claude Code Guard Hooks
|
|
69
|
+
|
|
70
|
+
Once installed, Claude Code **physically cannot** write source code before Round 5:
|
|
71
|
+
|
|
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.
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
### AI Slop Detection
|
|
79
|
+
|
|
80
|
+
9 pattern detectors that catch the telltale signs of AI-generated UI:
|
|
81
|
+
|
|
82
|
+
```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
|
|
86
|
+
```
|
|
87
|
+
|
|
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.
|
|
89
|
+
|
|
90
|
+
### Content Validation
|
|
91
|
+
|
|
92
|
+
Templates aren't enough. BASTARD checks that documents have **real content**, not just empty headers:
|
|
93
|
+
|
|
94
|
+
```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
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
## The Seven Parents
|
|
101
|
+
|
|
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 |
|
|
111
|
+
|
|
112
|
+
BASTARD doesn't replace any of them. It tells them when to speak and when to shut up.
|
|
113
|
+
|
|
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
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
## All Commands
|
|
121
|
+
|
|
122
|
+
| Command | Description |
|
|
123
|
+
|---------|------------|
|
|
124
|
+
| `bastard init [name]` | Scaffold project + templates + state machine |
|
|
125
|
+
| `bastard status` | Visual pipeline with round/gate status |
|
|
126
|
+
| `bastard run [round]` | Step-by-step workflow with framework guidance |
|
|
127
|
+
| `bastard prompt [round]` | Generate copy-pasteable prompt for a round |
|
|
128
|
+
| `bastard gate [round]` | Run automated gate checks |
|
|
129
|
+
| `bastard validate [doc]` | Deep content validation |
|
|
130
|
+
| `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 |
|
|
140
|
+
| `bastard history` | Action audit trail |
|
|
141
|
+
| `bastard reset` | Reset pipeline (keeps files) |
|
|
142
|
+
|
|
143
|
+
## Standards
|
|
144
|
+
|
|
145
|
+
A SaaS exits BASTARD when all gates pass:
|
|
146
|
+
|
|
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 |
|
|
155
|
+
|
|
156
|
+
## Philosophy
|
|
157
|
+
|
|
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.
|
|
159
|
+
|
|
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)
|
|
164
|
+
|
|
165
|
+
## License
|
|
166
|
+
|
|
167
|
+
MIT
|
|
168
|
+
|
|
169
|
+
---
|
|
170
|
+
|
|
171
|
+
*Born from many. Better than all.*
|