Skip to content

Commit c5ca01a

Browse files
Merge pull request #5 from fiveonecode/docs/contributing-tracks
Split CONTRIBUTING into public and harness tracks
2 parents 162fb35 + 96ab6bb commit c5ca01a

7 files changed

Lines changed: 114 additions & 26 deletions

File tree

CONTRIBUTING.md

Lines changed: 46 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -2,56 +2,78 @@
22

33
Thanks for taking the time to improve Simulator Broker.
44

5-
## Setup
5+
This page has two tracks:
6+
7+
1. **Public patches** — Node.js 20 and the Node test suites. You do not need
8+
the agent harness or a Codex session directory.
9+
2. **Maintainers and agent runs** — the existing `agent:context` /
10+
`agent:verify` / `agent:complete` flow.
11+
12+
## Public patches
13+
14+
Use this track for a small public change: a spec tweak, a CLI or broker-core
15+
fix, a doc edit, or a focused app patch.
616

717
Requirements:
818

9-
- macOS with Xcode and iOS Simulator support
10-
- Node.js LTS
11-
- `xcodegen` on `PATH`
19+
- Node.js 20 or newer on `PATH`
20+
- macOS with Xcode and iOS Simulator support for work that talks to simulators
21+
- `xcodegen` on `PATH` only if you change or build the macOS app
1222

13-
Install and verify from the repo root:
23+
From the repo root, run the Node suites that match what you changed. These
24+
commands do not go through `agent:*`:
1425

1526
```bash
16-
npm install --package-lock-only
17-
npm run agent:catalog -- --format md
18-
npm test
27+
npm run test:broker-core
28+
npm run test:client
29+
npm run test:harness-adoption
1930
```
2031

21-
The macOS app project is generated locally and is not checked in:
32+
App work also needs XcodeGen and `npm run test:app`. The full suite is
33+
`npm test`.
2234

23-
```bash
24-
npm run build:app
25-
```
35+
You do not need to run `agent:context`, `agent:verify`, or `agent:complete`,
36+
and you do not need to create a task session directory.
2637

27-
## Development Workflow
38+
### Pull requests
39+
40+
- Keep changes focused and reviewable.
41+
- Include tests or explain why a deterministic test is not available.
42+
- Keep private or local context out of committed files.
43+
- Do not commit generated Xcode projects, derived data, local broker state,
44+
credentials, machine-specific paths, or task-session artifacts.
45+
46+
## Maintainers and agent runs
47+
48+
Use this track for maintainer work and agent runs that follow the product
49+
harness. Harness enforcement is unchanged: `agent:complete` still requires
50+
structured commits, selected verification profiles, and session artifacts.
2851

2952
Before editing, identify the changed paths and create a task session:
3053

3154
```bash
32-
npm run agent:context -- --paths <files> --session-dir "$HOME/.codex/agent-harness/simulator-broker-app/<session>"
55+
npm run agent:context -- --paths <files> --session-dir <session-dir>
3356
```
3457

3558
Run every verification profile reported by the context command. Specs and
36-
harness-only changes normally require:
59+
docs normally require:
3760

3861
```bash
39-
npm run agent:verify -- --profile spec-only --paths <files> --session-dir "$HOME/.codex/agent-harness/simulator-broker-app/<session>"
62+
npm run agent:verify -- --profile spec-only --paths <files> --session-dir <session-dir>
4063
```
4164

4265
Implementation changes normally require:
4366

4467
```bash
68+
npm run agent:verify -- --profile implementation --paths <files> --session-dir <session-dir>
4569
npm test
4670
```
4771

48-
## Pull Requests
72+
Close the session with:
4973

50-
- Keep changes focused and reviewable.
51-
- Include tests or explain why a deterministic test is not available.
52-
- Keep private/local context out of committed files.
53-
- Do not commit generated Xcode projects, derived data, local broker state,
54-
credentials, machine-specific paths, or task-session artifacts.
74+
```bash
75+
npm run agent:complete -- --session-dir <session-dir>
76+
```
5577

56-
Meaningful task commits should use the structured sections documented in
57-
`AGENTS.md`.
78+
Meaningful task commits use the structured sections documented in
79+
[AGENTS.md](AGENTS.md).

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,9 @@ npm run build:app
6363
`install:local` builds the Debug app, installs the CLI, and copies
6464
`Simulator Broker.app` to `~/Applications`.
6565

66-
Contributor setup, verification, and pull-request expectations are in
67-
[CONTRIBUTING.md](CONTRIBUTING.md).
66+
Contributor setup is in [CONTRIBUTING.md](CONTRIBUTING.md). A small public
67+
patch uses Node.js 20 and the Node test suites. Maintainers and agent runs
68+
keep the `agent:context` / `agent:verify` / `agent:complete` track.
6869

6970
## Five-minute hello world
7071

docs/getting-started.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ Related: [README](../README.md), [Concepts](concepts.md), [Current capabilities]
55
This page is the newcomer install and first-run guide. Specs under `spec/` remain
66
the implementation contract. `simbroker` help and `simbroker doctor` print
77
human-readable text by default; pass `--json` for machine-readable payloads.
8+
A small public patch follows the public-patches track in
9+
[CONTRIBUTING.md](../CONTRIBUTING.md); it does not require the agent harness.
810

911
## Prerequisites
1012

docs/test/front-door.test.mjs

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,55 @@ test("README separates use-versus-develop install guidance and includes a hello-
5454
assert.ok(readme.includes("simbroker lease acquire"));
5555
});
5656

