Skip to content

Docs: update readme on real get started example#482

Merged
djm81 merged 368 commits intomainfrom
dev
Apr 3, 2026
Merged

Docs: update readme on real get started example#482
djm81 merged 368 commits intomainfrom
dev

Conversation

@djm81
Copy link
Copy Markdown
Collaborator

@djm81 djm81 commented Apr 3, 2026

Description

Restructure the repository README.md around a proof-first onboarding flow so first-time visitors see a concrete value proposition, runnable commands, and real sample output before the deeper platform story.

Fixes #476

New Features #(issue)

Contract References: Updates the docs-first contract tests for the README and docs/index.md first-contact story; no runtime @icontract API changes.

Type of Change

  • 📚 Documentation update
  • 🧪 Test enhancement (scenario tests, property-based tests)
  • 🐛 Bug fix (non-breaking change which fixes an issue)
  • ✨ New feature (non-breaking change which adds functionality)
  • 💥 Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • 🔒 Contract enforcement (adding/updating @icontract decorators)
  • 🔧 Refactoring (code improvement without functionality change)

Contract-First Testing Evidence

Required for all changes affecting CLI commands or public APIs:

Contract Validation

  • Runtime contracts added/updated (@icontract decorators on public APIs)
  • Type checking enforced (@beartype decorators applied)
  • CrossHair exploration completed: hatch run contract-test-exploration
  • Contract violations reviewed and addressed

Test Execution

  • Contract validation: hatch run contract-test
  • Contract exploration: hatch run contract-test-exploration
  • Scenario tests: hatch run contract-test-scenarios
  • Full test suite: hatch run contract-test-full

Test Quality

  • CLI commands tested with typer test client
  • Edge cases covered with Hypothesis property tests
  • Error handling tested with invalid inputs
  • Rich console output verified manually or with snapshots

How Has This Been Tested?

Contract-First Approach: Added README/docs contract tests for the proof-first hero, sample-output proof block, section ordering, and reproducible evidence assets. Captured failing-before and passing-after evidence in openspec/changes/readme-star-conversion-01/TDD_EVIDENCE.md.

Manual Testing

  • Tested CLI commands manually
  • Verified rich console output
  • Tested with different input scenarios
  • Checked error messages for clarity

Automated Testing

  • Contract validation passes
  • Property-based tests cover edge cases
  • Scenario tests cover user workflows
  • All existing tests still pass

Test Environment

  • Python version: 3.12.3
  • OS: Ubuntu (Cursor Cloud)

Checklist

  • My code follows the style guidelines (PEP 8, ruff format, isort)
  • I have performed a self-review of my code
  • I have added/updated contracts (@icontract, @beartype)
  • I have added/updated docstrings (Google style)
  • I have made corresponding changes to documentation
  • My changes generate no new warnings (basedpyright, ruff, pylint)
  • All tests pass locally
  • I have added tests that prove my fix/feature works
  • Any dependent changes have been merged

Quality Gates Status

  • Type checking ✅ (hatch run type-check)
  • Linting ✅ (hatch run lint)
  • Contract validation ✅ (hatch run contract-test)
  • Contract exploration ✅ (hatch run contract-test-exploration)
  • Scenario tests ✅ (hatch run contract-test-scenarios)

Notes

  • OpenSpec change: readme-star-conversion-01
  • Synced GitHub issue: #481
  • OpenSpec validation now passes with the installed CLI: openspec validate readme-star-conversion-01 --strict
  • Reproducible sample output capture: docs/_support/readme-first-contact/capture-readme-output.sh
  • Capture now pins nold-ai/specfact-demo-repo to commit 2b5ba8cd57d16c1a1f24463a297fdb28fbede123
  • Capture metadata now records the real review exit code, and the script exits non-zero when the review run fails
  • README pre-commit snippet now uses the real hook id: specfact-smart-checks
  • README GitHub Actions snippet now uses the canonical CLI surface: govern enforce stage
  • Stored support artifacts: docs/_support/readme-first-contact/sample-output/capture-metadata.txt, docs/_support/readme-first-contact/sample-output/init-output.txt, docs/_support/readme-first-contact/sample-output/review-output.txt
  • hatch run smart-test currently fails on an unrelated baseline issue during collection in tests/integration/test_command_package_runtime_validation.py (IndexError: 2); see openspec/changes/readme-star-conversion-01/TDD_EVIDENCE.md.

