Skip to content

Add facts-only codebase scan to /sd:setup - #11

Merged
developzoneio merged 4 commits into
mainfrom
feat/setup-codebase-scan
Jun 19, 2026
Merged

Add facts-only codebase scan to /sd:setup#11
developzoneio merged 4 commits into
mainfrom
feat/setup-codebase-scan

Conversation

@developzoneio

Copy link
Copy Markdown
Owner

What

Implements the Planned roadmap item /sd:setup codebase scan. Turns first-run setup from a
blank <<placeholder>> template into detected defaults - facts only, never constitution rules.

Changes

  • commands/setup.md - new Phase 2.5 "Scan codebase (facts only)" (Claude-driven bounded
    sampling: stack, paths.{src,tests,docs}, commands.* from the project manifest, and an ordered
    inside-out paths.layers map). Adds a single batch confirmation gate (not a 4th question),
    wires detected facts into Phase 4 (CLAUDE.md) and Phase 6 (project-config.json), and adds a Rules
    bullet pinning the facts-only boundary.
  • templates/project-config.template.json - adds paths.layers: [] with a usage note.
  • CHANGELOG.md - [Unreleased] -> Added entry.
  • docs/superpowers/ - design doc + implementation plan for traceability.

Design decisions

  • Facts only - constitution rules stay human-authored; auto-inferring them risks codifying
    accidental patterns as enforced law.
  • No scanner script - the scan is prompt-driven sampling inside setup.md, keeping the engine
    stack-agnostic with no cross-platform ps1/sh pair to maintain.
  • paths.layers is an ordered inside-out [{name, path}] array - order encodes dependency
    direction, backing constitution 1.1.

Verification

  • scripts/validate.ps1 - all 6 checks pass (command count unchanged at 10; [Unreleased] gate
    satisfied).
  • Added lines are pure ASCII (pre-existing em-dash/x glyphs untouched; .md not subject to the
    .ps1-only ASCII gate).

Constraints preserved: <=3 interactive questions, idempotent, stack-agnostic, no BOM, engine never
modified.

🤖 Generated with Claude Code

@developzoneio
developzoneio merged commit 3f3ee96 into main Jun 19, 2026
4 checks passed
@developzoneio
developzoneio deleted the feat/setup-codebase-scan branch June 19, 2026 08:59
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