* enhance(#4139): Phase 8 — the toggle becomes discoverable, and the ledger closes ADR-4139's final phase. workflow.compact_content already defaulted to false (Phase 1's buildNewProjectConfig hardcoded default), but nothing surfaced it: /gsd-new-project never asked, and /gsd-settings/config had no toggle path for an already-initialized project — config-set/config-get were the only route. new-project.md gains a fourth question in the existing Round 2 AskUserQuestion array (grouped with the other general-workflow-behavior toggles, not the per-agent capability questions above it) and threads compact_content into the config-new-project CLI JSON literal. settings.md mirrors the exact pattern every other non-capability workflow.* key already follows: read_current bullet, question block, update_config write, the safe-merge non-capability-keys list, save_as_defaults, and the confirm summary table — seven edits, zero new src/*.cts code, since Phase 1's merge logic is a generic passthrough. Its success_criteria question-count ("24 settings") is bumped to 25 to match the now-25-entry main AskUserQuestion batch. settings-advanced.md deliberately does NOT get a duplicate question: no other boolean toggle in this repo is asked in both settings.md and settings-advanced.md, and there's no reason to start with this one. docs/CONFIGURATION.md, docs/USER-GUIDE.md, and a new docs/features/4139-compact- content.md fragment (regenerated into docs/FEATURES.md) document the toggle. ADR-4139 itself: Status flips Proposed -> Accepted, the acceptance-criteria section becomes a guard ledger — a 13-row table covering all 12 of #4139's original checkboxes plus the shipped-content guard criterion, each with real evidence (the merged PR that satisfied it, fetched via `gh issue view --json closedByPullRequestsReferences` rather than asserted from phase numbers) — and both "Open questions for the implementation phases" are resolved rather than left dangling: discuss-phase was never converted to spine+detail shape (verified: no detail/ subdir exists) — a genuine gap, not a reasoned decline; the disjointness check is confirmed line-based by reading compact-content-split.cjs's normalizeNonTrivialLines directly. Orthogonal review (isolated Standards/Spec code-review + security-review sub-agents) found and this fixes two real defects: the changeset fragment's body didn't match CONTRIBUTING.md's single em-dash-sentence format (was multi-sentence prose naming implementation file paths); and settings.md's own success_criteria still said "24 settings" after the new question pushed the main batch to 25. Also fixed, found by the Spec pass while confirming commands/gsd/settings.md correctly needed no sync edit: that file and its skills/gsd-settings/SKILL.md twin both still described "Interactive 5-question prompt (model, research, plan_check, verifier, branching)", stale since long before this phase (the batch has had far more than 5 questions for a while) — replaced with a description that names the current set without hardcoding a count that will drift again. gsd-test (real run, sha 1da78fe2) caught a third real regression the local sweep missed: new-project.md is a registered spine+detail split for Phase 4's token-reduction benchmark (scripts/benchmark-compact-content.cjs), and the new question's +167 tokens drifted the committed baseline (tests/fixtures/compact-content-benchmark-baseline.json). The benchmark itself is designed never to fail CI on drift, but the test asserting the COMMITTED baseline is currently non-drifted correctly caught it. Regenerated via `node scripts/benchmark-compact-content.cjs --write`; re-verified --check now reports "up to date" and the test file passes 27/27. Closes #4408. Closes #4139. Emitted-Drift-Ack-Growth: new-project.md — new 4th Round-2 AskUserQuestion entry (Compact Content, #4139) plus the config-new-project CLI JSON field and explanatory sentence; a new opt-in toggle needs new prose. Emitted-Drift-Ack-Growth: settings.md — new workflow.compact_content read_current bullet, question block, update_config write, safe-merge key, save_as_defaults field, and confirm summary row (the same seven-edit pattern every other non-capability workflow.* toggle already follows), plus the 24->25 success_criteria count fix found in review. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> * chore(#4408): backfill changeset PR number pr:0 -> pr:4587 now that gh pr create has returned the real number. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> --------- Co-authored-by: sim <sim@local> Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
41
docs/features/4139-compact-content.md
Normal file
41
docs/features/4139-compact-content.md
Normal file
@@ -0,0 +1,41 @@
|
||||
---
|
||||
id: 4139
|
||||
title: Compact Content Mode
|
||||
group: Context Engineering Features
|
||||
---
|
||||
|
||||
**Config:** `workflow.compact_content: false`
|
||||
|
||||
**Purpose:** Per-project opt-in to token-minimized variants of GSD's own shipped prompt
|
||||
content — workflow instructions, planning-artifact templates, and non-Claude agent-persona
|
||||
payloads — so the always-loaded instruction window leaves more of the model's attention on
|
||||
the developer's own code (ADR-4139 Decision 2: finite attention, not per-invocation price,
|
||||
since prompt caching already discounts the latter).
|
||||
|
||||
Nothing is compressed at runtime. Compact variants are hand-authored, reviewed files sitting
|
||||
beside their canonical siblings; the config key only chooses which one gets read. With the
|
||||
key off (the default), every covered workflow, template, and agent persona behaves exactly as
|
||||
it did before this feature existed.
|
||||
|
||||
**Requirements:**
|
||||
- REQ-COMPACT-01: System MUST default `workflow.compact_content` to `false` — off costs
|
||||
nothing and changes no existing behavior
|
||||
- REQ-COMPACT-02: Eagerly `@`-included workflow files MUST keep their host-guaranteed load;
|
||||
compactness on this stream comes from a spine + deferred `detail/*.md` elaboration, never
|
||||
from converting the `@`-include itself
|
||||
- REQ-COMPACT-03: A missed runtime `Read` of a deferred elaboration or compact variant MUST
|
||||
degrade to a complete, correct, terser state — never to a state with no instructions
|
||||
- REQ-COMPACT-04: No compact variant MAY weaken or remove protected content (guardrails,
|
||||
output-format contracts, few-shot examples, security language, structural headings)
|
||||
- REQ-COMPACT-05: An agent with no compact persona variant registered MUST fall back to its
|
||||
canonical persona and disclose the fallback inside the served payload, never fail or serve
|
||||
nothing
|
||||
- REQ-COMPACT-06: `/gsd-new-project` MUST ask the question and persist the answer;
|
||||
`/gsd-settings` and `/gsd-config` MUST toggle it on an already-initialized project
|
||||
|
||||
**Config:**
|
||||
| Setting | Type | Default | Description |
|
||||
|---------|------|---------|-------------|
|
||||
| `workflow.compact_content` | boolean | `false` | When `true`, loads token-minimized instruction/template/agent-persona variants wherever one is registered; falls back to canonical content everywhere else |
|
||||
|
||||
**See also:** [ADR-4139](../adr/4139-compact-content-seam.md), [CONFIGURATION.md](../CONFIGURATION.md#workflow-toggles), [USER-GUIDE.md](../USER-GUIDE.md)
|
||||
Reference in New Issue
Block a user