Public: anyone can read this; the crew can change it.
docs/VISION.md: the owner's vision, verbatim, read by every run #841
scout/forge:scout/616-docs-vision-md-the-owner-s-vision-verbat → main 1 commit fork
4 files
changed +89
−1
CLAUDE.md +19 −1
| @@ -1,6 +1,7 @@ | ||
| 1 | 1 | # CLAUDE.md — working in this repo |
| 2 | 2 | |
| 3 | Orientation for an agent editing forge. Read this first, then `README.md` (what | |
| 3 | Orientation for an agent editing forge. **Read `docs/VISION.md` first: it says | |
| 4 | what the forge is for and the order of work.** Then this file, then `README.md` (what | |
| 4 | 5 | it is) and `docs/ARCHITECTURE.md` (why it's shaped this way). This file is the |
| 5 | 6 | rulebook: the invariants you must not break, and how to work here. |
| 6 | 7 | |
| @@ -50,6 +51,23 @@ canAdmin`), token scope (`readForm` floor + `minScope`), and branch | ||
| 50 | 51 | environment — never from the forge's own, which carries secrets. A |
| 51 | 52 | preview's data is a copy of production's, never a path to it. |
| 52 | 53 | |
| 54 | ## Rules of the work | |
| 55 | ||
| 56 | - **Done means reachable** — a person reaches it from the feed in two taps, an | |
| 57 | agent through the MCP, a test proves it, a look shows it. A function nobody | |
| 58 | can call is not done. | |
| 59 | - **Contract, not expand** (`docs/VISION.md`, *How we build*): | |
| 60 | 1. **Contract:** one interface per job. When two screens do the same job, | |
| 61 | keep the better one and delete the other in the same change, not later. | |
| 62 | 2. **Minimal, not bare:** every element on a screen earns its place for the | |
| 63 | path the person is on; white space at every screen size; nothing shown | |
| 64 | that the person does not need now. | |
| 65 | 3. **Intentional paths:** each screen has one primary next action. Name the | |
| 66 | path in the issue (who arrives, from where, to do what, where they go | |
| 67 | next), and a UI pull shows that path in its looks at phone and desktop | |
| 68 | widths. | |
| 69 | 4. **A UI change that adds a screen or a control says what it removes.** | |
| 70 | ||
| 53 | 71 | ## How to work |
| 54 | 72 | |
| 55 | 73 | sh |
docs/VISION.md added +31
| @@ -0,0 +1,31 @@ | ||
| 1 | # What the forge is for | |
| 2 | The forge is a social place for building. Everyone who joins gets a whole forge of their own: their apps, and a crew that builds them. People share what they make, take what others made and mold it, and the best of it rises through a visible tree of forks, while anyone can stay as private and as different as they like. Opening it should feel like opening X: you get it at once. Steering it should take one thought: type it, go. | |
| 3 | ||
| 4 | ## Order of work | |
| 5 | 0. **Trust, always first.** Agents are contained. Agent pulls are reviewed. The gate runs every test. Admin is a separate account from the everyday one, explained kindly and directly; using AI with admin stays possible but deliberate. Private by default, and always plain about who can see what. | |
| 6 | 1. **One front door: the feed.** Home is an X-style timeline that IS the git primitives: a post is a tell or an issue; a reply is a comment; a repost or quote is a share or a fork; a like is a signal written to the decision ledger; a crew member's posts are its runs, pulls and looks. The crew reads and writes through the same feed. There is no dev/studio split: one interface, with every developer depth (files, diffs, runs, terminal) one step deeper from any post. | |
| 7 | 2. **The explorer.** Apps, forges and people ranked by real metrics (use, forks, ships, likes, freshness), and trivially filterable to exactly what you want. Every app says "make it yours": one action forks it into your forge. | |
| 8 | 3. **The fork tree is the organization.** My forge is the public upstream; an organization's forge forks it; each person's forge forks their organization's. Every fork chooses how it follows its upstream. The tree is visible and a pleasure to browse; good changes bubble up as offers and flow down as updates. | |
| 9 | 4. **A forge in a link.** I (or my agent, through the MCP) create a forge for a person, a client or an organization: chosen apps (some forked from mine, some still autonomous so they see it cooking), a starter budget, an admin account, one link. First login shows their crew working right now in the feed, and three next steps: make your everyday account, open your apps, tell the crew something. They add their people; each new person gets their own forge that follows the organization's. A client list tracks who was sent what and what happened. | |
| 10 | 5. **Open to every agent.** Any agent or harness can find and use a forge: the MCP with OAuth (Claude app, Grok in a car); a role-aware, token-efficient manifest on every page saying what you can do here as who you are; standards metadata; and on a public app or repo, an outside person or agent can file a report or offer a pull without being taught how. | |
| 11 | 6. **Never lost.** A forge toolbar in every app and preview: where you are (app, environment, which pull this previews), who is working on it, comment on this page or its issue or pull, tell the crew from here, make it yours. Later: in a preview, a tint on what changed and its diff on selection. | |
| 12 | 7. **Steering is one thought.** Tell from anywhere: the feed composer, the toolbar, a phone share sheet, the MCP. | |
| 13 | ||
| 14 | ## How we build | |
| 15 | - A deterministic tool with deliberate noise: actions are explicit, previewed and receipted; AI judgment only where we say so. | |
| 16 | - The same action has the same shape for a person and an agent: a page and an MCP tool, in the same words. | |
| 17 | - Done means reachable: a person reaches it from the feed in two taps, an agent through the MCP, a test proves it, a look shows it. A function nobody can call is not done. | |
| 18 | - Far ideas go on the map behind what they depend on, and we trim honestly. | |
| 19 | - **Contract, not expand.** In the owner's words: "There are a lot of repeated interfaces because of the studio and dev split. That was by design so I could see many examples and learn what I like faster. That was an expand. This is a contract. I want minimalist but not bare. Make use of white space on any screen size, but don't show me something I don't need to see and waste my time or mental space. Intentional user paths are the name of the game." As rules: | |
| 20 | 1. **Contract:** one interface per job. When two screens do the same job, keep the better one and delete the other in the same change, not later. | |
| 21 | 2. **Minimal, not bare:** every element on a screen earns its place for the path the person is on; white space at every screen size; nothing shown that the person does not need now. | |
| 22 | 3. **Intentional paths:** each screen has one primary next action. Name the path in the issue (who arrives, from where, to do what, where they go next), and a UI pull shows that path in its looks at phone and desktop widths. | |
| 23 | 4. **A UI change that adds a screen or a control says what it removes.** | |
| 24 | ||
| 25 | ## The tests | |
| 26 | - **Link test:** someone opens a link to their new forge and, within a minute and without a word from me, sees a crew working and knows what to do next. | |
| 27 | - **Muse test:** an outside agent looking at a public forge app finds out how to report a problem or offer a change, and does it. | |
| 28 | - **Friend test:** someone I send an app to makes it theirs in one action. | |
| 29 | - **Tesla test:** any MCP client connects with OAuth and steers. | |
| 30 | - **Lost test:** from any app or preview you know where you are and can get home, comment, or tell the crew. | |
| 31 | - **Admin test:** a new owner is guided to a separate everyday account, told why in two sentences, and can still choose otherwise on purpose. |
src/crew/brief.ts +2
| @@ -116,6 +116,8 @@ export function systemPrompt(input: BriefInput): string { | ||
| 116 | 116 | "", |
| 117 | 117 | "Your shell is sandboxed: writes stay in the clone, the network is the forge and the package registry, and you cannot signal processes you started in an earlier command. If you start the app to try it, do it inside one command that also stops it (`bun run src/server.ts & pid=$!; sleep 2; curl …; kill $pid`). Anything left running is stopped by the forge when you finish; it is not a failure, but it is noise.", |
| 118 | 118 | "", |
| 119 | "Read `docs/VISION.md` in the repository first, if it has one: it says what the forge is for and the order of work. Done means reachable — a person reaches it from the feed in two taps, an agent through the MCP, a test proves it, a look shows it; a function nobody can call is not done. Contract, not expand: one interface per job (delete the worse of two screens in the same change), every element earns its place, each screen has one primary next action, and a UI change that adds a screen or a control says what it removes.", | |
| 120 | "", | |
| 119 | 121 | "Work carefully and finish. If the task is unclear, impossible, or not something you should do, do not guess: make your last message start with `DECLINED:` followed by exactly why. Nothing is pushed then, and a person reads it.", |
| 120 | 122 | ); |
| 121 | 123 | return lines.filter((l) => l !== undefined).join("\n"); |
test/brief-vision.test.ts added +37
| @@ -0,0 +1,37 @@ | ||
| 1 | /** Every crew brief points at docs/VISION.md and states the rules of the work. */ | |
| 2 | ||
| 3 | import { expect, test } from "bun:test"; | |
| 4 | import { readFileSync } from "node:fs"; | |
| 5 | import { systemPrompt, type BriefInput } from "../src/crew/brief.ts"; | |
| 6 | ||
| 7 | const input = (isApp: boolean): BriefInput => | |
| 8 | ({ | |
| 9 | agent: { user: { username: "scout", displayName: "Scout" }, brief: "" }, | |
| 10 | repo: { ownerName: "o", name: "r", defaultBranch: "main" }, | |
| 11 | issue: { number: 1 }, | |
| 12 | branch: "scout/1", | |
| 13 | forgeUrl: "http://forge", | |
| 14 | isApp, | |
| 15 | resuming: false, | |
| 16 | }) as unknown as BriefInput; | |
| 17 | ||
| 18 | test("every brief, app or not, is told to read the vision and the rules", () => { | |
| 19 | for (const isApp of [false, true]) { | |
| 20 | const text = systemPrompt(input(isApp)); | |
| 21 | expect(text).toContain("docs/VISION.md"); | |
| 22 | expect(text).toContain("Done means reachable"); | |
| 23 | expect(text).toContain("Contract, not expand"); | |
| 24 | } | |
| 25 | }); | |
| 26 | ||
| 27 | test("CLAUDE.md links the vision first and states the rules; the vision carries them", () => { | |
| 28 | const claude = readFileSync("CLAUDE.md", "utf8"); | |
| 29 | expect(claude.indexOf("docs/VISION.md")).toBeLessThan( | |
| 30 | claude.indexOf("## Invariants"), | |
| 31 | ); | |
| 32 | expect(claude).toContain("**Done means reachable**"); | |
| 33 | expect(claude).toContain("**A UI change that adds a screen or a control says what it removes.**"); | |
| 34 | const vision = readFileSync("docs/VISION.md", "utf8"); | |
| 35 | expect(vision).toContain("**Contract, not expand.**"); | |
| 36 | expect(vision).toContain("# What the forge is for"); | |
| 37 | }); |
new above
offline