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 @@ -330,6 +330,7 @@ state to its index: [`docs/adr/`](../adr/README.md), [`docs/pdr/`](../pdr/README
| D311 | **An agent's skills lost their skip-worktree bit, and its commit stopped in the sandbox's mask** (#584). Downstream, 2026-11-29, nstack 0.35.3: the five agents' clones kept D261's sparse patterns, but their committed skills showed as deleted; pre-commit's stash wrote them back into the mask, and `git checkout -- .` failed with "Device or resource busy". The loss itself was not reproduced beyond one clone's commit of the sandbox's masks: git clears the bit wherever the file is present | **Done**: at each `nstack agent run`, a skill outside the patterns that is absent from the working tree gets its bit back, in the index alone; one the working tree holds stays and is said kept, as before. Not taken: `git sparse-checkout reapply`, which leaves them while the sandbox's placeholder stands; `--assume-unchanged`, a hint git may drop. Not caught: a bit lost during a session is set again only at the agent's next run |
| D312 | **A cycle left proposed was approved as if accepted** (#587). Downstream, 2026-11-29: the next cycle, `proposed` with no `accepted_on` while one ran, was approved by the decider as its acceptance; neither fitness nor pr-check said the approval accepted nothing, and a second push and a second approval followed. The framing playbook said it; nothing said it where the approval is given | **Done**: pr-check warns (C11) on a pull request that leaves a cycle `proposed` with no `accepted_on`, in a framed project — on the check itself, beside the approval, not only in its log — with the gesture: `accepted_on` while a cycle runs, else `status: accepted` and its start. A warning, not a failure: a decider may approve a proposal still being framed. Not caught: a cycle proposed during framing, before the charter is accepted — the framing accepts both |
| D313 | **The update's refusal off main did not say it makes its own branch, nor the way from a worktree** (#589). Downstream, 2026-11-29, 0.35.4: the coordinator made a branch and a worktree for the update first, as for any change; the refusal said `git switch main`, which a worktree beside main's cannot do | **Done**: `nstack update`, `nstack update --forge` and `nstack config` refuse with one Action: `git switch <default>`, or in a worktree beside the one that holds it `git switch --detach <default>` (#261), and the command makes its own branch: make none before |
| D314 | **A pull request titled with a deliverable's part, "D126 3c —", was not read as delivering it** (#588). Downstream, 2026-11-29, 0.35.4: `nstack deliver D126 --held '1=#1372'` refused it; the team titles a deliverable's parts "D121 4a —", "D123 (a) —", "D126 3c —", one pull request in two. D300 read a letter glued to the id only | **Done**: after the id and its letter, a part is read too — a number with an optional letter, "-1", or, opening the title, "(a)" — before the dash or the colon, and in the closing parentheses; `deliver`, `plan` and the start branches' landing read these part forms alike. Words there stay a mention, and a part takes no scope after it: "D12 is next —", "D7 (wip) —", "D12 3 files:" name nothing. Not read: "(a)" inside the closing parentheses, which hold no nested ones |
| 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
38 changes: 34 additions & 4 deletions platform/tests/test_hold.py
Original file line number Diff line number Diff line change
Expand Up @@ -1295,7 +1295,10 @@ def land(alice: Path, message: str) -> None:


@pytest.mark.parametrize("title", ["resume: nothing lost (D1) (#7)", "D1a — resume, first part (#7)",
"resume, second part (D1b) (#7)", "D1 resume: nothing lost (#7)"])
"resume, second part (D1b) (#7)", "D1 resume: nothing lost (#7)",
"D1 3c — resume, a part of the third criterion (#7)",
"D1 (a) — resume, its first part (#7)", "D1b-1: resume (#7)",
"resume, a part (D1 3c) (#7)"])
def test_plan_names_it_once_the_work_landed_though_the_state_is_unmoved(shared, capsys, title):
"""A delivery never edits the cycle file (D183): at the kernel's Close the state is still ready.
A part's title lands as deliver counts it (D300, #560)."""
Expand All @@ -1307,11 +1310,38 @@ def test_plan_names_it_once_the_work_landed_though_the_state_is_unmoved(shared,
assert "d1-resume-an-interrupted-recording" in capsys.readouterr().out.split("Empty start branches left")[-1]


def test_a_mere_mention_is_no_landing(shared, capsys):
"""A live hold's branch is never named because a commit spoke of it."""
PART_TITLES = {
# D314 (#588): downstream, a deliverable's parts are titled "D<n> <part> —"; one pull request in two carried one
"D126 3c — shell: the first run's three screens (#1372)": {"D126"},
"D121 4a — the summary": {"D121"},
"D123 (a) — the export": {"D123"},
"D122b-1: Auto leaves no engine": {"D122"},
"D122 2 — the second criterion": {"D122"},
"shell: the panel (D126 3c) (#9)": {"D126"},
"shell: two parts (D126 3c, D127b-2) (#9)": {"D126", "D127"},
# what stays a mention: words, not a part, between the id and the dash
"D12 is next — notes": set(),
"D12 3 files — notes": set(),
"D12 3 files: notes": set(),
"D12 a — notes": set(),
"D7 (wip) — notes": set(),
"D1 1:1 meeting — notes": {"D1"}, # read before as " 1:", a scope: unchanged
"docs: D12 3c — notes": set(),
}


@pytest.mark.parametrize("title", PART_TITLES)
def test_a_part_of_a_deliverable_titled_after_its_id_delivers_it(title):
assert hold._delivers(title, "") == PART_TITLES[title]


@pytest.mark.parametrize("title", ["docs: note that the export waits for D1", "D1 is next — a note (#7)",
"D1 a — a note (#7)", "D1 (wip) — a note (#7)"])
def test_a_mere_mention_is_no_landing(shared, capsys, title):
"""A live hold's branch is never named because a commit spoke of it; words after the id are no part (D314)."""
alice = clone(shared, "alice")
hold.claim(alice, "D1", session="s", person="@alice")
land(alice, "docs: note that the export waits for D1")
land(alice, title)
capsys.readouterr()
hold.show(alice)
assert "Empty start branches left" not in capsys.readouterr().out
Expand Down
2 changes: 1 addition & 1 deletion skeleton/.nstack/handbook/project.md
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ When a deliverable's work went on other branches, the empty branch its claim sta
commit — is the framework's own: `nstack deliver` removes it with the delivery, here and on the
remote, unless a push since gave it work. `nstack plan` names those left — the default branch
records the deliverable's delivery (its `Deliverable:` line, or a subject opening `D<n> —`, `D<n>:` or `D<n> <scope>:` or
holding `(D<n>)`, a part letter allowed after the id), it is no longer `ready` or `in-progress`, or it belongs to another cycle — and
holding `(D<n>)`, a part letter or a marked part allowed after the id, as `nstack deliver` counts them — `.nstack/playbooks/framing.md` §4), it is no longer `ready` or `in-progress`, or it belongs to another cycle — and
`nstack plan --prune` removes them all, the decider's one command for what no delivery meets.

The hold is a branch of the shared remote, `nstack/hold/<cycle>/D30`, whose commits are its
Expand Down
3 changes: 2 additions & 1 deletion skeleton/.nstack/playbooks/framing.md
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,8 @@ from then on the plan check refuses an accepted charter over a form left as it c
criteria like the others, and its section says on whose word and on what it entered.
A deliverable a closed cycle deferred comes back the same way, under its id. `nstack deliver`
counts the merges that name it — a title opening `D<n> —`, `D<n>:` or `D<n> <scope>:`, or ending `(D<n>)`, a part
letter allowed after the id (`D<n>a —`, `(D<n>b)`), or a `Deliverable: D<n>` line — the id alone; one merged before the cycle started is carried over, and only a person's
letter allowed after the id (`D<n>a —`, `(D<n>b)`), or a part marked after it (`D<n> 3c —`, `D<n>-1:`,
`D<n> (a) —`, one letter, `(D<n> 2)`), or a `Deliverable: D<n>` line — the id alone; one merged before the cycle started is carried over, and only a person's
answer can then be cited for its criteria. `out-of-cycle` is not its path, and its hold ended
with the closed cycle (`nstack unclaim` says so).
- **An urgent fix** outside the cycle — an incident, a production defect — goes in a pull
Expand Down
12 changes: 9 additions & 3 deletions src/napkinstack/hold.py
Original file line number Diff line number Diff line change
Expand Up @@ -929,9 +929,13 @@ def _empty_start_branches(root: Path, name: str | None, items: list) -> dict[str
# A deliverable done in several pull requests may mark each part with one letter, "D125a —", "(D125b)":
# an id never carries one, so the part is D125's (D300, #560)
_PART = r"[a-z]?"
_TITLED = re.compile(rf"\(({_ID}{_PART}(?:, *{_ID}{_PART})*)(?:,[^()]*)?\)(?: *\(#[0-9]+\))?$") # "… (D47, second of three) (#12)"
# D314 (#588): or with a part marked after it — a number, "-1", " 3c", " 2" — or, opening a title, one
# letter in parentheses: "D126 3c —", "D122b-1:", "D123 (a) —". Words there are no part, and a part takes
# no scope after it: "D12 is next —", "D7 (wip) —", "D12 3 files:" name nothing.
_SUB = r"(?:-[0-9]+)?(?: [0-9]+[a-z]?)?"
_TITLED = re.compile(rf"\(({_ID}{_PART}{_SUB}(?:, *{_ID}{_PART}{_SUB})*)(?:,[^()]*)?\)(?: *\(#[0-9]+\))?$") # "… (D47, second of three) (#12)"
# the id opening the title, then a dash, a colon, or one word and a colon as a scope reads: "D120 export: …"
_OPENED = re.compile(rf"^({_ID}){_PART}(?: [—–-]|:| [\w./-]+:)")
_OPENED = re.compile(rf"^({_ID}){_PART}(?:{_SUB}(?: \([a-z]\))?(?: [—–-]|:)| [\w./-]+:)")
_NAMED = re.compile(rf"^Deliverable:[ \t]*({_ID})\b", re.I | re.M) # as pr-check K3 reads it
_PULL = re.compile(r"\(#([0-9]+)\)$")
_MERGED = re.compile(r"^Merge pull request #([0-9]+)\b") # the forge's merge commit: the title is the body's first line
Expand Down Expand Up @@ -1325,7 +1329,9 @@ def _landed(root: Path, ident: str, ref: str, base: str) -> bool:
`Deliverable:` line of a pull request, or its id in parentheses or opening a subject — a commit
merely speaking of it is no delivery, and a live hold's branch is not named for it."""
name = ident.upper()
pattern = rf"\({name}[a-z]?\)|^Deliverable:[ \t]*{name}([^0-9]|$)|^{name}[a-z]?( [—–-]|:| [[:alnum:]_./-]+:)" # as _delivers
part = "[a-z]?(-[0-9]+)?( [0-9]+[a-z]?)?" # as _PART and _SUB (D300, D314)
pattern = (rf"\({name}{part}\)|^Deliverable:[ \t]*{name}([^0-9]|$)"
rf"|^{name}[a-z]?((-[0-9]+)?( [0-9]+[a-z]?)?( \([a-z]\))?( [—–-]|:)| [[:alnum:]_./-]+:)") # as _OPENED
return bool(_git(root, "log", "-1", "--format=%H", "--extended-regexp", f"--grep={pattern}", f"{ref}~1..{base}").stdout.strip())


Expand Down