Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
15 commits
Select commit Hold shift + click to select a range
d015a1e
feat: recorded test output in the Application pane and the test repla…
ryota-murakami Oct 22, 2026
94f93d4
fix: an in-place update of a long recorded test output no longer free…
ryota-murakami Oct 22, 2026
e97407d
test: the pane DOM check's read list names its golden sequence fixtur…
ryota-murakami Oct 22, 2026
f23f0e3
Merge remote-tracking branch 'origin/main' into codex/cycle-0049-pr-b…
ryota-murakami Oct 22, 2026
6227426
Merge remote-tracking branch 'origin/main' into codex/cycle-0049-pr-b…
ryota-murakami Oct 22, 2026
139e53e
test(test-replay): Step 7 coverage tests of the Application output an…
ryota-murakami Oct 22, 2026
3029b7d
fix(test-replay): Step 9 review fixes for the Application pane and th…
ryota-murakami Oct 22, 2026
076b65e
docs(agents): the owner's everything-for-the-product rule and the age…
ryota-murakami Oct 22, 2026
602a0fc
fix(test-replay): a test replay still recording ends with no ended-ea…
ryota-murakami Oct 22, 2026
9bed4ac
fix(test-replay): Step 9 pass 2 review fixes and the health gate (Cyc…
ryota-murakami Oct 22, 2026
5359c28
fix(test-replay): Step 9 pass 3 review fixes (Cycle 0049 PR-B1)
ryota-murakami Oct 22, 2026
ef39b3e
fix(test-replay): Step 11 adversarial fixes for the recorded output's…
ryota-murakami Oct 22, 2026
fe46bbb
docs(agents): the owner's everything-for-the-product rule keeps the i…
ryota-murakami Oct 22, 2026
3cbde22
chore(release): v0.2.34.0 — the recorded test output in the Applicati…
ryota-murakami Oct 22, 2026
000e566
docs: documentation audit fixes for v0.2.34.0 (the package path, the …
ryota-murakami Oct 22, 2026
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
15 changes: 15 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ The driving agent owns state, cycle selection and completion claims; GStack supp
Standing rules, stated as rules (no decision log); delivery chain and ship limit: [Delivery](#delivery).

- **Fallow scores application code only (2026-10-19):** `extension/src` without `src/tests`, and `extension/skills`; tests and `extension/scripts` are out ([checks](#commands-and-checks)).
- **Everything for the product (owner, 2026-10-22):** 「お金を勝手に使うことと犯罪行為以外は禁止しないからPRODUCT_GOAL.mdの成果物/アプリケーションを最速/最高品質で作成する事に全リソースを捧げろ」. A rule, convention or skill step that plainly adds nothing to the product is skipped, not followed by habit; documents unrelated to the application ride on the current work branch, with no separate pull request and no wait on CI whose result is obvious. Spending money without the owner's permission and anything illegal stay forbidden, and the irreversible steps that **Never without the owner** lists still wait for the owner.
- **The owner cannot answer:** every decision point takes the recommended option, named in the Issue's Owner decisions. A pause the owner directs stops the work at once; only the owner's explicit message lifts it. A conditional pause ("when X is done, stop") is not immediate.
- **Dedicated Windows development machine (2026-10-14):** setup and repair (IME settings, QA reinstall or reset, needed data removal) need no new permission. Spend the time on live explanation, save and synchronized replay. A remedy that truly needs the owner: research it, finish independent preparation, give concrete verified steps. Outcomes and gates still govern.
- **Never without the owner:** buying credits, subscription or billing changes, new or changed credentials, permanent deletion, security settings, repository visibility. Signing in with the owner's existing sessions to what the work needs is the agent's job, done without asking (2026-10-22). Preserve the owner's and others' edits, profiles, extensions, skills, settings, tabs, drafts, learning, target source and credentials.
Expand Down Expand Up @@ -151,6 +152,20 @@ Never embed a demonstration or validation application in the extension, its runt
- Check for existing utilities, hooks, components and types before adding one. Reusable functions and classes get short purpose, trigger and caller docs with an example; reference workspace symbols with JSDoc links; explain non-obvious branches and loops briefly.
- DAMP behavior tests, hard-coded expectations, Arrange/Act/Assert, `test`; `toBeVisible` for displayed UI.

## Agent skills

### Issue tracker

GitHub Issues on laststance/codebook, through the `gh` CLI. See `docs/agents/issue-tracker.md`.

### Triage labels

The five default triage roles, each label named after its role (all five already exist on GitHub). See `docs/agents/triage-labels.md`.

### Domain docs

Single-context: one root `GLOSSARY.md` and `docs/adr/`, created lazily. See `docs/agents/domain.md`.

## Codex compaction hook

[`.codex/hooks.json`](.codex/hooks.json) registers only `SessionStart` with `^compact$`, ignoring startup and resume (Claude Code runs the same command from `.claude/settings.json`, the only shared Claude file: `compact` matcher, 5 s timeout); the command (Node, Git, POSIX shell) prints the owner's re-entry rule first (PRODUCT_GOAL.md in full and the PNG, then the Issue and this file in full), the scope and pause sentence, and this file's `## Mandatory entry` and `## Owner directions in force` sections verbatim, within 10,000 characters: Claude Code injects longer hook context only as a 2,000-character preview and a file path, so printing this whole file once cut the restore order. When those sections outgrow the limit, it prints the rule and points to this file; a missing section fails the hook. It restores no editing gate or Stop continuation. Each collaborator enables hooks, trusts the project, reviews the hook in Codex [`/hooks`](https://learn.chatgpt.com/docs/hooks) after every definition change (and disables it alone there if needed), and checks that a fresh `/compact` shows `CODEBOOK: RESTORE PRODUCT CONTEXT AFTER COMPACTION`, which proves delivery, not reading or understanding. Files alone do not establish activation; this repository changes no global Codex setting, and a Codex observation does not verify Claude Code delivery. `node --test .codex/restore-product-context.test.mjs` tests it (CI too): the rule within the first 2,000 characters, the whole output within 10,000 (about 1,500 tokens, under Codex's `additionalContextLimit` of 4,000), both sections verbatim; errors exit nonzero with stderr, with no fail-closed guarantee.
17 changes: 17 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,22 @@
# Changelog

## [0.2.34.0] - 2026-10-22 (development candidate)

Cycle 0049's second pull request ([Issue #107](https://github.com/laststance/codebook/issues/107)): a test replay's recorded test output in the Application pane, and the Study pane's test replay section rebuilt around the selected moment. The recorded source with its transitions and the native round in both editors come with the third pull request.

**The Application pane shows the recorded test output.**

- **Up to the selected moment.** A test replay's Application pane shows the output the test printed up to the selected moment and nothing printed after it, under the header `Recorded test output · <t> s` and the test's file and title path. At the result it ends with the verdict (`Test passed · exit code 0`, `Test failed · exit code <n>` or `Ended by signal <SIGNAL>`); a replay that ended before its result says `Recording ended before the test result.`, and one still recording says nothing of an end.
- **Readable as text.** Lines written to standard error start with `[stderr] `. Terminal colors, cursor moves and other control characters (C0 and C1 controls, DEL and bidirectional controls) are removed. The Node inspector's own lines fold into one muted line such as `2 Node inspector lines hidden`, and the pane keeps the last 65,536 characters, with a line such as `… 1200 earlier characters not shown` before them.
- **In place.** Moving through the replay updates the same page, so your scroll position, text selection and keyboard focus stay. The pane follows the latest output until you scroll up, and **Jump to latest** follows it again; moving back to a shorter moment does not turn following back on. A page the editor loads again (the pane moved to another window, webviews reloaded) shows the latest moment it had and keeps your choice; a pane the editor replaces follows again.
- **Long output.** Moving through a long recorded output costs about the end the pane keeps: many short lines, or one very long line printed without line feeds, no longer slow the editor at each step or fill its memory.

**The Study pane's test replay section.** It names the result, the capture and the explained stops, then the selected moment (`Stop <n> of <m> · <t> s`, `Output · <t> s` or `Result · <verdict> · <t> s`) with the explanation the chat saved for it, or `No saved explanation for this stop.`, and says `Source and debugger not recorded at this moment.` where they are not. **Previous stop** and **Next stop** come first in its transport, then **Play**, the time slider, **Previous event** and **Next event**. The learning summary is drawn as a browser replay's: a sequence diagram and its numbered steps under **Step details**, where the selected step is marked and the other steps of the same moment read `Same recorded moment`; a step's link selects its moment and that step. The events are listed under the collapsed **Events (<n>)**. When you close the Application pane, the section says `The Application pane is closed.`, and **Show recorded output** opens it again at the selected moment.

**Compatibility.** The MCP API stays 1.8 and the bundled skill 1.0.46. No stored format changes: test histories, learning materials and reader positions written by 0.2.33.0 open unchanged, and those written now open in 0.2.33.0.

**Not observed.** No native run of this version has reached a test stop yet; the native round in VS Code and Cursor comes with the third pull request. A pane that Show recorded output opens again after you closed it can open beside the source rather than above it; its placement is checked natively in that round.

## [0.2.33.0] - 2026-10-22 (development candidate)

Cycle 0049 is a feature cycle ([Issue #107](https://github.com/laststance/codebook/issues/107)): a Vitest test run that the editor chat explained becomes a learning replay, a **test replay**. It is delivered in three pull requests, merged in order; this version holds the first, the loop and its contracts. The recorded test output in the Application pane and the summary's selected step come with the second, the recorded source with its transitions and the native round in both editors with the third.
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Codebook contributes `debug.focusEditorOnBreak: false` as the native debugger de

## Implementation status

This is a preview, not a Marketplace or Open VSX release. The delivered version is **0.2.33.0** once the first pull request of [Cycle 0049](https://github.com/laststance/codebook/issues/107) is merged; until then 0.2.32.0 ([PR #106](https://github.com/laststance/codebook/pull/106)) is the delivered one, and the active cycle Issue says where the delivery stands. Cycle 0049 is a feature cycle: a Vitest test run that the editor chat explained becomes a learning replay, a **test replay**. Its first pull request holds the loop and its contracts: a test run reads `demonstrated` once its test passed after every declared stop and its history sealed complete; **Save learning replay** and **Open replay** in the status bar save and open it (its test output, the executed source and the native debugger's recorded stops; no application video); the run resource tells the agent the test's result and which explanations the saved learning still lacks; a node-test start's refusals arrive before its first stop with their fix; and the bundled skill 1.0.46 routes a question about a test to this flow. The MCP API is 1.8. The recorded test output in the Application pane and the summary's selected step come with its second pull request, the recorded source with its transitions and the native round in both editors with its third; the test replay's summary in the Learning summary view is the next feature cycle. What each earlier cycle delivered, with its tests, trials and limits, is in the [change history](CHANGELOG.md) and in that cycle's record, kept under the tag [`docs-archive-2026-10-20`](https://github.com/laststance/codebook/tree/docs-archive-2026-10-20/docs/cycles); from Cycle 0048 on, the cycle's Issue holds its tasks and state, and its pull requests the results.
This is a preview, not a Marketplace or Open VSX release. The delivered version is **0.2.34.0** once the second pull request of [Cycle 0049](https://github.com/laststance/codebook/issues/107) is merged; until then 0.2.33.0 ([PR #113](https://github.com/laststance/codebook/pull/113)) is the delivered one, and the active cycle Issue says where the delivery stands. Cycle 0049 is a feature cycle: a Vitest test run that the editor chat explained becomes a learning replay, a **test replay**. Its first pull request holds the loop and its contracts: a test run reads `demonstrated` once its test passed after every declared stop and its history sealed complete; **Save learning replay** and **Open replay** in the status bar save and open it (its test output, the executed source and the native debugger's recorded stops; no application video); the run resource tells the agent the test's result and which explanations the saved learning still lacks; a node-test start's refusals arrive before its first stop with their fix; and the bundled skill 1.0.46 routes a question about a test to this flow. The MCP API is 1.8. Its second pull request shows the recorded test output in the Application pane, updated in place up to the selected moment, and rebuilds the Study pane's test replay section around that moment (Previous stop and Next stop first, the learning summary drawn as a browser replay's with the selected step); the recorded source with its transitions and the native round in both editors come with its third; the test replay's summary in the Learning summary view is the next feature cycle. What each earlier cycle delivered, with its tests, trials and limits, is in the [change history](CHANGELOG.md) and in that cycle's record, kept under the tag [`docs-archive-2026-10-20`](https://github.com/laststance/codebook/tree/docs-archive-2026-10-20/docs/cycles); from Cycle 0048 on, the cycle's Issue holds its tasks and state, and its pull requests the results.

The specification is [goal version 10](PRODUCT_GOAL.md), and the implementation targets external repositories. Historical fixture or coupled-Wiki success is not proof of that destination.

Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.2.33.0
0.2.34.0
53 changes: 53 additions & 0 deletions docs/agents/domain.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# Domain Docs

How the engineering skills should consume this repo's domain documentation when exploring the codebase.

In this repository, product outcomes live in [PRODUCT_GOAL.md](../../PRODUCT_GOAL.md) and owner rules in [AGENTS.md](../../AGENTS.md), stated as rules; a glossary entry or ADR never restates or overrides either.

## Before exploring, read these

- **`GLOSSARY.md`** at the repo root, or
- **`GLOSSARY-MAP.md`** at the repo root if it exists: it points at one `GLOSSARY.md` per context. Read each one relevant to the topic.
- **`docs/adr/`**: read ADRs that touch the area you're about to work in. In multi-context repos, also check `src/<context>/docs/adr/` for context-scoped decisions.

If any of these files don't exist, **proceed silently**. Don't flag their absence; don't suggest creating them upfront. The `mattpocock-skills:domain-modeling` skill (reached via `mattpocock-skills:grilling` and `mattpocock-skills:codebase-design`) creates them lazily when terms or decisions actually get resolved.

## File structure

Single-context repo (most repos):

```
/
├── GLOSSARY.md
├── docs/adr/
│ ├── 0001-event-sourced-orders.md
│ └── 0002-postgres-for-write-model.md
└── src/
```

Multi-context repo (presence of `GLOSSARY-MAP.md` at the root):

```
/
├── GLOSSARY-MAP.md
├── docs/adr/ ← system-wide decisions
└── src/
├── ordering/
│ ├── GLOSSARY.md
│ └── docs/adr/ ← context-specific decisions
└── billing/
├── GLOSSARY.md
└── docs/adr/
```

## Use the glossary's vocabulary

When your output names a domain concept (in an issue title, a refactor proposal, a hypothesis, a test name), use the term as defined in `GLOSSARY.md`. Don't drift to synonyms the glossary explicitly avoids.

If the concept you need isn't in the glossary yet, that's a signal: either you're inventing language the project doesn't use (reconsider) or there's a real gap (note it for `mattpocock-skills:domain-modeling`).

## Flag ADR conflicts

If your output contradicts an existing ADR, surface it explicitly rather than silently overriding:

> _Contradicts ADR-0007 (event-sourced orders), but worth reopening because…_
50 changes: 50 additions & 0 deletions docs/agents/issue-tracker.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# Issue tracker: GitHub

Issues and specs for this repo live as GitHub issues. Use the `gh` CLI for all operations.

## This repository

[AGENTS.md](../../AGENTS.md) wins over this file: its `Where things live`, `Cycle rule` and `GitHub` sections define the cycle Issue (label `cycle`, title `Cycle NNNN: <outcome>`, four body sections), goal Issue #1 and the `goal` label. Open an Issue from evidence, never from a planning tool's need. The repository is public: everything posted is world-readable, a security defect before its fix too.

## Conventions

- **Create an issue**: `gh issue create --title "..." --body "..."`. Use a heredoc for multi-line bodies.
- **Read an issue**: `gh issue view <number> --json number,title,body,labels,comments`.
- **List issues**: `gh issue list --state open --json number,title,body,labels,comments --jq '[.[] | {number, title, body, labels: [.labels[].name], comments: [.comments[].body]}]'` with appropriate `--label` and `--state` filters.
- **Make an issue a sub-issue of a parent**: `gh issue create --parent <parent> ...`, or `gh issue edit <parent> --add-sub-issue <child>` afterwards (`gh` 2.94+). Older `gh`: `gh api --method POST repos/<owner>/<repo>/issues/<parent>/sub_issues -F sub_issue_id=<child-db-id>` (database id, as in **Blocking** below). Without sub-issues, put `Part of #<parent>` at the top of the child body.
- **Comment on an issue**: `gh issue comment <number> --body "..."`
- **Apply / remove labels**: `gh issue edit <number> --add-label "..."` / `--remove-label "..."`
- **Close**: `gh issue close <number> --comment "..."`

Infer the repo from `git remote -v`; `gh` does this automatically when run inside a clone.

## Pull requests as a triage surface

**PRs as a request surface: no.** _(Set to `yes` if this repo treats external PRs as feature requests; `/triage` reads this flag.)_

When set to `yes`, PRs run through the same labels and states as issues, using the `gh pr` equivalents:

- **Read a PR**: `gh pr view <number> --comments` and `gh pr diff <number>` for the diff.
- **List external PRs for triage**: `gh api --paginate 'repos/{owner}/{repo}/pulls?state=open' --jq '.[] | select(.author_association | IN("OWNER","MEMBER","COLLABORATOR") | not) | {number, title, author: .user.login, author_association, labels: [.labels[].name]}'`.
- **Comment / label / close**: `gh pr comment`, `gh pr edit --add-label`/`--remove-label`, `gh pr close`.

GitHub shares one number space across issues and PRs, so a bare `#42` may be either: resolve with `gh pr view 42` and fall back to `gh issue view 42`.

## When a skill says "publish to the issue tracker"

Create a GitHub issue.

## When a skill says "fetch the relevant ticket"

Read it as in **Read an issue** above.

## Wayfinding operations

Used by `/wayfinder`. The **map** is a single issue with **child** issues as tickets.

- **Map**: a single issue labelled `wayfinder:map`, holding the Notes / Decisions-so-far / Fog body. `gh issue create --label wayfinder:map`.
- **Child ticket**: an issue linked to the map as a GitHub sub-issue (see **Make an issue a sub-issue of a parent**). Where sub-issues aren't enabled, add the child to a task list in the map body and put `Part of #<map>` at the top of the child body. Labels: `wayfinder:<type>` (`research`/`prototype`/`grilling`/`task`). Once claimed, the ticket is assigned to the driving dev.
- **Blocking**: GitHub's **native issue dependencies**, the canonical, UI-visible representation. Add an edge with `gh api --method POST repos/<owner>/<repo>/issues/<child>/dependencies/blocked_by -F issue_id=<blocker-db-id>`, where `<blocker-db-id>` is the blocker's numeric **database id** (`gh api repos/<owner>/<repo>/issues/<n> --jq .id`, _not_ the `#number` or `node_id`). GitHub reports `issue_dependencies_summary.blocked_by` (open blockers only, the live gate). Where dependencies aren't available, fall back to a `Blocked by: #<n>, #<n>` line at the top of the child body. A ticket is unblocked when every blocker is closed.
- **Frontier query**: list the map's open children (`gh issue list --state open`, scoped to the map's sub-issues / task list), drop any with an open blocker (`issue_dependencies_summary.blocked_by > 0`, or an open issue in the `Blocked by` line) or an assignee; first in map order wins.
- **Claim**: `gh issue edit <n> --add-assignee @me`, the session's first write.
- **Resolve**: `gh issue comment <n> --body "<answer>"`, then `gh issue close <n>`, then append a context pointer (gist + link) to the map's Decisions-so-far.
Loading