buildline 0.0.0-stage → 0.3.1

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 (43) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +216 -2
  3. package/bin/buildline.js +131 -0
  4. package/package.json +49 -4
  5. package/src/cli.js +537 -0
  6. package/src/detect.js +228 -0
  7. package/src/features.js +157 -0
  8. package/src/files.js +107 -0
  9. package/src/install.js +280 -0
  10. package/src/models.js +66 -0
  11. package/src/render.js +9 -0
  12. package/src/server.js +143 -0
  13. package/src/ui/index.html +333 -0
  14. package/templates/AGENTS.block.md +48 -0
  15. package/templates/CLAUDE.block.md +20 -0
  16. package/templates/GEMINI.block.md +3 -0
  17. package/templates/agents/buildline-design-reviewer.md +21 -0
  18. package/templates/agents/buildline-mapper.md +23 -0
  19. package/templates/agents/buildline-reviewer.md +24 -0
  20. package/templates/agents/buildline-spec-critic.md +19 -0
  21. package/templates/agents/buildline-verifier.md +30 -0
  22. package/templates/bin/gates.mjs +65 -0
  23. package/templates/bin/hook.mjs +90 -0
  24. package/templates/buildline-readme.md +55 -0
  25. package/templates/ci/buildline.yml +71 -0
  26. package/templates/context/architecture.md +21 -0
  27. package/templates/context/design.md +22 -0
  28. package/templates/context/product.md +22 -0
  29. package/templates/cursor.mdc +11 -0
  30. package/templates/feature/progress.md +6 -0
  31. package/templates/feature/spec.md +34 -0
  32. package/templates/principles.md +23 -0
  33. package/templates/stations/autopilot.md +52 -0
  34. package/templates/stations/build.md +52 -0
  35. package/templates/stations/buildline.md +48 -0
  36. package/templates/stations/design.md +39 -0
  37. package/templates/stations/new.md +39 -0
  38. package/templates/stations/onboard.md +57 -0
  39. package/templates/stations/plan.md +44 -0
  40. package/templates/stations/review.md +37 -0
  41. package/templates/stations/ship.md +32 -0
  42. package/templates/stations/spec.md +46 -0
  43. package/templates/stations/verify.md +44 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Julian Oczkowski
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 CHANGED
@@ -1,3 +1,217 @@
1
- # Temporary Holding Version
1
+ <div align="center">
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ <picture>
4
+ <source media="(prefers-color-scheme: dark)" srcset="docs/assets/logo-dark.svg">
5
+ <img alt="Buildline" src="docs/assets/logo-light.svg" width="520">
6
+ </picture>
7
+
8
+ **Install an AI software factory into any project, in one command.**
9
+
10
+ A spec-driven pipeline that coding agents follow from idea to merged PR, with real quality gates,<br>
11
+ independent verification, and a clear place for developers, designers and product managers.
12
+
13
+ [![npm](https://img.shields.io/npm/v/buildline?color=e5a400&label=npm)](https://www.npmjs.com/package/buildline)
14
+ [![node](https://img.shields.io/badge/node-%E2%89%A520.12-5d5a54)](#requirements)
15
+ [![license](https://img.shields.io/badge/license-MIT-5d5a54)](LICENSE)
16
+
17
+ **Works with** Claude Code · Codex · Cursor · Gemini CLI · GitHub Copilot · anything that reads `AGENTS.md`
18
+
19
+ ```bash
20
+ npx buildline
21
+ ```
22
+
23
+ **[Website & docs](https://julianoczkowski.github.io/buildline/)** · [Quick start](#quick-start) · [How it works](#how-it-works) · [Models per station](#models-per-station) · [Dashboard](#the-dashboard)
24
+
25
+ </div>
26
+
27
+ <br>
28
+
29
+ <picture>
30
+ <source media="(prefers-color-scheme: dark)" srcset="docs/assets/dashboard-dark.png">
31
+ <img alt="The Buildline dashboard: features moving through spec, design, plan, build, verify, review and ship" src="docs/assets/dashboard-light.png">
32
+ </picture>
33
+
34
+ ## Why Buildline
35
+
36
+ Coding agents can build most of a feature now, but only when the repo gives them three things most repos don't:
37
+
38
+ | | Without it | With Buildline |
39
+ |---|---|---|
40
+ | **A definition of done** | "Make saved carts work." | Requirements and Given/When/Then scenarios a human owns, locked while the agent builds. |
41
+ | **A way to check the work** | "It works on my end." | Your lint, types, tests and build as gates, plus a verifier that never saw the code being written. |
42
+ | **Memory between sessions** | Every chat starts from zero. | Specs, task lists with `passes` flags and progress logs on disk, so any session picks up where the last one stopped. |
43
+
44
+ And it's sized to the change: a typo doesn't go through a six-document ceremony, and an epic gets split before anyone writes code.
45
+
46
+ ## Quick start
47
+
48
+ ```bash
49
+ cd your-project # empty folder or a ten-year-old monorepo
50
+ npx buildline # detects your stack, asks 5 questions, shows every file before writing
51
+ ```
52
+
53
+ Then, in Claude Code:
54
+
55
+ ```text
56
+ /buildline-onboard new project: interview + scaffold · existing: map the codebase
57
+ /buildline-new Let users save carts for later
58
+ /buildline where things stand and what's next, any time
59
+ ```
60
+
61
+ Not on Claude Code? Ask your agent to *"follow `.buildline/stations/buildline.md`"*. Every station is a plain markdown playbook.
62
+
63
+ ## How it works
64
+
65
+ ```mermaid
66
+ flowchart LR
67
+ I(["idea"]) --> N["intake"]
68
+ N -->|feature| S["spec · PM"]
69
+ N -->|fix| B
70
+ N -->|epic| X["split into features"]
71
+ S --> D["design · designer"] --> P["plan · eng"] --> B["build · agent"]
72
+ B --> V["verify · independent agent"] --> R["review · agent + human"] --> SH(["ship · human merges"])
73
+ V -. failures become tasks .-> B
74
+ R -. blockers become tasks .-> B
75
+ ```
76
+
77
+ Every change is one folder, `.buildline/features/004-saved-carts/`:
78
+
79
+ - **`spec.md`**: brief, requirements, acceptance scenarios, design, plan. Aim for one screen.
80
+ - **`feature.json`**: status, approvals, and tasks that only flip to `"passes": true` on evidence.
81
+ - **`progress.md`**: an append-only log, so the next session (human or agent) knows what happened.
82
+
83
+ ## Built for the whole team
84
+
85
+ | | Start with | You own |
86
+ |---|---|---|
87
+ | **Product managers** | `npx buildline ui`, `/buildline-new`, `/buildline-spec` | requirements, acceptance scenarios, spec approval |
88
+ | **Designers** | `context/design.md`, `/buildline-design` with a Figma link or screenshots | flows, states, components, design approval |
89
+ | **Developers** | `/buildline`, `/buildline-build`, `npx buildline run <id>` | technical design, the plan, the merge |
90
+
91
+ Role guides: [product managers](docs/for-product-managers.md) · [designers](docs/for-designers.md) · [developers](docs/for-developers.md)
92
+
93
+ ## Models per station
94
+
95
+ Use the strongest model where judgement matters and a fast one where the work is well specified. You can also have a second vendor review the diff.
96
+
97
+ ```bash
98
+ npx buildline models preset balanced # Opus specs, designs, plans, reviews · Sonnet builds and verifies
99
+ npx buildline models set review codex # Codex reviews every diff as a second opinion
100
+ npx buildline models # see what each station uses
101
+ ```
102
+
103
+ ```json
104
+ "models": { "default": "sonnet", "plan": "opus", "review": "codex:gpt-5-codex", "verify": "gemini" }
105
+ ```
106
+
107
+ Claude Code skills and subagents switch model per station. A station routed to Codex or Gemini is handed off automatically, and `buildline step <station> <id>` opens it in the right tool. [More on models →](docs/models.md)
108
+
109
+ ## Guardrails that hold
110
+
111
+ Instructions in prose are advice. These are enforced:
112
+
113
+ - **Acceptance lock.** A Claude Code hook blocks edits to a spec's `## Acceptance` while the feature is in build, verify or review. Agents can't move the goalposts.
114
+ - **Independent verification.** The verifier subagent starts in a clean context with only the spec, so the builder never grades its own work.
115
+ - **Evidence before `passes`.** A task is done only after its verification step and the gates have been run and observed.
116
+ - **Humans merge.** Always, at every autonomy level.
117
+ - **Your files stay yours.** Buildline adds marked blocks to files you own, tracks its own files by hash, keeps your edits on `update`, and `remove` restores your settings exactly.
118
+
119
+ ## Autonomy you can dial up
120
+
121
+ | Level | Humans approve | Agents do alone |
122
+ |---|---|---|
123
+ | **1 · Assist** | every station | nothing without a yes |
124
+ | **2 · Guided** *(default)* | spec, plan, merge | build, verify, review |
125
+ | **3 · Autopilot** | spec, merge | plan → review unattended with `buildline run <id>` (Claude Code `/goal`) |
126
+ | **4 · Dark factory** | merge | everything up to a ready PR |
127
+
128
+ Start at 2. Raise it as your gates and acceptance scenarios earn trust. [More on autonomy →](docs/autonomy.md)
129
+
130
+ ## The dashboard
131
+
132
+ `npx buildline ui` opens a local board so people who don't live in a terminal can take part:
133
+
134
+ - see every feature by station
135
+ - read and edit specs, approve stages, and move work along
136
+ - copy the exact command to continue in Claude Code
137
+
138
+ It runs on `127.0.0.1`, needs no account, and only touches Buildline's markdown files.
139
+
140
+ <picture>
141
+ <source media="(prefers-color-scheme: dark)" srcset="docs/assets/drawer-dark.png">
142
+ <img alt="A feature open in the dashboard: approvals, next command and the spec" src="docs/assets/drawer-light.png">
143
+ </picture>
144
+
145
+ ## What gets installed
146
+
147
+ <details>
148
+ <summary>Everything is plain markdown, JSON and two zero-dependency scripts.</summary>
149
+
150
+ ```text
151
+ AGENTS.md + Buildline block: rules, pipeline, gates (read by every agent)
152
+ CLAUDE.md + Buildline block: imports AGENTS.md, lists skills
153
+ .claude/skills/buildline-*/ 11 skills: /buildline, /buildline-new, /buildline-spec … /buildline-autopilot
154
+ .claude/agents/buildline-*.md 5 subagents: spec-critic, verifier, reviewer, design-reviewer, mapper
155
+ .claude/settings.json + hooks (session briefing, acceptance lock) + gate permissions
156
+ .cursor/rules/buildline.mdc if you use Cursor
157
+ GEMINI.md + import block, if you use Gemini CLI
158
+ .github/workflows/buildline.yml optional: gates on every PR + Claude review against the spec
159
+ .buildline/
160
+ buildline.json autonomy, gates, models, team, agents yours
161
+ principles.md the non-negotiables every change is checked against yours
162
+ context/ product · architecture · design system yours
163
+ stations/ one playbook per station managed
164
+ features/ your work
165
+ bin/gates.mjs, hook.mjs quality gates and Claude Code hooks
166
+ ```
167
+
168
+ Works alongside an existing `CLAUDE.md`, `AGENTS.md`, Cursor rules, Spec Kit or BMAD setup, and replaces none of them.
169
+ </details>
170
+
171
+ ## CLI
172
+
173
+ <details>
174
+ <summary><code>npx buildline</code> with no arguments opens an interactive menu. Every command:</summary>
175
+
176
+ ```text
177
+ npx buildline interactive menu (offers setup if there's no factory yet)
178
+ npx buildline init [-y] install --agents --autonomy --models --ci --dry-run
179
+ npx buildline status the board in your terminal --json
180
+ npx buildline new "<title>" open a feature --type fix|feature|epic
181
+ npx buildline approve <id> <stage> record an approval (spec | design | plan)
182
+ npx buildline ui dashboard
183
+ npx buildline step <station> [id] open a station on its model --headless --model
184
+ npx buildline models models per station set <station> <model> · preset <name>
185
+ npx buildline run <id> autopilot with Claude Code /goal --headless
186
+ npx buildline gates run quality gates
187
+ npx buildline doctor check the setup
188
+ npx buildline update refresh managed files, keep your edits
189
+ npx buildline remove uninstall (keeps features and context)
190
+ ```
191
+
192
+ Full reference: [docs/cli.md](docs/cli.md)
193
+ </details>
194
+
195
+ ## Docs
196
+
197
+ Read them on the **[docs site](https://julianoczkowski.github.io/buildline/)**, or here on GitHub:
198
+
199
+ | | |
200
+ |---|---|
201
+ | [Getting started](docs/getting-started.md) | new and existing projects |
202
+ | [Concepts](docs/concepts.md) | features, stations, gates, approvals, context |
203
+ | [Stations](docs/stations.md) | what each one does and produces |
204
+ | [Models per station](docs/models.md) | Claude models, Codex and Gemini per station |
205
+ | [Autonomy & /goal](docs/autonomy.md) | levels 1–4 and unattended runs |
206
+ | [Customising](docs/customising.md) | what's yours, what's managed, how to extend |
207
+ | [CLI reference](docs/cli.md) | every command and option |
208
+ | [FAQ](docs/faq.md) | troubleshooting |
209
+ | [Research notes](docs/research.md) | the thinking behind the design, with sources |
210
+
211
+ ## Requirements
212
+
213
+ Node.js 20.12 or newer. Claude Code is recommended: it adds skills, subagents, hooks and `/goal`. Every other agent works through `AGENTS.md` and the station playbooks.
214
+
215
+ ## License
216
+
217
+ MIT © Julian Oczkowski
@@ -0,0 +1,131 @@
1
+ #!/usr/bin/env node
2
+ import { parseArgs } from 'node:util';
3
+ import path from 'node:path';
4
+ import pc from 'picocolors';
5
+ import * as cli from '../src/cli.js';
6
+ import { VERSION } from '../src/install.js';
7
+
8
+ const HELP = `
9
+ ${pc.bold('buildline')}: install an AI software factory into any project ${pc.dim('v' + VERSION)}
10
+
11
+ ${pc.bold('Usage')}
12
+ npx buildline [command] [options]
13
+
14
+ ${pc.bold('Commands')}
15
+ ${pc.cyan('(none)')} interactive menu (sets up a factory if there isn't one)
16
+ ${pc.cyan('init')} install the factory into this project
17
+ ${pc.cyan('status')} show features, stations and what's next
18
+ ${pc.cyan('new')} "<title>" open a feature ${pc.dim('--type fix|feature|epic --owner <name> --parent <id>')}
19
+ ${pc.cyan('approve')} <id> <stage> record a human approval (spec | design | plan) ${pc.dim('--by <name>')}
20
+ ${pc.cyan('move')} <id> <station> move a feature to a station ${pc.dim('--note "<why>"')}
21
+ ${pc.cyan('ui')} open the dashboard in your browser ${pc.dim('--port <n> --no-open')}
22
+ ${pc.cyan('step')} <station> [id] open a station in the CLI and model set for it ${pc.dim('--model <m> --headless --print')}
23
+ ${pc.cyan('models')} show models per station ${pc.dim('set <station> <model> · preset <name>')}
24
+ ${pc.cyan('run')} [id] autopilot: build → verify → review with Claude Code /goal ${pc.dim('--headless --print')}
25
+ ${pc.cyan('gates')} [names...] run the quality gates
26
+ ${pc.cyan('doctor')} check the setup
27
+ ${pc.cyan('update')} refresh managed files (keeps your edits)
28
+ ${pc.cyan('remove')} uninstall (keeps your features and context)
29
+
30
+ ${pc.bold('Init options')}
31
+ -y, --yes accept detected defaults, no prompts
32
+ --agents <list> claude,codex,cursor,gemini,copilot
33
+ --autonomy <1-4> 1 assist · 2 guided · 3 autopilot · 4 dark factory
34
+ --team <list> developer,designer,pm
35
+ --models <preset> session · balanced · budget · second
36
+ --ci / --no-ci add the GitHub Actions workflow
37
+ --dry-run show what would change without writing
38
+ --force overwrite managed files even if you edited them
39
+ -C, --cwd <dir> run in another directory
40
+
41
+ ${pc.bold('Examples')}
42
+ npx buildline ${pc.dim('# guided setup or the menu')}
43
+ npx buildline init -y --autonomy 3 ${pc.dim('# non-interactive install')}
44
+ npx buildline new "Saved carts" ${pc.dim('# open a feature')}
45
+ npx buildline run 004 ${pc.dim('# unattended build loop')}
46
+ npx buildline models set review codex ${pc.dim('# Codex reviews every diff')}
47
+ npx buildline step review 004 ${pc.dim('# run one station on its model')}
48
+ `;
49
+
50
+ const { values: opts, positionals } = parseArgs({
51
+ allowPositionals: true,
52
+ options: {
53
+ yes: { type: 'boolean', short: 'y' },
54
+ agents: { type: 'string' },
55
+ autonomy: { type: 'string' },
56
+ team: { type: 'string' },
57
+ models: { type: 'string' },
58
+ model: { type: 'string', short: 'm' },
59
+ ci: { type: 'boolean' },
60
+ 'no-ci': { type: 'boolean' },
61
+ 'dry-run': { type: 'boolean' },
62
+ force: { type: 'boolean' },
63
+ cwd: { type: 'string', short: 'C' },
64
+ type: { type: 'string', short: 't' },
65
+ owner: { type: 'string' },
66
+ parent: { type: 'string' },
67
+ by: { type: 'string' },
68
+ note: { type: 'string' },
69
+ port: { type: 'string' },
70
+ 'no-open': { type: 'boolean' },
71
+ headless: { type: 'boolean' },
72
+ print: { type: 'boolean' },
73
+ json: { type: 'boolean' },
74
+ help: { type: 'boolean', short: 'h' },
75
+ version: { type: 'boolean', short: 'v' },
76
+ },
77
+ });
78
+
79
+ const root = path.resolve(opts.cwd || process.cwd());
80
+ const o = { ...opts, dryRun: opts['dry-run'], ci: opts['no-ci'] ? false : opts.ci, open: !opts['no-open'] };
81
+ const [cmd, ...rest] = positionals;
82
+
83
+ async function main() {
84
+ if (opts.version) return console.log(VERSION);
85
+ if (opts.help || cmd === 'help') return console.log(HELP);
86
+ switch (cmd) {
87
+ case undefined:
88
+ return cli.home(root);
89
+ case 'init':
90
+ return cli.init(root, o);
91
+ case 'status':
92
+ case 'st':
93
+ return cli.status(root, o);
94
+ case 'new':
95
+ return cli.newFeature(root, rest.join(' ') || null, o);
96
+ case 'approve':
97
+ if (rest.length < 2) throw new Error('Usage: buildline approve <id> <spec|design|plan>');
98
+ return cli.approveFeature(root, rest[0], rest[1], o);
99
+ case 'move':
100
+ if (rest.length < 2) throw new Error('Usage: buildline move <id> <station>');
101
+ return cli.moveFeature(root, rest[0], rest[1], o);
102
+ case 'ui':
103
+ case 'dashboard':
104
+ return (await import('../src/server.js')).serve(root, o);
105
+ case 'step':
106
+ if (!rest[0]) throw new Error('Usage: buildline step <station> [id]');
107
+ return cli.step(root, rest[0], rest[1], o);
108
+ case 'models':
109
+ return cli.models(root, rest, o);
110
+ case 'run':
111
+ return cli.run(root, rest[0], o);
112
+ case 'gates':
113
+ return cli.gates(root, rest);
114
+ case 'doctor':
115
+ return cli.doctor(root);
116
+ case 'update':
117
+ return cli.update(root, o);
118
+ case 'remove':
119
+ case 'uninstall':
120
+ return cli.remove(root, o);
121
+ default:
122
+ console.log(HELP);
123
+ throw new Error(`Unknown command "${cmd}".`);
124
+ }
125
+ }
126
+
127
+ main().catch((err) => {
128
+ console.error(`${pc.red('✘')} ${err.message}`);
129
+ if (process.env.DEBUG) console.error(err.stack);
130
+ process.exitCode = 1;
131
+ });
package/package.json CHANGED
@@ -1,6 +1,51 @@
1
1
  {
2
2
  "name": "buildline",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
3
+ "version": "0.3.1",
4
+ "description": "Install an AI software factory into any project. A spec-driven pipeline for Claude Code (and any AGENTS.md-compatible agent), for developers, designers and product managers.",
5
+ "type": "module",
6
+ "bin": {
7
+ "buildline": "bin/buildline.js"
8
+ },
9
+ "files": [
10
+ "bin",
11
+ "src",
12
+ "templates",
13
+ "README.md",
14
+ "LICENSE"
15
+ ],
16
+ "engines": {
17
+ "node": ">=20.12"
18
+ },
19
+ "scripts": {
20
+ "test": "node --test test/buildline.test.js",
21
+ "start": "node bin/buildline.js",
22
+ "site": "node scripts/build-site.mjs",
23
+ "release": "node scripts/release.mjs"
24
+ },
25
+ "keywords": [
26
+ "claude-code",
27
+ "ai",
28
+ "agents",
29
+ "software-factory",
30
+ "spec-driven",
31
+ "agents-md",
32
+ "cursor",
33
+ "codex",
34
+ "cli"
35
+ ],
36
+ "author": "Julian Oczkowski",
37
+ "license": "MIT",
38
+ "repository": {
39
+ "type": "git",
40
+ "url": "git+https://github.com/julianoczkowski/buildline.git"
41
+ },
42
+ "homepage": "https://julianoczkowski.github.io/buildline/",
43
+ "bugs": "https://github.com/julianoczkowski/buildline/issues",
44
+ "dependencies": {
45
+ "@clack/prompts": "^1.8.1",
46
+ "picocolors": "^1.1.1"
47
+ },
48
+ "devDependencies": {
49
+ "marked": "^15.0.12"
50
+ }
51
+ }