From 162b47cedc8980792a4c021e8444f3488bf49649 Mon Sep 17 00:00:00 2001 From: Jeremy Collins Date: Tue, 1 Dec 2026 08:45:23 -0500 Subject: [PATCH] Add PROCESS.md: the work model of the project --- PROCESS.md | 103 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 103 insertions(+) create mode 100644 PROCESS.md diff --git a/PROCESS.md b/PROCESS.md new file mode 100644 index 0000000..293aba3 --- /dev/null +++ b/PROCESS.md @@ -0,0 +1,103 @@ +# Development process + +This page is the work model of the project. One coordinator and one worker for each platform do the work. Each of them is an AI session. The owner sets the goals and makes the decisions. + +Each primary repository of the organization uses this work model. The work in this repository starts when the owner sets its milestones. + +The model has two aims: `main` stays correct, and the work goes in at a steady pace. Quality comes before the count of changes. + +## Roles + +| Role | Count | Model | Machine | +|---|---|---|---| +| Owner | 1 | a person | any | +| Coordinator | 1 | the most capable model | Linux | +| Worker | 1 for each platform | a cheaper model | Linux, macOS, Windows | + +### The owner + +- Gives the goals, the order of the work, and the release plan. +- Makes each decision that changes the design, the security rules, or the public text of the project. +- Approves each install, each use of a signing key, and each use of a real device. + +### The coordinator + +- Plans the work. It splits a goal into items that do not depend on each other, and gives each item to one worker. +- Owns the issues: it files them, labels them, removes duplicates, and closes them. +- Owns the review. It reads each PR, tests it, and asks for changes. +- Merges. No other role merges a PR. +- Owns the releases: the version change, the notes, the tag, and the checks after the tag. +- Fixes `main` first when a check of `main` fails. +- Writes a PR itself only when no PR waits for a test or a merge. The merge of the open PRs comes first. +- Gives each issue the milestone of a release. A milestone has the name of its tag, such as `v1.0.0-beta.7`. + +### A worker + +- Takes items from the coordinator, and continues with the next item without a wait. +- Tests each change on its platform before the push: a real window, an emulator, or a simulator. +- Opens one small PR for each item, and at most one PR in each hour. It stacks a PR on an open PR only when the code needs it. +- Uses the rest of the hour for tests, docs, pictures, and the review of the PRs of the other workers. +- Rebases its PRs when the coordinator asks. +- Does not merge, and does not close an issue. + +## The pace + +- A worker opens at most one PR in each hour. With two workers and the coordinator, at most three new PRs arrive in an hour. +- The coordinator has no limit. In each hour it tests and merges each open PR that is ready. +- The limit keeps the queue short. After a release or a QA pass of one or two hours, the coordinator finds 4 to 6 PRs, not 100. +- The limit also keeps the cost of the work steady. +- A PR that is not ready stays open for the next hour. No merge is done in a hurry. +- The plan of a day is about 8 hours of work: 24 PRs at most. The milestone of the day holds no more work than that. +- When the work of the day is done, the work stops until the QA pass at midnight. No session takes work from the next day. + +## The loop + +1. A worker pushes a PR and sends one line to the coordinator. +2. The coordinator collects the open PRs that are ready. +3. The coordinator merges them on `main` in one test tree and runs the gate of the repository on that tree. +4. If the gate fails, the coordinator finds the PR that causes the failure, removes it from the tree, and tells its worker. +5. The coordinator checks that the head of each PR did not move during the test. +6. The coordinator rebases each PR on `main`, writes the test result in a comment, and merges by rebase. +7. The workers continue to push during steps 2 to 6. A PR that arrives during a test goes into the next tree. + +One test tree for several PRs is the key step. The gate runs one time for the set, and it also tests the PRs together. + +## Rules of the coordinator + +- Test before each merge. A check that CI runs must also be in the local gate. +- Build the docs site before the merge of each docs change, when the repository has one. +- Show a visual change to the owner before the merge. +- Compare the head of a PR before and after the test. +- State in the PR what ran and what did not run, for example "No emulator ran here." +- Do not do an action for a worker that the permission check of that worker denied. Ask the owner. +- Keep an idea of the owner private until the owner asks for an issue or a page. +- Keep security findings private: local files and direct messages only, with plain PR titles and bodies. + +## Messages + +Messages between sessions and thoughts use a short form: symbols, issue numbers, paths, and key words. + +- A message to a worker has the goal, the scope, the rules that differ from the rules of the repository, and the form of the report. +- A report has one line for each item: the PR number, the state, and the checks that ran. +- Point to a file, an issue, or a PR. Do not copy its text. +- The text that a person reads has short and plain sentences: commits, PRs, issues, docs, and the report to the owner. It follows WRITING.md when the repository has one. + +## Limits of a machine + +- Start no subagent. The coordinator and the workers are the only agents. +- Keep scripts, logs, and worktrees out of the shared folders of the machine. Remove a worktree when its PR merges. +- Stop the other jobs before a benchmark. Record the load with each number. +- Stop only your own processes, by PID. + +## Releases + +A release comes out each morning, after the QA pass of the night. + +1. At midnight the coordinator names the head of `main` as the release candidate. A PR that merges later goes into the next release. +2. The coordinator and each worker run the QA pass on the candidate, each on its platform: the tests, the release build, and the user paths of the notes. A worker reports pass or fail for each area, with the faults that stop the release first. +3. A fault that stops the release gets a fix PR, and the fix goes through the loop. Each other fault gets an issue with a milestone and a line in the known limits of the notes. +4. The coordinator makes the version PR with the notes and merges it. +5. The coordinator waits for a green CI run of `main`, and then tags. It watches the release jobs, checks the packages, and adds the highlights to the release notes. +6. The workers do not stop for a release. + +Each open issue has the milestone of the release that plans to close it. When a release comes out, the coordinator closes its milestone and moves each issue that stays open to the next one.