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
4 changes: 2 additions & 2 deletions .specs/kagan-supervision-board/design.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,12 +90,12 @@ same-session writes so concurrent event handlers cannot clobber each other.
| `tui.tsx` | TUI composition, routes, subscriptions, update discovery at launch, and the `kagan.update` command | R3, R18.1, R18.4 |
| `tui/session/`, `tui/tasks/` | TUI data ops: list/create, serialized metadata patching, send-back, merge, triage, approval, helper restart | R1, R3.2, R4.9, R9.10, R11, R12, R17.8 |
| `tui/dialogs/create-task.tsx` | Custom OpenTUI create dialog, including configured/custom task scope selection | R1.1–1.4, R1.9–10 |
| `tui/board/store.tsx` | Solid board store: grouping, ordering, selection, move gating, refresh, notices, and update status | R3, R7, R17.4–5, R18 |
| `tui/board/store.tsx` | Solid board store: grouping, ordering, selection (including Tab root-card cycling), move gating, refresh, notices, and update status | R3, R7, R17.4–5, R18 |
| `tui/board/commands.tsx` | Key bindings and dialog flows: create, move, triage, approve/merge, send-back, helper restart, task details view | R5.2, R4.9, R9.10, R10, R11, R12, R17.3, R17.7 |
| `tui/board/board.tsx` / `column.tsx` / `card.tsx` | Board layout, column headers with cap, cards with task number and badges; board footer shows version, persistent update status, and the conditional update hint | R3, R3.7–8, R7.4, R18 |
| `tui/updates/` | npm `latest` dist-tag check with eligibility and TTL cache (`check.ts`), non-mutating launch discovery (`launch.ts`), the approve→stage→install controller (`action.ts`), and the bounded no-shell CLI runner (`runner.ts`) | R3.8, R18 |
| `tui/format.ts` | Card badges, age/diff/subtask formatting | R3.6 |
| `tui/dialogs/task-details.tsx` | Read-only task details view from live session metadata and diff stats | R17.7 |
| `tui/dialogs/task-details.tsx` | Read-only task details and intake-notes views; large dialog, pinned summary, scrollable body | R17.7 |
| `tui/dialogs/onboarding.tsx` | First-run board tour and opt-out persistence | R17.6 |
| `tui/routes/settings.tsx` | Settings route for editing plugin options and saving `opencode.json` | R17.10–13 |

Expand Down
11 changes: 10 additions & 1 deletion .specs/kagan-supervision-board/requirements.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,10 @@ status cues, so that I can see at a glance what needs my attention.
13. WHERE the user filters cards with a query of the form `#N`, the board SHALL match only the
card whose task number equals `N` exactly, in addition to the existing title/slug substring
match.
14. WHEN the user presses Tab or Shift+Tab on the board THEN selection SHALL cycle forward or
backward across root board cards in column order (Backlog → In Progress → Review → Done),
wrapping at the ends, and SHALL land only on root cards — never on child sessions such as
intake or reviewer helpers; row-wise navigation into children remains available via j/k.

---

Expand Down Expand Up @@ -458,7 +462,12 @@ so that failures, handoffs, and supervision evidence are visible instead of hidd
`kagan.tutorial` palette command (`/kagan-tutorial`), regardless of the opt-out.
7. WHEN the user views task details from the card action menu THEN Kagan SHALL display a read-only
summary of the task's title, status, intake, findings, prior triage, reports, check/setup
evidence, and diff stats without mutating task state.
evidence, and diff stats without mutating task state. WHEN that content exceeds the dialog
viewport THEN Kagan SHALL keep the title and status summary pinned and scroll the body so no
section is clipped. WHEN intake has completed THEN the card action menu SHALL also offer a
read-only intake-notes view of the understanding and resolved decisions with the same scroll
rule. WHEN the selected task is in Review THEN the card action menu SHALL lead with Approve and
Send back.
8. WHEN concurrent handlers patch the same session's `kagan` metadata THEN Kagan SHALL serialize the
read-modify-write operations per session so one patch cannot clobber another, and a failed patch
SHALL NOT block later patches for that session.
Expand Down
13 changes: 8 additions & 5 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,14 @@ spec authority and read order. `src/domain/task/metadata.ts` is the authoritativ
new-comment check compares against the PR merge base.
- Run one built-in check with `bunx verifyx lint`, `bunx verifyx format`, `bunx verifyx check-types`, or
`bunx verifyx duplicate-code`. Use `bun run package` for package checks.
- `verify:complexity` is two-tier: pure logic (`src/{domain,server,git,checks}`, `src/server.ts`,
`src/task/`) must clear maintainability index 52; the TUI surface (`src/tui/`, `src/tui.tsx`) clears
50 because its JSX render functions are inherently lower-scoring. Raise a score by splitting genuine
responsibilities into cohesive units — never by deleting comments, joining lines, or fragmenting a
coherent function. The exact command is pinned by `test/guards/validation.test.ts`.
- `verify:complexity` is two-tier: pure logic (`src/**/*.ts` excluding `src/tui/**` and `src/tui.tsx`)
must clear maintainability index 52; the TUI surface (`src/tui/**/*.{ts,tsx}`, `src/tui.tsx`) clears
50 because its JSX render functions are inherently lower-scoring. Simplify the failing function
first; split only when responsibilities genuinely diverge. Merging or unsplitting is valid when
cohesion beats MI churn from artificial file boundaries. Use `verifyx complexity --sloc-scope function`
to score SLOC from each function body instead of the whole file. Never game the metric by deleting
comments, joining lines, or fragmenting a coherent function. The exact command is pinned by
`test/guards/validation.test.ts`.
- Run the full suite with `bun run test`, not bare `bun test`. The script supplies
`--conditions browser`; `bunfig.toml` supplies the Solid preload. Bun positional test filters can
also match a local gitignored `references/` checkout because its exclude applies only to test
Expand Down
10 changes: 6 additions & 4 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,12 @@ This runs the declared source checks: complexity, comment policy, and circular d
auto-formats with oxfmt. Verifyx also runs the local `test` script automatically.

