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
1 change: 1 addition & 0 deletions docs/governance/workstreams.md
Original file line number Diff line number Diff line change
Expand Up @@ -308,6 +308,7 @@ state to its index: [`docs/adr/`](../adr/README.md), [`docs/pdr/`](../pdr/README
| D289 | **What an independent review of v0.34.10 found** (2026-11-25), and #533. A budget `isdigit()` took but `int()` refused (`²`) ended in a traceback, in `nstack config` and in pr-scope; `agent_sockets: 1` was "already true" to `nstack config` (`1 == True`) while the engine, reading `is True`, kept the sandbox closed; pr-scope read the budget in the pull request's own tree, so a change could raise the budget it was measured by — the answers `agent_sockets` is read from the default branch; a render Copier stopped half way was left in the tree; a refusal of copier.yml's validator on an answer already in the file (`checks: forge` on GitLab) named the setting asked for; `nstack update` in an agent's run, without `--session`, made a commit T2 refuses (#533); INSTALL's command list, the answers file's header and three Actions did not name `nstack config` | Done: a budget is a whole number as `int()` reads it (ASCII decimal, above 0); a value is the same only of the same type; pr-scope reads the answers at the base — the project's merged word, as the forges read their rules from the target branch; a base whose file YAML cannot read is measured by the defaults, with a WARNING naming the base — refusing would refuse the pull request that fixes it (the fresh verifier's finding); a render that stops on a tree that was clean is undone; the refused answer is named, with its command; `update` and `update --forge` refuse in an agent's run without `--session`, before anything is written (the engine's other commits: none — `init` is a person's); the docs and Actions name `nstack config`. Each fix's test seen red by mutation (six mutants, six killed) |
| D290 | **T4 refused a confirmation written `<sha>: why`** (#532, downstream, v0.34.8). Each `;` clause of the Confirmed cell was split on its first space and its first word had to be a commit: `36d3d59:` was none, for its colon — the most natural slip from the `<sha> — <why>` T4's Action asks for. The run attested 4 of 5 and cost a re-attest and a verifier round-trip, and the refusal never quoted the cell it read | Done: a clause's commit is its first word, backticks or not, followed by a space, a dash, a colon or a comma, or nothing; a longer word or a clause that does not start with it still confirms nothing. T4's refusal quotes each unconfirmed scenario's cell, or says it has none. 05-workflow §7 says both. Tests: eight forms that confirm (a doubled backtick among them, as the old strip read it — the fresh verifier's nit), four refusals quoted, a long cell cut at 120; each fix's mutant killed |
| D291 | **A squash merge on GitHub leaves no readable Agent-Session trailer on the default branch** (#540, found by the coherence review of v0.34.10): GitHub appends its `Co-authored-by` paragraph — and, for several commits, a `---------` line — after the commit's trailer block, and git reads trailers in the last paragraph only. None of the last 14 commits of this repository's main reads one | Done, by reading before building: every engine reader of the trailer — pr-check's T2 and its verifier check, attest's session, the holds — reads a pull request's own commits or the hold refs, never a squashed commit; no page promises a trailer on the default branch; the session stays in the squashed message, where `git log --grep` finds it (checked on main). 05-workflow §7 says where the trailer is read and how to find a session on the default branch. Not built: a merge that rewrites the message — it would cover an agent's merge only, never a person's in the forge's page, for a reader that does not exist |
| D292 | **Who contributes is a sentence nothing enforces, and an outsider has no path** (the maintainer's request, 2026-11-25: collaboration within one organisation and on an open project alike). Measured the same day on a public test project with a small AI agent on an account with no access: the fork's CI waited for a person and ran without secrets, and pr-check refused its gamed sheet; but the contributing guide spoke to members only, K3 sent it to `nstack claim`, and approving one run released that run only (#542, #543) | Proposed: PDR-0025, one answer `contributors: members \| open`, kept with the project's answers, shown in the contributing guide and displayed on the forge (GitHub's pull requests restricted to collaborators, readable as `pull_request_creation_policy`); an absent answer asserts nothing, so an update changes no project; accepted only after two measurements — the setting written through the API, and an agent's App still opening pull requests under `members`; no claim bot, no AI detection, no contributor agreement chosen for the project. Two independent reviews: the findings against the code and the pull request, then the record itself (its default hid a breaking change, now absent-asserts-nothing) |
| v0.6.0 | **What is announced refuses, and the documents say what is true**: D51 to D54, and the documentary lot of the internal audit | **Done (2026-09-20)**: five workstreams merged (#83, #84, #85, #86, #87), **v0.6.0 published**, tag on `8ae544c`, verified on published artefacts — including an update of `tool-library` from v0.5.0, 9 files and no conflict, still compliant. Found doing it: D55. Next: the pilot, and M11 beside it |
| Pilot | **`NapkinStack/flet`, the first real project**, run by a session that knew nothing of this repository, with the maintainer as decider and this repository's agent as observer — public on the Free plan, where the whole checklist is available, rather than private on Team where G5 is paid and G6 does not exist | **Set aside by the maintainer, 2026-10-15**, at its cycle boundary; the real product followed since is `summit`. **Ran from 2026-09-20**: discovery decided *go* after three rounds and two independent challenges, charter accepted; cycle 01 closed `stopped/reframed`, **cycle 02 closed** with two deliverables accepted and one deferred (its #27), **cycle 03 framed and approved** (#28, #30), which starts its first `critical` module; the framework taken to v0.6.1 by itself at the boundary (#29), v0.6.2 proposed (#31). It has produced D56 to D63, D68, D70 to D77, replicated D26 and D55, and measured D49 — the first figures on what an independent verifier finds (PDR-0003) |
| M11 | **Ceremony follows consequence** (PDR-0011): the framework charges what a failure costs, per module and per project, and states each price before it is paid; with PDR-0004's routing, and PDR-0007, PDR-0008 and PDR-0010 — through to v0.7.0 | **Published as v0.7.0 (2026-10-12).** Planned 2026-09-23 (#98). Merged: **M11f** (#101), **M11a** (#102), **M11b** (#103), **M11d** (#104), **M11e** (#105), **M11c** (#106), **M11h** (#107), **M11g** (#108) closed by its probe — not clean, returned to M13; **M11m** (D68, D74, D75); **M11l** (PDR-0010, D59, D60); **M11n** (D79); **M11o** (PDR-0010 extended: every document has its moment); **M11p** (PDR-0002's three levels given a place: `docs/project/rules/`); **M11j** (PDR-0007: the unframed stage); **M11q** (no folder created empty; PDR-0012 proposed: a project's tree is the project's). **M11k** (PDR-0008's print mode: `nstack settings`; D77, D78). **M11s** (PDR-0012 accepted; the framework's files under `.nstack/`; an update carries what a project adapted); **M11u** (an update rewrites the old addresses a project wrote in its own files, D85). **M11t** (`nstack new-contract`: the contracts module is created by the first contract; PDR-0012 built in full); **M11v** (what the third project found: D81, D82, D83, D86, D87). **M11i**: v0.7.0 published 2026-10-12 (#125, D88). To do: **M11r** PDR-0008's apply mode and D57, after a probe on the real forge; the two earlier projects take v0.7.0 themselves, observed |
Expand Down
152 changes: 152 additions & 0 deletions docs/pdr/0025-a-project-says-who-contributes.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,152 @@
# PDR-0025 — A project says who contributes: its members, or anyone through a fork

- **Status**: Proposed (2026-11-25, D292), from the maintainer's request that NapkinStack be set up
for efficient collaboration, both within one organisation and on an open project. Its first
measurement is done (*User problem*). Two facts are measured before it is accepted
(*Decision*, 5), and nothing is built before that
- **Date**: 2026-11-25
- **Decision makers**: NapkinStack maintainers (`@NapkinStack/maintainers`)
- **Modules affected**: the decider's settings, `nstack settings` and `nstack doctor`, the
contributing guide, pr-check's K3

> The PDR describes **what the product must do and why**, never its implementation.
> The how belongs to an ADR.

---

## User problem

NapkinStack serves the members of an organisation well. They have write access, so they can
claim, attest, approve, and have an agent under an App of their own. A project that also wants
outside contributors gets nothing from NapkinStack. A project that wants none can only write that
wish in its contributing guide, and nothing enforces it.

This was measured on 2026-11-25, on a public test project of the organisation (NapkinStack/flet,
v0.34.11). The contributor was a small AI agent on an account with no access, told only to
"contribute a useful change via a pull request from your fork".
- **Forge and CI, what held:**
- the fork's workflows waited for a person's approval (G9);
- they then ran without secrets;
- pr-check refused the sheet the agent wrote after its first red check: its own account as
verifier, the template's example scenario, `passed` with no evidence.
- **The contributing guide spoke only to members.** The agent never followed it, made a change
unrelated to the cycle's open deliverable, and met the rules only at its first red check.
- **K3 sent it to `nstack claim`**, which needs write access.
- **Approving a fork's workflows from one run's page released that run only.**

- **The template's example scenario, copied verbatim, passed as a scenario**, and the template's
text left in the description was never named.

These gaps are #542 (the path from outside, K3, the approval of a fork's runs, what the verifier
owns) and #543 (the template's example and its leftover text). They hold whatever the project
chooses, and they are repaired first. This PDR is about the choice itself.

## Goal

The decider states once, among the project's answers, whether contributions come from its members
only or also from outside. The forge enforces that choice, and the contributing guide gives each
contributor the path that matches it.

## Out of scope

- A bot that lets an outsider hold a deliverable by a comment, in the style of `@rustbot claim`.
A member can already hold a deliverable for someone (`nstack claim --person`), and leaving it
unheld is acceptable. A bot would be built only if the volume of outside contributions ever asks
for one.
- Telling an AI's change from a person's. The rules judge the change and its verification, never
who typed it. This matches what Kubernetes requires: a person who understands the change and
defends it.
- A contributor agreement or a sign-off rule (DCO, CLA). That is the decider's legal choice. When
the decider makes it, the project uses an established app.

## Prior art

| Product / reference | Solution chosen | What we keep from it |
|---|---|---|
| GitHub, [2026-02-13](https://github.blog/changelog/2026-02-13-new-repository-settings-for-configuring-pull-request-access/) | A repository setting restricts the opening of pull requests to collaborators, or turns pull requests off. Its API exposes `pull_request_creation_policy` (`all` read on our repositories) | **The forge enforces `members`**, instead of a sentence in a guide |
| GitHub, [2026-06-17](https://github.blog/changelog/2026-06-17-limit-open-pull-requests-for-users-without-write-access/) and [2026-10-28](https://github.blog/changelog/2026-10-28-pull-request-limits-exempt-contributors-by-age-or-history/) | A limit on the open pull requests of an account without write access, with exemptions by age or history | Not in this decision: whether a repository can set it through the API is unmeasured; a follow-up if `open` is taken |
| GitHub | The workflows of a first-time contributor's fork wait for a maintainer's approval | Already in the checklist (G9) |
| [Rust's triagebot](https://forge.rust-lang.org/triagebot/issue-assignment.html), Probot's issue-assigner | An outsider claims an issue by a comment, and a bot assigns it | Not taken now (*Out of scope*) |
| tldraw (2026) | Closes outside pull requests automatically, after a wave of low-quality AI ones | The extreme of `members`, enforced by the forge here instead |

**The convention the user already knows**: a public repository either takes pull requests from
anyone, through a fork, or says it does not and the forge holds to it.

## Options considered

1. **Say nothing**, as today: `members` is a sentence nothing enforces, and `open` has no path.
2. **Derive the mode from the repository's visibility**: visibility says who may read the code,
not whether outside code is wanted. A public repository may want none.
3. **Repair #542 and #543 only, and let the forge's own setting be the choice**: the smallest
change. But the forge's setting would then be the only record of a decision about the project.
NapkinStack keeps such decisions in the repository and treats the forge as a display of them.
The contributing guide also needs the choice to say the right path, and it is written from the
repository.
4. **One answer of the decider's, `contributors: members | open`, kept with the project's answers,
shown in the contributing guide, and displayed on the forge** (chosen).

## Decision

**1. One answer, `contributors`, the decider's**, kept with the project's other answers and changed
the same way: by a pull request a human approves.

**2. Absent means not asserted.** A project that has not answered keeps today's behaviour. Nothing
is checked, nothing is changed on the forge, and the guide stays as it is. Only an explicit answer
is enforced. An update therefore changes nothing for a project already receiving outside pull
requests.

**3. `members`**: the forge restricts the opening of pull requests to the project's collaborators.
The person who applies the forge's settings sees that change before it is made, as for every
setting. The contributing guide says that issues are welcome and that pull requests come from
members.

**4. `open`**: pull requests stay open to all, and a fork's workflows wait for a person's approval
(G9, already asked). The contributing guide carries the path from outside, from #542.

**5. Measured before acceptance**, because a wrong answer would make the decision harmful:
- whether the forge's setting can be applied, not only read, through its API;
- whether a GitHub App installed on the repository, an agent's identity, can still open a pull
request under `members`. If it cannot, `members` would stop the project's own agents, and the
decision is reconsidered.

**6. The answer and the forge can disagree** when a person changes the forge's setting by hand. The
forge's settings check reads the forge and names the drift, as it does for every setting.

**7. Off GitHub**, the answer shapes the contributing guide only. The forge's part is said *not
verified* until the forge offers the setting.

## Expected behaviour

- On a project answering `members`, an account without access cannot open a pull request. The
forge says so, and the guide points to issues. The project's agents still open theirs.
- On a project answering `open`, an outsider who reads the guide opens a pull request on a `ready`
deliverable, fills its sheet from the acceptance criteria, and leaves the results to a member.
- Changing the answer is a pull request a human approves, like any setting.

## Success criterion

We will consider this was the right call if, before **2026-12-31**:
- on the test project answering `open`, an outside contributor delivers its cycle's deliverable
with pr-check green after at most one verification round;
- on the same project answering `members`, the forge refuses a pull request from an account
without access, and an agent's pull request, under its App, passes.

How it is observed: the same rehearsal as on 2026-11-25, run again with the guide and the setting
built.

If the criterion is not met: the setting is removed, and the guide's path from #542 stays.

## Removal condition

Removed if no project answers `open` by **2027-06-30**, or if the forges converge on a contribution
policy that a repository declares in a file of its own, which NapkinStack would then generate
instead.

## Impacts

- **Projects**: nothing until they answer. An explicit `members` on a public project closes pull
requests to outsiders, which is a visible change. The person applying the forge's settings sees
it before it is made.
- **The engine and the skeleton**: a new setting, an item of the forge's checklist, and the
contributing guide's section for each mode. The how belongs to an ADR, once the two measurements
of *Decision* 5 are made.
1 change: 1 addition & 0 deletions docs/pdr/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,3 +48,4 @@ The PDR describes **what the product must do and why**, never its implementation
| [0022](./0022-agents-deliver-alone-a-person-is-asked-only-where-it-matters.md) | Agents deliver alone; a person is asked only where it matters | **Accepted (2026-11-01)**; built as D193, D194 and D196 | 2027-03-31, the third project and one new project |
| [0023](./0023-a-criterion-s-due-date-is-the-one-written-in-bold.md) | A criterion's due date is the one written in bold | **Accepted (2026-11-13)**, option B chosen by the decider; amends PDR-0020 §1 and §6; built as D211 | 2027-03-31, the project that met it and one other |
| [0024](./0024-a-task-runs-on-the-model-its-kind-needs.md) | A task runs on the model its kind needs | **Proposed (2026-11-24)**, D280; a measurement on a project before anything is built | 2026-12-15, the project that measures it |
| [0025](./0025-a-project-says-who-contributes.md) | A project says who contributes: its members, or anyone through a fork | **Proposed (2026-11-25)**, D292; measured on a test project with an outside AI contributor (#542, #543) | 2026-12-31, the same rehearsal, run again |