Screenshots/Recordings (if applicable)

Not applicable for this docs-only change.

Open in Web Open in Cursor 

djm81 and others added 30 commits February 16, 2026 00:25
…#262)

* feat(ci): attach test and repro log artifacts to PR orchestrator runs

- Tests job: run smart-test-full, upload logs/tests/ as test-logs artifact
- Contract-first-ci: capture repro to logs/repro/, upload repro-logs and repro-reports
- Docs: CI and GitHub Actions section in troubleshooting (artifact names, usage)
- Version 0.31.1, CHANGELOG entry

Implements OpenSpec change ci-01-pr-orchestrator-log-artifacts. Fixes #260.

Co-authored-by: Cursor <cursoragent@cursor.com>

* Fix workflow and test

* ci(pr-orchestrator): add log artifacts for all pipeline jobs

- type-check: capture output to logs/type-check/, upload type-check-logs
- lint: capture to logs/lint/, upload lint-logs
- compat-py311: capture to logs/compat-py311/, upload compat-py311-logs
- quality-gates: capture to logs/quality-gates/, upload quality-gates-logs
- compat-py311: use hatch -e ENV run run (not hatch test) for pytest
- docs: list all CI artifact names and jobs in troubleshooting

Co-authored-by: Cursor <cursoragent@cursor.com>

---------

Co-authored-by: Dominikus Nold <djm81@users.noreply.github.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
* feat: enhanced module manifest security and integrity (arch-06)

Co-authored-by: Cursor <cursoragent@cursor.com>

* fix: remove duplicate ModulePackageMetadata import (ruff F811)

* Fix failed tests

* Fix type-check errors

---------

