Skip to content

Tower: a Decisions tab — a UI view of codev/state/pending-decisions.md with click boxes per option (recommended marked) and a comment box per decision, writing the owner's word back into the file #1819

Closed

Description

@waleedkadous

Ask

Add a Decisions tab to the Tower dashboard: a proper UI over a workspace's pending-decisions file, with a click box per option (the recommended one marked), a free-text comment box per decision, and nothing else. The markdown file stays the single source of truth; the tab is a view of it that writes the owner's choice and comment back into the file in the same place the owner types them today. Requested by the Shannon owner, 2026-10-17 12:10 am PT: "I want it to just be a view of the dec doc."

How we decide today (the process the tab must fit)

One architect (main) is the hub. Every other architect sends a decision as an inline message:

afx send architect:main "DECISION <name>-<n>: <title>
<the item, exactly as it will appear>"

Main rewrites it in plain words and posts it into ONE file, codev/state/pending-decisions.md, under ## Open. The owner reads that file in a Tower file tab (afx open codev/state/pending-decisions.md) and rules by typing a word on the item's **Your word:** line (or a sentence anywhere under the item, or in chat). The owner then says ddu ("decisions doc updated") in main's terminal, or a Tower cron notices the file changed; main scans every open item, relays each ruling to its architect (RULING <id>: <word>), moves the item to ## Ruled as a one-line record, and appends the architect's DONE <id>: … there later. Only main writes the file; the owner's edits are the only other writes.

The file format (what the tab parses)

# Pending owner decisions — all architects (hub: main)

Rule inline: a letter or one word on an item's **Your word:** line is enough. "approve" = approve AND merge.
Newest first. Only main edits this file; architects send items with `afx send architect:main "DECISION …"`.

_Status: N open — <ids>. Written h:mm pm (<what changed>)._

## Open

### <architect>-<n> · <YYYY-MM-DD h:mm am/pm PT> · <Question the owner answers, naming the artifact by what it does>

- **Problem:** (or **Context:**) what is wrong or undecided, as the owner would see it.
- **Root cause:** why (for a fix). For a choice: **Options:** (a) `word` = … (b) `word` = …
- **Fix:** what the change does, in product terms.
- **Testing:** the receipt.
- **Cost:** dollars or minutes, only when money is involved.
- **Recommendation (<architect>):** one line; may be followed by "Main's note: …".
- **Links:** URLs and repo paths.

**Your word:** `<first word, recommended>` = what it does / `<second word>` = what it does / `hold`

## Ruled

- **<id>** · ruled `<word>` <time> · relayed <time>: <what happened> · DONE <time>: <architect's report>

Conventions the parser can rely on: items are ### headings whose first token is the id; the **Your word:** line lists the options as backticked words separated by /; the first option is the recommended one (the Recommendation line names it too); the owner's word is whatever text follows the **Your word:** line, or a sentence anywhere in the item; ## Ruled holds one-line records that the tab can show read-only.

What the tab does

  1. Lists the ## Open items newest first, each as a card: title, the body rendered as markdown, Links as links.
  2. Under each card, the options from the **Your word:** line as click boxes (radio), the recommended one visibly marked; plus one free-text box ("comment") for anything the owner wants to say instead of or in addition to a word (tonight's real rulings included "accept but don't add the limit on additional tests. That could easily backfire." and "Wait. That means if someone after onboarding connects whatsapp they can't do the scan? Keep the skills…").
  3. On choose / submit, it writes into the file under that item, right after the **Your word:** line, exactly what the owner would have typed: the chosen word on its own line, then the comment as a paragraph. No other change to the file; no reformatting; the architect's existing scan (regex over the text after **Your word:**) picks it up unchanged.
  4. ## Ruled shows below as a collapsed read-only list.
  5. The tab re-renders when the file changes on disk (main writes it a few times an hour); an unsaved comment survives a re-render.
  6. Works for any workspace that has codev/state/pending-decisions.md; the path can be a Tower setting with that default.

Non-goals

No new store, no database: the file is the state. No notifications: the existing file-change cron and the owner's ddu do that. No per-architect files: the hub file is the only one.

Where the format is documented

codev/decision-protocol.md in the adopter repo (sections 3 and 5 are quoted above). Happy to move that doc into codev's skeleton once the tab exists.

Activity

  1. waleedkadous commented on Oct 17, 2026

    @waleedkadous
    ContributorAuthor

    Owner addition (12:11 am): time zone must not be hard-wired to Pacific. The item headings carry a local-time stamp with its zone (h:mm am/pm PT in our file because that is where this owner sits); the tab should parse whatever zone the file says and render times in the viewer's local time zone, and anything the tab writes (none planned, since it writes only the word and comment) would use the viewer's zone, not an assumed one. Nothing in the parser may assume PT.

  2. added
    area/tower
    on Oct 17, 2026
  3. waleedkadous commented on Oct 17, 2026

    @waleedkadous
    ContributorAuthor

    Architect triage: SPIR, area/tower. High-risk tier (Tower UI plus a write path into a workspace file), so the PR gets a 3-way integration review and a Playwright run of the tab before merge.

    Decisions baked in for the builder, so the spec can take them as given:

    1. Tower serves it, nothing new runs. The tab is a new tab type in the existing Tower dashboard, backed by workspace-scoped Tower API routes next to the afx open annotate route in tower-routes.ts. Markdown rendering reuses what the dashboard already has (artifact-canvas MarkdownView), not a second renderer.
    2. The file is the only state. Read on open, re-read on file change, no cache that can disagree with disk. The configurable path lives in .codev/config.json with the default codev/state/pending-decisions.md, consistent with where every other Tower setting lives.
    3. Writes are a splice, and they fail loudly. The write endpoint locates the item by its ### <id> heading, inserts the word line and the comment paragraph directly after the **Your word:** line, and writes nothing else. If the heading is missing or appears twice at write time, the write is refused with a clear error and the owner's text stays in the comment box. No reformatting, no merge heuristics, no fallback.
    4. The parser is a pure function with its own tests against the format in the issue body: ids from the heading's first token, options from the backticked words on the **Your word:** line, first option recommended, existing owner text after that line shown as the current ruling. Per the owner's comment, the heading's time zone is parsed from the text and rendered in the viewer's local zone. Nothing may assume PT.
    5. Unsaved comment survives re-render. Keyed by item id in component state, not by DOM position.
    6. ## Ruled is read-only and collapsed by default.

    Out of scope, as the issue says: notifications, a store, per-architect files. Moving decision-protocol.md into the skeleton is a follow-up once the tab ships.

  4. waleedkadous commented on Oct 17, 2026

    @waleedkadous
    ContributorAuthor

    Protocol addition for the tab (owner ask 2026-10-17 6:15 am): the owner may type a question instead of a word. Main relays it to the owning architect and pastes the answer into the item, above the **Your word:** line, as two labelled list lines:

    - **You asked (6:07 am):** "why a new tool? Don't we have existing tools?"
    - **Onboarding's answer (6:09 am):** The Daybreak composer does not get the chat tool set. … Main checked the code: …

    The item stays open; the owner rules after reading. For the tab: (1) the comment box is where such a question goes, and submitting it writes the question after the word line exactly as a comment would (the architect's scan treats it as the ruling text and recognises it is a question); (2) render **You asked** / **<Name>'s answer** line pairs as a small question-and-answer thread on the card, newest at the bottom, so the owner sees the answer without opening the raw file; (3) a second question appends a second pair. Nothing else changes in the format.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/tower

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions