feat(spec-navigator): centralise GitHub repo defaults#605
Merged
Conversation
…#248 Phase 1) Replace 7 hardcoded debrief / debrief-future literals across 3 production files + 4 test fixtures with reads from a single new module that exposes DEFAULT_OWNER, DEFAULT_REPO, and DEFAULT_REPO_LABEL. The literals appear only as ?? fallbacks in defaults.ts; build-time VITE_DEFAULT_OWNER / VITE_DEFAULT_REPO override them. Per /speckit.review decision 2A: no new Configuration entity, no src/config/ module, no JSON Schema, no Zod boundary added. The existing ApiOptions typed seam plus three named constants in strings.ts cover the same need. Phase 1 of #248 (specs/248-extract-spec-navigator/). Prepares apps/ spec-navigator/ for the Phase 2 subtree split into debrief/spec-navigator; default values reproduce today's debrief-future user experience byte-for- byte (FR-005, FR-024). Verified: spec-navigator lint, typecheck, vitest (151 passed, 2 pre- existing skips), and Playwright (25 active passed) all green. Repo-wide pnpm -r typecheck and pnpm test, uv run ruff / pyright / pytest also green.
Adds:
- specs/248-extract-spec-navigator/tasks.md — task breakdown for the
scope chosen in this branch (Phase 1 in code + Phase 2 extraction kit).
Phase 3 cutover deferred to a follow-up PR per kit's PHASE3-RUNBOOK.md.
- specs/248-extract-spec-navigator/evidence/test-summary.md and
usage-example.md — Phase 1 verification evidence.
- specs/248-extract-spec-navigator/extraction-kit/ — self-contained kit
for an operator with rights on the debrief org to bring up
debrief/spec-navigator:
* README.md + scripts/{extract,bootstrap-new-repo}.sh
* workflows/{ci,live,deploy}.yml — match contracts/ci-surface.md
* templates/{README,CONFIGURATION,SECURITY}.md — adopter docs
* patches/{01-vite-base-default, 02-url-compat-shim, 03-bundled-
fixtures, 04-eslint-standalone, 05-tsconfig-standalone}.md
* PHASE3-RUNBOOK.md — atomic cutover PR procedure incl. ADR-031
The kit exists because GitHub MCP tooling on this branch is restricted
to debrief/debrief-future and cannot create / push to the new repo.
Deliberately documented hand-off; no destructive action taken on this
repo.
NOTE: BACKLOG.md row 248 is currently the iOS install-help banner
(Backlog Navigator), a different feature; no row corresponds to this
spec dir even though backlog row 255 references it as "#248
(spec-navigator extraction)". T001 / T205 (mark item implementing /
complete) skipped; if a row is desired the maintainer can add one.
Contributor
📋 Spec NavigatorReview this PR's specs interactively:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Introduce a centralised configuration seam for spec-navigator's target GitHub repository, enabling the app to be extracted into a standalone repository and retargeted to different consumers via build-time environment variables.
Changes
New file:
apps/spec-navigator/src/defaults.tsDEFAULT_OWNER,DEFAULT_REPO, andDEFAULT_REPO_LABELconstantsVITE_DEFAULT_OWNERandVITE_DEFAULT_REPOenvironment variables at module load'debrief'and'debrief-future'if env vars are unsetUpdated:
apps/spec-navigator/src/github/api.tsDEFAULT_OWNERandDEFAULT_REPOconstants../defaultsinsteadUpdated:
apps/spec-navigator/src/state/useFeature.ts'debrief'and'debrief-future'inFeatureScopeliteralDEFAULT_OWNERandDEFAULT_REPOfrom../defaultsUpdated:
apps/spec-navigator/src/strings.tsDEFAULT_REPO_LABELfrom./defaults'debrief/debrief-future'substrings with template strings interpolating the label:Updated test files (rewired to use defaults):
src/github/__tests__/schemas.test.tssrc/__tests__/xssAdversarial.test.tssrc/components/__tests__/ArtifactView.test.tsxsrc/components/__tests__/markdownRender.bench.test.tsImplementation Details
This change is Phase 1 of spec-navigator extraction (#248). It establishes the configuration seam required for the app to be extracted into
debrief/spec-navigatorwhile remaining retargetable to other consumers.The extraction kit (committed under
specs/248-extract-spec-navigator/extraction-kit/) provides:extract.sh,bootstrap-new-repo.sh) to perform the subtree split and bootstrap the new repoci.yml,live.yml,deploy.yml) for the new repoAll tests pass (176 passed, 9 intentionally skipped). The default behaviour is byte-for-byte identical to pre-Phase-1 — no user-facing changes when env vars are unset.
https://claude.ai/code/session_01Hq3f6kyL6NKWBaJSpUkBAZ