t3-auto-build 1.0.0 → 1.0.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 (3) hide show
  1. package/README.md +133 -65
  2. package/bin/cli.mjs +7 -3
  3. package/package.json +19 -1
package/README.md CHANGED
@@ -1,25 +1,48 @@
1
- # t3-auto-build
1
+ # t3-auto-build
2
+
3
+ <p align="center"><img src="https://raw.githubusercontent.com/mirceas94/t3-auto-build/main/assets/banner.svg" alt="t3-auto-build: multi-model builds in parallel waves with safety guards, fed by Codex, Antigravity and Claude" width="100%"></p>
4
+
5
+ <p align="center">Cross-platform installer and <code>$auto-build</code> orchestration suite for T3 Code.</p>
6
+
7
+ <p align="center">
8
+ <a href="https://www.npmjs.com/package/t3-auto-build"><img src="https://img.shields.io/npm/v/t3-auto-build" alt="npm version"></a>
9
+ <a href="https://github.com/mirceas94/t3-auto-build/actions/workflows/ci.yml"><img src="https://github.com/mirceas94/t3-auto-build/actions/workflows/ci.yml/badge.svg?branch=main" alt="CI status on main"></a>
10
+ <img src="https://img.shields.io/badge/node-%3E%3D18-brightgreen" alt="Node 18 or newer">
11
+ <img src="https://img.shields.io/badge/dependencies-0-brightgreen" alt="Zero dependencies">
12
+ <img src="https://img.shields.io/badge/license-MIT-blue" alt="MIT license">
13
+ </p>
14
+
15
+ ## Why t3-auto-build
2
16
 
3
17
  Cross-platform installer and `$auto-build` orchestration suite for T3 Code: a coding-discipline
4
18
  `CLAUDE.md`, slash commands, an `auto-build` skill rendered from your own model config, and Node
5
19
  hooks for guardrails. No dependencies. Node 18 or newer.
6
20
 
7
- ## T3 Code quickstart
21
+ - **Multi-model routing:** presets for Codex, Antigravity and Claude, with failover along model ladders.
22
+ - **Parallel waves:** larger tasks are split into file-disjoint waves with checks between them.
23
+ - **Guardrails:** hooks block secret-file edits, some destructive commands and disallowed delegate models.
24
+ - **Quota aware:** cooldown locks keep delegation away from exhausted providers and models.
25
+ - **Careful installs:** your edited files are kept unless you pass `--force`, which backs them up first.
26
+ - **Zero dependencies:** plain Node, 18 or newer.
8
27
 
9
- 1. Install into your Claude config directory. From a clone:
28
+ ## 60-second Quick Start
29
+
30
+ 1. Install into your Claude config directory:
10
31
 
11
32
  ```sh
12
- node bin/cli.mjs init
33
+ npx t3-auto-build init
13
34
  ```
14
35
 
15
- Once the package is published, `npx t3-auto-build init` does the same.
36
+ From a clone, `node bin/cli.mjs init` does the same.
16
37
 
17
38
  2. Check the result:
18
39
 
19
40
  ```sh
20
- node bin/cli.mjs doctor
41
+ npx t3-auto-build doctor
21
42
  ```
22
43
 
44
+ From a clone: `node bin/cli.mjs doctor`.
45
+
23
46
  3. **Restart T3 Code** (and any running Claude Code session). Hooks and `settings.json` changes
24
47
  load only at startup.
25
48
 
@@ -28,37 +51,54 @@ hooks for guardrails. No dependencies. Node 18 or newer.
28
51
  The skill calls `t3-auto-build quota ...`. From a clone, `npm link` puts that command on `PATH`.
29
52
  Without it the skill reads or edits the cooldown file directly.
30
53
 
31
- ## Preset matrix
32
-
33
- | Preset | Models | Codex | Antigravity | Claude | Dual audit |
34
- |---|---|---|---|---|---|
35
- | `tri-provider` (default) | 9 | 3 | 3 | 3 | Claude Opus 5.5 + Gemini 4 Carbon |
36
- | `claude-codex` | 6 | 3 | 0 | 3 | Claude Opus 5.5 + gpt-6-luna |
37
- | `claude-only` | 3 | 0 | 0 | 3 | Claude Opus 5.5 + Claude Sonnet 5.5 |
38
-
39
- Every preset bans `Argon` and `Fable/Mythos`, defaults to Claude Sonnet 5.5 at `medium` effort and
40
- sets the auto-compaction threshold to 35%.
41
-
42
- ## Provider detection and tiers
54
+ ## auto-build workflow
43
55
 
44
- Interactive `init` on a fresh target picks the default preset from the binaries on `PATH`: `claude`,
45
- `codex` and `antigravity` give `tri-provider`, `claude` and `codex` give `claude-codex`, anything
46
- else gives `claude-only`. Provider config folders are only checked for existence and do not change
47
- the preset. With an existing config its preset is the default. `init --yes` does not detect: a fresh
48
- install without `--preset` uses `tri-provider`.
56
+ Triage sizes the task, `L2`/`L3` plan and build in waves (foundations, core, tests/docs), then verification runs with at most 2 fix rounds.
57
+
58
+ ```mermaid
59
+ flowchart TD
60
+ start["auto-build request"] --> step0["Step 0: lockouts, git baseline, resume"]
61
+ step0 --> triage["Triage: REPO_BRIEF, level and shape"]
62
+ triage -->|"L0 / L1"| single["Single builder"]
63
+ triage -->|"L2 / L3"| plan["Plan (cross-check on L3)"]
64
+ plan --> wave1["Wave 1: foundations"]
65
+ wave1 --> wave2["Wave 2: core"]
66
+ wave2 --> wave3["Wave 3: tests and docs"]
67
+ single --> verify["Verify: tests, lint, diff audit"]
68
+ wave3 --> verify
69
+ verify -->|"blockers"| fix["Fix round (max 2)"]
70
+ fix --> verify
71
+ verify -->|"passed"| report["Optional commit and report"]
72
+ ```
49
73
 
50
- `--tiers provider:plan[:weekday]`, comma separated (for example `claude:max:monday,codex:plus`),
51
- records subscription plans. Interactive `init` asks for each detected provider when the flag is
52
- absent.
74
+ 1. **Step 0:** check lockouts, record the `git status` baseline, resume if asked.
75
+ 2. **Triage:** write a short `REPO_BRIEF` (using the cached `.claude/repo-profile.md`) and pick the
76
+ level `L0` to `L3` and work shape `A` (multi-file, UI) or `B` (algorithms, debugging).
77
+ 3. **Plan** (`L2`/`L3`), cross-checked by another provider on `L3` when available.
78
+ 4. **Build:** `L2`/`L3` run in file-disjoint waves: foundations, core, tests/docs. Builders in a wave
79
+ run in parallel; the diff guard and exit checks pass before the next wave.
80
+ 5. **Verify:** blind edge-case tests (`L2`/`L3`), tests and lint, a diff-only audit preferring
81
+ another provider (two auditors on `L3`), at most 2 fix rounds, then an optional commit and a
82
+ report.
53
83
 
54
- | Provider | Plan: short-window limit locks the provider | Plan: locks only the heavy model | Heavy model |
55
- |---|---|---|---|
56
- | `claude` | `pro` | `max` | Claude Opus 5.5 |
57
- | `codex` | `plus` | `pro` | gpt-6-luna |
58
- | `antigravity` | `standard` | `ultra` | Gemini 4 Carbon |
84
+ Runs that edit code, and `--plan-only` runs, save `.claude/auto-build-state.json` (`flags`,
85
+ `completedWaves`, `modifiedFiles`, `remaining`, `blockers`) after each wave or step and keep it
86
+ gitignored. `$auto-build --resume` restores it, lets newly typed flags win and skips completed waves.
87
+ It stops if the file is missing or invalid. When quota runs out, the run saves state so you can
88
+ resume later.
59
89
 
60
- The weekday (`monday` or `mon`) is the weekly reset day, taken as 00:00 UTC. A custom `heavyModels`
61
- list in the config is kept.
90
+ | Flag | Effect |
91
+ |---|---|
92
+ | `--fast` / `--strict` | Cap at `L1` / force `L3`. |
93
+ | `--plan-only` | Stop after the plan. |
94
+ | `--dry-run` | Stop after triage and show the routing. |
95
+ | `--audit-only` | Test and audit the uncommitted diff, then fix if needed. |
96
+ | `--resume` | Continue an interrupted run. |
97
+ | `--commit` | Commit only if the active checks pass. |
98
+ | `--no-audit`, `--no-tests` | Skip the audit / tests. |
99
+ | `--budget` | Cheaper routing; no plan cross-check, blind tests or dual audit. |
100
+ | `--reset-cooldowns` | Clear all locks first. |
101
+ | `--<provider>-only` | Use only that provider's models. |
62
102
 
