Skip to content

feat(spec-navigator): centralise GitHub repo defaults#605

Merged
IanMayo merged 2 commits intomainfrom
claude/implement-speckit-248-ChSwl
May 9, 2026
Merged

feat(spec-navigator): centralise GitHub repo defaults#605
IanMayo merged 2 commits intomainfrom
claude/implement-speckit-248-ChSwl

Conversation

@IanMayo
Copy link
Copy Markdown
Member

@IanMayo IanMayo commented May 9, 2026

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.ts

    • Exports DEFAULT_OWNER, DEFAULT_REPO, and DEFAULT_REPO_LABEL constants
    • Reads VITE_DEFAULT_OWNER and VITE_DEFAULT_REPO environment variables at module load
    • Falls back to 'debrief' and 'debrief-future' if env vars are unset
    • Centralises the only place in source code where production literals appear
  • Updated: apps/spec-navigator/src/github/api.ts

    • Remove inlined DEFAULT_OWNER and DEFAULT_REPO constants
    • Import from ../defaults instead
  • Updated: apps/spec-navigator/src/state/useFeature.ts

    • Replace hardcoded 'debrief' and 'debrief-future' in FeatureScope literal
    • Import DEFAULT_OWNER and DEFAULT_REPO from ../defaults
  • Updated: apps/spec-navigator/src/strings.ts

    • Import DEFAULT_REPO_LABEL from ./defaults
    • Replace three hardcoded 'debrief/debrief-future' substrings with template strings interpolating the label:
      • PAT scope description in settings help text
      • Empty state message in OpenPrList
      • Modal title in SpecBrowserModal
  • Updated test files (rewired to use defaults):

    • src/github/__tests__/schemas.test.ts
    • src/__tests__/xssAdversarial.test.ts
    • src/components/__tests__/ArtifactView.test.tsx
    • src/components/__tests__/markdownRender.bench.test.ts

Implementation 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-navigator while remaining retargetable to other consumers.

The extraction kit (committed under specs/248-extract-spec-navigator/extraction-kit/) provides:

  • Two shell scripts (extract.sh, bootstrap-new-repo.sh) to perform the subtree split and bootstrap the new repo
  • Five patch recipes for post-extraction fixes (Vite base path, URL compat shim, bundled fixtures, ESLint/tsconfig standalone configs)
  • CI workflows (ci.yml, live.yml, deploy.yml) for the new repo
  • Documentation templates and runbooks for Phase 2 (extraction) and Phase 3 (cutover)

All 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

claude added 2 commits May 8, 2026 16:14
…#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.
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 9, 2026

📋 Spec Navigator

Review this PR's specs interactively:
👉 Open in Spec Navigator
Raw spec directories changed in this PR:

@IanMayo IanMayo merged commit 5d0abcb into main May 9, 2026
2 checks passed
@IanMayo IanMayo deleted the claude/implement-speckit-248-ChSwl branch May 9, 2026 15:41
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.

2 participants