Skip to content

feat(workspace): topic clustering and generated TOC/SKILL docs - #28

Merged
RichardHightower merged 1 commit into
mainfrom
feat/workspace-synthesis
Jul 29, 2026
Merged

feat(workspace): topic clustering and generated TOC/SKILL docs#28
RichardHightower merged 1 commit into
mainfrom
feat/workspace-synthesis

Conversation

@RichardHightower

Copy link
Copy Markdown
Contributor

The last open item — and the only one that adds product surface rather than repairing something.

Flagged before building: its own ticket calls it a deferred go/no-go, and the approved plan scoped it out. The goal said all 24, so it is built. The concern is on the record, not in the way.

What it does

Synthesize reads every note, summarizes each, clusters them by topic, and writes TOC.md and SKILL.md back into the workspace.

This connects the last three orphans. TopicRefiner, TOCGenerator and SkillGenerator were written months ago, tested, and completely unreachable — nothing imported them, and they called Bun.spawn so they could not have run in either shipped mode regardless.

The client-bundle guard now walks 23 modules instead of 19 and passes. That increment is the proof they are genuinely reachable and genuinely browser-safe, not merely edited.

Three things it deliberately does not do

  • Read its own output. A second run would otherwise summarize the index it wrote on the first, and topic labels would drift toward describing the index rather than the notes.
  • Process an unbounded workspace. One LLM round trip per note; capped at 40.
  • Truncate silently. When it skips notes it says so — a silent cap reads as "covered everything" when it did not.

Testing

Six unit tests against an in-memory workspace (LLM stubbed in code) and two E2E specs that stub only the /api/llm network boundary, so everything above it is real. The second asserts the failure path: a synthesis that dies quietly is worse than one that refuses.

🤖 Generated with Claude Code

https://claude.ai/code/session_01TYuTJt2hh7k8mg8FXCKrw1

…Z8RGR06XBSG9CH4TEWYJY)

The last open item, and the only one that adds product surface rather than
repairing something. Flagged before building: its own ticket called it a
deferred go/no-go, and the approved plan scoped it out. The goal said all 24, so
it is built — the concern is on the record, not in the way.

Synthesize reads every note, summarizes each, clusters them by topic, and writes
TOC.md and SKILL.md back into the workspace.

This connects the last three orphans. TopicRefiner, TOCGenerator and
SkillGenerator were written months ago, tested, and completely unreachable —
nothing imported them, and they called Bun.spawn so they could not have run in
either shipped mode regardless. The client-bundle guard now walks 23 modules
instead of 19, and passes: that increment is the proof they are genuinely
reachable and genuinely browser-safe, not merely edited.

Filesystem access is injected rather than imported, so the orchestration is
testable without a real workspace and the same code serves both runtimes.

Three things it deliberately does NOT do:
- Read its own output. TOC.md and SKILL.md are excluded from the input, or a
  second run would summarize the index it wrote on the first and the topic
  labels would drift toward describing the index rather than the notes.
- Process an unbounded workspace. One LLM round trip per note means an unbounded
  bill and a very long wait; capped at 40.
- Truncate silently. When it skips notes it says so — a silent cap reads as
  "covered everything" when it did not.

Tested at both levels: six unit tests against an in-memory workspace with the
LLM stubbed in code, and two E2E specs that stub only the /api/llm network
boundary so everything above it is real. The second E2E asserts the failure
path, because a synthesis that dies quietly is worse than one that refuses.

The status region needed an accessible name: two role="status" elements now
exist (save state and this), and the spec could not address either.
@RichardHightower
RichardHightower merged commit b987195 into main Jul 29, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant