| 1 | # Project placement |
| 2 | |
| 3 | Paul approved the four product rules on 2026-11-15. This spec changes the |
| 4 | coordinator's placement decision and lets people correct a task's project. |
| 5 | It supersedes the current instruction to choose a repository without asking. |
| 6 | |
| 7 | ## Decide, or ask |
| 8 | |
| 9 | Use the project the person names, or the project whose work they clearly |
| 10 | continue. Otherwise ask when several projects fit, or when this could be a |
| 11 | new project rather than a feature. Never create a repository without a |
| 12 | placement card answered by the person, unless their current request explicitly |
| 13 | asks for a new project. A tool argument claiming permission is not permission. |
| 14 | |
| 15 | Keep the coordinator instruction short: |
| 16 | |
| 17 | > Use the named project or the clear continuation. If placement is ambiguous, |
| 18 | > ask with a placement card, best guess first. Always confirm a new repository |
| 19 | > unless the person explicitly requested one. Wait for the answer before |
| 20 | > recording or starting work. Learn from project corrections in your notebook. |
| 21 | |
| 22 | `add_project` continues to attach an existing repository. `record_task` is |
| 23 | called once placement is settled, before investigation; `start_task` retains |
| 24 | its existing role. `ask_person` gains structured placement data: an ordered |
| 25 | list of reachable repositories and, optionally, the proposed new repository. |
| 26 | The runner must preserve this data. Ordinary questions cannot authorise |
| 27 | repository creation. `create_project` checks a matching answered placement |
| 28 | card or explicit words in the current person's message before returning the |
| 29 | runner's create permission. The permission is bound to the person, lane, |
| 30 | answer turn and exact repository; replay cannot widen it. |
| 31 | |
| 32 | The question is “Where should this go?” Choices read “Add to <project>”, |
| 33 | “New project”, and the other candidates, best guess first, at most six. |
| 34 | Store stable repository choices separately from their labels, plus card ID, |
| 35 | revision, person, turn and lane. The new choice names one proposed repository. `new_first` puts it first |
| 36 | when it is the best guess. |
| 37 | A tap records the answer and resumes the coordinator with the original request. |
| 38 | Do not create a repository merely to show this card. Revalidate repository |
| 39 | access when answering and when executing. Duplicate taps cannot create twice; |
| 40 | stale revisions, altered choices and another person's answer are refused. |
| 41 | |
| 42 | Set aside hides the card using Roster's existing control. It does not answer, |
| 43 | select the first choice, create a task or repository, or start Engineering. |
| 44 | The unresolved request stays available to restore and answer. A later ordinary |
| 45 | message does not silently authorise the pending repository. |
| 46 | |
| 47 | ## Correct a task |
| 48 | |
| 49 | Every task project chip, including Roster reports and task lists, opens |
| 50 | “Wrong project?” with two choices: “Move to another project” and “Make it a new |
| 51 | project”. The first opens a destination chooser; the second explicitly asks |
| 52 | for a new repository and its name. Show the destination before submitting. |
| 53 | The task ID stays stable, so links, reports and sub-chat threads keep working. |
| 54 | |
| 55 | | Current state | Result | |
| 56 | | --- | --- | |
| 57 | | Noted or investigated; nothing dispatched | Move at once, keep the brief; do not start work that was not started. | |
| 58 | | Queued locally, never dispatched | Withdraw the queued step and move; restart if Engineering was requested. | |
| 59 | | Running, even without a push | “Move and restart”; stop dispatched work and wait for termination proof. | |
| 60 | | Pushed, failed, in checks or review | “Move and restart”; wait for all dispatched attempts to terminate, then start fresh Engineering. | |
| 61 | | Ready to merge | Withdraw the old merge choice and watcher; fresh Engineering in the destination. | |
| 62 | | Merging or merge outcome unknown | Refuse. The hub must settle the outcome first. | |
| 63 | | Merged or done | Refuse. A separate request may create a new task; never reinterpret the old merge. | |
| 64 | | Cancelled or folded | Refuse; the person can make a separate request. | |
| 65 | |
| 66 | An authenticated merge notification arriving during the stop refuses the |
| 67 | pending move and leaves the completed task in its original project. |
| 68 | |
| 69 | Before a push, a move is instant only if no process can still act on the old |
| 70 | repository. Elapsed time, an offline runner, cancellation acknowledgement, |
| 71 | or a terminal state alone is not termination proof. Keep the move pending |
| 72 | until the assigned runner proves termination of the exact attempt. Undispatched |
| 73 | steps can be withdrawn locally. Block dispatch, retry, publication and merge |
| 74 | while a move is pending. A crash/reconnect resumes this durable state. |
| 75 | Recheck the requesting owner's membership and destination access at completion; |
| 76 | if either was revoked, retain the hold instead of restarting. |
| 77 | |
| 78 | Preserve title, brief, notes, findings, completed Research with its original |
| 79 | sources, task creator, priority and deadlines, conversation lane, card threads, |
| 80 | and specialist questions and answers. An open specialist question must finish before a move can start; its saved |
| 81 | answer stays on the task. Old repository paths remain labelled |
| 82 | with their source repository. Retire old specialist sessions for new questions. |
| 83 | Do not move branches, commits, checks, copy acceptance, review judgements, |
| 84 | preview sessions, repository-specific revert instructions or merge permission. Retain old steps as history, excluded |
| 85 | from current progress and success. Fresh Engineering uses a new branch name |
| 86 | and the destination's base, policy and runner placement. Returning to a previous |
| 87 | repository must also use a fresh branch. |
| 88 | |
| 89 | Never delete, rename, force-push, merge or otherwise modify the old branch as |
| 90 | part of a move. Stop the old watcher. Record its repository and branch on the |
| 91 | task so the person can inspect it. Late reports from retired attempts cannot |
| 92 | restore old evidence or trigger further work. An already committed external |
| 93 | push remains historical; it is never transplanted into the destination. |
| 94 | |
| 95 | ## Authority, audit and learning |
| 96 | |
| 97 | Use the verified session and check the current roster inside each write |
| 98 | transaction. The coordinator cannot call the move operation on its own. |
| 99 | Destination repositories must be available to the task creator's runner; |
| 100 | moving does not grant repository or namespace access. Owner changes must not |
| 101 | transfer a task to the owner's credentials. |
| 102 | |
| 103 | **Decision for Paul:** may a non-owner task creator move their own task? |
| 104 | Recommendation: keep owner-only writes in this release, matching the explicit |
| 105 | non-owner refusal guard in this brief and existing Engineering authority. |
| 106 | Allow any current owner to correct a task, preserving its creator. Extending |
| 107 | this to creators later needs a deliberate change to the write policy. |
| 108 | |
| 109 | The same transaction records move requested/completed, actor, task ID, source |
| 110 | and destination, old branch, revision, and whether a restart was needed. |
| 111 | No credentials or source contents enter the audit. Completion writes a short |
| 112 | correction into the creator's existing coordinator notebook, attributed as a |
| 113 | system-observed fact rather than a quoted personal preference. Deliver it to |
| 114 | the runner's notebook too, including after reconnect. Corrections are reference, |
| 115 | not authority. Preserve the notebook's bounds; permanent move history stays |
| 116 | on the task even when old notebook entries age out. |
| 117 | |
| 118 | ## Storage and protocol |
| 119 | |
| 120 | Use additive migration 0087 after main's 0086. Persist structured placement |
| 121 | card data, pending destination/actor, move history, and retired step markers. |
| 122 | Backfill existing rows as unchanged. Preserve history and task identity. |
| 123 | Use protocol 25 after main's 24 for placement metadata and notebook correction |
| 124 | delivery. Older runners may read existing tasks but cannot start this workflow |
| 125 | or receive a restart requiring the new contract. Validate and bound all new |
| 126 | fields. Never use a submitted boolean as proof of explicit permission. |
| 127 | |
| 128 | ## Interface and verification |
| 129 | |
| 130 | Reuse Roster's project monogram, compact chip, native details menu, hairline |
| 131 | borders and theme tokens. Keep the shared chip in its own template partial; |
| 132 | change Roster's byline only at that call site to reduce conflict with |
| 133 | `roster-report-actions`. On phones the chooser is a normal single-column page, |
| 134 | with labelled fields and full-width tap targets. Desktop uses the same flow. |
| 135 | Native links and POST forms work without JavaScript; server responses enforce |
| 136 | CSRF, authority and revision checks. Pending moves show that Equipo is stopping |
| 137 | work; unresolved termination never looks like a completed move. |
| 138 | |
| 139 | Write failing tests first. Cover clear-context prompts, ordered ambiguous |
| 140 | choices, new-project confirmation and explicit-request exception; forged, |
| 141 | stale, replayed, cross-person and set-aside answers; roster revocation; every |
| 142 | state in the table; rollback and concurrent moves; destination permissions; |
| 143 | termination delayed or missing; late reports; old branch unchanged; fresh |
| 144 | branch on return; all preserved context; historical evidence excluded; notebook |
| 145 | delivery; protocol compatibility and migration from main. Break each guard, |
| 146 | observe its test fail, restore it and record the command/result. |
| 147 | |
| 148 | Browser checks at 1280 and 390 pixels in light and dark cover task and Roster |
| 149 | chips, keyboard access, destination selection, confirmation, set aside and the |
| 150 | pending state. Save screenshots in `../shots/`. Run targeted Go tests, |
| 151 | `make budget`, `python3 scripts/runner-dead-references.py`, `make lanes-check` |
| 152 | and `make copy-release-check`; then push and poll branch CI to green. New UI |
| 153 | copy gets the delegated acceptance record requested in the brief. No merge |
| 154 | or deployment is part of this work. |
| 155 | |