Skip to content

feat(quickstart): split quickstart into router + task-specific topic subcommands (lit-c5519f81-93c728d5.2.1)#201

Merged
brandon-fryslie merged 3 commits into
masterfrom
quickstart-router-93c728d5.2.1
Jun 10, 2026
Merged

feat(quickstart): split quickstart into router + task-specific topic subcommands (lit-c5519f81-93c728d5.2.1)#201
brandon-fryslie merged 3 commits into
masterfrom
quickstart-router-93c728d5.2.1

Conversation

@brandon-fryslie

Copy link
Copy Markdown
Collaborator

Summary

  • Bare lit quickstart becomes a short router: the critical agent-instructions preamble, the topic list with imperative trigger descriptions ("use when..."), the "cheap to call, re-run any time" line, and the lit readylit start <id> fastpath.
  • Per-workflow guidance moves into callable topics — lit quickstart ready|new|update|done|doctor — each carrying the material the former monolithic output covered in that section, with breathing room.
  • The router keeps the quickstart.md filename, so existing project/global overrides, --eject, and --refresh drift detection keep working unchanged. The five topic templates register as instances of the same managed-template type, so override precedence and eject extend to them with zero new resolution code paths.
  • Topic dispatch is a value table (token → template) sharing one render path; unknown topics error with the valid list (exit 2), and topics reject flags.
  • SOIL is routed, not dropped: soil_mode appends to the bare router output only (the session-start read — it's a session-wide convention, not task guidance), never to topic output.
  • --refresh now reports override drift for all six guidance templates instead of just quickstart.md.

Breadcrumb pointers in command success output are sibling ticket lit-c5519f81-93c728d5.2.2 (next in the epic).

Verification

  • Full go test ./... green.
  • New tests: router content, every topic's guidance, unknown-topic error, topic+flag rejection, SOIL on router only, project override honored for a topic template.
  • Live-verified with a fresh binary in a scratch repo: router, topics, --eject (all 8 templates), --refresh drift report flagging a customized topic override.

Ticket: lit-c5519f81-93c728d5.2.1

@brandon-fryslie brandon-fryslie force-pushed the quickstart-router-93c728d5.2.1 branch from e90e4ce to ed9ad7e Compare June 10, 2026 07:54

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Z.ai Coding Agent Review

One must-change: [LAW:one-source-of-truth] — the set of quickstart topic templates is enumerated in three separate places (quickstartTopics slice, QuickstartGuidanceNames() function, and the quickstartUsage const). Adding a new topic requires editing all three; the refresh path and usage string should derive from quickstartTopics, the single authoritative mapping.

Pattern-level note: the PR is otherwise well-structured. The topic dispatch is data-driven (value lookup, single render path), the refresh logic was cleanly generalized from one template to many, and the tests verify behavior (output content, error messages, override precedence) rather than implementation details. The quickstartTopics data table is a good [LAW:one-type-per-behavior] application — the consolidation request above is about completing that design by making it the sole source of truth.

❌ Request Changes

Comment thread internal/templates/templates.go Outdated

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Z.ai Coding Agent Review

Clean PR adding lit quickstart <topic> subcommands (ready, new, update, done, doctor) with a data-driven dispatch table. No must-change issues found.

Strengths: The quickstartTopics table in quickstart_topics.go is a well-executed single source of truth — the usage string, topic validation, refresh set, and router display all derive from it, satisfying [LAW:one-source-of-truth] and [LAW:one-type-per-behavior]. Every topic shares one render path (value lookup, not per-topic branching), good [LAW:dataflow-not-control-flow]. Error messages for unknown topics and aliases are dynamically constructed from the table/map, never hand-maintained strings. Test coverage is thorough: router contract, topic content, unknown-topic errors, flag rejection, soil-section exclusion, and project-override precedence.

Minor observations (not blocking):

  • Line 1409 (if *refresh || ejectChanged || *force): the *force check is redundant — if *force is true without ejectChanged, the pre-existing guard at line 1404 already returned. Harmless but unnecessary.
  • Line 76 of the test (strings.Contains(output, "lit quickstart ready —")) couples the topic tests to a specific string in the router template. If the router wording changes, this sentinel breaks even though topic functionality is unaffected — a minor [LAW:behavior-not-structure]` coupling.

✅ Approved

…subcommands (lit-c5519f81-93c728d5.2.1)

Bare 'lit quickstart' becomes a short router: the critical agent-instructions
preamble, the topic list with imperative trigger descriptions, and the
'lit ready' -> 'lit start <id>' fastpath. Per-workflow guidance moves into
callable topics — lit quickstart ready|new|update|done|doctor — each carrying
the material the former monolithic output covered in that section.

The router keeps the quickstart.md filename so existing project/global
overrides, --eject, and --refresh drift detection keep working unchanged.
Topic templates are five new instances of the same managed-template type,
registered in the templates package, so override precedence and eject extend
to them with no new code paths. Topic dispatch is a value table (token ->
template) sharing one render path.

SOIL is routed, not dropped: soil_mode appends to the bare router output only
(session-start read), never to topic output. --refresh now reports override
drift for all six guidance templates instead of just quickstart.md.

Breadcrumb pointers in command success output are sibling ticket
lit-c5519f81-93c728d5.2.2.
…ng and refresh set derive from the topic table

The token→template table in quickstart_topics.go is now the sole
declaration of quickstart topic membership and display order.
QuickstartGuidanceNames (a second ordered copy in the templates package)
is removed; the --refresh template set and the usage string both derive
from the table, so adding a topic is a one-line edit. [LAW:one-source-of-truth]
@brandon-fryslie brandon-fryslie force-pushed the quickstart-router-93c728d5.2.1 branch from 2799ef9 to 356ecd6 Compare June 10, 2026 08:15

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Z.ai Coding Agent Review

No must-change violations found. The PR is well-designed: the quickstartTopics table is the single source of truth for topic membership, the usage string and refresh template set both derive from it, and every topic shares one render path — clean [LAW:one-source-of-truth] and [LAW:one-type-per-behavior] compliance.

Two pre-existing / non-blocking observations worth the author's attention:

  1. Dual-table maintenance surface (quickstartTopics vs shortAliases). Adding a new topic requires editing both quickstart_topics.go (the topic table) and templates.go (the shortAliases map). The keys differ by design (CLI subcommand tokens vs --eject aliases), so this isn't a strict [LAW:one-source-of-truth] violation, but the template-name constants are the only shared reference. A future refactor could have shortAliases derive its quickstart entries from the topic table.

  2. TestQuickstartTopicRejectsFlags gap. The test at quickstart_topics_test.go:94-105 covers --refresh and --eject but omits --force. The production guard (cli.go:1409) checks all three flags. Worth adding a {"quickstart", "ready", "--force"} case for completeness.

✅ Approved

@brandon-fryslie brandon-fryslie dismissed github-actions[bot]’s stale review June 10, 2026 08:20

Finding addressed in 2799ef9 (single-source topic table); thread resolved and re-review on current head is clean.

@brandon-fryslie brandon-fryslie merged commit 00427b2 into master Jun 10, 2026
6 checks passed
@brandon-fryslie brandon-fryslie deleted the quickstart-router-93c728d5.2.1 branch June 10, 2026 08:20
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