Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 17 additions & 2 deletions NORTH_STAR.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,20 @@ that project is an empty folder or an existing codebase with history.
- **Two modes:**
- **Empty (0→1):** the operator's first command *becomes* the first north star; Fabrica
scaffolds the skeleton + a **real PR-CI gate (the operator confirms that initial gate)**
+ a first commit, then runs the loop.
+ a first commit + a **committed `.fabrica/north-star.md`** (Faber drafts the exact
north-star text + done-signal from the operator's command as part of the approved bootstrap
plan; the bootstrap coder commits THAT text into the target), then runs the loop.
- **Existing (1→N):** Fabrica **understands the whole project first** (structure, stack,
conventions, current state), then pursues the operator's north star.
- **Done-signal:** from BOTH starting points — (a) an empty folder/repo, and (b) an existing
repo with no prior Fabrica setup — a first `/faber` session drives one real change to a
**merged, CI-gated PR** toward the operator's stated goal, with the CI gate present
(**operator-approved when Fabrica bootstrapped it**) before any autonomous merge.
(**operator-approved when Fabrica bootstrapped it**) before any autonomous merge. On the
empty (0→1) path the bootstrap PR also lands a **committed `.fabrica/north-star.md`** (active
non-placeholder entry, no `fabrica-shipped-default` marker) so the 0→1 target ends with the
committed north star the shipped gate (`manager-review.sh`) requires — a `doctor.sh`
north-star WARN *before* that bootstrap PR lands is advisory in greenfield (like missing
PR CI), not a blocker.
- **Why it's the north star:** the team is only *"pick up my work"* useful if it meets a
project where it is, instead of requiring a pre-wired repo.
- **Safety note:** Fabrica's autonomy rests on CI + cross-vendor review; on an empty project
Expand All @@ -74,6 +81,14 @@ trajectory and override anything consensus dropped.
but **not** independently proven on a real fresh clone, so folded into B rather than marked
*achieved*. Original done-signal: `doctor.sh` exits 0 + an accurate fresh-clone
`QUICKSTART.md` walkthrough.
- **C — "Numbers I can trust" (MapleFolio)** — *Fabrica's **first real external run**; set +
approved by the operator (2026-07-01, in-session `/faber`); **achieved 2026-07-02**. Logged
here as a completed external run — Fabrica-self's active star stays B.* Goal: MapleFolio's
Canadian room/cash/FX calculation engine verified by an automated test suite run as the hard
CI gate, so real-money contribution decisions rest on correct math. This run motivated the
**per-target north-star architecture** (#97 resolver, #98/98a atomic flip, 98b adoption) — a
target's goal must live in the target's `.fabrica/north-star.md`, not Fabrica's control-plane
file.

### Vetoed-but-Faber-thought-relevant (manager-debate filtered these out)

Expand Down
22 changes: 15 additions & 7 deletions QUICKSTART.md
Original file line number Diff line number Diff line change
Expand Up @@ -172,17 +172,25 @@ gate yet (Faber won't run autonomously until a real gate exists):
outward-facing action Faber won't do silently). If you already have a folder with a base
branch, skip this.
4. **Approve the concrete bootstrap plan.** Faber proposes the initial scaffold — a runnable
**skeleton + manifest + first test + a `pull_request` CI workflow** — and you approve that
plan. That approval is the go for the bootstrap.
**skeleton + manifest + first test + a `pull_request` CI workflow + a committed
`.fabrica/north-star.md`** — and you approve that plan. That approval is the go for the
bootstrap. Part of the plan is the **exact north-star text + done-signal Faber drafts from
your opening command** (command-as-first-north-star): the bootstrap coder commits *that* text
into the target's `.fabrica/north-star.md` — Faber doesn't invent your goal.
5. **Faber scaffolds it.** Once the repo + base branch exist, Faber first bootstraps the loop
labels and runs its read-only **readiness self-check** (`doctor.sh`) — surfacing any hard
failure like `gh`/Codex CLI not signed in **before** it spawns anything (the bootstrap PR
still gets a Codex review, so that prerequisite matters up front); the expected no-CI /
no-`CLAUDE.md` results here are just advisory warnings. Then Faber spawns the coder under its
narrow **greenfield-bootstrap exception** to create the skeleton, manifest, first test, and
PR CI **together** in one sole-purpose PR (the coder is normally blocked with no commands to
discover and no PR CI — this exception exists precisely to establish both). Cross-vendor Codex
review still runs.
no-`CLAUDE.md` — **and no-north-star** — results here are just advisory warnings (the bootstrap
PR is what creates the committed `.fabrica/north-star.md`, so a north-star WARN *before* it
lands is advisory in greenfield, like the missing-PR-CI WARN). Then Faber spawns the coder
under its narrow **greenfield-bootstrap exception** to create the skeleton, manifest, first
test, PR CI, **and a committed `.fabrica/north-star.md`** (an active non-placeholder entry
carrying your goal + done-signal, no `fabrica-shipped-default` marker) **together** in one
sole-purpose PR (the coder is normally blocked with no commands to discover and no PR CI —
this exception exists precisely to establish both). Cross-vendor Codex review still runs. This
leaves the 0→1 target with the committed north star the shipped gate (`manager-review.sh`)
requires.
6. **You approve and merge the bootstrap PR by hand.** No real gate exists yet for it to
certify itself, so Faber classifies it **human-merge-only** and does **not** auto-merge
it — you merge that initial gate yourself (same as the add-PR-CI bootstrap above).
Expand Down
11 changes: 11 additions & 0 deletions RESTORE.md
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,17 @@ That checklist covers:
required to restore the coding team, so it is out of scope for this runbook. If you do
want it back, note that it needs a `CLAUDE_CODE_OAUTH_TOKEN` repo secret, which lives
only in GitHub repo settings (not in any file here) and must be re-created by hand.
- **North star (per target)** — the team steers by the target's **committed**
`.fabrica/north-star.md` (resolved via `scripts/lib/north-star.sh`; the manager-debate gate
reads its committed content). Restore it in the target repo: copy
[`templates/.fabrica/north-star.md`](templates/.fabrica/north-star.md) to
`.fabrica/north-star.md`, replace the placeholder with your direction, **remove the
`<!-- fabrica-shipped-default -->` marker**, and **commit** it — a missing / still-marked /
no-`status: active` star FAILs the proactive gate (`manager-review.sh`) and WARNs in
`doctor.sh`. Setup does **not** seed it — `setup-target-repo.sh` only creates the loop labels.
(When restoring **Fabrica itself**, its north star is the root
[`NORTH_STAR.md`](NORTH_STAR.md) — Fabrica is its own target — so there's no separate
`.fabrica/north-star.md` to restore.)
- **Conventions** — drop [`templates/target-CLAUDE.md`](templates/target-CLAUDE.md) into
the target repo's root, filled in for that repo.
- **The in-session setup** — install `/faber` (step 1) and connect the Codex CLI for
Expand Down
30 changes: 24 additions & 6 deletions manager/CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -154,12 +154,30 @@ only to you. I never talk to the coder or the reviewer — you are my single int
- **Greenfield BOOTSTRAP (3b) — drive the first scaffold once the operator approves the plan.**
After the safe entry above (detection + the operator's approval of the concrete bootstrap
plan), you drive the **initial scaffold** as a designated **greenfield-bootstrap issue**:
a runnable **skeleton + manifest + first test + a `pull_request` CI workflow**, created
**together** by a coder subagent under the coder's narrow **greenfield-bootstrap exception**
(`routines/coder.md`). That exception lets the coder scaffold this first change even with no
commands to discover (#78) and no PR-CI (#81/#86) yet, because this sole-purpose issue
*establishes* the toolchain **and** the gate; it is the greenfield analogue of the add-CI
exception, and every other/feature issue still hits the normal gates.
a runnable **skeleton + manifest + first test + a `pull_request` CI workflow + a committed
`.fabrica/north-star.md`**, created **together** by a coder subagent under the coder's narrow
**greenfield-bootstrap exception** (`routines/coder.md`). That exception lets the coder
scaffold this first change even with no commands to discover (#78) and no PR-CI (#81/#86)
yet, because this sole-purpose issue *establishes* the toolchain **and** the gate; it is the
greenfield analogue of the add-CI exception, and every other/feature issue still hits the
normal gates.
- **The bootstrap turns the operator's command into the committed target north star.** The
greenfield 0→1 path must leave the target with the committed `.fabrica/north-star.md` the
post-98a gate requires (`manager-review.sh` FAILs on missing / `fabrica-shipped-default` /
no-`status: active`). So **you (Faber) draft the exact north-star text + done-signal** from
the operator's stated command, as part of the operator-approved bootstrap plan — the
command-as-first-north-star, recorded IN the target and committed. The bootstrap coder
commits **THAT** Faber-provided text (an active `status: active` heading, the operator's
goal + a done-signal, **NO `fabrica-shipped-default` marker**, **no fabricated approval
token** — approval is the operator's in-session act); **it does not invent the goal.** This
makes the committed target star part of the bootstrap-PR artifact set, so a doc-following
0→1 path never ends without it.
- **Pre-bootstrap north-star WARN is advisory in greenfield.** Because the bootstrap PR
itself *creates* the committed `.fabrica/north-star.md`, a `doctor.sh` north-star WARN
run **before** that PR lands (e.g. `no north star set for the target — .fabrica/north-star.md
is absent`) is **advisory in greenfield — like the expected `no PR-triggered CI detected`
WARN** — NOT a blocker pre-bootstrap. Relay it as advisory and proceed with the bootstrap;
the bootstrap PR is what establishes the committed star.
- **Base-branch prerequisite (operator-gated, you surface it).** A truly empty GitHub repo
(no commits → no default branch) can't receive a PR yet, so establishing the initial base
(the first commit) is an **operator-gated prerequisite** — consistent with the no-git /
Expand Down
13 changes: 10 additions & 3 deletions routines/coder-revision.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,12 +83,19 @@ Faber has briefed you with the PR, the latest review comments, and the current r
to an add-CI PR; any feature PR on a CI-less repo still escalates and stops per this gate.
**GREENFIELD-BOOTSTRAP EXCEPTION** (mirrors `coder.md`): when the PR is the **designated
greenfield-bootstrap** — the first scaffold on an empty target (skeleton + manifest + first
test + `pull_request` CI together) — this sole-purpose PR is **permitted** despite step-3
test + `pull_request` CI + a committed `<target>/.fabrica/north-star.md` together) — this
sole-purpose PR is **permitted** despite step-3
finding nothing and no PR-CI existing yet: neither the step-3 command-discovery nor this
PR-CI gate applies, because it *establishes* the toolchain **and** the gate. **This is a gate
decision only** — you are working on the PR's existing branch (fix mode already branched), so
fold review feedback into the skeleton / manifest / first test / workflow on that branch, run
those commands locally (step 5), and push the green result. Also **narrow + sole-purpose** —
fold review feedback into the skeleton / manifest / first test / workflow / committed
`<target>/.fabrica/north-star.md` on that branch, run
those commands locally (step 5), and push the green result. **The committed
`<target>/.fabrica/north-star.md`** carries the **Faber-provided** north star (an active
`status: active` heading, the operator's goal + a done-signal, **NO `fabrica-shipped-default`
marker**, **no fabricated approval token**) — **commit the text Faber's brief provides; do not
invent the goal** (the post-98a gate reads the committed file and FAILs on missing /
marker-carrying / no-active-entry). Also **narrow + sole-purpose** —
only the greenfield-bootstrap PR; any other PR on a command-less / CI-less repo still
escalates and stops per this gate. (This bootstrap PR is operator-approved + human-merged —
Faber's concern; your job is the green push and stop.)
Expand Down
19 changes: 15 additions & 4 deletions routines/coder.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,10 +112,21 @@ manager-debate consensus toward a user-approved north star (a proactive issue).
scaffolding happens in the implementation step (step 6), AFTER step 5 creates the branch**
— branch first, then scaffold, so branch-safety holds. In that implementation step you
create the initial **project skeleton + a manifest + a first test + a `pull_request` CI
workflow together**: scaffold a minimal runnable skeleton per the goal Faber states in the
brief, add its manifest, add one real first test, and author a `pull_request`-triggered
workflow that installs and runs the lint / build / test for that skeleton; run those same
commands locally (step 9) so the workflow you author is green. This exception is **narrow +
workflow + a committed `<target>/.fabrica/north-star.md` together**: scaffold a minimal
runnable skeleton per the goal Faber states in the brief, add its manifest, add one real
first test, and author a `pull_request`-triggered workflow that installs and runs the lint /
build / test for that skeleton; run those same commands locally (step 9) so the workflow you
author is green. **Also create + commit `<target>/.fabrica/north-star.md` with the
Faber-provided north star:** post-98a the merge / manager-debate gate reads the target's
**committed** `.fabrica/north-star.md` and FAILs on missing / `fabrica-shipped-default`-marker /
no-`status: active`-entry, so the 0→1 bootstrap must leave a real committed one. **Faber's
brief gives you the exact north-star text + done-signal** (drafted from the operator's command
as part of the operator-approved bootstrap plan) — **commit THAT text; do not invent the
goal.** Write it with an active `status: active` heading carrying the operator's goal + the
done-signal, **NO `fabrica-shipped-default` marker**, and **no fabricated approval token**
(approval is the operator's in-session act, not a line you write). If the brief does not
include the north-star text, do NOT invent it: comment (lead with the SHORT reason
`ambiguous-spec`), add label `needs-human`, and stop. This exception is **narrow +
sole-purpose** — it applies **only** to the designated greenfield-bootstrap issue (a first
scaffold on an empty target); any other/feature work still hits the normal step-3 and
step-4 gates and escalates + stops on a CI-less / command-less repo as above.
Expand Down
Loading
Loading