57+
function headingSection(markdown, heading) {
58+
const marker = `\n## ${heading}\n`;
59+
const start = markdown.indexOf(marker);
60+
if (start === -1) {
61+
return "";
62+
}
63+
const bodyStart = start + marker.length;
64+
const next = markdown.indexOf("\n## ", bodyStart);
65+
return markdown.slice(bodyStart, next === -1 ? markdown.length : next);
66+
}
67+
68+
test("CONTRIBUTING leads with a public Node-20 patch track that does not require the harness", () => {
69+
const contributing = readRepoFile("CONTRIBUTING.md");
70+
const human = headingSection(contributing, "Public patches");
71+
const firstHeading = contributing.split(/\r?\n/).find((line) => line.startsWith("## "));
72+
73+
assert.equal(firstHeading, "## Public patches");
74+
assert.ok(human.length > 0, "CONTRIBUTING must have a Public patches section");
75+
assert.ok(
76+
contributing.includes("Node.js 20") || contributing.includes("Node 20") || contributing.includes(">=20"),
77+
"CONTRIBUTING must name Node 20",
78+
);
79+
assert.ok(
80+
human.includes("npm run test:broker-core")
81+
|| human.includes("npm run test:client")
82+
|| human.includes("npm run test:harness-adoption")
83+
|| human.includes("npm test"),
84+
"public track must name a Node test command that is not agent:*",
85+
);
86+
assert.equal(human.includes("You do not need to run `agent:context`"), true);
87+
assert.equal(human.includes("$HOME/.codex"), false);
88+
assert.equal(human.includes("npm run agent:context --"), false);
89+
assert.equal(human.includes("npm run agent:verify --"), false);
90+
assert.equal(human.includes("npm run agent:complete --"), false);
91+
});
92+
93+
test("CONTRIBUTING keeps a labeled maintainer harness track", () => {
94+
const contributing = readRepoFile("CONTRIBUTING.md");
95+
const harness = headingSection(contributing, "Maintainers and agent runs");
96+
97+
assert.ok(harness.length > 0, "CONTRIBUTING must have a Maintainers and agent runs section");
98+
assert.ok(harness.includes("agent:context"));
99+
assert.ok(harness.includes("agent:verify"));
100+
assert.ok(harness.includes("agent:complete"));
101+
assert.ok(harness.includes("npm run agent:context --"));
102+
assert.ok(harness.includes("npm run agent:verify --"));
103+
assert.ok(harness.includes("npm run agent:complete --"));
104+
});
105+
57106
test("README links newcomer docs and embeds a real screenshot file", () => {
58107
const readme = readRepoFile("README.md");
59108
const imageMatch = /!\[.*?]\((.*?)\)/.exec(readme);

spec/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ This repo exists to develop a reusable local simulator broker:
5353
- app unit tests and the local XcodeGen-driven build/test flow now support build-only reruns, focused `-only-testing` filters, and stable `xcresult` output for runtime triage
5454
- local install, local-debug portable packaging, Release distribution packaging, and onboarding flows now exist through `install_local.sh`, `install_local.sh --cli-only`, `package_local.sh`, `package_distribution.sh`, `test:install-smoke`, `test:package-smoke`, `host init --bootstrap-config`, and `project init`
5555
- the published onboarding docs now distinguish CLI-only install, repo-local contributor app+CLI install, local-debug portable bundling, and signed distribution packaging; a new login shell should resolve `simbroker` after install without sourcing `env.sh`
56+
- `CONTRIBUTING.md` publishes a public-patch track (Node.js 20 and the Node test suites, no harness session) and a labeled maintainer/agent harness track; `agent:complete` enforcement is unchanged
5657
- `host init --bootstrap-config` warns that it creates real Simulator devices before provisioning them
5758
- broker-aware sample consumer repo artifacts now cover manual human, interactive agent, unattended agent build-and-test, and CI patterns under `examples/harness-adoption/`
5859
- broker-aware build/test leases now support downstream process registration, memory ceiling containment, evidence bundles, and forced-abort cleanup for detached simulator-like processes

spec/agents.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,12 @@ Related: `spec/README.md`, `spec/harness-integration.md`, `spec/build-and-test.m
55

66
This file defines the intended agent workflow for the bootstrap phase of this repo.
77

8+
`CONTRIBUTING.md` publishes two tracks. Public patches use Node.js 20 and the
9+
Node test suites (`test:broker-core`, `test:client`, `test:harness-adoption`,
10+
or `npm test`) and do not require `agent:context` or a task session directory.
11+
Maintainers and agent runs still use `agent:context` / `agent:verify` /
12+
`agent:complete`. Harness enforcement in this repository is unchanged.
13+
814
## Current routing
915

1016
- `harness-contract` exclusively owns `WORKFLOW.md`, `.agents/`, agent

spec/build-and-test.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,13 @@ The public front door is `README.md` plus `docs/getting-started.md`,
7777
`docs/concepts.md`, and `docs/status.md`. Those pages are newcomer guidance.
7878
This file remains the contributor and verification contract.
7979

80+
`CONTRIBUTING.md` splits public patches from maintainer and agent runs. A
81+
public patch names Node.js 20 and the Node test suites and does not require
82+
`agent:context` or a Codex session directory. The maintainer track still
83+
documents `agent:context`, `agent:verify`, and `agent:complete`. Harness
84+
enforcement (`agent:complete` structured commits, selected profiles, and
85+
session artifacts) is unchanged.
86+
8087
## Contributor onboarding contract
8188

8289
Use the repo-local contributor flow when the engineer already has this checkout on the target Mac.

0 commit comments

Comments
 (0)