The maintainability-index gate is two-tier, matching the architecture split: pure logic
(`src/{domain,server,git,checks}` plus `src/server.ts` and `src/task/`) must clear a higher bar than
the TUI surface (`src/tui/`), whose JSX render functions are inherently lower-scoring. Raise a file's
score by splitting genuine responsibilities into cohesive units, never by deleting comments, joining
lines, or fragmenting a coherent function.
(`src/**/*.ts` excluding `src/tui/**` and `src/tui.tsx`) must clear maintainability index 52; the TUI
surface (`src/tui/**/*.{ts,tsx}`, `src/tui.tsx`) clears 50 because its JSX render functions are
inherently lower-scoring. Simplify the failing function first; split only when responsibilities
genuinely diverge. Merging or unsplitting is valid when cohesion beats MI churn from artificial file
boundaries. Never game the metric by deleting comments, joining lines, or fragmenting a coherent
function. The exact command is pinned by `test/guards/validation.test.ts`.

Pre-commit and CI run `bun run check`. That full check-only gate runs every built-in `verifyx` check,
including its automatic test step, then validates the package. It does not rewrite files.
Expand Down
8 changes: 4 additions & 4 deletions bun.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

21 changes: 12 additions & 9 deletions docs/concepts/task-lifecycle.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ denied with the reason, on the board and server-side.

Creating a task spawns a read-only **task prep** child session. It reads the codebase at your
chosen base branch and returns three things: an understanding of the task, clarifying decisions
(each an assumption you must approve or override with an answer), and a refined final instruction
(each an assumption you must accept or override with an answer), and a refined final instruction
for the implementing agent. It also returns an advisory mode recommendation (`autonomous`,
`assisted`, or `manual`) with a one-line rationale. The recommendation is informational only and
never gates a move or approval.
Expand Down Expand Up @@ -59,14 +59,17 @@ rejected before they are saved.
the same worktree, prompted with the previous iteration's report, the files already changed, the
findings to address, and the intended-behavior findings to leave alone. Review state resets; the
card returns to In Progress.
- **Approve** (`a`) is unlocked once the reviewer has run and every finding is triaged. It opens
the merge dialog: merge the task branch into the checked-out branch, into another branch, or
take no action (right for investigative tasks). If the base branch has advanced since the task
was created, the dialog warns that the reviewed diff may be stale. A failed merge aborts the
approval — nothing moves to Done on an error. Once a task reaches Done it stays there — moving it
back out is denied; create a follow-up task instead. Done tasks can be archived from the card
action menu; archiving removes them from the board but the session remains reachable through
OpenCode's own session list.
- **Approve** (`a`, or Enter → Approve on a Review card) opens the triage dialog first. Approve &
merge unlocks once every finding is ruled; until then the dialog states how many remain. After
unlock it opens the merge dialog: merge into the checked-out branch, into another branch, or take
no action (right for investigative tasks). If the base branch has advanced since the task was
created, the dialog warns that the reviewed diff may be stale. A failed merge aborts the approval
— nothing moves to Done on an error. Once a task reaches Done it stays there — moving it back out
is denied; create a follow-up task instead. Done tasks can be archived from the card action menu;
archiving removes them from the board but the session remains reachable through OpenCode's own
session list. Intake understanding and resolved decisions are also reachable from the card menu
as **View intake notes**. Both details views keep the header pinned and scroll long bodies with
`↑`/`↓`.

If an intake or review helper fails, the card shows `intake failed` or `review failed`. Kagan
retries automatically up to `helperRetries` times; after that, press `r` on the card to retry
Expand Down
6 changes: 3 additions & 3 deletions docs/quickstart.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,9 +99,9 @@ iterating, take over the session, or leave it in Review.
- **Filter and reorder** — press `/` to filter cards by title or slug. Type `#3` to filter to task
#3. Press `J` / `K` to reorder the selected root card within its column.
- **View details and archive** — open a card's action menu with `Enter` to read a structured summary
of intake, findings, check output, and diff stats, or — for Done tasks — **archive** them so they
leave the board. Archiving is one-way; the session remains reachable through OpenCode's own session
list.
of intake, findings, check output, and diff stats (`↑`/`↓` scroll when it is long), or — for Done
tasks — **archive** them so they leave the board. Archiving is one-way; the session remains
reachable through OpenCode's own session list.
- **Settings** — press `,` on the board or run `/kagan-settings` to edit Kagan's plugin options.
Saving writes project `opencode.json`; restart OpenCode or reopen the project for changes to apply.

Expand Down
Loading