Co-authored-by: Dominikus Nold <djm81@users.noreply.github.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
…rch-07) (#265)

* feat: add schema extension system for modular ProjectBundle extensions
  Enables modules to extend Feature and ProjectBundle with namespaced custom
  fields without modifying core models, supporting marketplace-ready
  interoperability.
  - Add extensions dict field to Feature and ProjectBundle models
  - Implement type-safe get/set extension accessors with namespace enforcement
  - Extend module manifest schema with schema_extensions declaration
  - Add ExtensionRegistry for collision detection and introspection
  - Extend module lifecycle registration to load and validate extensions
  OpenSpec Change: arch-07-schema-extension-system
  Resolves #213

* feat: schema extension system (arch-07) and quality gate fixes

- Add extensions field and get_extension/set_extension to Feature and ProjectBundle
- Add SchemaExtension model and schema_extensions to ModulePackageMetadata
- Add ExtensionRegistry with collision detection; integrate in module registration
- Parse schema_extensions in discover_package_metadata
- Docs: extending-projectbundle guide, architecture section, sidebar
- Version 0.32.0, CHANGELOG entry, TDD_EVIDENCE
- Format: E402 (imports at top in project.py), UP042 (StrEnum in backlog-core),
  RUF043/B017 in schema extension tests
- Type-check: pass schema_metadata/project_metadata in BundleManifest test calls

OpenSpec Change: arch-07-schema-extension-system
Resolves #213

Co-authored-by: Cursor <cursoragent@cursor.com>

* Update change progress

* Add docs guides and update changes

* Use v0.32.0 as version and combine arch-06/arch-07

* Update change order plan

---------

Co-authored-by: Dominikus Nold <djm81@users.noreply.github.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Signed-off-by: Dom <39115308+djm81@users.noreply.github.com>
* feat(workflow): standardize worktree-first development flow

* docs(openspec): mark workflow-01 delivery tasks complete

* Apply review finding

---------

Co-authored-by: Dominikus Nold <djm81@users.noreply.github.com>
* feat(policy-engine): implement unified policy framework

* docs(openspec): mark policy-engine-01 implemented in change order

* fix(policy-engine): make module io contract compliant

* feat(policy-engine): add policy init templates and docs coverage

* fix: refine grouped policy limit semantics and outputs

* docs: clarify policy engine value for new users

---------

Co-authored-by: Dominikus Nold <djm81@users.noreply.github.com>
…1) (#275)

- Use discover_all_package_metadata() in init so list-modules/enable/disable
  use same roots as registry (built-in + workspace modules + SPECFACT_MODULES_ROOTS)
- Extend backlog-core-01 OpenSpec: init-module-discovery-alignment spec,
  tasks 0.5.x, TDD evidence
- Bump version to 0.34.0; CHANGELOG

Fixes #116

Co-authored-by: Dominikus Nold <djm81@users.noreply.github.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
* feat: add thorough codebase validation (validation-01)
  - Add --crosshair-per-path-timeout to specfact repro and ReproChecker
  - Add docs/reference/thorough-codebase-validation.md (quick check, contract-full, sidecar, dogfooding)
  - Unit test and TDD evidence for CrossHair per-path timeout
  - OpenSpec validation-01-deep-validation tasks and TDD_EVIDENCE updated

* fix: reject non-positive CrossHair per-path timeout (review)

* docs: CHANGELOG v0.34.0 and doc updates for thorough codebase validation

---------

Signed-off-by: Dom <39115308+djm81@users.noreply.github.com>
Co-authored-by: Dominikus Nold <djm81@users.noreply.github.com>
* feat(patch-mode): add patch apply (local + --write with confirmation) [#177]

- Add patch_mode module: pipeline (generator, applier, idempotency), patch apply command
- specfact patch apply <file> (local + preflight), patch apply --write --yes (upstream, idempotent)
- OpenSpec patch-mode-01-preview-apply: proposal Source Tracking, tasks, TDD_EVIDENCE
- CHANGELOG [Unreleased] entry for v0.34.0 merge

Co-authored-by: Cursor <cursoragent@cursor.com>

* fix(patch-mode): sanitize idempotency keys, derive key from patch content [PR review]

* Fix errors and ensure module compatibility

---------

Co-authored-by: Dominikus Nold <djm81@users.noreply.github.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
* feat: add bundle-mapper module with confidence-based spec-to-bundle mapping

- BundleMapping model and BundleMapper engine (explicit label, historical, content similarity)
- Mapping history persistence and MappingRule (save_user_confirmed_mapping, load_bundle_mapping_config)
- Interactive UI (ask_bundle_mapping) with Rich confidence visualization
- Unit tests and TDD_EVIDENCE for bundle-mapper-01 (OpenSpec #121)

Co-authored-by: Cursor <cursoragent@cursor.com>

* fix(bundle-mapper): address PR review findings (P1/P2)

- P1 interactive: no default accept for low-confidence; use default only when conf >= 0.5
- P1 history: ignore empty key fields in item_keys_similar (only count non-empty matches)
- P2 engine: add historical weight only when hist_bundle == primary_bundle_id
- Add test_item_keys_similar_empty_fields_not_counted to lock empty-key behavior

Co-authored-by: Cursor <cursoragent@cursor.com>

---------

Co-authored-by: Dominikus Nold <djm81@users.noreply.github.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
* fix: implement verification-01 delta for bundle mapping, patch apply, and docs parity

* test: fix patch write yes scenario for real diff apply

* fix: keep bundle mapping history out of bundle manifest

---------

Co-authored-by: Dominikus Nold <djm81@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com>
Signed-off-by: Dom <39115308+djm81@users.noreply.github.com>
djm81 and others added 18 commits March 30, 2026 12:31
* docs: sharpen first-contact story and onboarding

* docs: address first-contact review feedback

* docs: address onboarding review fixes

* test: accept default-filtered site tokens in docs parity

* docs: record completed onboarding quality gates

* test: improve first-contact assertion failures

---------

Co-authored-by: Dominikus Nold <djm81@users.noreply.github.com>
* fix: harden trustworthy green checks

* fix: restore contract-first ci repro command

* fix: apply CodeRabbit auto-fixes

Fixed 3 file(s) based on 3 unresolved review comments.

Co-authored-by: CodeRabbit <noreply@coderabbit.ai>

* fix: resolve CI failures for trustworthy green checks PR

- Use hatch run contract-test instead of specfact code repro in CI
  (CLI bundle not available in CI environment)
- Allow test_bundle_import.py in migration cleanup legacy-import check
  (_bundle_import is an internal helper, not a removed module package)
- Fix formatting in test_trustworthy_green_checks.py (CodeRabbit commit
  was unformatted)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix: address CodeRabbit review findings

- Add trailing newline to TDD_EVIDENCE.md (MD047)
- Make _load_hooks() search for repo: local instead of assuming index 0
- Replace fragile multi-line string assertion in actionlint test with
  semantic line-by-line checks

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Dominikus Nold <djm81@users.noreply.github.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Co-authored-by: CodeRabbit <noreply@coderabbit.ai>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
- Widen workflow_changed filter to include scripts/run_actionlint.sh
  and scripts/yaml-tools.sh so Workflow Lint triggers on script changes
- Pin actionlint default to v1.7.11 (matches CI) instead of latest
- Fix run_actionlint.sh conflating "not installed" with "lint failures"
  by separating availability check from execution
- Restore sys.path after test_bundle_import to avoid cross-test leakage
- Normalize CHANGE_ORDER.md status format to semicolon convention

Co-authored-by: Dominikus Nold <djm81@users.noreply.github.com>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
#472)

Simplify run_actionlint.sh control flow so both local and docker
execution paths propagate actionlint's exit code via `exit $?`. Previously
the docker path used `if run_with_docker; then exit 0; fi` which treated
lint errors as "docker unavailable" and fell through to install guidance.

Co-authored-by: Dominikus Nold <djm81@users.noreply.github.com>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
#473)

- Assert hook id == "specfact-smart-checks" to prevent silent renames
- cd to REPO_ROOT before running local actionlint so it finds workflows
  regardless of caller's cwd

Co-authored-by: Dominikus Nold <djm81@users.noreply.github.com>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
…4.0 (#474)

* feat: clean-code-01-principle-gates — 7-principle charter gates, v0.44.0

Implements openspec/changes/clean-code-01-principle-gates:

- Rewrote .cursor/rules/clean-code-principles.mdc as a canonical alias
  surface for the 7-principle clean-code charter (naming, kiss, yagni,
  dry, solid) defined in nold-ai/specfact-cli-modules. Documents Phase A
  KISS thresholds (>80 warning / >120 error LOC), nesting-depth and
  parameter-count checks active, and Phase B (>40/80) explicitly deferred.
- Added Clean-Code Review Gate sections to AGENTS.md and CLAUDE.md listing
  all 5 expanded review categories and the Phase A thresholds.
- Created .github/copilot-instructions.md as a lightweight alias (< 30 lines)
  referencing the canonical charter without duplicating it inline.
- Added unit tests (test_clean_code_principle_gates.py) covering all three
  spec scenarios: charter references, compliance gate, LOC/nesting thresholds.
- TDD evidence recorded in openspec/changes/clean-code-01-principle-gates/TDD_EVIDENCE.md.
- Bumped version 0.43.3 → 0.44.0 (minor — feature branch).
- Updated CHANGELOG.md and openspec/CHANGE_ORDER.md.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* fix: clean-code-01-principle-gates review findings and broad exception handling\n\n- Fix coderabbitai review findings:\n  - Clarify T20 and W0718 are aspirational in clean-code-principles.mdc\n  - Add language specifier to TDD_EVIDENCE.md fenced code block\n  - Update test to check all 7 canonical principles\n  - Make LOC threshold assertion more specific\n- Improve exception handling throughout codebase:\n  - Replace broad except Exception with specific exceptions\n  - Apply SOLID principle for better error handling\n- Update tasks.md to reflect completion status\n\nFixes #434\n\nGenerated by Mistral Vibe.\nCo-Authored-By: Mistral Vibe <vibe@mistral.ai>

---------

Co-authored-by: Dominikus Nold <djm81@users.noreply.github.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Archive 11 completed OpenSpec changes:
- bugfix-02-ado-import-payload-slugging
- ci-02-trustworthy-green-checks
- clean-code-01-principle-gates
- code-review-zero-findings
- docs-04-docs-review-gate-and-link-integrity
- docs-05-core-site-ia-restructure
- docs-07-core-handoff-conversion
- docs-12-docs-validation-ci
- docs-13-core-nav-search-theme-roles
- docs-14-first-contact-story-and-onboarding
- init-ide-prompt-source-selection
- packaging-02-cross-platform-runtime-and-module-resources
- speckit-02-v04-adapter-alignment

Fix spec validation errors:
- Add proper delta headers (ADDED/MODIFIED/REMOVED/RENAMED)
- Use correct scenario format with GIVEN/WHEN/THEN bullets
- Ensure requirement headers match between delta and main specs
- Use correct operation type based on existing requirements

Update main specs with archived changes:
- backlog-adapter: various updates
- bridge-adapter: Spec-Kit v0.4.x capabilities
- bridge-registry: BridgeConfig preset updates
- code-review-module: new requirements
- debug-logging: enhancements
- devops-sync: improvements
- documentation-alignment: core vs modules separation
- review-cli-contracts: new contracts
- review-run-command: command updates

Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
…w fixes (#477)

* Fix content for install, sync, uninstallä

* test(docs): align first-contact contracts and stabilize module CLI tests

- docs/index: restore Why does it exist?, tagline, OpenSpec, canonical core CLI story
- Update init profile tests for solo-developer + install all (code-review, six bundles)
- Lean help test accepts uvx init hint; upgrade/core_compatibility tests match runtime
- Autouse fixture re-bootstraps CommandRegistry after category-group tests
- Rebase tasks conflict resolved; TDD_EVIDENCE + tasks for gates 7.1/7.2/12.1/12.2

Made-with: Cursor

* fix(tools): smart-test baseline and pre-commit single code-review run

- Run full suite when smart-test cache has no last_full_run; force+auto falls back to full when incremental is a no-op
- Pre-commit: invoke pre_commit_code_review.py once (no xargs split) so .specfact/code-review.json is not clobbered
- Tests and OpenSpec tasks for docs-new-user-onboarding

Made-with: Cursor

* test: fix CI backlog copy assertions and module install test isolation

- Align backlog not-installed tests with solo-developer init guidance (no <profile> placeholder)
- Autouse: reset CommandRegistry, register_builtin_commands, rebuild_root_app_from_registry so module install tests work after registry-only clears

Made-with: Cursor

* docs: README wow path + tests locking entrypoint with docs

- README leads with uvx init + code review run --scope full; pip install secondary
- Unit contract tests: README and docs/index.md share canonical uvx strings and order
- E2E: init --profile solo-developer in temp git repo; registry ready for step two with mock bundles

Made-with: Cursor

* feat(init): solo-developer includes code-review bundle and marketplace install

- Add specfact-code-review to canonical bundles and solo-developer preset
- Install marketplace module nold-ai/specfact-code-review via install_bundles_for_init
- Docs index: core CLI story and default starting point copy for parity tests
- CLI: missing-module hint references solo-developer profile
- smart_test_coverage: icontract requires use (self, test_level) for method contracts
- Re-sign init and module_registry manifests; tests and registry updates

Made-with: Cursor

* fix(tools): align _run_changed_only with tuple return and baseline full run

- Return (success, ran_any) from _run_changed_only; run full suite when no last_full_run
- run_smart_tests(auto, force): fall back to full tests when incremental ran nothing
- Fix wow e2e fixture typing (Iterator[None]) for basedpyright

Unblocks PR #477 CI: type-check, tests, lint job.

Made-with: Cursor

* chore(release): bump to 0.45.1 and update OpenSpec tasks status

- Sync version across pyproject.toml, setup.py, and __init__ modules
- Changelog: 0.45.1 entry for dependency profiles, smart-test baseline, CI, UX
- openspec: rolling status snapshot and task checkboxes for PR verification
- Includes prior branch work: init/profile, module registry, docs entry path, workflows

Made-with: Cursor

---------

Co-authored-by: Dominikus Nold <djm81@users.noreply.github.com>
…pgrade tests (#479)

* fix: code-review gate (Typer params), typer<0.24 vs semgrep, module upgrade tests

- Split root/install Typer callbacks into merged param stubs (KISS param count).
- Patch typer.main via importlib; merge install param specs in module_registry.
- Cap typer<0.24 to stay compatible with semgrep click~=8.1.8.
- Invoke module_registry app directly in upgrade CLI tests (root app may lack module group).
- Refactors for first_run_selection, module_packages, registry tests, semgrep README.

Worktree: specfact-cli-worktrees/bugfix/code-review-cli-tests
Made-with: Cursor

* docs: use code import in examples (flat import removed from CLI)

Replace specfact [--flags] import from-code with specfact [--flags] code import
from-code so check-docs-commands matches the nested Typer path after removing
the flat import shim.

Made-with: Cursor

* Fix review findings

---------

Co-authored-by: Dom <djm81@users.noreply.github.com>
* docs: restructure readme for star conversion

Co-authored-by: Dom <djm81@users.noreply.github.com>

* docs: sync readme change tracking

Co-authored-by: Dom <djm81@users.noreply.github.com>

* docs: relocate readme support artifacts

Co-authored-by: Dom <djm81@users.noreply.github.com>

* docs: fix readme workflow snippet and pin demo capture

Co-authored-by: Dom <djm81@users.noreply.github.com>

* docs: address remaining readme review findings

Co-authored-by: Dom <djm81@users.noreply.github.com>

---------

Co-authored-by: Dom <djm81@users.noreply.github.com>
@djm81 djm81 self-assigned this Apr 3, 2026
@djm81 djm81 added the documentation Improvements or additions to documentation label Apr 3, 2026
@djm81 djm81 added the enhancement New feature or request label Apr 3, 2026
@djm81 djm81 moved this from Todo to In Progress in SpecFact CLI Apr 3, 2026
@djm81 djm81 linked an issue Apr 3, 2026 that may be closed by this pull request
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Apr 3, 2026

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: bec2cd96-9e73-444e-a65d-3853c72bd12e

📥 Commits

Reviewing files that changed from the base of the PR and between 8085a80 and 8fe4a26.

📒 Files selected for processing (16)
  • README.md
  • docs/_support/readme-first-contact/capture-readme-output.sh
  • docs/_support/readme-first-contact/sample-output/capture-metadata.txt
  • docs/_support/readme-first-contact/sample-output/init-output.txt
  • docs/_support/readme-first-contact/sample-output/review-output.txt
  • docs/index.md
  • openspec/CHANGE_ORDER.md
  • openspec/changes/readme-star-conversion-01/.openspec.yaml
  • openspec/changes/readme-star-conversion-01/TDD_EVIDENCE.md
  • openspec/changes/readme-star-conversion-01/proposal.md
  • openspec/changes/readme-star-conversion-01/specs/readme-first-contact/spec.md
  • openspec/changes/readme-star-conversion-01/tasks.md
  • tests/unit/docs/docs_test_constants.py
  • tests/unit/docs/test_first_contact_story.py
  • tests/unit/docs/test_release_docs_parity.py
  • tests/unit/docs/test_wow_entrypoint_contract.py

📝 Walkthrough

Documentation Restructuring for Proof-First Onboarding (No CLI Changes)

This PR restructures README.md and docs/index.md around a proof-first value proposition to improve first-time user onboarding, addressing issue #476. No CLI commands, options, or public APIs were modified.

User-Visible Changes

README.md restructuring:

  • Hero section now leads with hook + subhook: "Review AI-assisted code against your own contracts. Catch drift before it reaches PR or main."
  • "Try it in 60 seconds" section appears first with uvx specfact-cli init --profile solo-developer and uvx specfact-cli code review run --path . --scope full
  • Real sample output block added showing Verdict, Score, Findings, and Evidence bundle location
  • Removed long narrative sections (What/Why/How/Who, backlog alignment, AI IDE setup, migration notes)
  • Reordered sections: proof-first hero → sample output → "What SpecFact does" → pre-commit/GitHub Actions snippets → "Add SpecFact to your workflow" → enterprise/module content
  • Replaced module example (nold-ai/specfact-specnold-ai/specfact-code-review)
  • Added GitHub Actions gate command govern enforce stage and pre-commit hook specfact-smart-checks snippets

docs/index.md updates:

  • Hero copy refocused from "score and fix list" to "AI-assisted review against contracts" with "catch drift" positioning
  • Quickstart result description tightened (removed explicit PASS/FAIL verdict phrasing)
  • Same uvx commands and first-contact flow as README

Contract & Testing Impact

New test constants module:

  • tests/unit/docs/docs_test_constants.py exports HOOK and SUBHOOK strings for reuse across docs contract tests

Refactored contract tests:

  • test_wow_entrypoint_contract.py: Renamed from "uvx wow" to "proof-first/readme-first-contact" contract. Updated assertions to validate:

    • New section ordering: "Try it in 60 seconds" < "What SpecFact does" < "Add SpecFact to your workflow" < "For teams and organizations"
    • Presence of sample output, evidence bundle references, and new CTA ("Star this repo if the output is useful")
    • File-system contract: docs/_support/readme-first-contact/capture-readme-output.sh exists and sample-output/ directory contains non-empty files
    • Removed checks for --scope full and "Verdict/Score/findings" specific wording
    • Docs index ordering: UVX_INIT block before "## What is SpecFact?"
  • test_first_contact_story.py: Simplified from strict question/phrase ordering to section presence and proof-first positioning. Now validates HOOK/SUBHOOK presence and "Try it in 60 seconds" section placement.

  • test_release_docs_parity.py: Updated to assert HOOK phrase presence in both README and docs/index (replacing older "validation and alignment layer" text).

Support Artifacts & Reproducibility

New capture infrastructure:

  • docs/_support/readme-first-contact/capture-readme-output.sh: Bash script that automates capturing sample output. Clones target repo to pinned ref, runs specfact init --profile solo-developer, then specfact code review run --path . --scope full with fixed tool integrations, records exit code and metadata.
  • docs/_support/readme-first-contact/sample-output/capture-metadata.txt: Metadata recording CLI version (0.45.1), repo ref, exit codes, and exact command lines executed
  • docs/_support/readme-first-contact/sample-output/init-output.txt: Captured initialization transcript showing bundle installation and module readiness confirmation

OpenSpec Change Artifacts

New change: readme-star-conversion-01

  • Tracks proof-first README restructuring as OpenSpec change order #12
  • proposal.md: Defines requirements for hero section, uvx quickstart, sample output block, and copy-pasteable snippets
  • specs/readme-first-contact/spec.md: Detailed contract specification requiring hero + quickstart in first screenful, real reproducible sample output, developer-focused summary, adoption-path snippets, and trust section explaining OpenSpec/TDD workflow
  • tasks.md: Step-by-step checklist for proof-first conversion including test-first flow, capture script execution, and quality gate validation
  • TDD_EVIDENCE.md: Documents failing-before and passing-after test runs with full command history, environment notes (unrelated smart-test baseline failure documented), and confirms contract validation, format/lint/type-check, and openspec validate --strict all pass

Quality Gates & Testing Status

  • Contract tests pass
  • Type checking and linting pass
  • Some scenario/property tests remain pending (noted as non-blocking)
  • Unrelated smart-test baseline failure during collection documented in TDD evidence

Module & Version Context

No module package boundaries or version bumps in this PR. The version 0.45.1 in CHANGELOG contains unrelated changes (dependency install profiles, smart-test baseline fallback, pre-commit invocation handling, bundle UX improvements, GitHub Actions fixes).

Walkthrough

This PR implements a README restructuring initiative that shifts from verbose "What/Why/How/Who" narrative to a proof-first pattern featuring a quick start, sample output, and contract-first messaging. It includes a reproducible capture script for generating documentation artifacts and comprehensive OpenSpec documentation tracking the change.

Changes

Cohort / File(s) Summary
README and Core Documentation
README.md, docs/index.md
Restructured README to emphasize "AI-assisted code review against contracts" with proof-first positioning, removed lengthy workflow/architecture sections, added "Try it in 60 seconds" quickstart, and updated docs/index.md hero copy to emphasize catching drift before PR/main.
Capture and Evidence Infrastructure
docs/_support/readme-first-contact/capture-readme-output.sh, docs/_support/readme-first-contact/sample-output/*
Added Bash script to automate capturing reproducible sample output from specfact-cli (init and code review runs), plus checked-in metadata, init transcript, and raw review output files as deterministic documentation artifacts.
OpenSpec Change Tracking
openspec/CHANGE_ORDER.md, openspec/changes/readme-star-conversion-01/...
Registered change in order table and added comprehensive change proposal, TDD evidence, specification, and task documentation defining README-first-contact contract requirements (hero/quickstart positioning, sample output sourcing, section ordering, adoption snippets).
Documentation Test Infrastructure
tests/unit/docs/docs_test_constants.py, tests/unit/docs/test_first_contact_story.py, tests/unit/docs/test_wow_entrypoint_contract.py, tests/unit/docs/test_release_docs_parity.py
Added shared test constants (HOOK, SUBHOOK) and substantially refactored test suites to validate proof-first story flow across README and docs/index.md surfaces; replaced ordered-question assertions with section-ordering and file-system contracts requiring capture artifacts and sample-output directory presence.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related issues

  • readme-star-conversion-01 #481: This PR directly implements the readme-star-conversion-01 proposal—README rewrite, reproducible capture script, sample-output evidence artifacts, and aligned test contract updates specified in that issue.

Possibly related PRs

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch dev

Comment @coderabbitai help to get the list of available commands and usage tips.

Signed-off-by: Dom <39115308+djm81@users.noreply.github.com>
@djm81 djm81 merged commit d4c7656 into main Apr 3, 2026
12 checks passed
@github-project-automation github-project-automation bot moved this from In Progress to Done in SpecFact CLI Apr 3, 2026
@chatgpt-codex-connector
Copy link
Copy Markdown

💡 Codex Review

if raw.lower() == "all":
return list(_INSTALL_ALL_BUNDLES)

P2 Badge Include code-review when resolving init --install all

resolve_install_bundles("all") now returns _INSTALL_ALL_BUNDLES, which omits specfact-code-review, even though this file declares specfact-code-review as a canonical bundle and includes it in the default solo-developer profile. In practice, users who run specfact init --install all won’t get the code-review bundle and then hit missing-command errors for specfact code review ... despite explicitly requesting “all” bundles.


_ = category_grouping_enabled # retained for API compatibility; grouping no longer selects flat vs category
for cmd_name in meta.commands:
if meta.category is not None:
_register_command_category_path(package_dir, meta, cmd_name, logger)

P2 Badge Respect category_grouping_enabled during command registration

This change discards category_grouping_enabled and always routes categorized modules through _register_command_category_path. register_builtin_commands() still reads this toggle from env/config, so deployments that set SPECFACT_CATEGORY_GROUPING_ENABLED=false to keep flat command routing lose that behavior after this commit; the flag is accepted but no longer affects registration.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation enhancement New feature or request

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

readme-star-conversion-01

1 participant