63
103
  ## CLI
64
104
 
@@ -84,6 +124,8 @@ list in the config is kept.
84
124
  | `--providers <list>` | sync-models | Only these of `claude`, `codex`, `antigravity`; comma separated. |
85
125
  | `--burst`, `--5h`, `--weekly`, `--until <when>`, `--reason <text>` | quota set | See [Quota](#quota). |
86
126
  | `--all` | quota clear | Remove every lock. |
127
+ | `--version`, `-v` | no command | Print the version. |
128
+ | `-h`, `--help` | all | Show the usage text. |
87
129
 
88
130
  Exit codes: `0` success, `1` failure (invalid JSON, broken install), `2` usage error.
89
131
 
@@ -100,6 +142,45 @@ that no longer belong and keeps and reports the ones you changed. Switching to `
100
142
  the hook entries and environment value from `settings.json`. That cleanup is the one case where a
101
143
  `core` run writes `settings.json`.
102
144
 
145
+ ## Presets and safety guards
146
+
147
+ A preset sets the model allowlist, ladders and defaults. The installed hooks block secret-file edits,
148
+ force pushes and hard resets, protected recursive `rm` targets, and `delegate_task` calls to banned,
149
+ non-allowlisted or locked models. They are a safety net, not a sandbox: see [Hooks](#hooks) and its
150
+ [known limits](#known-limits).
151
+
152
+ ### Preset matrix
153
+
154
+ | Preset | Models | Codex | Antigravity | Claude | Dual audit |
155
+ |---|---|---|---|---|---|
156
+ | `tri-provider` (default) | 9 | 3 | 3 | 3 | Claude Opus 5.5 + Gemini 4 Carbon |
157
+ | `claude-codex` | 6 | 3 | 0 | 3 | Claude Opus 5.5 + gpt-6-luna |
158
+ | `claude-only` | 3 | 0 | 0 | 3 | Claude Opus 5.5 + Claude Sonnet 5.5 |
159
+
160
+ Every preset bans `Argon` and `Fable/Mythos`, defaults to Claude Sonnet 5.5 at `medium` effort and
161
+ sets the auto-compaction threshold to 35%.
162
+
163
+ ### Provider detection and tiers
164
+
165
+ Interactive `init` on a fresh target picks the default preset from the binaries on `PATH`: `claude`,
166
+ `codex` and `antigravity` give `tri-provider`, `claude` and `codex` give `claude-codex`, anything
167
+ else gives `claude-only`. Provider config folders are only checked for existence and do not change
168
+ the preset. With an existing config its preset is the default. `init --yes` does not detect: a fresh
169
+ install without `--preset` uses `tri-provider`.
170
+
171
+ `--tiers provider:plan[:weekday]`, comma separated (for example `claude:max:monday,codex:plus`),
172
+ records subscription plans. Interactive `init` asks for each detected provider when the flag is
173
+ absent.
174
+
175
+ | Provider | Plan: short-window limit locks the provider | Plan: locks only the heavy model | Heavy model |
176
+ |---|---|---|---|
177
+ | `claude` | `pro` | `max` | Claude Opus 5.5 |
178
+ | `codex` | `plus` | `pro` | gpt-6-luna |
179
+ | `antigravity` | `standard` | `ultra` | Gemini 4 Carbon |
180
+
181
+ The weekday (`monday` or `mon`) is the weekly reset day, taken as 00:00 UTC. A custom `heavyModels`
182
+ list in the config is kept.
183
+
103
184
  ## sync-models
104
185
 
105
186
  > **`sync-models --dry-run` still executes live probes.** It spends real quota and writes nothing.
@@ -173,37 +254,6 @@ skipped with a warning and kept in the file until it is overwritten or cleared (
173
254
  or `--all`). A file that is not a JSON object is unreadable: hooks warn and ignore it. A write that
174
255
  leaves no entries removes the file.
175
256
 
176
- ## auto-build workflow
177
-
178
- 1. **Step 0:** check lockouts, record the `git status` baseline, resume if asked.
179
- 2. **Triage:** write a short `REPO_BRIEF` (using the cached `.claude/repo-profile.md`) and pick the
180
- level `L0` to `L3` and work shape `A` (multi-file, UI) or `B` (algorithms, debugging).
181
- 3. **Plan** (`L2`/`L3`), cross-checked by another provider on `L3` when available.
182
- 4. **Build:** `L2`/`L3` run in file-disjoint waves: foundations, core, tests/docs. Builders in a wave
183
- run in parallel; the diff guard and exit checks pass before the next wave.
184
- 5. **Verify:** blind edge-case tests (`L2`/`L3`), tests and lint, a diff-only audit preferring
185
- another provider (two auditors on `L3`), at most 2 fix rounds, then an optional commit and a
186
- report.
187
-
188
- Runs that edit code, and `--plan-only` runs, save `.claude/auto-build-state.json` (`flags`,
189
- `completedWaves`, `modifiedFiles`, `remaining`, `blockers`) after each wave or step and keep it
190
- gitignored. `$auto-build --resume` restores it, lets newly typed flags win and skips completed waves.
191
- It stops if the file is missing or invalid. When quota runs out, the run saves state so you can
192
- resume later.
193
-
194
- | Flag | Effect |
195
- |---|---|
196
- | `--fast` / `--strict` | Cap at `L1` / force `L3`. |
197
- | `--plan-only` | Stop after the plan. |
198
- | `--dry-run` | Stop after triage and show the routing. |
199
- | `--audit-only` | Test and audit the uncommitted diff, then fix if needed. |
200
- | `--resume` | Continue an interrupted run. |
201
- | `--commit` | Commit only if the active checks pass. |
202
- | `--no-audit`, `--no-tests` | Skip the audit / tests. |
203
- | `--budget` | Cheaper routing; no plan cross-check, blind tests or dual audit. |
204
- | `--reset-cooldowns` | Clear all locks first. |
205
- | `--<provider>-only` | Use only that provider's models. |
206
-
207
257
  ## Configuration
208
258
 
209
259
  `<config dir>/auto-build.config.json` holds `allowlist` (provider to model names), `bannedModels`,
@@ -267,7 +317,8 @@ PreToolUse guards:
267
317
  `provider`, `providerInstanceId` or `driverKind`, the provider is inferred from a `claude-`,
268
318
  `gpt-` or `gemini-` model name.
269
319
 
270
- Hooks fail open: malformed input, config or cooldown data produces a warning and exit 0. The secret
320
+ Hooks fail open: malformed input or cooldown data produces a warning and exit 0. An invalid config
321
+ produces a warning and falls back to preset defaults, so the allowlist is still enforced. The secret
271
322
  and destructive-command guards need no config.
272
323
 
273
324
  ### Known limits
@@ -289,6 +340,23 @@ skillspector. No Stop hook is installed.
289
340
  If you already run the PowerShell versions, remove them from `settings.json`. `doctor` warns while
290
341
  they are still wired.
291
342
 
343
+ ## Security and privacy
344
+
345
+ - No runtime dependencies. The package's own code makes no network requests and has no telemetry.
346
+ - It does run provider CLIs, which may use the network: `sync-models` and `init --probe` send live
347
+ prompts, and `quota check` runs their login status commands. See [sync-models](#sync-models) for
348
+ billing and environment caveats.
349
+ - Provider detection only checks that config folders exist; it opens nothing inside them.
350
+ - Probes run in an empty temp directory, and the cooldown reasons they record never quote CLI output.
351
+ - Commands are resolved from absolute `PATH` entries, never the current directory.
352
+ - Install and uninstall protect your edits and refuse symlinked paths inside the config directory,
353
+ with the exceptions described in [What `init` touches](#what-init-touches).
354
+ - Guard hooks fail open and have [known limits](#known-limits). Do not rely on them as a security
355
+ boundary.
356
+
357
+ Report vulnerabilities as described in [SECURITY.md](https://github.com/mirceas94/t3-auto-build/blob/main/SECURITY.md). To contribute,
358
+ see [CONTRIBUTING.md](https://github.com/mirceas94/t3-auto-build/blob/main/CONTRIBUTING.md).
359
+
292
360
  ## Optional tools
293
361
 
294
362
  `doctor` warns when these are missing:
package/bin/cli.mjs CHANGED
@@ -1,9 +1,11 @@
1
1
  #!/usr/bin/env node
2
+ import fs from 'node:fs';
3
+ import path from 'node:path';
2
4
  import { HEAVY_MODELS } from '../lib/detect.mjs';
3
5
  import { doctor } from '../lib/doctor.mjs';
4
6
  import { PRESETS, install, uninstall, wantsAuto } from '../lib/install.mjs';
5
7
  import { MODULES, readManifest } from '../lib/manifest.mjs';
6
- import { CliError, resolveTarget } from '../lib/paths.mjs';
8
+ import { CliError, PACKAGE_ROOT, resolveTarget } from '../lib/paths.mjs';
7
9
  import { syncModels } from '../lib/probe.mjs';
8
10
  import { confirmYes, initPrompts, parseChoice, parsePercent, parseTierSpec } from '../lib/prompt.mjs';
9
11
  import { QUOTA_WINDOWS, quotaCheck, quotaClear, quotaSet, quotaStatus } from '../lib/quota.mjs';
@@ -23,6 +25,7 @@ Commands:
23
25
  Options:
24
26
  --target <dir> config dir (default: $CLAUDE_CONFIG_DIR, else ~/.claude)
25
27
  -h, --help show this help
28
+ -v, --version print the version
26
29
  init only:
27
30
  --preset <name> ${PRESETS.join(' | ')}
28
31
  --modules <name> ${MODULES.join(' | ')}
@@ -48,7 +51,7 @@ Options:
48
51
  --all remove every lock`;
49
52
 
50
53
  const VALUE_FLAGS = ['target', 'preset', 'modules', 'compaction', 'tiers', 'providers', 'until', 'reason'];
51
- const SWITCHES = ['yes', 'force', 'help', 'probe', 'dry-run', 'all', ...QUOTA_WINDOWS];
54
+ const SWITCHES = ['yes', 'force', 'help', 'version', 'probe', 'dry-run', 'all', ...QUOTA_WINDOWS];
52
55
  const COMMAND_FLAGS = {
53
56
  init: ['preset', 'modules', 'compaction', 'tiers', 'probe', 'yes', 'force'],
54
57
  doctor: [],
@@ -66,7 +69,7 @@ function parseArgs(argv) {
66
69
  const flags = {};
67
70
  const positional = [];
68
71
  for (let i = 0; i < argv.length; i += 1) {
69
- const argument = argv[i] === '-h' ? '--help' : argv[i];
72
+ const argument = { '-h': '--help', '-v': '--version' }[argv[i]] ?? argv[i];
70
73
  if (!argument.startsWith('-')) {
71
74
  positional.push(argument);
72
75
  continue;
@@ -152,6 +155,7 @@ function quota(action, target, subject, flags) {
152
155
  async function main(argv) {
153
156
  const { flags, positional } = parseArgs(argv);
154
157
  if (flags.help) return console.log(USAGE);
158
+ if (flags.version) return console.log(JSON.parse(fs.readFileSync(path.join(PACKAGE_ROOT, 'package.json'), 'utf8')).version);
155
159
  const [first, ...rest] = positional;
156
160
  const command = first === 'quota' ? `quota ${rest.shift()}` : first;
157
161
  const [min, max] = ARGUMENTS[command] ?? [0, 0];
package/package.json CHANGED
@@ -1,7 +1,25 @@
1
1
  {
2
2
  "name": "t3-auto-build",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "description": "Cross-platform installer and $auto-build orchestration suite for T3 Code.",
5
+ "keywords": [
6
+ "claude-code",
7
+ "t3-code",
8
+ "orchestration",
9
+ "multi-agent",
10
+ "hooks",
11
+ "cli",
12
+ "codex",
13
+ "gemini"
14
+ ],
15
+ "homepage": "https://github.com/mirceas94/t3-auto-build#readme",
16
+ "bugs": {
17
+ "url": "https://github.com/mirceas94/t3-auto-build/issues"
18
+ },
19
+ "repository": {
20
+ "type": "git",
21
+ "url": "git+https://github.com/mirceas94/t3-auto-build.git"
22
+ },
5
23
  "type": "module",
6
24
  "bin": {
7
25
  "t3-auto-build": "bin/cli.mjs"