Skip to content

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

Merged
djm81 merged 3 commits intodevfrom
bugfix/code-review-cli-tests
Apr 3, 2026
Merged

fix: code-review gate (Typer params), typer<0.24 vs semgrep, module upgrade tests#479
djm81 merged 3 commits intodevfrom
bugfix/code-review-cli-tests

Conversation

@djm81
Copy link
Copy Markdown
Collaborator

@djm81 djm81 commented Apr 3, 2026

Summary

  • Merge Typer param introspection via split stubs (KISS) for root CLI and module install.
  • Cap typer<0.24 so Semgrep’s click~=8.1.8 does not combine with Typer 0.24+ (Click Choice import failure).
  • Module upgrade tests invoke the module-registry Typer app so module is not required on the root app when only bundle groups
    are registered.

Testing

  • hatch test tests/unit/specfact_cli/modules/test_module_upgrade_improvements.py

…pgrade 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
@djm81 djm81 self-assigned this Apr 3, 2026
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Apr 3, 2026

Caution

Review failed

Pull request was closed or merged during review

📝 Walkthrough

User-Visible Behavior & CLI Surface

  • Missing-bundle help no longer suggests the flat "import" token; users should use nested subcommand paths (e.g., specfact code import ...). The "import" flat shim was removed from the root mapping.
  • Module upgrade UX:
    • Shows visible progress (Rich status/spinner) while fetching the registry index and during per-module install/upgrade; Rich progress is suppressed in automated/test environments (TEST_MODE / PYTEST_CURRENT_TEST detection).
    • If fetching the registry index fails (offline/network), the CLI prints a clear warning and continues using installed metadata to make upgrade decisions.
    • Upgrade name resolution accepts short-name fallbacks when appropriate (e.g., nold-ai/specfact-backlog can match installed key specfact-backlog) and rejects malformed multi-segment targets.
  • First-run/init bundle installation:
    • Workflow bundles (specfact-project, specfact-backlog, specfact-codebase, specfact-spec, specfact-govern, plus related code-review entries) now prefer marketplace installs; BUNDLE_TO_MODULE_NAMES was changed so those bundles no longer use shipped bundled-module dirs and instead map to marketplace IDs where applicable.
  • Module install/upgrade commands accept multiple module IDs/names in one invocation; unit tests exercise the module Typer app directly (module_app) so root registration of the module group is not required for bundle-only test setups.

Contract / API Impact

  • Public/packaged module metadata bumps:
    • init: v0.1.23 → v0.1.24 (checksum & signature updated).
    • module_registry: v0.1.15 → v0.1.17 (checksum & signature updated).
  • Typer parameter handling (internal compatibility patches):
    • Root CLI and module-registry install command parameter signatures are split in implementation and merged at Typer resolution time via internal helper functions. The install command callback was changed to a thin wrapper (accepting module_ids, **kwargs) delegating to _install_impl(...).
    • Import-time monkey-patches to typer.utils.get_params_from_function and typer.main.get_params_from_function are applied to ensure merged parameter specs resolve correctly regardless of import order (module-registry also applies a local compatibility patch on import). These are internal compatibility shims — public function APIs and Pydantic models are not intentionally changed.
  • Module registration and protocol-scanning internals were refactored to use dataclass-backed context objects for shared state; public registration entry points and command registration semantics remain unchanged.

Testing & Quality Gates

  • New/updated unit tests:
    • tests/unit/specfact_cli/modules/test_module_upgrade_improvements.py: tests for multi-target upgrade invocation, registry-unavailable (warning + continue) behavior, Rich status usage in non-test mode, and short-name resolution. Tests call the module-registry Typer app directly (module_app).
    • Tests updated to expect marketplace installs where bundled module dirs were removed (init/profile-preset tests).
    • Tests updated to assert the absence of the flat "import" shim in the missing-bundle mapping.
    • New tests validate rejection/handling of multi-segment malformed module IDs and major-bump prompting/skipping behavior.
  • Hatch / CI changes:
    • Added explicit semgrep hatch scripts (semgrep-full, scan, scan-all, scan-json, scan-fix) that pass --config tools/semgrep/... to support Semgrep 1.38+ explicit config behavior.
    • Added setuptools>=69.0.0 to dev extras and the Hatch default environment to avoid pkg_resources import failures in modern minimal venvs (Semgrep/OpenTelemetry).
  • Test invocation hint: hatch test tests/unit/specfact_cli/modules/test_module_upgrade_improvements.py

Dependency Constraints

  • Typer upper bound added: typer>=0.20.0,<0.24 (pyproject.toml and setup.py) to avoid incompatibility with Semgrep’s pinned Click (click~=8.1.8). This prevents Click Choice import failures when Typer ≥0.24 is combined with Semgrep’s click.
  • Rich constrained to remain compatible with Semgrep (pyproject shows rich>=13.5.2,<13.6.0); semgrep pinned in dev envs to a recent supported version.

OpenSpec, Docs & CHANGELOG Touchpoints

  • OpenSpec change: docs-new-user-onboarding/specs/module-installation/spec.md updated to require visible progress for registry fetch/install steps and to document offline handling and per-module progress/warnings.
  • Documentation and examples updated project-wide to prefer code import from-code (nested code subcommand) instead of flat import from-code across CLI docs and examples.
  • tools/semgrep/README.md and Hatch scripts updated to document explicit --config usage and Semgrep 1.38+ behavior.
  • Module package version/integrity updates should be noted in release notes/CHANGELOG (init v0.1.24, module_registry v0.1.17).

Notes for Maintainers / Reviewers

  • Review focus:
    • Correctness and safety of Typer parameter-merge logic and import-time monkey-patches: ensure they are narrowly scoped, well-documented, and do not have unintended side effects across other Typer/Click uses.
    • module-registry console/status handling: confirm test-mode detection and spinner suppression behave correctly in CI and local interactive runs.
    • First-run/init bundle-to-marketplace change: verify migration/upgrade UX when previously bundled modules are now marketplace-only.
    • Tests that import the module-registry Typer app directly (module_app) — validate this test wiring is intentional and does not mask integration issues with root app registration.
  • Suggested review actions: run unit tests (hatch test), exercise specfact module upgrade interactively to observe spinner/major-bump prompts, and validate docs examples that switched to specfact code import ....

Walkthrough

Adds visible Rich progress for registry fetch and per-module installs (suppressible in test environments), warns-and-continues when registry index fetch fails using installed metadata, migrates several workflow bundles to marketplace installs, refactors Typer/CLI root callback and parameter merging, and restructures registry package scanning/registration internals with dataclasses.

Changes

Cohort / File(s) Summary
Specification Requirements
openspec/changes/docs-new-user-onboarding/specs/module-installation/spec.md
New requirements: CLI must show progress when fetching registry index and installing modules; allow suppressing Rich progress in automated tests; explicit offline warning + continue behavior.
Dependency & Tooling
pyproject.toml, setup.py, tools/semgrep/README.md
Bound typer>=0.20.0,<0.24; added setuptools>=69.0.0 to dev/hatch envs; added/updated Hatch semgrep scripts to use explicit --config tools/semgrep/...; README documents Semgrep 1.38+ explicit --config.
Root CLI Refactor & Typer Patch
src/specfact_cli/cli.py
Refactored root callback into _RootCliFlags and _apply_root_app_callback; moved root help to _ROOT_MAIN_DOC; added Typer get-params patch to merge split-signature option groups for root/install callbacks.
Module Registry Commands & Progress
src/specfact_cli/modules/module_registry/src/commands.py, src/specfact_cli/modules/module_registry/module-package.yaml
Introduced _module_upgrade_status Rich wrapper (disabled in test modes); merged/split install param handling into _install_impl with param-spec helpers; improved marketplace id resolution and per-target upgrade orchestration; upgrade continues when fetch_registry_index() returns None (warns and uses installed metadata); bumped package version and integrity metadata.
Bundle-to-Marketplace Migration & Install Flow
src/specfact_cli/modules/init/src/first_run_selection.py, src/specfact_cli/modules/init/module-package.yaml
Reworked bundle install order via _expand_bundle_install_order(); added per-bundle install helpers; moved several workflow bundles to marketplace-only installs (emptied bundled-module lists, added MARKETPLACE_ONLY_BUNDLES); bumped init package version and integrity.
Registry Module Packages Refactor
src/specfact_cli/registry/module_packages.py
Introduced dataclass state containers for scanning/registration (_ProtocolTopLevelScanState, _ProtocolComplianceCounters, _ModuleIntegrityContext, _PackageRegistrationContext); threaded state through scan/registration functions and centralized protocol counters/footer reporting.
Bootstrap Comment
src/specfact_cli/registry/bootstrap.py
Clarified docstring about category-group vs flat registration topology; no behavior change.
Tests — CLI / Registry / Init
tests/unit/specfact_cli/*, tests/unit/modules/init/*, tests/unit/registry/*, tests/unit/modules/module_registry/*
Updated tests for marketplace-based installs, added tests for offline registry-warning and progress-display behavior, removed some test-only loader stubs, adapted protocol tests to use PROTOCOL_METHODS, added multi-segment module id tests, and asserted removal of flat import shim mapping.
Docs & Examples
docs/**, docs/examples/**, docs/getting-started/**, docs/guides/**
Replaced import from-code with code import from-code in many docs/examples to match mode-aware CLI routing.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant CLI
    participant Console
    participant Registry as RegistryIndex
    participant Installer as MarketplaceInstaller

    User->>CLI: specfact module upgrade / install ...
    CLI->>Console: status "Fetching registry index"
    CLI->>Registry: fetch_registry_index()
    alt Registry available
        Registry-->>CLI: registry index
        CLI->>Console: status "Installing module X"
        CLI->>Installer: install/upgrade module X (uses registry metadata)
        Installer-->>CLI: success/failure
    else Registry unavailable
        Registry-->>CLI: None
        CLI->>Console: warn "registry unavailable, using installed metadata"
        CLI->>Installer: install/upgrade module X (based on local metadata)
        Installer-->>CLI: success/failure
    end
    CLI->>Console: display final progress/summary
    CLI-->>User: exit code / summary
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~60 minutes

Possibly related PRs

Suggested labels

QA, code-review

🚥 Pre-merge checks | ✅ 1 | ❌ 2

❌ Failed checks (1 warning, 1 inconclusive)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 42.86% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Description check ❓ Inconclusive Description is minimal but covers the core objectives and testing instruction. However, it omits required template sections: bug/feature classification, contract validation evidence, manual/automated testing details, quality gates, and checklist items. Expand description to include: Type of Change checkboxes, Contract validation evidence (runtime contracts, type checking, CrossHair exploration), detailed testing methodology (manual and automated), test environment details, and quality gates status.
✅ Passed checks (1 passed)
Check name Status Explanation
Title check ✅ Passed Title follows Conventional Commits format with 'fix:' prefix and accurately summarizes the three main changes: Typer parameter handling, Typer version cap for Semgrep compatibility, and module upgrade tests.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ 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 bugfix/code-review-cli-tests

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

@djm81 djm81 added enhancement New feature or request dependencies Dependency resolution and management labels 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
3 tasks
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 9

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (3)
src/specfact_cli/modules/module_registry/src/commands.py (1)

1-1: ⚠️ Potential issue | 🟡 Minor

Pipeline failure: Module signatures are stale.

The GitHub Actions failure indicates that module signatures need re-signing with the configured signing key. This must be resolved before merge but is outside the scope of code review.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/specfact_cli/modules/module_registry/src/commands.py` at line 1, CI
reports module signatures are stale; locate the repository's module signature
files (e.g., signatures directory or module_signatures.json used by the
module_registry/commands.py logic) and re-sign them using the project's
configured signing key/tool (the same key referenced in CI). Run the project's
signing command or script (the one used by your release/CI pipeline) to
regenerate signatures, verify the updated signature files are committed, and
push the changes so CI can validate the new signatures.
src/specfact_cli/registry/module_packages.py (1)

1278-1290: 🧹 Nitpick | 🔵 Trivial

Document category_grouping_enabled as deprecated.

The parameter is retained for API compatibility but has no effect on behavior (line 1285 assigns to _). Adding a deprecation note in the docstring would signal to callers that this parameter will be removed in a future release, preventing confusion.

📝 Suggested docstring update
 def _register_commands_for_package(
     package_dir: Path,
     meta: Any,
     category_grouping_enabled: bool,
     logger: Any,
 ) -> None:
-    """Register package commands. Categorized marketplace modules never use flat root registration."""
+    """Register package commands. Categorized marketplace modules never use flat root registration.
+
+    Args:
+        category_grouping_enabled: Deprecated, ignored. Retained for API compatibility.
+    """
     _ = category_grouping_enabled  # retained for API compatibility; grouping no longer selects flat vs category
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/specfact_cli/registry/module_packages.py` around lines 1278 - 1290,
Update the docstring of _register_commands_for_package to mark the
category_grouping_enabled parameter as deprecated and clarify it has no effect
(it is assigned to `_` for API compatibility) and will be removed in a future
release; mention callers should stop passing it and prefer relying on
meta.category for behavior, and include a short "Deprecated:" note (or
Sphinx-style :deprecated:) naming the parameter so the intent is clear to
maintainers and docs.
src/specfact_cli/modules/init/src/first_run_selection.py (1)

1-1: ⚠️ Potential issue | 🟡 Minor

Pipeline failure: Module signatures are stale.

The GitHub Actions failure indicates that module signatures need re-signing with the configured signing key. This is a blocking CI issue that must be resolved before merge but is outside the scope of code review.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/specfact_cli/modules/init/src/first_run_selection.py` at line 1, The
module signatures for first_run_selection.py are stale and must be re-signed
with the project's configured signing key; run the repository's signing
tool/command (the same one used in CI) to regenerate signatures for this module,
ensure the configured signing key/environment (e.g., GPG key or signing service
credentials) is available locally, verify the new signatures pass the project's
signature verification step, and commit the updated signature artifacts so CI
can succeed.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@src/specfact_cli/modules/init/module-package.yaml`:
- Around line 20-21: The manifest's integrity metadata (checksum and signature
fields in module-package.yaml) is stale and must be re-signed: run the module
signature verification/resign tool (hatch run
./scripts/verify-modules-signature.py --require-signature) to regenerate and
embed the correct signature and checksum, then commit the updated checksum and
signature values in module-package.yaml so the Module Signature Hardening CI
gate passes.

In `@src/specfact_cli/modules/init/src/first_run_selection.py`:
- Around line 110-118: The dataclass _InitBundleInstallDeps currently uses Any
for console, install_bundled_module, and install_module; replace these with more
specific types to improve type-checking: import Console from rich.console and
use console: Console, and import Callable from collections.abc and type the
installer fields as Callable[..., Path | None] (or a protocol if you prefer
explicit parameters) so install_bundled_module: Callable[..., Path | None] and
install_module: Callable[..., Path | None]; update the imports at the top
accordingly.

In `@src/specfact_cli/modules/module_registry/module-package.yaml`:
- Around line 20-21: The manifest's integrity fields (checksum and signature in
module-package.yaml) are stale; re-sign the package and update the
checksum/signature values: run the verifier/resigner workflow locally via the
provided helper (hatch run ./scripts/verify-modules-signature.py
--require-signature) to generate fresh signature and checksum values, replace
the checksum and signature entries in module-package.yaml with the outputs,
verify the script reports success, then commit the updated manifest so the
Module Signature Hardening workflow can pass; reference the checksum and
signature keys in module-package.yaml and the verify-modules-signature.py script
when making the changes.

In `@src/specfact_cli/modules/module_registry/src/commands.py`:
- Around line 1380-1406: The patching function
_ensure_specfact_install_param_patch() performs import-time monkeypatching of
typer.utils.get_params_from_function to ensure merged install signatures are
used when this module is imported early; add a short explicit comment at the top
of this function (and mirror it in the corresponding cli.py patch) stating that
idempotency is detected by checking tu.get_params_from_function.__name__ and
that this duplicates/guards the patch applied in specfact_cli.cli, so future
maintainers understand the cross-module dependency between
_ensure_specfact_install_param_patch, _specfact_merge_install_param_specs, and
the patch in typer.main.get_params_from_function.

In `@src/specfact_cli/registry/bootstrap.py`:
- Around line 7-8: The module docstring in bootstrap.py is ambiguous about how
command groups are mounted; update the docstring to explicitly state the
behavior of mount_category_groups and the flat-command compatibility shim so
maintainers understand the root command topology: mention that for installed
bundles the categories (code, backlog, project, spec, govern) are mounted as
grouped subcommands, and separately describe when/why a flat shim is used (e.g.,
only for backwards-compatibility or when bundles are not installed) and that it
is not the default; reference the bootstrap module and the
mount_category_groups/flat shim behavior in the wording to make the two
behaviors distinct and non-contradictory.

In `@src/specfact_cli/registry/module_packages.py`:
- Around line 63-69: The dataclass _ProtocolComplianceCounters uses
single-element lists (protocol_full, protocol_partial, protocol_legacy,
partial_modules, legacy_modules) as mutable counters which is unusual; change
these to plain integers (protocol_full: int = 0, protocol_partial: int = 0,
protocol_legacy: int = 0) and use list/tuple types only for collections
(partial_modules and legacy_modules as list/tuple as appropriate), then update
all places that increment these counters to do direct integer increments on the
_ProtocolComplianceCounters instance (e.g., replace x[0] += 1 usages with
x.protocol_full += 1) or alternatively introduce a small mutable counter wrapper
class and replace the single-element lists with instances of that wrapper to
preserve mutation semantics; update references in functions that mutate these
fields accordingly (search for protocol_full, protocol_partial, protocol_legacy
and the patterns accessing [0]).

In `@tests/unit/modules/init/test_first_run_selection.py`:
- Around line 392-404: The test is flaky because it doesn't force
bundled-install resolution; update the call to frs.install_bundles_for_init to
pass bundled_install=False so the test deterministically exercises the
marketplace fallback (leave installed_ids, _record_marketplace, and the
monkeypatch.setattr of "specfact_cli.registry.module_installer.install_module"
unchanged and assert the same installed_ids).

In `@tests/unit/registry/test_category_groups.py`:
- Around line 59-75: The test currently only checks forbidden_flat against
registered names and may pass vacuously; after calling
CommandRegistry.list_commands_for_help() and constructing names, add a strict
baseline assertion that core root commands exist (e.g., assert {'project',
'spec'} <= set(names)) so the test fails if core command registration is broken
while still keeping the forbidden_flat check intact.

In `@tools/semgrep/README.md`:
- Line 11: The section heading "Running Semgrep (1.38+)" is currently H3 and
violates MD001 because the document starts with an H1; change that heading from
"### Running Semgrep (1.38+)" to "## Running Semgrep (1.38+)" so the Markdown
hierarchy increments by one level (H1 → H2); update the README heading text
accordingly to fix the hierarchy.

---

Outside diff comments:
In `@src/specfact_cli/modules/init/src/first_run_selection.py`:
- Line 1: The module signatures for first_run_selection.py are stale and must be
re-signed with the project's configured signing key; run the repository's
signing tool/command (the same one used in CI) to regenerate signatures for this
module, ensure the configured signing key/environment (e.g., GPG key or signing
service credentials) is available locally, verify the new signatures pass the
project's signature verification step, and commit the updated signature
artifacts so CI can succeed.

In `@src/specfact_cli/modules/module_registry/src/commands.py`:
- Line 1: CI reports module signatures are stale; locate the repository's module
signature files (e.g., signatures directory or module_signatures.json used by
the module_registry/commands.py logic) and re-sign them using the project's
configured signing key/tool (the same key referenced in CI). Run the project's
signing command or script (the one used by your release/CI pipeline) to
regenerate signatures, verify the updated signature files are committed, and
push the changes so CI can validate the new signatures.

In `@src/specfact_cli/registry/module_packages.py`:
- Around line 1278-1290: Update the docstring of _register_commands_for_package
to mark the category_grouping_enabled parameter as deprecated and clarify it has
no effect (it is assigned to `_` for API compatibility) and will be removed in a
future release; mention callers should stop passing it and prefer relying on
meta.category for behavior, and include a short "Deprecated:" note (or
Sphinx-style :deprecated:) naming the parameter so the intent is clear to
maintainers and docs.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: 673b7f01-751a-4b08-97a1-ed01b7212a9b

📥 Commits

Reviewing files that changed from the base of the PR and between b4a7ecf and 84e092b.

📒 Files selected for processing (18)
  • openspec/changes/docs-new-user-onboarding/specs/module-installation/spec.md
  • pyproject.toml
  • setup.py
  • src/specfact_cli/cli.py
  • src/specfact_cli/modules/init/module-package.yaml
  • src/specfact_cli/modules/init/src/first_run_selection.py
  • src/specfact_cli/modules/module_registry/module-package.yaml
  • src/specfact_cli/modules/module_registry/src/commands.py
  • src/specfact_cli/registry/bootstrap.py
  • src/specfact_cli/registry/module_packages.py
  • tests/unit/modules/init/test_first_run_selection.py
  • tests/unit/registry/test_category_groups.py
  • tests/unit/registry/test_module_bridge_registration.py
  • tests/unit/registry/test_module_protocol_validation.py
  • tests/unit/specfact_cli/modules/test_module_upgrade_improvements.py
  • tests/unit/specfact_cli/registry/test_profile_presets.py
  • tests/unit/specfact_cli/test_module_not_found_error.py
  • tools/semgrep/README.md
💤 Files with no reviewable changes (1)
  • tests/unit/registry/test_module_bridge_registration.py
📜 Review details
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
  • GitHub Check: Type Checking (basedpyright)
  • GitHub Check: Linting (ruff, pylint)
  • GitHub Check: Compatibility (Python 3.11)
  • GitHub Check: Tests (Python 3.12)
🧰 Additional context used
📓 Path-based instructions (22)
**/*.py

📄 CodeRabbit inference engine (.cursorrules)

**/*.py: All public APIs must have @icontract decorators and @beartype type checking.
Commands should follow typer patterns with rich console output.
Use Pydantic models for all data structures to ensure data validation.
Write only high-value comments if at all. Avoid talking to the user through comments.
Use GPG-signed commits (git commit -S) when implementing changes in a worktree.

**/*.py: Maintain minimum 80% test coverage, with 100% coverage for critical paths in Python code
Use clear naming and self-documenting code, preferring clear names over comments
Ensure each function/class has a single clear purpose (Single Responsibility Principle)
Extract common patterns to avoid code duplication (DRY principle)
Apply SOLID object-oriented design principles in Python code
Use type hints everywhere in Python code and enable basedpyright strict mode
Use Pydantic models for data validation and serialization in Python
Use async/await for I/O operations in Python code
Use context managers for resource management in Python
Use dataclasses for simple data containers in Python
Enforce maximum line length of 120 characters in Python code
Use 4 spaces for indentation in Python code (no tabs)
Use 2 blank lines between classes and 1 blank line between methods in Python
Organize imports in order: Standard library → Third party → Local in Python files
Use snake_case for variables and functions in Python
Use PascalCase for class names in Python
Use UPPER_SNAKE_CASE for constants in Python
Use leading underscore (_) for private methods in Python classes
Use snake_case for Python file names
Enable basedpyright strict mode with strict type checking configuration in Python
Use Google-style docstrings for functions and classes in Python
Include comprehensive exception handling with specific exception types in Python code
Use logging with structured context (extra parameters) instead of print statements
Use retry logic with tenacity decorators (@retry) for operations that might...

Files:

  • setup.py
  • src/specfact_cli/registry/bootstrap.py
  • tests/unit/modules/init/test_first_run_selection.py
  • tests/unit/specfact_cli/test_module_not_found_error.py
  • tests/unit/registry/test_module_protocol_validation.py
  • tests/unit/specfact_cli/registry/test_profile_presets.py
  • tests/unit/registry/test_category_groups.py
  • src/specfact_cli/modules/init/src/first_run_selection.py
  • tests/unit/specfact_cli/modules/test_module_upgrade_improvements.py
  • src/specfact_cli/cli.py
  • src/specfact_cli/registry/module_packages.py
  • src/specfact_cli/modules/module_registry/src/commands.py
{src/__init__.py,pyproject.toml,setup.py}

📄 CodeRabbit inference engine (.cursor/rules/python-github-rules.mdc)

{src/__init__.py,pyproject.toml,setup.py}: Update src/init.py first as primary source of truth for package version, then pyproject.toml and setup.py
Maintain version synchronization across src/init.py, pyproject.toml, and setup.py

Files:

  • setup.py
  • pyproject.toml
{CHANGELOG.md,pyproject.toml,setup.py,src/__init__.py}

📄 CodeRabbit inference engine (.cursor/rules/session_startup_instructions.mdc)

When releasing, update CHANGELOG.md, pyproject.toml, setup.py, and src/__init__.py

Files:

  • setup.py
  • pyproject.toml
{pyproject.toml,setup.py,src/__init__.py}

📄 CodeRabbit inference engine (.cursor/rules/testing-and-build-guide.mdc)

Manually update version numbers in pyproject.toml, setup.py, and src/init.py when making a formal version change

Files:

  • setup.py
  • pyproject.toml
{pyproject.toml,setup.py,src/specfact_cli/__init__.py}

📄 CodeRabbit inference engine (CLAUDE.md)

Sync version across pyproject.toml, setup.py, and src/specfact_cli/init.py whenever bumping version

Sync version updates across pyproject.toml, setup.py, and src/specfact_cli/__init__.py

Files:

  • setup.py
  • pyproject.toml
**/*.{py,pyi}

📄 CodeRabbit inference engine (AGENTS.md)

**/*.{py,pyi}: Run code formatting with hatch run format (ruff format + fix) after every code change
Run type checking with hatch run type-check (basedpyright strict mode) on all Python code
All public APIs must use @icontract decorators (@require, @ensure, @invariant) and @beartype for runtime type checking
Use Python 3.11+, line length 120, and Google-style docstrings
Use snake_case for files/modules, PascalCase for classes, UPPER_SNAKE_CASE for constants
CLI commands use typer.Typer() + rich.console.Console() pattern
Use from specfact_cli.common import get_bridge_logger for logging; avoid print() in production command paths
Only write high-value comments and avoid verbose or redundant commentary
Keep backlog functionality grouped under the common top-level backlog command with subcommands: ceremony, analyze-deps, delta, verify-readiness
Project-scoped orchestration belongs under project command with subcommands: link-backlog, health-check, devops-flow, snapshot, regenerate, export-roadmap

Files:

  • setup.py
  • src/specfact_cli/registry/bootstrap.py
  • tests/unit/modules/init/test_first_run_selection.py
  • tests/unit/specfact_cli/test_module_not_found_error.py
  • tests/unit/registry/test_module_protocol_validation.py
  • tests/unit/specfact_cli/registry/test_profile_presets.py
  • tests/unit/registry/test_category_groups.py
  • src/specfact_cli/modules/init/src/first_run_selection.py
  • tests/unit/specfact_cli/modules/test_module_upgrade_improvements.py
  • src/specfact_cli/cli.py
  • src/specfact_cli/registry/module_packages.py
  • src/specfact_cli/modules/module_registry/src/commands.py
{src,tests}/**/*.py

📄 CodeRabbit inference engine (.cursor/rules/session_startup_instructions.mdc)

Apply pylint src tests for linting before committing

Files:

  • src/specfact_cli/registry/bootstrap.py
  • tests/unit/modules/init/test_first_run_selection.py
  • tests/unit/specfact_cli/test_module_not_found_error.py
  • tests/unit/registry/test_module_protocol_validation.py
  • tests/unit/specfact_cli/registry/test_profile_presets.py
  • tests/unit/registry/test_category_groups.py
  • src/specfact_cli/modules/init/src/first_run_selection.py
  • tests/unit/specfact_cli/modules/test_module_upgrade_improvements.py
  • src/specfact_cli/cli.py
  • src/specfact_cli/registry/module_packages.py
  • src/specfact_cli/modules/module_registry/src/commands.py
src/**/*.py

📄 CodeRabbit inference engine (.cursor/rules/spec-fact-cli-rules.mdc)

src/**/*.py: All code changes must be followed by running the full test suite using the smart test system.
All Python files in src/ and tools/ directories must have corresponding test files in tests/ directory. If you modify src/common/logger_setup.py, you MUST have tests/unit/common/test_logger_setup.py. NO EXCEPTIONS - even small changes require tests.
All new Python runtime code files must have corresponding test files created BEFORE committing the code. NO EXCEPTIONS - no code without tests.
Test Coverage Validation: Run hatch run smart-test-unit for modified files, hatch run smart-test-folder for modified directories, and hatch run smart-test-full before committing. ALL TESTS MUST PASS.
All components must support TEST_MODE=true environment variable with test-specific behavior defined as: if os.environ.get('TEST_MODE') == 'true': # test-specific behavior
Use src/common/logger_setup.py for all logging via: from common.logger_setup import get_logger; logger = get_logger(name)
Use src/common/redis_client.py with fallback for Redis operations via: from common.redis_client import get_redis_client; redis_client = get_redis_client()
Type checking must pass with no errors using: mypy .
Test coverage must meet or exceed 80% total coverage. New code must have corresponding tests. Modified code must maintain or improve coverage. Critical paths must have 100% coverage.
Use Pydantic v2 validation for all context and data schemas.

Add/update contracts on new or modified public APIs, stateful classes and adapters using icontract decorators and beartype runtime type checks

No print() in src/ — use get_bridge_logger() instead

src/**/*.py: Meaningful Naming — identifiers reveal intent; avoid abbreviations. Identifiers in src/ must use snake_case (modules/functions), PascalCase (classes), UPPER_SNAKE_CASE (constants). Avoid single-letter names outside short loop variables.
KISS — keep functions and modules small and single-purpose. Maximum function le...

Files:

  • src/specfact_cli/registry/bootstrap.py
  • src/specfact_cli/modules/init/src/first_run_selection.py
  • src/specfact_cli/cli.py
  • src/specfact_cli/registry/module_packages.py
  • src/specfact_cli/modules/module_registry/src/commands.py
@(src|tests)/**/*.py

📄 CodeRabbit inference engine (.cursor/rules/spec-fact-cli-rules.mdc)

Linting must pass with no errors using: pylint src tests

Files:

  • src/specfact_cli/registry/bootstrap.py
  • tests/unit/modules/init/test_first_run_selection.py
  • tests/unit/specfact_cli/test_module_not_found_error.py
  • tests/unit/registry/test_module_protocol_validation.py
  • tests/unit/specfact_cli/registry/test_profile_presets.py
  • tests/unit/registry/test_category_groups.py
  • src/specfact_cli/modules/init/src/first_run_selection.py
  • tests/unit/specfact_cli/modules/test_module_upgrade_improvements.py
  • src/specfact_cli/cli.py
  • src/specfact_cli/registry/module_packages.py
  • src/specfact_cli/modules/module_registry/src/commands.py
src/specfact_cli/**/*.py

📄 CodeRabbit inference engine (CLAUDE.md)

Use from specfact_cli.common import get_bridge_logger instead of print() in production command paths

Files:

  • src/specfact_cli/registry/bootstrap.py
  • src/specfact_cli/modules/init/src/first_run_selection.py
  • src/specfact_cli/cli.py
  • src/specfact_cli/registry/module_packages.py
  • src/specfact_cli/modules/module_registry/src/commands.py

⚙️ CodeRabbit configuration file

src/specfact_cli/**/*.py: Focus on modular CLI architecture: lazy module loading, registry/bootstrap patterns, and
dependency direction. Flag breaking changes to public APIs, Pydantic models, and resource
bundling. Verify @icontract + @beartype on public surfaces; prefer centralized logging
(get_bridge_logger) over print().

Files:

  • src/specfact_cli/registry/bootstrap.py
  • src/specfact_cli/modules/init/src/first_run_selection.py
  • src/specfact_cli/cli.py
  • src/specfact_cli/registry/module_packages.py
  • src/specfact_cli/modules/module_registry/src/commands.py
**/*.md

📄 CodeRabbit inference engine (.cursorrules)

**/*.md: Finish each output by listing which rulesets have been applied (e.g., .cursorrules, AGENTS.md, specific .cursor/rules/*.mdc), confirm Git Worktree Policy compliance if applicable, and state the AI provider and model version being used.
Follow markdown linting rules to avoid markdown linting errors (via markdown-rules).

Files:

  • openspec/changes/docs-new-user-onboarding/specs/module-installation/spec.md
  • tools/semgrep/README.md
**/*.{md,mdc}

📄 CodeRabbit inference engine (.cursor/rules/markdown-rules.mdc)

**/*.{md,mdc}: Do not use more than one consecutive blank line anywhere in the document (MD012: No Multiple Consecutive Blank Lines)
Fenced code blocks should be surrounded by blank lines (MD031: Fenced Code Blocks)
Lists should be surrounded by blank lines (MD032: Lists)
Files must end with a single empty line (MD047: Files Must End With Single Newline)
Lines should not have trailing spaces (MD009: No Trailing Spaces)
Use asterisks (**) for strong emphasis, not underscores (__) (MD050: Strong Style)
Fenced code blocks must have a language specified (MD040: Fenced Code Language)
Headers should increment by one level at a time (MD001: Header Increment)
Headers should be surrounded by blank lines (MD022: Headers Should Be Surrounded By Blank Lines)
Only one top-level header (H1) is allowed per document (MD025: Single H1 Header)
Use consistent list markers, preferring dashes (-) for unordered lists (MD004: List Style)
Nested unordered list items should be indented consistently, typically by 2 spaces (MD007: Unordered List Indentation)
Use exactly one space after the list marker (e.g., -, *, +, 1.) (MD030: Spaces After List Markers)
Use incrementing numbers for ordered lists (MD029: Ordered List Item Prefix)
Enclose bare URLs in angle brackets or format them as links (MD034: Bare URLs)
Don't use spaces immediately inside code spans (MD038: Spaces Inside Code Spans)
Use consistent indentation (usually 2 or 4 spaces) throughout markdown files
Keep line length under 120 characters in markdown files
Use reference-style links for better readability in markdown files
Use a trailing slash for directory paths in markdown files
Ensure proper escaping of special characters in markdown files

Files:

  • openspec/changes/docs-new-user-onboarding/specs/module-installation/spec.md
  • tools/semgrep/README.md
openspec/**/*.md

⚙️ CodeRabbit configuration file

openspec/**/*.md: Treat as specification source of truth: proposal/tasks/spec deltas vs. code behavior,
CHANGE_ORDER consistency, and scenario coverage. Surface drift between OpenSpec and
implementation.

Files:

  • openspec/changes/docs-new-user-onboarding/specs/module-installation/spec.md
**/test_*.py

📄 CodeRabbit inference engine (.cursor/rules/python-github-rules.mdc)

**/test_*.py: Write tests first in test-driven development (TDD) using the Red-Green-Refactor cycle
Ensure each test is independent and repeatable with no shared state between tests
Organize Python imports in tests using unittest.mock for Mock and patch
Use setup_method() for test initialization and Arrange-Act-Assert pattern in test files
Use @pytest.mark.asyncio decorator for async test functions in Python
Organize test files in structure: tests/unit/, tests/integration/, tests/e2e/ by module

Files:

  • tests/unit/modules/init/test_first_run_selection.py
  • tests/unit/specfact_cli/test_module_not_found_error.py
  • tests/unit/registry/test_module_protocol_validation.py
  • tests/unit/specfact_cli/registry/test_profile_presets.py
  • tests/unit/registry/test_category_groups.py
  • tests/unit/specfact_cli/modules/test_module_upgrade_improvements.py
tests/**/*.py

📄 CodeRabbit inference engine (.cursor/rules/spec-fact-cli-rules.mdc)

Tests must be meaningful and test actual functionality, cover both success and failure cases, be independent and repeatable, and have clear, descriptive names. NO EXCEPTIONS - no placeholder or empty tests.

tests/**/*.py: Trim low-value unit tests when a contract covers the same assertion (type/shape/raises on negative checks)
Delete tests that only assert input validation, datatype/shape enforcement, or raises on negative conditions now guarded by contracts and runtime typing
Convert repeated edge-case permutations into one Hypothesis property with contracts acting as oracles

tests/**/*.py: Use @pytest.mark.asyncio for async tests
Test structure must mirror source: tests/unit/, tests/integration/, tests/e2e/ with corresponding source paths
Contract-first approach: @icontract contracts on public APIs are primary coverage mechanism (target 80%+ API coverage); remove redundant unit tests that merely assert input validation or type checks

Secret redaction via LoggerSetup.redact_secrets must be covered by unit tests

Files:

  • tests/unit/modules/init/test_first_run_selection.py
  • tests/unit/specfact_cli/test_module_not_found_error.py
  • tests/unit/registry/test_module_protocol_validation.py
  • tests/unit/specfact_cli/registry/test_profile_presets.py
  • tests/unit/registry/test_category_groups.py
  • tests/unit/specfact_cli/modules/test_module_upgrade_improvements.py

⚙️ CodeRabbit configuration file

tests/**/*.py: Contract-first testing: meaningful scenarios, not redundant assertions already covered by
contracts. Flag flakiness, environment coupling, and missing coverage for changed behavior.

Files:

  • tests/unit/modules/init/test_first_run_selection.py
  • tests/unit/specfact_cli/test_module_not_found_error.py
  • tests/unit/registry/test_module_protocol_validation.py
  • tests/unit/specfact_cli/registry/test_profile_presets.py
  • tests/unit/registry/test_category_groups.py
  • tests/unit/specfact_cli/modules/test_module_upgrade_improvements.py
tests/**/*.{py,pyi}

📄 CodeRabbit inference engine (AGENTS.md)

tests/**/*.{py,pyi}: Test structure mirrors source: tests/unit/, tests/integration/, tests/e2e/. Use @pytest.mark.asyncio for async tests
Guard environment-sensitive logic with os.environ.get("TEST_MODE") == "true"

Files:

  • tests/unit/modules/init/test_first_run_selection.py
  • tests/unit/specfact_cli/test_module_not_found_error.py
  • tests/unit/registry/test_module_protocol_validation.py
  • tests/unit/specfact_cli/registry/test_profile_presets.py
  • tests/unit/registry/test_category_groups.py
  • tests/unit/specfact_cli/modules/test_module_upgrade_improvements.py
tests/unit/**/*.{py,pyi}

📄 CodeRabbit inference engine (AGENTS.md)

Redundant unit tests that only assert input validation or type checks should be removed because contracts and beartype already cover them

Files:

  • tests/unit/modules/init/test_first_run_selection.py
  • tests/unit/specfact_cli/test_module_not_found_error.py
  • tests/unit/registry/test_module_protocol_validation.py
  • tests/unit/specfact_cli/registry/test_profile_presets.py
  • tests/unit/registry/test_category_groups.py
  • tests/unit/specfact_cli/modules/test_module_upgrade_improvements.py
**/*.yaml

📄 CodeRabbit inference engine (.cursor/rules/spec-fact-cli-rules.mdc)

YAML files must pass linting using: hatch run yaml-lint with relaxed policy.

Files:

  • src/specfact_cli/modules/init/module-package.yaml
  • src/specfact_cli/modules/module_registry/module-package.yaml
**/*.{yml,yaml}

📄 CodeRabbit inference engine (.cursor/rules/testing-and-build-guide.mdc)

Validate YAML configuration files locally using hatch run yaml-lint before committing

**/*.{yml,yaml}: Format all YAML and workflow files using hatch run yaml-fix-all before committing
Use Prettier to fix whitespace, indentation, and final newline across YAML files
Use yamllint with the repo .yamllint configuration (line-length 140, trailing spaces and final newline enforced) to lint non-workflow YAML files

Files:

  • src/specfact_cli/modules/init/module-package.yaml
  • src/specfact_cli/modules/module_registry/module-package.yaml
**/*.{yaml,yml}

📄 CodeRabbit inference engine (AGENTS.md)

Keep YAML files validated with hatch run yaml-lint

Files:

  • src/specfact_cli/modules/init/module-package.yaml
  • src/specfact_cli/modules/module_registry/module-package.yaml
**/module-package.yaml

📄 CodeRabbit inference engine (AGENTS.md)

**/module-package.yaml: Module signature verification is required before PR creation; run hatch run ./scripts/verify-modules-signature.py --require-signature
Module version must be incremented (semver) whenever module files or signatures change; do not keep the same module version when module contents change

Files:

  • src/specfact_cli/modules/init/module-package.yaml
  • src/specfact_cli/modules/module_registry/module-package.yaml
pyproject.toml

📄 CodeRabbit inference engine (.cursorrules)

When updating the version in pyproject.toml, ensure it is newer than the latest PyPI version. The CI/CD pipeline will automatically publish to PyPI only if the new version is greater than the published version.

rich~=13.5.2 is pinned for semgrep compatibility; do not upgrade without checking

rich~=13.5.2 is pinned for semgrep compatibility and should not be upgraded without validation

Files:

  • pyproject.toml
🧠 Learnings (46)
📓 Common learnings
Learnt from: CR
Repo: nold-ai/specfact-cli PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-03-31T22:38:56.776Z
Learning: Clean-code review enforces 7-principle charter through `specfact code review run` with categories: `naming`, `kiss`, `yagni`, `dry`, `solid`; zero regressions required before merge; Phase A thresholds are active (LOC >80 warning / >120 error); Phase B deferred
Learnt from: CR
Repo: nold-ai/specfact-cli PR: 0
File: .cursor/rules/automatic-openspec-workflow.mdc:0-0
Timestamp: 2026-03-25T21:31:33.886Z
Learning: After implementing code changes in specfact-cli, run quality gates: `hatch run format`, `hatch run type-check`, `hatch run contract-test`, `hatch test` (or `hatch run smart-test`)
Learnt from: CR
Repo: nold-ai/specfact-cli PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-03-31T22:38:56.776Z
Learning: SpecFact code review must pass: run `hatch run specfact code review run --json --out .specfact/code-review.json` before PR creation; re-run when proposal, specs, tasks, design, or code change (not required for evidence-only edits); treat `.specfact/code-review.json` as mandatory evidence before change completion
Learnt from: CR
Repo: nold-ai/specfact-cli PR: 0
File: .cursor/rules/automatic-openspec-workflow.mdc:0-0
Timestamp: 2026-03-25T21:31:33.886Z
Learning: After code implementation in specfact-cli, create or update corresponding GitHub issue with title `[Change] <Brief Description>`, labels `enhancement` and `change-proposal` if targeting public repo, and update `proposal.md` Source Tracking section with issue number, URL, repository, and status
Learnt from: CR
Repo: nold-ai/specfact-cli PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2026-03-31T22:37:49.299Z
Learning: Run `hatch run specfact code review run --json --out .specfact/code-review.json` before submitting PR
Learnt from: CR
Repo: nold-ai/specfact-cli PR: 0
File: .cursor/rules/automatic-openspec-workflow.mdc:0-0
Timestamp: 2026-03-25T21:31:33.886Z
Learning: Ensure an OpenSpec change (new or delta) exists for any code modification in specfact-cli (`src/`, `tools/`, tests, or significant docs) unless user explicitly opts out with 'skip openspec', 'direct implementation', 'simple fix', or similar
📚 Learning: 2026-03-31T22:37:49.299Z
Learnt from: CR
Repo: nold-ai/specfact-cli PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2026-03-31T22:37:49.299Z
Learning: Applies to **/*.py : Use Python 3.11+, Typer CLI, Pydantic models, `icontract` + `beartype` decorators on all public APIs

Applied to files:

  • setup.py
  • pyproject.toml
📚 Learning: 2026-03-31T22:38:56.776Z
Learnt from: CR
Repo: nold-ai/specfact-cli PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-03-31T22:38:56.776Z
Learning: The modular command registry uses lazy loading: modules are discovered at startup in `src/specfact_cli/modules/` but imports are deferred until a command is invoked

Applied to files:

  • src/specfact_cli/registry/bootstrap.py
📚 Learning: 2026-03-25T21:31:33.886Z
Learnt from: CR
Repo: nold-ai/specfact-cli PR: 0
File: .cursor/rules/automatic-openspec-workflow.mdc:0-0
Timestamp: 2026-03-25T21:31:33.886Z
Learning: Ensure an OpenSpec change (new or delta) exists for any code modification in specfact-cli (`src/`, `tools/`, tests, or significant docs) unless user explicitly opts out with 'skip openspec', 'direct implementation', 'simple fix', or similar

Applied to files:

  • openspec/changes/docs-new-user-onboarding/specs/module-installation/spec.md
  • tests/unit/modules/init/test_first_run_selection.py
📚 Learning: 2026-03-25T21:31:33.886Z
Learnt from: CR
Repo: nold-ai/specfact-cli PR: 0
File: .cursor/rules/automatic-openspec-workflow.mdc:0-0
Timestamp: 2026-03-25T21:31:33.886Z
Learning: When creating OpenSpec changes for specfact-cli, use unique verb-led `change-id` and scaffold `proposal.md`, `tasks.md`, optional `design.md`, and spec deltas in `changes/<id>/specs/<capability>/spec.md`

Applied to files:

  • openspec/changes/docs-new-user-onboarding/specs/module-installation/spec.md
📚 Learning: 2026-03-25T21:31:33.886Z
Learnt from: CR
Repo: nold-ai/specfact-cli PR: 0
File: .cursor/rules/automatic-openspec-workflow.mdc:0-0
Timestamp: 2026-03-25T21:31:33.886Z
Learning: After code implementation in specfact-cli, create or update corresponding GitHub issue with title `[Change] <Brief Description>`, labels `enhancement` and `change-proposal` if targeting public repo, and update `proposal.md` Source Tracking section with issue number, URL, repository, and status

Applied to files:

  • openspec/changes/docs-new-user-onboarding/specs/module-installation/spec.md
📚 Learning: 2026-03-31T22:38:12.286Z
Learnt from: CR
Repo: nold-ai/specfact-cli PR: 0
File: CLAUDE.md:0-0
Timestamp: 2026-03-31T22:38:12.286Z
Learning: Applies to openspec/CHANGE_ORDER.md : Consult openspec/CHANGE_ORDER.md before creating, implementing, or archiving any change to verify blockers, module grouping, and dependencies; update CHANGE_ORDER.md in same commit as lifecycle events

Applied to files:

  • openspec/changes/docs-new-user-onboarding/specs/module-installation/spec.md
📚 Learning: 2026-03-31T22:38:56.776Z
Learnt from: CR
Repo: nold-ai/specfact-cli PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-03-31T22:38:56.776Z
Learning: Applies to **/module-package.yaml : Module version must be incremented (semver) whenever module files or signatures change; do not keep the same module version when module contents change

Applied to files:

  • openspec/changes/docs-new-user-onboarding/specs/module-installation/spec.md
  • src/specfact_cli/modules/init/module-package.yaml
  • src/specfact_cli/modules/module_registry/module-package.yaml
📚 Learning: 2026-03-25T21:32:57.944Z
Learnt from: CR
Repo: nold-ai/specfact-cli PR: 0
File: .cursor/rules/spec-fact-cli-rules.mdc:0-0
Timestamp: 2026-03-25T21:32:57.944Z
Learning: Applies to docs/**/*.md : Update architecture documentation in docs/ for architecture changes, state machine documentation for FSM modifications, interface documentation for API changes, and configuration guides for configuration changes. DO NOT create internal docs in specfact-cli repo folder that should not be visible to end users; use the respective internal repository instead.

Applied to files:

  • openspec/changes/docs-new-user-onboarding/specs/module-installation/spec.md
📚 Learning: 2026-03-31T22:38:12.286Z
Learnt from: CR
Repo: nold-ai/specfact-cli PR: 0
File: CLAUDE.md:0-0
Timestamp: 2026-03-31T22:38:12.286Z
Learning: Applies to src/specfact_cli/modules/*/ : Each module package must have module-package.yaml with metadata (name, version, commands, dependencies) and src/{name}/ directory with __init__.py and main.py containing typer.Typer app

Applied to files:

  • openspec/changes/docs-new-user-onboarding/specs/module-installation/spec.md
  • tests/unit/specfact_cli/modules/test_module_upgrade_improvements.py
  • src/specfact_cli/cli.py
  • src/specfact_cli/registry/module_packages.py
  • src/specfact_cli/modules/module_registry/src/commands.py
📚 Learning: 2026-03-31T22:38:56.776Z
Learnt from: CR
Repo: nold-ai/specfact-cli PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-03-31T22:38:56.776Z
Learning: README.md and docs landing page must stay in sync with actual CLI interface and command list; reconsider README from external/new-user perspective; lead with value and USP, not internal architecture; first-time reader should understand what SpecFact does and how to get started within first screen

Applied to files:

  • openspec/changes/docs-new-user-onboarding/specs/module-installation/spec.md
📚 Learning: 2026-03-31T22:38:56.776Z
Learnt from: CR
Repo: nold-ai/specfact-cli PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-03-31T22:38:56.776Z
Learning: Applies to {pyproject.toml,setup.py,src/specfact_cli/__init__.py} : Sync version updates across `pyproject.toml`, `setup.py`, and `src/specfact_cli/__init__.py`

Applied to files:

  • tests/unit/modules/init/test_first_run_selection.py
  • src/specfact_cli/modules/init/module-package.yaml
  • pyproject.toml
  • src/specfact_cli/cli.py
  • src/specfact_cli/registry/module_packages.py
  • src/specfact_cli/modules/module_registry/src/commands.py
📚 Learning: 2026-03-25T21:31:33.886Z
Learnt from: CR
Repo: nold-ai/specfact-cli PR: 0
File: .cursor/rules/automatic-openspec-workflow.mdc:0-0
Timestamp: 2026-03-25T21:31:33.886Z
Learning: Read and apply `openspec/config.yaml` for project context (tech stack, constraints, architecture, SDD+TDD discipline) before any code modification in specfact-cli

Applied to files:

  • src/specfact_cli/modules/init/module-package.yaml
  • src/specfact_cli/cli.py
📚 Learning: 2026-03-31T22:38:12.286Z
Learnt from: CR
Repo: nold-ai/specfact-cli PR: 0
File: CLAUDE.md:0-0
Timestamp: 2026-03-31T22:38:12.286Z
Learning: Applies to README.md : Keep README.md in sync with actual CLI interface and command list; prioritize new-user perspective with value/USP up front, not internal architecture

Applied to files:

  • tools/semgrep/README.md
📚 Learning: 2026-03-25T21:31:01.827Z
Learnt from: CR
Repo: nold-ai/specfact-cli PR: 0
File: .cursorrules:0-0
Timestamp: 2026-03-25T21:31:01.827Z
Learning: Applies to **/*.md : Finish each output by listing which rulesets have been applied (e.g., `.cursorrules`, `AGENTS.md`, specific `.cursor/rules/*.mdc`), confirm Git Worktree Policy compliance if applicable, and state the AI provider and model version being used.

Applied to files:

  • tools/semgrep/README.md
📚 Learning: 2026-03-25T21:33:15.296Z
Learnt from: CR
Repo: nold-ai/specfact-cli PR: 0
File: .cursor/rules/testing-and-build-guide.mdc:0-0
Timestamp: 2026-03-25T21:33:15.296Z
Learning: Applies to CHANGELOG.md : Update CHANGELOG.md to document all significant changes under Added, Fixed, Changed, or Removed sections when making a version change

Applied to files:

  • tools/semgrep/README.md
📚 Learning: 2026-03-25T21:32:57.944Z
Learnt from: CR
Repo: nold-ai/specfact-cli PR: 0
File: .cursor/rules/spec-fact-cli-rules.mdc:0-0
Timestamp: 2026-03-25T21:32:57.944Z
Learning: Applies to **/*.yaml : YAML files must pass linting using: hatch run yaml-lint with relaxed policy.

Applied to files:

  • tools/semgrep/README.md
  • pyproject.toml
📚 Learning: 2026-03-25T21:31:01.827Z
Learnt from: CR
Repo: nold-ai/specfact-cli PR: 0
File: .cursorrules:0-0
Timestamp: 2026-03-25T21:31:01.827Z
Learning: Applies to **/*.{py} : After any code changes, apply linting and formatting using `hatch run format`, perform type checking with `hatch run type-check` (basedpyright), run contract validation with `hatch run contract-test`, and run full test suite with `hatch test --cover -v`. Verify all tests pass and contracts are satisfied before committing.

Applied to files:

  • tools/semgrep/README.md
  • pyproject.toml
📚 Learning: 2026-03-31T22:38:56.776Z
Learnt from: CR
Repo: nold-ai/specfact-cli PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-03-31T22:38:56.776Z
Learning: Applies to **/*.{py,pyi} : Run type checking with `hatch run type-check` (basedpyright strict mode) on all Python code

Applied to files:

  • tools/semgrep/README.md
  • pyproject.toml
📚 Learning: 2026-03-25T21:31:33.886Z
Learnt from: CR
Repo: nold-ai/specfact-cli PR: 0
File: .cursor/rules/automatic-openspec-workflow.mdc:0-0
Timestamp: 2026-03-25T21:31:33.886Z
Learning: After implementing code changes in specfact-cli, run quality gates: `hatch run format`, `hatch run type-check`, `hatch run contract-test`, `hatch test` (or `hatch run smart-test`)

Applied to files:

  • tools/semgrep/README.md
  • pyproject.toml
  • src/specfact_cli/cli.py
📚 Learning: 2026-03-31T22:37:49.299Z
Learnt from: CR
Repo: nold-ai/specfact-cli PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2026-03-31T22:37:49.299Z
Learning: Run pre-commit checks in order: `hatch run format` → `type-check` → `lint` → `yaml-lint` → `contract-test` → `smart-test`

Applied to files:

  • tools/semgrep/README.md
  • pyproject.toml
📚 Learning: 2026-03-25T21:33:15.296Z
Learnt from: CR
Repo: nold-ai/specfact-cli PR: 0
File: .cursor/rules/testing-and-build-guide.mdc:0-0
Timestamp: 2026-03-25T21:33:15.296Z
Learning: Applies to **/*.{yml,yaml} : Validate YAML configuration files locally using `hatch run yaml-lint` before committing

Applied to files:

  • tools/semgrep/README.md
📚 Learning: 2026-03-25T21:33:22.650Z
Learnt from: CR
Repo: nold-ai/specfact-cli PR: 0
File: .cursor/rules/yaml-and-workflows.md:0-0
Timestamp: 2026-03-25T21:33:22.650Z
Learning: Run `hatch run yaml-check-all` in CI and before pull requests to validate all YAML and workflow files

Applied to files:

  • tools/semgrep/README.md
  • pyproject.toml
📚 Learning: 2026-03-25T21:32:38.156Z
Learnt from: CR
Repo: nold-ai/specfact-cli PR: 0
File: .cursor/rules/session_startup_instructions.mdc:0-0
Timestamp: 2026-03-25T21:32:38.156Z
Learning: Applies to **/*.py : Run `hatch run smart-test` for testing and ensure total coverage is >= 80%

Applied to files:

  • tools/semgrep/README.md
📚 Learning: 2026-03-25T21:33:15.296Z
Learnt from: CR
Repo: nold-ai/specfact-cli PR: 0
File: .cursor/rules/testing-and-build-guide.mdc:0-0
Timestamp: 2026-03-25T21:33:15.296Z
Learning: Before making a pull request, locally run format, lint, contract tests, and full test suite: `hatch run format`, `hatch run lint`, `hatch run contract-test`, `hatch test --cover -v`

Applied to files:

  • tools/semgrep/README.md
  • pyproject.toml
📚 Learning: 2026-03-31T22:38:56.776Z
Learnt from: CR
Repo: nold-ai/specfact-cli PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-03-31T22:38:56.776Z
Learning: Applies to **/*.{yaml,yml} : Keep YAML files validated with `hatch run yaml-lint`

Applied to files:

  • tools/semgrep/README.md
  • pyproject.toml
📚 Learning: 2026-03-31T22:38:12.286Z
Learnt from: CR
Repo: nold-ai/specfact-cli PR: 0
File: CLAUDE.md:0-0
Timestamp: 2026-03-31T22:38:12.286Z
Learning: Applies to **/*.py : Use icontract decorators (require, ensure, invariant) and beartype for runtime type checking on all public APIs

Applied to files:

  • src/specfact_cli/modules/init/src/first_run_selection.py
📚 Learning: 2026-03-31T22:38:25.299Z
Learnt from: CR
Repo: nold-ai/specfact-cli PR: 0
File: .cursor/rules/clean-code-principles.mdc:0-0
Timestamp: 2026-03-31T22:38:25.299Z
Learning: Applies to src/**/*.py : Use `icontract` (`require`/`ensure`) and `beartype` on all public APIs in `src/`

Applied to files:

  • src/specfact_cli/modules/init/src/first_run_selection.py
📚 Learning: 2026-03-31T22:38:56.776Z
Learnt from: CR
Repo: nold-ai/specfact-cli PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-03-31T22:38:56.776Z
Learning: Applies to **/*.{py,pyi} : All public APIs must use `icontract` decorators (`require`, `ensure`, `invariant`) and `beartype` for runtime type checking

Applied to files:

  • src/specfact_cli/modules/init/src/first_run_selection.py
📚 Learning: 2026-03-25T21:32:29.182Z
Learnt from: CR
Repo: nold-ai/specfact-cli PR: 0
File: .cursor/rules/python-github-rules.mdc:0-0
Timestamp: 2026-03-25T21:32:29.182Z
Learning: Applies to **/test_*.py : Organize Python imports in tests using unittest.mock for Mock and patch

Applied to files:

  • tests/unit/specfact_cli/modules/test_module_upgrade_improvements.py
📚 Learning: 2026-03-25T21:32:57.944Z
Learnt from: CR
Repo: nold-ai/specfact-cli PR: 0
File: .cursor/rules/spec-fact-cli-rules.mdc:0-0
Timestamp: 2026-03-25T21:32:57.944Z
Learning: Applies to @(pyproject.toml|setup.py|src/__init__.py|src/specfact_cli/__init__.py) : Maintain synchronized versions across pyproject.toml, setup.py, src/__init__.py, and src/specfact_cli/__init__.py.

Applied to files:

  • pyproject.toml
  • src/specfact_cli/cli.py
  • src/specfact_cli/modules/module_registry/src/commands.py
📚 Learning: 2026-03-25T21:32:57.944Z
Learnt from: CR
Repo: nold-ai/specfact-cli PR: 0
File: .cursor/rules/spec-fact-cli-rules.mdc:0-0
Timestamp: 2026-03-25T21:32:57.944Z
Learning: Applies to src/**/*.py : Test Coverage Validation: Run hatch run smart-test-unit for modified files, hatch run smart-test-folder for modified directories, and hatch run smart-test-full before committing. ALL TESTS MUST PASS.

Applied to files:

  • pyproject.toml
📚 Learning: 2026-03-31T22:38:12.286Z
Learnt from: CR
Repo: nold-ai/specfact-cli PR: 0
File: CLAUDE.md:0-0
Timestamp: 2026-03-31T22:38:12.286Z
Learning: Applies to pyproject.toml : rich~=13.5.2 is pinned for semgrep compatibility; do not upgrade without checking

Applied to files:

  • pyproject.toml
📚 Learning: 2026-03-31T22:38:56.776Z
Learnt from: CR
Repo: nold-ai/specfact-cli PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-03-31T22:38:56.776Z
Learning: Applies to pyproject.toml : `rich~=13.5.2` is pinned for semgrep compatibility and should not be upgraded without validation

Applied to files:

  • pyproject.toml
📚 Learning: 2026-03-31T22:38:56.776Z
Learnt from: CR
Repo: nold-ai/specfact-cli PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-03-31T22:38:56.776Z
Learning: Applies to **/*.{py,pyi} : CLI commands use `typer.Typer()` + `rich.console.Console()` pattern

Applied to files:

  • pyproject.toml
  • src/specfact_cli/cli.py
📚 Learning: 2026-03-31T22:38:12.286Z
Learnt from: CR
Repo: nold-ai/specfact-cli PR: 0
File: CLAUDE.md:0-0
Timestamp: 2026-03-31T22:38:12.286Z
Learning: Applies to src/specfact_cli/modules/*/src/*/*.py : CLI commands must use typer.Typer() + rich.console.Console() for command implementation and output

Applied to files:

  • pyproject.toml
  • src/specfact_cli/cli.py
  • src/specfact_cli/modules/module_registry/src/commands.py
📚 Learning: 2026-03-25T21:32:29.182Z
Learnt from: CR
Repo: nold-ai/specfact-cli PR: 0
File: .cursor/rules/python-github-rules.mdc:0-0
Timestamp: 2026-03-25T21:32:29.182Z
Learning: Applies to **/*.py : Use Python 3.12 as the target Python version

Applied to files:

  • pyproject.toml
📚 Learning: 2026-03-25T21:33:22.650Z
Learnt from: CR
Repo: nold-ai/specfact-cli PR: 0
File: .cursor/rules/yaml-and-workflows.md:0-0
Timestamp: 2026-03-25T21:33:22.650Z
Learning: Applies to **/*.{yml,yaml} : Format all YAML and workflow files using `hatch run yaml-fix-all` before committing

Applied to files:

  • pyproject.toml
📚 Learning: 2026-03-31T22:38:56.776Z
Learnt from: CR
Repo: nold-ai/specfact-cli PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-03-31T22:38:56.776Z
Learning: Applies to **/*.{py,pyi} : Run code formatting with `hatch run format` (ruff format + fix) after every code change

Applied to files:

  • pyproject.toml
📚 Learning: 2026-03-25T21:33:22.650Z
Learnt from: CR
Repo: nold-ai/specfact-cli PR: 0
File: .cursor/rules/yaml-and-workflows.md:0-0
Timestamp: 2026-03-25T21:33:22.650Z
Learning: Applies to .github/workflows/*.{yml,yaml} : Format GitHub Actions workflows using `hatch run workflows-fmt` and lint them with `hatch run workflows-lint` after editing

Applied to files:

  • pyproject.toml
📚 Learning: 2026-03-31T22:38:12.286Z
Learnt from: CR
Repo: nold-ai/specfact-cli PR: 0
File: CLAUDE.md:0-0
Timestamp: 2026-03-31T22:38:12.286Z
Learning: Applies to src/specfact_cli/modules/backlog/**/*.py : Backlog command topology: group backlog functionality under top-level 'backlog' command with subcommands (ceremony, analyze-deps, delta, verify-readiness)

Applied to files:

  • src/specfact_cli/cli.py
📚 Learning: 2026-03-31T22:38:12.286Z
Learnt from: CR
Repo: nold-ai/specfact-cli PR: 0
File: CLAUDE.md:0-0
Timestamp: 2026-03-31T22:38:12.286Z
Learning: Applies to src/specfact_cli/modules/project/**/*.py : Project-scoped orchestration belongs under 'project' command: link-backlog, health-check, devops-flow, snapshot, regenerate, export-roadmap

Applied to files:

  • src/specfact_cli/cli.py
📚 Learning: 2026-03-31T22:38:56.776Z
Learnt from: CR
Repo: nold-ai/specfact-cli PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-03-31T22:38:56.776Z
Learning: Applies to **/*.{py,pyi} : Project-scoped orchestration belongs under `project` command with subcommands: `link-backlog`, `health-check`, `devops-flow`, `snapshot`, `regenerate`, `export-roadmap`

Applied to files:

  • src/specfact_cli/cli.py
📚 Learning: 2026-03-31T22:38:12.286Z
Learnt from: CR
Repo: nold-ai/specfact-cli PR: 0
File: CLAUDE.md:0-0
Timestamp: 2026-03-31T22:38:12.286Z
Learning: Applies to {pyproject.toml,setup.py,src/specfact_cli/__init__.py} : Sync version across pyproject.toml, setup.py, and src/specfact_cli/__init__.py whenever bumping version

Applied to files:

  • src/specfact_cli/cli.py
  • src/specfact_cli/modules/module_registry/src/commands.py
📚 Learning: 2026-03-25T21:31:01.827Z
Learnt from: CR
Repo: nold-ai/specfact-cli PR: 0
File: .cursorrules:0-0
Timestamp: 2026-03-25T21:31:01.827Z
Learning: Applies to **/*.py : Commands should follow typer patterns with rich console output.

Applied to files:

  • src/specfact_cli/cli.py
📚 Learning: 2026-03-31T22:38:56.776Z
Learnt from: CR
Repo: nold-ai/specfact-cli PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-03-31T22:38:56.776Z
Learning: Applies to **/module-package.yaml : Module signature verification is required before PR creation; run `hatch run ./scripts/verify-modules-signature.py --require-signature`

Applied to files:

  • src/specfact_cli/modules/module_registry/module-package.yaml
🪛 GitHub Actions: Module Signature Hardening
src/specfact_cli/modules/init/module-package.yaml

[error] 1-1: Module signatures are stale for the configured signing key. Re-sign and commit manifest updates.

src/specfact_cli/modules/init/src/first_run_selection.py

[error] 1-1: Module signatures are stale for the configured signing key. Re-sign and commit manifest updates.

src/specfact_cli/modules/module_registry/module-package.yaml

[error] 1-1: Module signatures are stale for the configured signing key. Re-sign and commit manifest updates.

src/specfact_cli/modules/module_registry/src/commands.py

[error] 1-1: Module signatures are stale for the configured signing key. Re-sign and commit manifest updates.

🪛 markdownlint-cli2 (0.22.0)
tools/semgrep/README.md

[warning] 11-11: Heading levels should only increment by one level at a time
Expected: h2; Actual: h3

(MD001, heading-increment)

🔀 Multi-repo context nold-ai/specfact-cli-modules

nold-ai/specfact-cli-modules

Findings:

  • scripts/pre_commit_code_review.py — asserts invocation of the root CLI module ("-m specfact_cli.cli") and imports specfact_cli.cli; changes to root callback / Typer introspection or import-time patching could affect this script. [::nold-ai/specfact-cli-modules::scripts/pre_commit_code_review.py:26,53]

  • packages/specfact-spec/src/specfact_spec/generate/commands.py — imports specfact_cli.utils.progress.load_bundle_with_progress (progress/console helpers). The PR adds/changes Rich progress/status behavior during registry fetch and installs, which may change runtime console interactions for these package commands. [::nold-ai/specfact-cli-modules::packages/specfact-spec/src/specfact_spec/generate/commands.py]

  • packages/specfact-codebase/src/specfact_codebase/analyze/commands.py — imports specfact_cli.utils.progress (uses progress helpers). Potentially affected by progress/status behavior changes. [::nold-ai/specfact-cli-modules::packages/specfact-codebase/src/specfact_codebase/analyze/commands.py]

  • Broad consumer surface: many packages under packages/* import specfact_cli (command entrypoints, utils, runtime); the PR’s import-time monkeypatch of typer.get_params_from_function and changes to root/install Typer callbacks could affect any consumer that imports specfact_cli at module import time. Representative hits found across packages/* (e.g., specfact-spec, specfact-codebase, specfact-govern). [::nold-ai/specfact-cli-modules::packages/*]

Summary: Consumers in this repo commonly import specfact_cli (including scripts that invoke the CLI via python -m). The PR’s import-time Typer patches and Rich progress behavior are relevant — verify that import-time monkeypatching is safe for downstream package imports and that CLI-invoking scripts (like pre_commit_code_review.py) still behave as expected.

Comment thread src/specfact_cli/modules/init/module-package.yaml
Comment thread src/specfact_cli/modules/init/src/first_run_selection.py
Comment thread src/specfact_cli/modules/module_registry/module-package.yaml Outdated
Comment thread src/specfact_cli/modules/module_registry/src/commands.py
Comment thread src/specfact_cli/registry/bootstrap.py Outdated
Comment thread src/specfact_cli/registry/module_packages.py
Comment thread tests/unit/modules/init/test_first_run_selection.py
Comment thread tests/unit/registry/test_category_groups.py
Comment thread tools/semgrep/README.md
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
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 84e092b730

ℹ️ 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".

Comment thread src/specfact_cli/modules/module_registry/src/commands.py
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@docs/examples/integration-showcases/integration-showcases-testing-guide.md`:
- Around line 976-977: Search the document for the flat CLI invocations that use
the literal token sequence "specfact ... import from-code" (e.g., the example
line containing "specfact --no-banner code import from-code --repo .
--output-format yaml") and replace each with the nested subcommand form used
elsewhere in this file (the single-authoritative-contract pattern already
present in the updated sections), ensuring the examples use the same nested
"code import from-code" structure and arguments/flags as the canonical examples
elsewhere on the page; update all remaining occurrences (including the ones
noted in the review) so every user-facing CLI example matches the current nested
invocation style and output-format usage.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: 64d3da27-f417-404f-8245-c1652a3eadbc

📥 Commits

Reviewing files that changed from the base of the PR and between 84e092b and fbcf470.

📒 Files selected for processing (9)
  • docs/core-cli/modes.md
  • docs/examples/integration-showcases/integration-showcases-quick-reference.md
  • docs/examples/integration-showcases/integration-showcases-testing-guide.md
  • docs/examples/integration-showcases/integration-showcases.md
  • docs/examples/quick-examples.md
  • docs/getting-started/installation.md
  • docs/guides/copilot-mode.md
  • docs/guides/troubleshooting.md
  • docs/guides/use-cases.md
📜 Review details
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Tests (Python 3.12)
🧰 Additional context used
📓 Path-based instructions (3)
**/*.md

📄 CodeRabbit inference engine (.cursorrules)

**/*.md: Finish each output by listing which rulesets have been applied (e.g., .cursorrules, AGENTS.md, specific .cursor/rules/*.mdc), confirm Git Worktree Policy compliance if applicable, and state the AI provider and model version being used.
Follow markdown linting rules to avoid markdown linting errors (via markdown-rules).

Files:

  • docs/core-cli/modes.md
  • docs/examples/integration-showcases/integration-showcases-quick-reference.md
  • docs/getting-started/installation.md
  • docs/examples/quick-examples.md
  • docs/guides/use-cases.md
  • docs/examples/integration-showcases/integration-showcases.md
  • docs/guides/troubleshooting.md
  • docs/guides/copilot-mode.md
  • docs/examples/integration-showcases/integration-showcases-testing-guide.md
**/*.{md,mdc}

📄 CodeRabbit inference engine (.cursor/rules/markdown-rules.mdc)

**/*.{md,mdc}: Do not use more than one consecutive blank line anywhere in the document (MD012: No Multiple Consecutive Blank Lines)
Fenced code blocks should be surrounded by blank lines (MD031: Fenced Code Blocks)
Lists should be surrounded by blank lines (MD032: Lists)
Files must end with a single empty line (MD047: Files Must End With Single Newline)
Lines should not have trailing spaces (MD009: No Trailing Spaces)
Use asterisks (**) for strong emphasis, not underscores (__) (MD050: Strong Style)
Fenced code blocks must have a language specified (MD040: Fenced Code Language)
Headers should increment by one level at a time (MD001: Header Increment)
Headers should be surrounded by blank lines (MD022: Headers Should Be Surrounded By Blank Lines)
Only one top-level header (H1) is allowed per document (MD025: Single H1 Header)
Use consistent list markers, preferring dashes (-) for unordered lists (MD004: List Style)
Nested unordered list items should be indented consistently, typically by 2 spaces (MD007: Unordered List Indentation)
Use exactly one space after the list marker (e.g., -, *, +, 1.) (MD030: Spaces After List Markers)
Use incrementing numbers for ordered lists (MD029: Ordered List Item Prefix)
Enclose bare URLs in angle brackets or format them as links (MD034: Bare URLs)
Don't use spaces immediately inside code spans (MD038: Spaces Inside Code Spans)
Use consistent indentation (usually 2 or 4 spaces) throughout markdown files
Keep line length under 120 characters in markdown files
Use reference-style links for better readability in markdown files
Use a trailing slash for directory paths in markdown files
Ensure proper escaping of special characters in markdown files

Files:

  • docs/core-cli/modes.md
  • docs/examples/integration-showcases/integration-showcases-quick-reference.md
  • docs/getting-started/installation.md
  • docs/examples/quick-examples.md
  • docs/guides/use-cases.md
  • docs/examples/integration-showcases/integration-showcases.md
  • docs/guides/troubleshooting.md
  • docs/guides/copilot-mode.md
  • docs/examples/integration-showcases/integration-showcases-testing-guide.md
docs/**/*.md

📄 CodeRabbit inference engine (.cursor/rules/spec-fact-cli-rules.mdc)

Update architecture documentation in docs/ for architecture changes, state machine documentation for FSM modifications, interface documentation for API changes, and configuration guides for configuration changes. DO NOT create internal docs in specfact-cli repo folder that should not be visible to end users; use the respective internal repository instead.

Preserve all front-matter on every edit to docs files (title, layout, nav_order, permalink, etc.)

Preserve all YAML front-matter on docs when editing (title, layout, nav_order, permalink, etc.); check docs/_layouts/default.html and docs/index.md before modifying front-matter keys

Files:

  • docs/core-cli/modes.md
  • docs/examples/integration-showcases/integration-showcases-quick-reference.md
  • docs/getting-started/installation.md
  • docs/examples/quick-examples.md
  • docs/guides/use-cases.md
  • docs/examples/integration-showcases/integration-showcases.md
  • docs/guides/troubleshooting.md
  • docs/guides/copilot-mode.md
  • docs/examples/integration-showcases/integration-showcases-testing-guide.md

⚙️ CodeRabbit configuration file

docs/**/*.md: User-facing accuracy: CLI examples match current behavior; preserve Jekyll front matter;
call out when README/docs index need sync.

Files:

  • docs/core-cli/modes.md
  • docs/examples/integration-showcases/integration-showcases-quick-reference.md
  • docs/getting-started/installation.md
  • docs/examples/quick-examples.md
  • docs/guides/use-cases.md
  • docs/examples/integration-showcases/integration-showcases.md
  • docs/guides/troubleshooting.md
  • docs/guides/copilot-mode.md
  • docs/examples/integration-showcases/integration-showcases-testing-guide.md
🧠 Learnings (26)
📓 Common learnings
Learnt from: CR
Repo: nold-ai/specfact-cli PR: 0
File: .cursor/rules/automatic-openspec-workflow.mdc:0-0
Timestamp: 2026-03-25T21:31:33.886Z
Learning: After implementing code changes in specfact-cli, run quality gates: `hatch run format`, `hatch run type-check`, `hatch run contract-test`, `hatch test` (or `hatch run smart-test`)
Learnt from: CR
Repo: nold-ai/specfact-cli PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-03-31T22:38:56.776Z
Learning: Clean-code review enforces 7-principle charter through `specfact code review run` with categories: `naming`, `kiss`, `yagni`, `dry`, `solid`; zero regressions required before merge; Phase A thresholds are active (LOC >80 warning / >120 error); Phase B deferred
Learnt from: CR
Repo: nold-ai/specfact-cli PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-03-31T22:38:56.776Z
Learning: SpecFact code review must pass: run `hatch run specfact code review run --json --out .specfact/code-review.json` before PR creation; re-run when proposal, specs, tasks, design, or code change (not required for evidence-only edits); treat `.specfact/code-review.json` as mandatory evidence before change completion
Learnt from: CR
Repo: nold-ai/specfact-cli PR: 0
File: .cursor/rules/automatic-openspec-workflow.mdc:0-0
Timestamp: 2026-03-25T21:31:33.886Z
Learning: After code implementation in specfact-cli, create or update corresponding GitHub issue with title `[Change] <Brief Description>`, labels `enhancement` and `change-proposal` if targeting public repo, and update `proposal.md` Source Tracking section with issue number, URL, repository, and status
Learnt from: CR
Repo: nold-ai/specfact-cli PR: 0
File: .cursor/rules/automatic-openspec-workflow.mdc:0-0
Timestamp: 2026-03-25T21:31:33.886Z
Learning: Ensure an OpenSpec change (new or delta) exists for any code modification in specfact-cli (`src/`, `tools/`, tests, or significant docs) unless user explicitly opts out with 'skip openspec', 'direct implementation', 'simple fix', or similar
Learnt from: CR
Repo: nold-ai/specfact-cli PR: 0
File: CLAUDE.md:0-0
Timestamp: 2026-03-31T22:38:12.286Z
Learning: Applies to src/specfact_cli/modules/*/src/*/*.py : CLI commands must use typer.Typer() + rich.console.Console() for command implementation and output
Learnt from: CR
Repo: nold-ai/specfact-cli PR: 0
File: .cursor/rules/automatic-openspec-workflow.mdc:0-0
Timestamp: 2026-03-25T21:31:33.886Z
Learning: For new code in specfact-cli using OpenSpec workflow, follow TDD discipline: write tests first, then implementation code
Learnt from: CR
Repo: nold-ai/specfact-cli PR: 0
File: CLAUDE.md:0-0
Timestamp: 2026-03-31T22:38:12.286Z
Learning: Applies to src/specfact_cli/modules/*/ : Each module package must have module-package.yaml with metadata (name, version, commands, dependencies) and src/{name}/ directory with __init__.py and main.py containing typer.Typer app
Learnt from: CR
Repo: nold-ai/specfact-cli PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2026-03-31T22:37:49.299Z
Learning: Run `hatch run specfact code review run --json --out .specfact/code-review.json` before submitting PR
Learnt from: CR
Repo: nold-ai/specfact-cli PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-03-31T22:38:56.776Z
Learning: Applies to **/*.{py,pyi} : CLI commands use `typer.Typer()` + `rich.console.Console()` pattern
📚 Learning: 2026-03-25T21:32:57.944Z
Learnt from: CR
Repo: nold-ai/specfact-cli PR: 0
File: .cursor/rules/spec-fact-cli-rules.mdc:0-0
Timestamp: 2026-03-25T21:32:57.944Z
Learning: Applies to docs/**/*.md : Update architecture documentation in docs/ for architecture changes, state machine documentation for FSM modifications, interface documentation for API changes, and configuration guides for configuration changes. DO NOT create internal docs in specfact-cli repo folder that should not be visible to end users; use the respective internal repository instead.

Applied to files:

  • docs/core-cli/modes.md
  • docs/examples/integration-showcases/integration-showcases-quick-reference.md
  • docs/getting-started/installation.md
  • docs/examples/quick-examples.md
  • docs/guides/use-cases.md
  • docs/examples/integration-showcases/integration-showcases.md
  • docs/guides/troubleshooting.md
  • docs/guides/copilot-mode.md
📚 Learning: 2026-03-25T21:31:33.886Z
Learnt from: CR
Repo: nold-ai/specfact-cli PR: 0
File: .cursor/rules/automatic-openspec-workflow.mdc:0-0
Timestamp: 2026-03-25T21:31:33.886Z
Learning: Ensure an OpenSpec change (new or delta) exists for any code modification in specfact-cli (`src/`, `tools/`, tests, or significant docs) unless user explicitly opts out with 'skip openspec', 'direct implementation', 'simple fix', or similar

Applied to files:

  • docs/core-cli/modes.md
  • docs/examples/integration-showcases/integration-showcases-quick-reference.md
  • docs/getting-started/installation.md
  • docs/examples/quick-examples.md
  • docs/guides/use-cases.md
  • docs/examples/integration-showcases/integration-showcases.md
  • docs/guides/troubleshooting.md
  • docs/guides/copilot-mode.md
  • docs/examples/integration-showcases/integration-showcases-testing-guide.md
📚 Learning: 2026-03-25T21:31:33.886Z
Learnt from: CR
Repo: nold-ai/specfact-cli PR: 0
File: .cursor/rules/automatic-openspec-workflow.mdc:0-0
Timestamp: 2026-03-25T21:31:33.886Z
Learning: When creating OpenSpec changes for specfact-cli, use unique verb-led `change-id` and scaffold `proposal.md`, `tasks.md`, optional `design.md`, and spec deltas in `changes/<id>/specs/<capability>/spec.md`

Applied to files:

  • docs/core-cli/modes.md
  • docs/examples/integration-showcases/integration-showcases-quick-reference.md
  • docs/getting-started/installation.md
  • docs/examples/quick-examples.md
  • docs/guides/use-cases.md
  • docs/examples/integration-showcases/integration-showcases.md
  • docs/examples/integration-showcases/integration-showcases-testing-guide.md
📚 Learning: 2026-03-25T21:31:33.886Z
Learnt from: CR
Repo: nold-ai/specfact-cli PR: 0
File: .cursor/rules/automatic-openspec-workflow.mdc:0-0
Timestamp: 2026-03-25T21:31:33.886Z
Learning: After code implementation in specfact-cli, create or update corresponding GitHub issue with title `[Change] <Brief Description>`, labels `enhancement` and `change-proposal` if targeting public repo, and update `proposal.md` Source Tracking section with issue number, URL, repository, and status

Applied to files:

  • docs/core-cli/modes.md
  • docs/examples/integration-showcases/integration-showcases-quick-reference.md
  • docs/getting-started/installation.md
  • docs/examples/quick-examples.md
  • docs/guides/use-cases.md
  • docs/examples/integration-showcases/integration-showcases.md
  • docs/guides/troubleshooting.md
  • docs/guides/copilot-mode.md
  • docs/examples/integration-showcases/integration-showcases-testing-guide.md
📚 Learning: 2026-03-31T22:38:56.776Z
Learnt from: CR
Repo: nold-ai/specfact-cli PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-03-31T22:38:56.776Z
Learning: README.md and docs landing page must stay in sync with actual CLI interface and command list; reconsider README from external/new-user perspective; lead with value and USP, not internal architecture; first-time reader should understand what SpecFact does and how to get started within first screen

Applied to files:

  • docs/core-cli/modes.md
  • docs/examples/integration-showcases/integration-showcases-quick-reference.md
  • docs/getting-started/installation.md
  • docs/examples/quick-examples.md
  • docs/guides/use-cases.md
  • docs/examples/integration-showcases/integration-showcases.md
📚 Learning: 2026-03-25T21:31:33.886Z
Learnt from: CR
Repo: nold-ai/specfact-cli PR: 0
File: .cursor/rules/automatic-openspec-workflow.mdc:0-0
Timestamp: 2026-03-25T21:31:33.886Z
Learning: Run `openspec validate <change-id> --strict` before implementing any code changes in specfact-cli to validate the OpenSpec change

Applied to files:

  • docs/core-cli/modes.md
  • docs/examples/integration-showcases/integration-showcases-quick-reference.md
  • docs/examples/quick-examples.md
  • docs/examples/integration-showcases/integration-showcases.md
  • docs/guides/troubleshooting.md
  • docs/guides/copilot-mode.md
  • docs/examples/integration-showcases/integration-showcases-testing-guide.md
📚 Learning: 2026-03-25T21:31:33.886Z
Learnt from: CR
Repo: nold-ai/specfact-cli PR: 0
File: .cursor/rules/automatic-openspec-workflow.mdc:0-0
Timestamp: 2026-03-25T21:31:33.886Z
Learning: For new code in specfact-cli using OpenSpec workflow, follow TDD discipline: write tests first, then implementation code

Applied to files:

  • docs/core-cli/modes.md
  • docs/examples/integration-showcases/integration-showcases-quick-reference.md
  • docs/examples/quick-examples.md
  • docs/guides/troubleshooting.md
  • docs/guides/copilot-mode.md
  • docs/examples/integration-showcases/integration-showcases-testing-guide.md
📚 Learning: 2026-03-31T22:38:56.776Z
Learnt from: CR
Repo: nold-ai/specfact-cli PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-03-31T22:38:56.776Z
Learning: Clean-code review enforces 7-principle charter through `specfact code review run` with categories: `naming`, `kiss`, `yagni`, `dry`, `solid`; zero regressions required before merge; Phase A thresholds are active (LOC >80 warning / >120 error); Phase B deferred

Applied to files:

  • docs/core-cli/modes.md
  • docs/examples/integration-showcases/integration-showcases-quick-reference.md
  • docs/guides/use-cases.md
  • docs/examples/integration-showcases/integration-showcases.md
  • docs/guides/troubleshooting.md
  • docs/guides/copilot-mode.md
📚 Learning: 2026-03-25T21:31:33.886Z
Learnt from: CR
Repo: nold-ai/specfact-cli PR: 0
File: .cursor/rules/automatic-openspec-workflow.mdc:0-0
Timestamp: 2026-03-25T21:31:33.886Z
Learning: After implementing code changes in specfact-cli, run quality gates: `hatch run format`, `hatch run type-check`, `hatch run contract-test`, `hatch test` (or `hatch run smart-test`)

Applied to files:

  • docs/core-cli/modes.md
  • docs/examples/integration-showcases/integration-showcases-quick-reference.md
  • docs/examples/integration-showcases/integration-showcases.md
  • docs/guides/troubleshooting.md
  • docs/guides/copilot-mode.md
  • docs/examples/integration-showcases/integration-showcases-testing-guide.md
📚 Learning: 2026-03-31T22:37:49.299Z
Learnt from: CR
Repo: nold-ai/specfact-cli PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2026-03-31T22:37:49.299Z
Learning: Run `hatch run specfact code review run --json --out .specfact/code-review.json` before submitting PR

Applied to files:

  • docs/core-cli/modes.md
  • docs/examples/integration-showcases/integration-showcases-quick-reference.md
  • docs/getting-started/installation.md
  • docs/examples/quick-examples.md
  • docs/guides/use-cases.md
  • docs/examples/integration-showcases/integration-showcases.md
  • docs/guides/troubleshooting.md
  • docs/guides/copilot-mode.md
  • docs/examples/integration-showcases/integration-showcases-testing-guide.md
📚 Learning: 2026-03-31T22:38:56.776Z
Learnt from: CR
Repo: nold-ai/specfact-cli PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-03-31T22:38:56.776Z
Learning: SpecFact code review must pass: run `hatch run specfact code review run --json --out .specfact/code-review.json` before PR creation; re-run when proposal, specs, tasks, design, or code change (not required for evidence-only edits); treat `.specfact/code-review.json` as mandatory evidence before change completion

Applied to files:

  • docs/core-cli/modes.md
  • docs/examples/integration-showcases/integration-showcases-quick-reference.md
  • docs/getting-started/installation.md
  • docs/examples/quick-examples.md
  • docs/guides/use-cases.md
  • docs/examples/integration-showcases/integration-showcases.md
  • docs/guides/troubleshooting.md
  • docs/guides/copilot-mode.md
  • docs/examples/integration-showcases/integration-showcases-testing-guide.md
📚 Learning: 2026-03-25T21:33:15.296Z
Learnt from: CR
Repo: nold-ai/specfact-cli PR: 0
File: .cursor/rules/testing-and-build-guide.mdc:0-0
Timestamp: 2026-03-25T21:33:15.296Z
Learning: Use `hatch test` command for running tests instead of direct pytest usage to ensure proper Python matrix, dependency resolution, environment variables, and coverage reports

Applied to files:

  • docs/core-cli/modes.md
📚 Learning: 2026-03-25T21:33:15.296Z
Learnt from: CR
Repo: nold-ai/specfact-cli PR: 0
File: .cursor/rules/testing-and-build-guide.mdc:0-0
Timestamp: 2026-03-25T21:33:15.296Z
Learning: Before making a pull request, locally run format, lint, contract tests, and full test suite: `hatch run format`, `hatch run lint`, `hatch run contract-test`, `hatch test --cover -v`

Applied to files:

  • docs/core-cli/modes.md
📚 Learning: 2026-03-25T21:32:57.944Z
Learnt from: CR
Repo: nold-ai/specfact-cli PR: 0
File: .cursor/rules/spec-fact-cli-rules.mdc:0-0
Timestamp: 2026-03-25T21:32:57.944Z
Learning: Applies to src/**/*.py : Test Coverage Validation: Run hatch run smart-test-unit for modified files, hatch run smart-test-folder for modified directories, and hatch run smart-test-full before committing. ALL TESTS MUST PASS.

Applied to files:

  • docs/core-cli/modes.md
📚 Learning: 2026-03-25T21:31:01.827Z
Learnt from: CR
Repo: nold-ai/specfact-cli PR: 0
File: .cursorrules:0-0
Timestamp: 2026-03-25T21:31:01.827Z
Learning: When creating implementation plans or OpenSpec tasks.md, explicitly verify and include: worktree creation from `origin/dev`, `hatch env create` in the worktree, pre-flight checks (`hatch run smart-test-status`, `hatch run contract-test-status`), and worktree cleanup steps post-merge.

Applied to files:

  • docs/core-cli/modes.md
📚 Learning: 2026-03-25T21:32:38.156Z
Learnt from: CR
Repo: nold-ai/specfact-cli PR: 0
File: .cursor/rules/session_startup_instructions.mdc:0-0
Timestamp: 2026-03-25T21:32:38.156Z
Learning: Applies to **/*.py : Run `hatch run smart-test` for testing and ensure total coverage is >= 80%

Applied to files:

  • docs/core-cli/modes.md
📚 Learning: 2026-03-25T21:33:22.650Z
Learnt from: CR
Repo: nold-ai/specfact-cli PR: 0
File: .cursor/rules/yaml-and-workflows.md:0-0
Timestamp: 2026-03-25T21:33:22.650Z
Learning: Run `hatch run yaml-check-all` in CI and before pull requests to validate all YAML and workflow files

Applied to files:

  • docs/core-cli/modes.md
📚 Learning: 2026-03-25T21:33:15.296Z
Learnt from: CR
Repo: nold-ai/specfact-cli PR: 0
File: .cursor/rules/testing-and-build-guide.mdc:0-0
Timestamp: 2026-03-25T21:33:15.296Z
Learning: Run contract-first validation locally before committing: `hatch run contract-test-contracts`, `hatch run contract-test-exploration`, and `hatch run contract-test-scenarios`

Applied to files:

  • docs/core-cli/modes.md
📚 Learning: 2026-03-31T22:37:49.299Z
Learnt from: CR
Repo: nold-ai/specfact-cli PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2026-03-31T22:37:49.299Z
Learning: Run pre-commit checks in order: `hatch run format` → `type-check` → `lint` → `yaml-lint` → `contract-test` → `smart-test`

Applied to files:

  • docs/core-cli/modes.md
📚 Learning: 2026-03-25T21:31:33.886Z
Learnt from: CR
Repo: nold-ai/specfact-cli PR: 0
File: .cursor/rules/automatic-openspec-workflow.mdc:0-0
Timestamp: 2026-03-25T21:31:33.886Z
Learning: Read and apply `openspec/config.yaml` for project context (tech stack, constraints, architecture, SDD+TDD discipline) before any code modification in specfact-cli

Applied to files:

  • docs/core-cli/modes.md
  • docs/examples/integration-showcases/integration-showcases-quick-reference.md
  • docs/getting-started/installation.md
  • docs/examples/quick-examples.md
  • docs/guides/troubleshooting.md
  • docs/guides/copilot-mode.md
  • docs/examples/integration-showcases/integration-showcases-testing-guide.md
📚 Learning: 2026-03-31T22:38:56.776Z
Learnt from: CR
Repo: nold-ai/specfact-cli PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-03-31T22:38:56.776Z
Learning: Applies to {pyproject.toml,setup.py,src/specfact_cli/__init__.py} : Sync version updates across `pyproject.toml`, `setup.py`, and `src/specfact_cli/__init__.py`

Applied to files:

  • docs/examples/integration-showcases/integration-showcases-quick-reference.md
  • docs/examples/quick-examples.md
  • docs/examples/integration-showcases/integration-showcases.md
📚 Learning: 2026-03-25T21:31:01.827Z
Learnt from: CR
Repo: nold-ai/specfact-cli PR: 0
File: .cursorrules:0-0
Timestamp: 2026-03-25T21:31:01.827Z
Learning: All development work must use git worktrees per AGENTS.md Git Worktree Policy. Create worktree from origin/dev using `git worktree add ../specfact-cli-worktrees/<type>/<slug> -b <branch-name> origin/dev`. Allowed types: `feature/`, `bugfix/`, `hotfix/`, `chore/`. Never use `git checkout -b` in primary checkout.

Applied to files:

  • docs/examples/integration-showcases/integration-showcases-quick-reference.md
📚 Learning: 2026-03-31T22:38:12.286Z
Learnt from: CR
Repo: nold-ai/specfact-cli PR: 0
File: CLAUDE.md:0-0
Timestamp: 2026-03-31T22:38:12.286Z
Learning: Applies to README.md : Keep README.md in sync with actual CLI interface and command list; prioritize new-user perspective with value/USP up front, not internal architecture

Applied to files:

  • docs/getting-started/installation.md
  • docs/examples/quick-examples.md
  • docs/guides/use-cases.md
  • docs/guides/copilot-mode.md
  • docs/examples/integration-showcases/integration-showcases-testing-guide.md
📚 Learning: 2026-03-31T22:38:12.286Z
Learnt from: CR
Repo: nold-ai/specfact-cli PR: 0
File: CLAUDE.md:0-0
Timestamp: 2026-03-31T22:38:12.286Z
Learning: Applies to src/specfact_cli/modules/project/**/*.py : Project-scoped orchestration belongs under 'project' command: link-backlog, health-check, devops-flow, snapshot, regenerate, export-roadmap

Applied to files:

  • docs/examples/quick-examples.md
📚 Learning: 2026-03-31T22:38:56.776Z
Learnt from: CR
Repo: nold-ai/specfact-cli PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-03-31T22:38:56.776Z
Learning: When a command, option, or behaviour changes, update the corresponding doc page in the same PR

Applied to files:

  • docs/guides/copilot-mode.md
🔀 Multi-repo context nold-ai/specfact-cli-modules

Linked repositories findings

nold-ai/specfact-cli-modules

  • Many bundle packages import specfact_cli at runtime; changes that run at import-time (the PR’s Typer monkey-patch / param-introspection) could affect these consumers.

    • Representative imports: [::nold-ai/specfact-cli-modules::packages/specfact-spec/src/specfact_spec/generate/commands.py] (imports specfact_cli.utils.progress — occurrences near lines 33, 543–545)
    • Representative imports: [::nold-ai/specfact-cli-modules::packages/specfact-project/src/specfact_project/plan/commands.py] (imports specfact_cli.utils.progress — occurrences near lines 43–44)
    • Many other bundle packages under packages/* import specfact_cli (see numerous hits under packages/specfact-/src/). [::nold-ai/specfact-cli-modules::packages/*]
  • Progress helpers are directly used by bundle commands; the PR’s change to display Rich progress/status during registry fetch and per-module installs (and the TEST_MODE suppression behavior) may affect console/UX in these bundle commands:

    • load_bundle_with_progress referenced in multiple files in specfact-spec and specfact-project (e.g., [::nold-ai/specfact-cli-modules::packages/specfact-spec/src/specfact_spec/generate/commands.py], [::nold-ai/specfact-cli-modules::packages/specfact-project/src/specfact_project/plan/commands.py]).
  • Scripts that invoke the CLI module or rely on import-time behavior:

    • scripts/pre_commit_code_review.py imports dev_bootstrap.ensure_core_dependency which asserts invoking the root CLI module ("-m specfact_cli.cli"); import-time patches to specfact_cli.cli may affect this script’s behavior. [::nold-ai/specfact-cli-modules::scripts/pre_commit_code_review.py:26]
  • Tooling/validation scripts reference specfact_cli (potentially sensitive to import-time changes):

    • tools/validate_cli_contracts.py imports specfact_cli utilities. [::nold-ai/specfact-cli-modules::tools/validate_cli_contracts.py]
  • No evidence in this repo of direct patches to typer.get_params_from_function, but grep for that symbol returned no hits; still, the PR’s import-time monkeypatch in specfact-cli could have cross-repo impact because many modules import specfact_cli on import. (Search performed: rg "get_params_from_function" returned no matches in this repo.)

Summary assessment: multiple bundle packages and scripts in this repository import and call specfact_cli utilities (notably progress helpers). The PR’s changes that apply import-time monkey-patching of Typer and alter Rich progress/status behavior are therefore relevant: ensure the monkey-patch is safe to run during general imports by downstream packages and that TEST_MODE detection/suppression behaves as expected for these consumers.

🔇 Additional comments (8)
docs/guides/use-cases.md (1)

49-52: Command path update is correct and consistent.

This CoPilot example now matches the nested CLI topology and avoids the removed flat import shim.

docs/examples/integration-showcases/integration-showcases.md (1)

341-345: Pre-commit example now uses the correct nested import command.

Good alignment with current CLI command structure.

docs/core-cli/modes.md (1)

182-183: Mode-routing examples are correctly normalized to code import from-code.

These updates are consistent across all mode scenarios in this page.

Also applies to: 192-193, 252-253

docs/getting-started/installation.md (1)

356-359: The CoPilot CLI-only install guide example is now aligned with current routing.

Nice targeted fix.

docs/examples/integration-showcases/integration-showcases-quick-reference.md (1)

80-80: Quick-reference command matrix is consistently updated.

All touched import commands now use the canonical nested path.

Also applies to: 98-98, 120-120, 138-138, 223-223

docs/examples/quick-examples.md (1)

69-69: Operational mode examples now correctly route through code import from-code.

This keeps quick examples in sync with CLI nesting.

Also applies to: 203-203, 206-206

docs/guides/copilot-mode.md (1)

33-33: CoPilot-mode command examples are correctly migrated to the nested form.

Good consistency across quick start and comparison examples.

Also applies to: 101-101, 104-104

docs/guides/troubleshooting.md (1)

138-138: Mode-aware command examples now match the nested Typer CLI contract.

The updated specfact --mode <mode> code import from-code ... paths are consistent with the root/app command boundary and should prevent docs-vs-runtime drift for module/bundle consumers.

Also applies to: 448-448, 480-480

@djm81 djm81 merged commit e87058b into dev Apr 3, 2026
17 of 18 checks passed
@github-project-automation github-project-automation bot moved this from In Progress to Done in SpecFact CLI Apr 3, 2026
djm81 added a commit that referenced this pull request Apr 10, 2026
* feat(init): align init module discovery with registry (backlog-core-01) (#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, #163) (#272)

* 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: add patch apply (local + --write with confirmation) [#177] (#273)

* 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 (bundle-mapper-01, #121) (#274)

* 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>

* Archive finished changes

* fix: implement verification-01 wave1 delta closure (#277)

* 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>

* Archive delta validation change and update specs

* Update patch version

* Potential fix for pull request finding 'Empty except'

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>

* apply review fixes

* Add cli validation changes

* feat: launch central module marketplace lifecycle (#287)

* feat: launch module marketplace lifecycle and trust-first UX

Deliver the central module marketplace workflow with source-aware discovery, lifecycle management, and trust/publisher visibility so users can safely manage official vs local modules. This also aligns docs and OpenSpec artifacts with the shipped behavior, including command introspection and clearer install/uninstall guidance.

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

* fix: respect explicit discovery roots in module tests

Disable implicit legacy/workspace roots when explicit roots are passed to module discovery so isolated test roots are honored and deterministic.

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

* fix: enforce safe module extraction and upgrade reinstall

---------

Co-authored-by: Dominikus Nold <djm81@users.noreply.github.com>
Co-authored-by: Cursor <cursoragent@cursor.com>

* fix: resolve bundle-mapper review defects with TDD evidence (#290)

* 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>

* fix: address bundle-mapper review defects with tdd evidence

* test: make specmatic integration tests plugin-agnostic

---------

Signed-off-by: Dom <39115308+djm81@users.noreply.github.com>
Co-authored-by: Dominikus Nold <djm81@users.noreply.github.com>
Co-authored-by: Cursor <cursoragent@cursor.com>

* feat:Add architecture review docs and findings to mitigate

* feat(backlog): add backlog add for interactive issue creation (#289)

* feat: add interactive backlog issue creation flow

* feat(backlog): add interactive issue creation and mapping setup

* fix: align backlog protocol test fakes and module manifest versions

* Fix type error

* fix(backlog): persist ado sprint and normalize github create id

* fix(backlog-core): address review findings for add/config/github

---------

Signed-off-by: Dom <39115308+djm81@users.noreply.github.com>
Co-authored-by: Dominikus Nold <djm81@users.noreply.github.com>

* chore(openspec): archive completed changes and align architecture docs (#292)

* chore(openspec): archive completed changes and align architecture docs

* docs(architecture): refresh discrepancies report after arch-08 remediation

---------

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

* docs(change): Archive architecture discrepancy remediation change

* fix(codeql): preserve module contract marker and document fallback excepts

* fix(backlog): restore installed-runtime discovery parity and add backlog prompt (#294)

* fix(backlog): restore installed runtime discovery and add backlog prompt

* Archive bugfix change

---------

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

* fix(version): sync manifests to 0.36.1 and archive backlog-core-04 (#297)

* fix(backlog): restore installed runtime discovery and add backlog prompt

* Archive bugfix change

* fix(version): sync built-in module manifests to 0.36.1

---------

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

* fix: harden module lifecycle bootstrap and signing workflows (#299)

* fix: harden module lifecycle bootstrap and signing workflows

* fix: stabilize module signature hashing across environments

* fix: stabilize bundle module signature verification in CI

---------

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

* test: simplify monkeypatch callables in module_security tests

* Fix duplicate with statement

* chore(release): bump to v0.37.1 and harden signature gates

* test: fix init command regression assertions

* fix: release v0.37.2 with runtime crypto deps

* fix: address signature-backend warning and module version drift

* fix: use hatch build in PyPI publish workflow script (#304)

* fix: resolve startup module freshness home path dynamically (#306)

* fix: harden module signing workflow and reduce startup log noise

* test: align module migration compatibility with decoupled module versions

* fix: fail fast on invalid base ref in changed-only module signing

* fix: stabilize module precedence and backlog github mapping flow

* fix(module-registry): persist disables and correct bundled availability

* Re-sign module registry and fix / ignore local temp artifacts

* bump module registry version to 0.1.3

* fix(registry): restore protocol reporting logs in debug mode

* fix(backlog): harden refine writeback, prompts, and any-filter semantics (#311)

* fix(backlog): harden refine writeback, prompts, and daily any filters

* fix(github): default story type fallback to feature

* Fix format

* Fix codex review findings

* bump and sign changed modules

* chore(hooks): enforce module signature verification in pre-commit

* chore(hooks): add markdownlint to pre-commit checks

---------

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

* fix(hooks,ado): correct format gate and enforce iteration on direct
  id lookup

* Apply review findings and fix tests

* Pin virtualenv < 21 to avoid incaopatibility failure

* fix: finalize backlog-core-06 ado comment API versioning (#314)

* fix(backlog): harden refine writeback, prompts, and daily any filters

* fix(github): default story type fallback to feature

* Fix format

* Fix codex review findings

* bump and sign changed modules

* chore(hooks): enforce module signature verification in pre-commit

* chore(hooks): add markdownlint to pre-commit checks

* fix: finalize backlog-core-06 ado comment api versioning and ci hatch pins

* fix: address review findings for formatter safety and ado metric patch guards

* docs(openspec): update CHANGE_ORDER status tracking

* fix(ado): apply iteration filter for direct issue_id lookup

---------

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

* feat: Advanced marketplace features (marketplace-02) - dependency resolution, aliases, custom registries, publishing (#318)

* feat: advanced marketplace features (marketplace-02) - dependency resolution, aliases, custom registries, namespace enforcement, publishing

- dependency_resolver: resolve_dependencies(), --skip-deps, --force on install
- alias_manager: alias create/list/remove (no top-level alias commands)
- custom_registries: add-registry, list-registries, remove-registry; fetch_all_indexes; search Registry column
- module_installer: namespace/name enforcement, collision detection
- scripts/publish-module.py + .github/workflows/publish-modules.yml (optional signing)
- docs: publishing-modules, custom-registries, dependency-resolution; updated installing-modules, module-marketplace, commands
- version 0.38.0, CHANGELOG

Made-with: Cursor

* docs(openspec): defer 6.2.4 and 6.2.5 (index update/PR, workflow test) to later

Made-with: Cursor

* Add follow-up change proposals for marketplace

* Fix codex review findings

---------

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

* fix: complete marketplace publish registry PR flow and bump (#320)

0.38.1

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

* fix: update init ide hint and repair publish workflow
  condition

* feat(backlog): normalize daily summarize Markdown output (#323)

* feat(backlog): summarize Markdown normalization and TTY/CI rendering

* chore(openspec): drop implementation snapshot from change

* Update title

---------

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

* Update version

* Add github skills

* Add new marketplace changes

* feat(cli): category groups and flat shims using real module Typer (#331)

* feat(cli): category groups and flat shims using real module Typer

- Add category groups (code, backlog, project, spec, govern) with flatten same-name member
- Sort commands under backlog/project groups A–Z
- Fix flat shims to expose real module Typer so 'specfact sync bridge' and 'specfact plan update-idea' work
- Add first-run init, module grouping, OpenSpec change for 0.40.x remove-flat-shims
- Bump version to 0.39.0, CHANGELOG and OpenSpec updates

Made-with: Cursor

* Fix signature

* fix: resolve module grouping regressions and stabilize CI
  tests

* fix: keep uncategorized modules flat during grouped registration

---------

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

* Update docs regarding module migration change

* feat: module-migration-02 bundle extraction (#332)

* docs: add module-migration-02-bundle-extraction to CHANGE_ORDER.md

* feat: implement module-migration-02 bundle extraction

* fix(ci): checkout module bundles repo for test jobs

* Fix test failures

* fix(modules): load local bundle sources in compatibility aliases

* fix: run worktree policy code in tests/CI and silence reexport deprecation

- Prefer src/<name>/main.py over app.py when SPECFACT_REPO_ROOT is set so
  policy init uses worktree templates.py (SPECFACT_POLICY_TEMPLATES_DIR).
- Policy engine module-package.yaml: version 0.1.5 and re-signed checksum.
- conftest: set SPECFACT_REPO_ROOT, SPECFACT_POLICY_TEMPLATES_DIR; add
  bundle package roots when specfact-cli-modules present.
- Policy engine integration tests: rely on conftest env, clear registry
  and re-register before invoke so loader uses worktree.
- test_reexport_shims: filter deprecation warning for legacy analyze import.

Made-with: Cursor

* fix: defer specfact_backlog import in shims so CI can register bridges

- backlog and policy_engine __init__.py: import specfact_backlog only in
  __getattr__ (cached), not at module load. Allows loading .src.adapters.*
  for bridge registration without requiring specfact_backlog installed.
- Re-sign backlog and policy_engine module-package.yaml after init changes.
- openspec: update module-migration-02 tasks.md.

Made-with: Cursor

* fix: defer bundle import in all module shims to fix CI collection errors

- Apply deferred import (only in __getattr__, cached) to analyze, contract,
  drift, enforce, generate, import_cmd, migrate, patch_mode, plan, project,
  repro, sdd, spec, sync, validate. Matches backlog and policy_engine.
- Prevents ImportError when tests import specfact_cli.modules.<name>.src.*
  without specfact_backlog/specfact_govern/specfact_project/specfact_spec
  installed (e.g. CI). Fixes 78 collection errors.
- Re-sign all affected module-package.yaml manifests.

Made-with: Cursor

* fix(ci): include module shims in hatch cache key so CI uses current code

* feat(modules): registry descriptions, --bump-version for publish, tasks and format fixes

- Add description to registry index entries in publish-module.py (module search)
- Add --bump-version patch|minor|major for bundle re-publish in publish-module.py
- Format fixes in validate-modules-repo-sync.py (SIM108, B007)
- Mark completed tasks in module-migration-02-bundle-extraction tasks.md
- Update test for publish_bundle(bump_version=) signature

Made-with: Cursor

* Add missing migration tasks to the open change to completely isolate modules into specfact-cli-modules repo.

* Add gap analysis and update changes

* Update follow-up changes to avoid ambiguities and overlaps

* docs: complete migration-02 section-18 parity and 17.8 gate evidence

* docs: mark migration-02 import-categorization commit checkpoint done

* Update change constraints and blockers for module migration

* docs: add migration-05 issue #334 and complete task 17.10.4

* Update change constraints and blockers for module migration

---------

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

* Implement blockers to prepare for module-migration-03 change. (#336)

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

* feat: module-migration-03 core slimming closeout and registry fixes (#317) (#341)

* Prepare module-migration-03 removal of old built-in modules

* feat(core): delete specfact-project module source from core (migration-03)

Made-with: Cursor

* feat(core): delete specfact-backlog module source from core (migration-03)

Made-with: Cursor

* feat(core): delete specfact-codebase module source from core (migration-03)

Made-with: Cursor

* feat(core): delete specfact-spec module source from core (migration-03)

Made-with: Cursor

* feat(core): delete specfact-govern module source from core (migration-03)

Made-with: Cursor

* chore(tests): skip tests for removed modules when source absent (migration-03)

Add pytest.importorskip() for backlog, plan, sync, enforce, generate,
patch_mode, import_cmd so tests are skipped when module source was
removed from core. Preserves tests for later move to specfact-cli-modules.
Update tasks.md and TDD_EVIDENCE.md for Task 10 completion.

Made-with: Cursor

* feat(bootstrap): remove flat shims and non-core module registrations (migration-03)

- Remove _register_category_groups_and_shims (unconditional category/shim registration).
- Trim CORE_MODULE_ORDER to 4 core: init, auth, module-registry, upgrade.
- Add @beartype to _mount_installed_category_groups.
- Category groups and flat shims only for installed bundles via _mount_installed_category_groups.

Made-with: Cursor

* docs(openspec): mark Task 11.4 done in tasks.md

Made-with: Cursor

* feat(cli): conditional category group mount from installed bundles (migration-03)

- Add _RootCLIGroup (extends ProgressiveDisclosureGroup) with resolve_command
  override: unknown commands in KNOWN_BUNDLE_GROUP_OR_SHIM_NAMES show
  actionable error (not installed + specfact init / specfact module install).
- Root app uses cls=_RootCLIGroup. Main help docstring adds init/module
  install hint for workflow bundles.

Made-with: Cursor

* docs(openspec): mark Task 12.4 done in tasks.md

Made-with: Cursor

* feat(init): enforce mandatory bundle selection and profile presets (migration-03)

* Add module removal core tests

* docs(openspec): record Task 14 module signing gate (migration-03)

* feat: complete module-migration-03 core slimming and
  follow-up alignment (#317)

* Fix format error

* fix: handle detached HEAD registry branch selection and
  stabilize migration-03 CI tests

---------

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

* Finalize module-migration-02 change

* docs(backlog-auth): update auth docs and OpenSpec task status (#342)

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

* chore(openspec): archive completed changes and sync main specs

* docs(openspec): prefix module migration proposal titles with IDs

* Add bug change for ado required fields setting and update change order

* Update change order

* feat(core): finalize migration-03 auth removal and 3-core slim package (#317) (#343)

* Prepare module-migration-03 removal of old built-in modules

* feat(core): delete specfact-project module source from core (migration-03)

Made-with: Cursor

* feat(core): delete specfact-backlog module source from core (migration-03)

Made-with: Cursor

* feat(core): delete specfact-codebase module source from core (migration-03)

Made-with: Cursor

* feat(core): delete specfact-spec module source from core (migration-03)

Made-with: Cursor

* feat(core): delete specfact-govern module source from core (migration-03)

Made-with: Cursor

* chore(tests): skip tests for removed modules when source absent (migration-03)

Add pytest.importorskip() for backlog, plan, sync, enforce, generate,
patch_mode, import_cmd so tests are skipped when module source was
removed from core. Preserves tests for later move to specfact-cli-modules.
Update tasks.md and TDD_EVIDENCE.md for Task 10 completion.

Made-with: Cursor

* feat(bootstrap): remove flat shims and non-core module registrations (migration-03)

- Remove _register_category_groups_and_shims (unconditional category/shim registration).
- Trim CORE_MODULE_ORDER to 4 core: init, auth, module-registry, upgrade.
- Add @beartype to _mount_installed_category_groups.
- Category groups and flat shims only for installed bundles via _mount_installed_category_groups.

Made-with: Cursor

* docs(openspec): mark Task 11.4 done in tasks.md

Made-with: Cursor

* feat(cli): conditional category group mount from installed bundles (migration-03)

- Add _RootCLIGroup (extends ProgressiveDisclosureGroup) with resolve_command
  override: unknown commands in KNOWN_BUNDLE_GROUP_OR_SHIM_NAMES show
  actionable error (not installed + specfact init / specfact module install).
- Root app uses cls=_RootCLIGroup. Main help docstring adds init/module
  install hint for workflow bundles.

Made-with: Cursor

* docs(openspec): mark Task 12.4 done in tasks.md

Made-with: Cursor

* feat(init): enforce mandatory bundle selection and profile presets (migration-03)

* Add module removal core tests

* docs(openspec): record Task 14 module signing gate (migration-03)

* feat: complete module-migration-03 core slimming and
  follow-up alignment (#317)

* Fix format error

* fix: handle detached HEAD registry branch selection and
  stabilize migration-03 CI tests

* Prepare module-migration-03 removal of old built-in modules

* Prepare module-migration-03 removal of old built-in modules

* chore(tests): skip tests for removed modules when source absent (migration-03)

Add pytest.importorskip() for backlog, plan, sync, enforce, generate,
patch_mode, import_cmd so tests are skipped when module source was
removed from core. Preserves tests for later move to specfact-cli-modules.
Update tasks.md and TDD_EVIDENCE.md for Task 10 completion.

Made-with: Cursor

* feat(bootstrap): remove flat shims and non-core module registrations (migration-03)

- Remove _register_category_groups_and_shims (unconditional category/shim registration).
- Trim CORE_MODULE_ORDER to 4 core: init, auth, module-registry, upgrade.
- Add @beartype to _mount_installed_category_groups.
- Category groups and flat shims only for installed bundles via _mount_installed_category_groups.

Made-with: Cursor

* docs(openspec): mark Task 11.4 done in tasks.md

Made-with: Cursor

* feat(cli): conditional category group mount from installed bundles (migration-03)

- Add _RootCLIGroup (extends ProgressiveDisclosureGroup) with resolve_command
  override: unknown commands in KNOWN_BUNDLE_GROUP_OR_SHIM_NAMES show
  actionable error (not installed + specfact init / specfact module install).
- Root app uses cls=_RootCLIGroup. Main help docstring adds init/module
  install hint for workflow bundles.

Made-with: Cursor

* docs(openspec): mark Task 12.4 done in tasks.md

Made-with: Cursor

* feat(init): enforce mandatory bundle selection and profile presets (migration-03)

* Add module removal core tests

* docs(openspec): record Task 14 module signing gate (migration-03)

* feat: complete module-migration-03 core slimming and
  follow-up alignment (#317)

* Fix format error

* fix: handle detached HEAD registry branch selection and
  stabilize migration-03 CI tests

* feat(core): remove auth module from core and route auth via backlog (migration-03)

* docs(openspec): update migration-03 PR status and tracking

* docs(openspec): finalize migration-03 checklist and defer non-blocking gates

* Fix remaining auth findings and dependency in core cli

---------

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

* Archive module-migration-03 change

* feat: remove flat command shims (category-only CLI) (#344)

* feat: remove flat command shims from grouped registry

* Finalize change module-migration-04 implementation

---------

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

* Archived module-migration-04 and updated specs

* docs(openspec): finalize module-migration-05 tracking after modules PR merge (#345)

* Implement blockers to prepare for module-migration-03 change.

* Update migration change

* docs(openspec): close migration-05 PR tracking and change order

---------

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

* Archive module-migration-05 change and update specs

* test(migration-06): move legacy sync tests out of core (#346)

* feat(migration-06): core decoupling cleanup - boundary tests and inventory

- Add test_core_does_not_import_from_bundle_packages boundary regression test
- Update spec with ownership boundary and migration acceptance criteria
- Add CORE_DECOUPLING_INVENTORY.md (keep/move/interface classification)
- Record TDD evidence in TDD_EVIDENCE.md
- Update docs/reference/architecture.md with core vs modules-repo boundary
- Update openspec/CHANGE_ORDER.md status

No move candidates identified; core already decoupled from bundle packages.
Boundary test prevents future core->bundle coupling.

Refs #338

Made-with: Cursor

* chore(migration-06): mark all tasks complete

Made-with: Cursor

* feat(migration-06): extend scope - migrate package-specific artifacts per #338

- Add MIGRATION_REMOVAL_PLAN.md with phased removal of MIGRATE-tier code
- Add test_core_modules_do_not_import_migrate_tier boundary test
- Remove templates.bridge_templates (dead code; only tests used it)
- Remove tests/unit/templates/test_bridge_templates.py
- Update CORE_DECOUPLING_INVENTORY.md with removal status
- Update spec with MIGRATE-tier enforcement and package-specific removal

Phase 1 complete. Further MIGRATE-tier removal documented in plan.
Refs #338

Made-with: Cursor

* test(migration-06): move legacy sync tests out of core

---------

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

* Archived module-migration-06 change and updated specs

* test: module-migration-07 core test ownership cleanup (#347)

* test: finalize module-migration-07 core test ownership cleanup

* docs: mark module-migration-07 quality and PR tasks complete

* test: fix CI isolation failures for project and persona merge

* test: narrow migrated skips and restore core registry guardrails

* test: stabilize core CI by refining skips and bootstrap checks

* test: fix remaining PR failures via targeted core filtering

* fix: harden module package checks against import-mode class identity

* test: stabilize core slimming integration assertions

---------

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

* Archived backlog-core-07 change and updated specs

* Update some docs and archive latest finished changes and specs

* Add docs update change

* feat: add agile-01-feature-hierarchy change and update CHANGE_ORDER.md (#376)

- Create openspec/changes/agile-01-feature-hierarchy/ with proposal.md and tasks.md
- Add Epics #256 (Architecture Layer Integration), #257 (AI IDE Integration),
  and #258 (Integration Governance and Dogfooding) to CHANGE_ORDER.md parent issues table
- 25 GitHub Feature issues created (#351-#375), linked to their parent Epics
- Feature label created; issue #185 closed (ceremony-cockpit-01, archived 2026-02-18)

Co-authored-by: Dominikus Nold <djm81@users.noreply.github.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>

* docs: align core docs and sync pending changes (#377)

* docs: align core docs and sync pending changes

* fix: preserve partial staging in markdown autofix hook

---------

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

* fix: stabilize release test suite after module migration

* Update module

* Fix module install

* Fix module install

* Fix failed tests

* Fix marketplace client regression

* Fix install regression for specfact-cli (#380)

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

* Add changes to improve runtime validation and backlog module remaining migration to module

* refactor: remove backlog ownership from core cli (#384)

* refactor: remove backlog ownership from core cli

* fix: align CI marketplace validation paths

* test: stabilize command audit validation and add command-surface change

---------

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

* Add new command alignment change

* fix: finalize cli runtime validation regressions (#387)

* fix: finalize cli runtime validation regressions

* test: align satisfied dependency logging assertions

---------

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

* docs: archive cli-val-07 change

* Archive changes and update specs

* Add code-review change proposals

* test: align command surface regression coverage

* docs: add OpenSpec change for backlog-core commands migration (#390)

* feat: add OpenSpec change for backlog-core commands migration

Change: backlog-02-migrate-core-commands
- Add proposal, design, tasks, specs
- Add TDD_EVIDENCE.md with implementation progress
- GitHub Issue: #389

Rules applied: AGENTS.md Git Worktree Policy, TDD Hard Gate

Made-with: Cursor

* docs: update TDD_EVIDENCE and tasks for quality gate results

Made-with: Cursor

* docs: update TDD_EVIDENCE with test fix results

Made-with: Cursor

* docs: update TDD_EVIDENCE with all test fixes complete

Made-with: Cursor

---------

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

* fix: use POST instead of PATCH for ADO work item creation (#391)

* fix: use POST instead of PATCH for ADO work item creation

Azure DevOps API requires POST (not PATCH) for creating work items.

Also fixed category grouping to always register group commands.

Made-with: Cursor

* docs: add changelog entry for ADO POST fix

Made-with: Cursor

* chore: bump version to 0.40.4

Made-with: Cursor

* fix: update test mocks from PATCH to POST for ADO create

- Reverted incorrect unconditional _mount_installed_category_groups call

- Updated test_create_issue mocks to use requests.post instead of requests.patch

Made-with: Cursor

* test: skip category group test when bundles not installed

The test_bootstrap_with_category_grouping_disabled_registers_flat_commands test

expects bundles like specfact-codebase to be installed, but in CI they may not be.

Added pytest.skip() when 'code' command is not available.

Made-with: Cursor

---------

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

* docs: archive backlog-02-migrate-core-commands change

- Archived backlog-02-migrate-core-commands change

- Updated CHANGE_ORDER.md with implementation status

- Updated main specs with backlog-add, backlog-analyze-deps, backlog-delta, backlog-sync, backlog-verify-readiness

Made-with: Cursor

* feat: document code-review module scaffold (#410)

* feat: document code-review module scaffold

* chore: sync 0.41.0 release version artifacts

---------

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

* Add change for project codebase ownership

* Realign code import ownership surface (#412)

* Realign code import ownership surface

* Harden temp registry command audit test

---------

Signed-off-by: Dom <39115308+djm81@users.noreply.github.com>
Co-authored-by: Dominikus Nold <djm81@users.noreply.github.com>

* Update code review changes

* docs: update reward ledger OpenSpec tracking (#413)

Link the existing change issue, record TDD evidence, and align the OpenSpec artifacts with the bundle-owned DDL and paired worktree implementation flow.

Made-with: Cursor

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

* Track house-rules skill OpenSpec changes (#414)

Made-with: Cursor

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

* docs: Update change-proposal for code-review-07 (#415)

* Track house-rules skill OpenSpec changes

Made-with: Cursor

* Cursor: Apply local changes for cloud agent

---------

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

* Finalize code-review-07 status

* Finalize code-review-08 status

* feat: apply code-review-09 pre-commit integration

* fix: fall back when cached hatch test env is broken

* fix: avoid hatch env for coverage xml export

* fix: install type-check and lint tools directly in CI

* fix: install pytest fallback deps in test job

* fix: install pytest-cov for test fallback path

* Finalize code-review-09 status

* [Change] Align core docs with modules site ownership (#419)

* Align core docs with modules site ownership

* Close docs portal change PR task

---------

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

* fix: harden docs parity URL assertions

* Archive finished changes and update specs

* docs: fix command syntax parity after lean-core/modules split (v0.42.2) (#421)

Replace all stale CLI syntax families in authored docs with current
shipped commands. Adds docs parity tests that guard against regression.

Removed syntax families corrected:
- specfact project plan → project devops-flow / project snapshot / govern enforce sdd
- project import from-bridge → code import from-bridge
- specfact backlog policy → backlog verify-readiness / backlog refine
- specfact spec contract → spec validate / spec generate-tests / spec mock
- specfact spec sdd constitution → govern enforce sdd [BUNDLE]
- spec generate <prompt-subcommands> → AI IDE skills or removed

Updated docs: README.md, docs/index.md, docs/README.md,
docs/reference/commands.md (+4 reference docs),
docs/getting-started/ (4 files), docs/guides/ (21 files),
docs/examples/ (5 files), docs/prompts/ (2 files).

Added 11 new docs parity tests in test_release_docs_parity.py:
- 7 tests asserting removed syntax families stay absent
- 4 tests asserting current command families remain documented

Co-authored-by: Dominikus Nold <djm81@users.noreply.github.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>

* Archive finished changes and update specs

- Archive docs-03-command-syntax-parity (2026-03-18)
- Sync delta specs: cli-output + documentation-alignment updated with
  post-split command-surface alignment requirements and scenarios
- Update CHANGE_ORDER.md: mark docs-03 as archived

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

* Update evidence

* Potential fix for pull request finding 'Unused global variable'

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>

* docs: align core docs ownership and parity (#424)

* docs: fix command syntax parity after lean-core/modules split (v0.42.2)

Replace all stale CLI syntax families in authored docs with current
shipped commands. Adds docs parity tests that guard against regression.

Removed syntax families corrected:
- specfact project plan → project devops-flow / project snapshot / govern enforce sdd
- project import from-bridge → code import from-bridge
- specfact backlog policy → backlog verify-readiness / backlog refine
- specfact spec contract → spec validate / spec generate-tests / spec mock
- specfact spec sdd constitution → govern enforce sdd [BUNDLE]
- spec generate <prompt-subcommands> → AI IDE skills or removed

Updated docs: README.md, docs/index.md, docs/README.md,
docs/reference/commands.md (+4 reference docs),
docs/getting-started/ (4 files), docs/guides/ (21 files),
docs/examples/ (5 files), docs/prompts/ (2 files).

Added 11 new docs parity tests in test_release_docs_parity.py:
- 7 tests asserting removed syntax families stay absent
- 4 tests asserting current command families remain documented

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

* docs: align core docs ownership and parity

---------

Co-authored-by: Dominikus Nold <djm81@users.noreply.github.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>

* docs: fix quickstart install guidance

* docs: remove generated project plan docs

* Add code-review change

* fix: preserve native backlog import payloads (#429)

* fix: preserve native backlog import payloads

* fix: preserve imported proposal ids on reimport

---------

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

* fix: add docs review workflow and repair docs links (#428)

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

* fix: keep imported change ids stable across title changes (#431)

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

* fix: remove conflicting pages file copies

* Add docs sync changs

* docs: update openspec clean-code planning

* Update change status

* fix: code-review-zero-findings dogfood remediation (v0.42.3) (#435)

* fix: continue code review remediation and align module signing

* fix: complete code-review-zero-findings dogfood remediation (v0.42.3)

Eliminates full-scope code review findings (types, Radon CC, contracts, lint) and records OpenSpec change code-review-zero-findings with tests and CHANGELOG. Module manifests may need re-signing before merge per project policy.

Made-with: Cursor

* chore: re-sign bundled modules after content changes

* fix: resolve review follow-up regressions

* fix: run ci smart-test directly

* fix: restore ci test progress output

* fix: stabilize command audit ci test

---------

Signed-off-by: Dom <39115308+djm81@users.noreply.github.com>
Co-authored-by: Dominikus Nold <djm81@users.noreply.github.com>

* Add docs refactoring changes

* Add bug change tracking for encoding and resources

* docs: restructure core site IA to 6-section progressive nav (#442)

* docs: restructure core site IA from 5 flat sections to 6 progressive sections

Restructure docs.specfact.io from a flat 5-section sidebar to a 6-section
progressive navigation: Getting Started, Core CLI, Module System, Architecture,
Reference, Migration.

- Create docs/core-cli/, docs/module-system/, docs/migration/ directories
- Move 12 files to correct new sections with jekyll-redirect-from entries
- Write 3 new CLI reference pages: init.md, module.md, upgrade.md
- Replace first-steps.md with focused 5-minute quickstart
- Rewrite index.md as portal landing with core vs modules delineation
- Rewrite getting-started/README.md to link module tutorials to modules site
- Update sidebar navigation in _layouts/default.html
- Delete 6 obsolete files (competitive-analysis, ux-features, common-tasks,
  workflows, testing-terminal-output, guides/README)
- Add documentation-alignment delta spec for core-only focus policy

Implements: #438
OpenSpec: docs-05-core-site-ia-restructure

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

* docs: fix broken internal links after IA restructure

Update all relative links across 40 files to point to new file locations:
- ../reference/architecture.md → ../architecture/overview.md
- ../reference/debug-logging.md → ../core-cli/debug-logging.md
- ../reference/modes.md → ../core-cli/modes.md
- guides/ sibling links → ../module-system/ or ../migration/
- module-system/ back-links → ../guides/
- Remove links to deleted files (common-tasks, workflows)
- first-steps.md → quickstart.md

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

* fix: update test path for moved bootstrap-checklist and fix remaining broken links

- Update test_module_bootstrap_checklist_uses_current_bundle_ids to use
  new path docs/module-system/bootstrap-checklist.md
- Fix 2 remaining command-chains.md anchor links in migration-guide.md

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

---------

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

* fix: harden cross-platform runtime and IDE resource discovery (#443)

* fix: harden cross-platform runtime and IDE resource discovery

* fix: bump patch version to 0.42.4

* fix: restore init lifecycle compatibility

---------

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

* fix: resolve review type-safety findings

* Improve clarity and scope of ide prompt change

* feat(init): IDE prompt source catalog, --prompts, namespaced exports (#445)

* feat(init): IDE prompt source catalog, --prompts, namespaced exports

Implement init-ide-prompt-source-selection: discover core + module prompts,
default export all sources, interactive multi-select, non-interactive --prompts,
source-namespaced IDE paths. Fix project module roots to use metadata source
project. Extend discovery roots with user/marketplace. Update startup_checks
for nested exports. Bump init module to 0.1.14 with signed manifest.

Made-with: Cursor

* fix(init): scope VS Code prompt recommendations to exported sources

- Pass prompts_by_source into create_vscode_settings from copy_prompts_by_source_to_ide
- Strip prior .github/prompts/* recommendations on selective export to avoid stale paths
- Extract helpers for catalog paths and fallbacks; keep code review clean

Made-with: Cursor

---------

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

* fix tests

* release: bump version to 0.42.5 and update CHANGELOG

- Remove [Unreleased] sections; fold historical arch-08 notes under [0.34.0]
- Document init ide catalog, VS Code recommendations, integration test isolation

Made-with: Cursor

* Fix review findings

* feat(init): selective IDE prompt export cleanup and VS Code recommendation strip

- Prune stale exports and unselected catalog segments in copy_prompts_by_source_to_ide
- Strip only specfact*.prompt.md under .github/prompts/ when merging VS Code settings
- Tighten e2e missing-templates assertions to match CLI output
- Add unit tests for prompt path helper and selective export behavior

Made-with: Cursor

* Fix review findings

* Add missing import

* Bump patch version and changelog

* Fix failed tests

* Fix review findings

* docs: core vs modules URL contract and OpenSpec alignment (#448)

* docs: add core vs modules URL contract and OpenSpec alignment

Document cross-site permalink rules in docs/reference, extend documentation-alignment
and module-docs-ownership specs, update docs-07 and openspec config, and note the
dependency on modules URL policy in CHANGE_ORDER.

Made-with: Cursor

* docs: convert core handoff pages to modules canonical links (docs-07)

- Replace 20 duplicate guides/tutorials with thin summaries, prerequisites,
  and links to modules.specfact.io per URL contract
- Add docs/reference/core-to-modules-handoff-urls.md mapping table
- Align OpenSpec documentation-alignment spec delta with ADDED Requirements
- Complete docs-07-core-handoff-conversion tasks checklist

Refs: #439
Made-with: Cursor

---------

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

* feat(docs-12): docs command validation and cross-site link checks (#449)

* feat(docs-12): docs command validation and cross-site link checks

- Add check-docs-commands (Typer CliRunner prefix + --help) and exclusions for migration/illustrative pages
- Add check-cross-site-links with robust URL extraction; warn-only in docs-validate and CI while live site may lag
- Extend docs-review: Hatch env, validation steps, pytest tests/unit/docs/
- Opt-in handoff map HTTP test (SPECFACT_RUN_HANDOFF_URL_CHECK=1)
- OpenSpec deltas, TDD_EVIDENCE, tasks complete; CHANGELOG [Unreleased]

Made-with: Cursor

* fix(docs-validate): strip leading global flags before command path

- Parse --mode/--input-format/--output-format + value, then other root flags
- Add test for specfact --mode copilot import from-code …
- Fix showcase docs: hatch run contract-test-exploration (not specfact)

Made-with: Cursor

* fix(docs-12): harden link/command validators and spec wording

- Capitalize Markdown in cross-site link spec requirement
- Cross-site: redirect-only HTTP success, UTF-8 read failures, URL delimiter/trim fixes
- Docs commands: catch Typer exceptions on --help, UTF-8 read failures
- Tests: shared loader for check-cross-site-links module

Made-with: Cursor

---------

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

* fix(scripts): CliRunner without mix_stderr for Click 8.3+ compatibility (#451)

Default CliRunner() merges stderr into stdout; read stdout only so
accessing result.stderr does not raise when streams are combined.

Made-with: Cursor

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

* fix: review gates (semgrep print, radon CC, icontract, questionary types) (#452)

* fix: satisfy review gates for docs scripts and module_lifecycle typing

- Replace print() with Rich Console in docs validation scripts (semgrep)
- Split HTTP URL checks and doc scans to reduce cyclomatic complexity (radon)
- Add icontract require/ensure on public helpers; use CliRunner() without mix_stderr
- Cast questionary API for basedpyright reportUnknownMemberType

Made-with: Cursor

* fix(scripts): address #452 review (HTTP helpers, icontract, CLI streams)

- _http_success_code: use int directly after None guard
- _response_status: safe getcode via getattr/callable
- check-docs: drop @require preconditions duplicated by beartype
- _cli_invoke_streams_text: merge stdout + stderr for not-installed detection

Made-with: Cursor

---------

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

* Add speckit adapter alignment change and update affected change specs

* feat(adapters): spec-kit v0.4.x adapter alignment (#454)

* feat(adapters): spec-kit v0.4.x adapter alignment — extensions, presets, hooks, version detection, 7-command presets

Update SpecKitAdapter, ToolCapabilities, BridgeConfig presets, and
SpecKitScanner for spec-kit v0.4.3 compatibility:

- ToolCapabilities: 5 new optional fields (extensions, extension_commands,
  presets, hook_events, detected_version_source)
- SpecKitScanner: scan_extensions(), scan_presets(), scan_hook_events()
  with .extensionignore support and defensive JSON parsing
- SpecKitAdapter: 3-tier version detection (CLI → heuristic → None),
  refactored get_capabilities() with reduced cyclomatic complexity
- BridgeConfig: all 3 speckit presets expanded from 2 to 7 command
  mappings (specify, plan, tasks, implement, constitution, clarify, analyze)
- 42 new tests across 4 test files (110 targeted, 2248 full suite pass)
- Docs updated: comparison matrix, journey guide, integrations overview,
  adapter development guide

Closes #453

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

* fix: address CodeRabbit review findings

- Use get_bridge_logger instead of logging.getLogger in speckit adapter
  and scanner (production command path convention)
- Narrow except Exception to except OSError in _load_extensionignore
- Simplify redundant base_path conditional in get_capabilities
- Use SimpleNamespace instead of dynamic type() in tests
- Add subprocess.TimeoutExpired and OSError exception tests for CLI
  version detection
- Fix duplicate MD heading in bridge-adapter spec
- Add blank lines after markdown headings in proposal (MD022)

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

---------

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

* chore: bump version to 0.43.0 for spec-kit v0.4.x alignment (#455)

* chore: bump version to 0.43.0 and add changelog entry

Minor version bump for spec-kit v0.4.x adapter alignment feature.
Syncs version across pyproject.toml, setup.py, and __init__.py.
Adds changelog entry documenting new capabilities.

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

* Sync deps and fix changelog

* Sync deps and fix changelog

---------

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

* fix(packaging): remove workflow prompts from core wheel (packaging-02 #441, v0.43.1) (#456)

* fix(packaging): drop duplicate workflow prompts from core wheel (packaging-02 3.5)

Remove resources/prompts from wheel force-include and repo tree; canonical
copies remain in specfact-cli-modules bundles. Align startup IDE drift
checks and init template resolution with discover_prompt_template_files.
Bump to 0.43.1; re-sign init module 0.1.19. Update CHANGELOG, docs, OpenSpec.

Made-with: Cursor

* fix: address PR review (changelog, TDD evidence, startup checks, tests)

- Changelog 0.43.1 header uses Unreleased until release tag
- TDD_EVIDENCE: pre-fail block for Task 3.5 before passing verification
- TemplateCheckResult.sources_available; skip last_checked_version bump when no
  discoverable prompts; drift missing only when source exists
- Integration _fake_discover respects include_package_fallback
- test_validate_all_prompts uses tmp_path; re-enable file in default test run
- test_print_startup_checks_version_update_no_type uses stale version timestamp

Made-with: Cursor

* fix: address follow-up PR review (startup metadata, tests)

- Use ide_dir directly in TemplateCheckResult when IDE folder exists
- Set last_checked_version only after successful template-source checks
- Integration test: assert discover_prompt_template_files fallback + stable startup patches
- validate_all_prompts test: valid vs invalid specfact.*.md outcomes

Made-with: Cursor

---------

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

* Potential fix for pull request finding 'Empty except'

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>

* Fix changelog version

* docs: unify core docs portal UX (#459)

* docs: unify core docs portal UX

* Fix docs-13 core review findings

* Address docs-13 PR review feedback

* Address follow-up docs review feedback

---------

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

* Harden docs home URL test assertion

* feat: doc frontmatter validation, v0.43.2 review JSON gate, and pre-commit review UX (#463)

* chore(release): v0.43.2 pre-commit review JSON + OpenSpec dogfood rules

- Pre-commit gate writes ReviewReport JSON to .specfact/code-review.json
- openspec/config.yaml: require fresh review JSON and remediate findings
- Docs and unit tests updated

Made-with: Cursor

* fix: CodeRabbit — changelog, openspec TDD_EVIDENCE freshness, review hook timeout

- CHANGELOG 0.43.2: expanded entries, line wrap
- openspec/config.yaml: exclude TDD_EVIDENCE.md from review JSON staleness
- pre_commit_code_review: timeout 300s, TimeoutExpired handling
- tests: exact cwd, timeout assertion and timeout failure test

Made-with: Cursor

* Add code review to pre-commit and frontmatter docs validation

* Improve pre-commit script output

* Improve specfact code review findings output

* Fix review findings

* Improve pre-commit hook output

* Enable dev branch code review

* Update code review hook

* Fix contract review findings

* Fix review findings

* Fix review warnings

* feat: doc frontmatter hardening and code-review gate fixes

- Typer CLI for doc-frontmatter-check; safer owner resolution (split helpers for CC)
- Strict exempt handling; pre-commit hook matches USAGE-FAQ.md; review script JSON typing
- Shared test fixtures/types; integration/unit test updates; OpenSpec tasks and TDD evidence
- Changelog: pre-commit code-review-gate UX note

Made-with: Cursor

* Fix test failures and add docs review to github action runner

* Fix test failure due to UTF8 encoding

* Apply review findings

* Optimize pr orchestrator runtime

* Optimize pr orchestrator runtime

* Fix caching on pr-orchestrator

---------

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

* docs: archive doc-frontmatter-schema openspec change

* Apply suggestions from code review

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>

* fix: restore protocol stubs for type checking

* Add frontamtter check

* fix: harden protocol stubs for code quality

* Add PR test hardening change

* fix: remediate review findings and harden review gates

* fix: rebuild review report model for pydantic

* Add story and onboarding change

* Update change tracking

* Improve scope for ci/cd requirements

* docs: sharpen first-contact story and onboarding (#467)

* 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 review blockers and bump patch version

* test: harden modules docs url assertions

* fix: harden trustworthy green checks (#469)

* 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>

* fix: address CodeRabbit review findings for ci-02 (#471)

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

* fix: propagate docker actionlint exit code instead of masking failures (#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>

* fix: assert hook id stability and cd to repo root for local actionlint (#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>

* feat: clean-code-01-principle-gates — 7-principle charter gates, v0.44.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>

* feat: archive completed openspec changes and update main specs

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>

* Add new user onboarding change

* docs & tooling: new user onboarding + smart-test and pre-commit review 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>

* fix: code-review gate (Typer params), typer<0.24 vs semgrep, module upgrade 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 (#480)

* 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>

* archived implemented changes

* Archive and remove outdated changes

* Split and refactor change proposals between both repos

* Archive alignment change

* Add changes and github hierarchy scripts

* feat: add GitHub hierarchy cache sync (#492)

* feat: add github hierarchy cache sync

* Backport improvements from modules scripts

* Fix review findings

* Make github sync script executable

---------

Signed-off-by: Dom <39115308+djm81@users.noreply.github.com>
Co-authored-by: Dominikus Nold <djm81@users.noreply.github.com>

* [codex] Compact agent governance loading (#493)

* feat: compact agent governance loading

* docs: mark governance PR task complete

* docs: sync governance-03 github issue metadata

* fix: restore dev branch governance block

* Apply review findings

* docs: add sibling internal wiki context for OpenSpec design

Point AGENTS.md, Claude/Copilot/Cursor surfaces, and the OpenSpec rule at
docs/agent-rules/40-openspec-and-tdd.md to read-only wiki paths (hot.md,
graph.md, concepts) via absolute paths when specfact-cli-internal is present.
Update INDEX applicability notes and extend governance tests.

Made-with: Cursor

---------

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

* Archived github hierarchy change

* Update rules for openspec archive

* Potential fix for pull request finding 'Unused local variable'

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>

* Add wiki up…
djm81 added a commit that referenced this pull request Apr 13, 2026
* Archive delta validation change and update specs

* Update patch version

* Potential fix for pull request finding 'Empty except'

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>

* apply review fixes

* Add cli validation changes

* feat: launch central module marketplace lifecycle (#287)

* feat: launch module marketplace lifecycle and trust-first UX

Deliver the central module marketplace workflow with source-aware discovery, lifecycle management, and trust/publisher visibility so users can safely manage official vs local modules. This also aligns docs and OpenSpec artifacts with the shipped behavior, including command introspection and clearer install/uninstall guidance.

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

* fix: respect explicit discovery roots in module tests

Disable implicit legacy/workspace roots when explicit roots are passed to module discovery so isolated test roots are honored and deterministic.

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

* fix: enforce safe module extraction and upgrade reinstall

---------

Co-authored-by: Dominikus Nold <djm81@users.noreply.github.com>
Co-authored-by: Cursor <cursoragent@cursor.com>

* fix: resolve bundle-mapper review defects with TDD evidence (#290)

* 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>

* fix: address bundle-mapper review defects with tdd evidence

* test: make specmatic integration tests plugin-agnostic

---------

Signed-off-by: Dom <39115308+djm81@users.noreply.github.com>
Co-authored-by: Dominikus Nold <djm81@users.noreply.github.com>
Co-authored-by: Cursor <cursoragent@cursor.com>

* feat:Add architecture review docs and findings to mitigate

* feat(backlog): add backlog add for interactive issue creation (#289)

* feat: add interactive backlog issue creation flow

* feat(backlog): add interactive issue creation and mapping setup

* fix: align backlog protocol test fakes and module manifest versions

* Fix type error

* fix(backlog): persist ado sprint and normalize github create id

* fix(backlog-core): address review findings for add/config/github

---------

Signed-off-by: Dom <39115308+djm81@users.noreply.github.com>
Co-authored-by: Dominikus Nold <djm81@users.noreply.github.com>

* chore(openspec): archive completed changes and align architecture docs (#292)

* chore(openspec): archive completed changes and align architecture docs

* docs(architecture): refresh discrepancies report after arch-08 remediation

---------

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

* docs(change): Archive architecture discrepancy remediation change

* fix(codeql): preserve module contract marker and document fallback excepts

* fix(backlog): restore installed-runtime discovery parity and add backlog prompt (#294)

* fix(backlog): restore installed runtime discovery and add backlog prompt

* Archive bugfix change

---------

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

* fix(version): sync manifests to 0.36.1 and archive backlog-core-04 (#297)

* fix(backlog): restore installed runtime discovery and add backlog prompt

* Archive bugfix change

* fix(version): sync built-in module manifests to 0.36.1

---------

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

* fix: harden module lifecycle bootstrap and signing workflows (#299)

* fix: harden module lifecycle bootstrap and signing workflows

* fix: stabilize module signature hashing across environments

* fix: stabilize bundle module signature verification in CI

---------

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

* test: simplify monkeypatch callables in module_security tests

* Fix duplicate with statement

* chore(release): bump to v0.37.1 and harden signature gates

* test: fix init command regression assertions

* fix: release v0.37.2 with runtime crypto deps

* fix: address signature-backend warning and module version drift

* fix: use hatch build in PyPI publish workflow script (#304)

* fix: resolve startup module freshness home path dynamically (#306)

* fix: harden module signing workflow and reduce startup log noise

* test: align module migration compatibility with decoupled module versions

* fix: fail fast on invalid base ref in changed-only module signing

* fix: stabilize module precedence and backlog github mapping flow

* fix(module-registry): persist disables and correct bundled availability

* Re-sign module registry and fix / ignore local temp artifacts

* bump module registry version to 0.1.3

* fix(registry): restore protocol reporting logs in debug mode

* fix(backlog): harden refine writeback, prompts, and any-filter semantics (#311)

* fix(backlog): harden refine writeback, prompts, and daily any filters

* fix(github): default story type fallback to feature

* Fix format

* Fix codex review findings

* bump and sign changed modules

* chore(hooks): enforce module signature verification in pre-commit

* chore(hooks): add markdownlint to pre-commit checks

---------

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

* fix(hooks,ado): correct format gate and enforce iteration on direct
  id lookup

* Apply review findings and fix tests

* Pin virtualenv < 21 to avoid incaopatibility failure

* fix: finalize backlog-core-06 ado comment API versioning (#314)

* fix(backlog): harden refine writeback, prompts, and daily any filters

* fix(github): default story type fallback to feature

* Fix format

* Fix codex review findings

* bump and sign changed modules

* chore(hooks): enforce module signature verification in pre-commit

* chore(hooks): add markdownlint to pre-commit checks

* fix: finalize backlog-core-06 ado comment api versioning and ci hatch pins

* fix: address review findings for formatter safety and ado metric patch guards

* docs(openspec): update CHANGE_ORDER status tracking

* fix(ado): apply iteration filter for direct issue_id lookup

---------

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

* feat: Advanced marketplace features (marketplace-02) - dependency resolution, aliases, custom registries, publishing (#318)

* feat: advanced marketplace features (marketplace-02) - dependency resolution, aliases, custom registries, namespace enforcement, publishing

- dependency_resolver: resolve_dependencies(), --skip-deps, --force on install
- alias_manager: alias create/list/remove (no top-level alias commands)
- custom_registries: add-registry, list-registries, remove-registry; fetch_all_indexes; search Registry column
- module_installer: namespace/name enforcement, collision detection
- scripts/publish-module.py + .github/workflows/publish-modules.yml (optional signing)
- docs: publishing-modules, custom-registries, dependency-resolution; updated installing-modules, module-marketplace, commands
- version 0.38.0, CHANGELOG

Made-with: Cursor

* docs(openspec): defer 6.2.4 and 6.2.5 (index update/PR, workflow test) to later

Made-with: Cursor

* Add follow-up change proposals for marketplace

* Fix codex review findings

---------

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

* fix: complete marketplace publish registry PR flow and bump (#320)

0.38.1

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

* fix: update init ide hint and repair publish workflow
  condition

* feat(backlog): normalize daily summarize Markdown output (#323)

* feat(backlog): summarize Markdown normalization and TTY/CI rendering

* chore(openspec): drop implementation snapshot from change

* Update title

---------

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

* Update version

* Add github skills

* Add new marketplace changes

* feat(cli): category groups and flat shims using real module Typer (#331)

* feat(cli): category groups and flat shims using real module Typer

- Add category groups (code, backlog, project, spec, govern) with flatten same-name member
- Sort commands under backlog/project groups A–Z
- Fix flat shims to expose real module Typer so 'specfact sync bridge' and 'specfact plan update-idea' work
- Add first-run init, module grouping, OpenSpec change for 0.40.x remove-flat-shims
- Bump version to 0.39.0, CHANGELOG and OpenSpec updates

Made-with: Cursor

* Fix signature

* fix: resolve module grouping regressions and stabilize CI
  tests

* fix: keep uncategorized modules flat during grouped registration

---------

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

* Update docs regarding module migration change

* feat: module-migration-02 bundle extraction (#332)

* docs: add module-migration-02-bundle-extraction to CHANGE_ORDER.md

* feat: implement module-migration-02 bundle extraction

* fix(ci): checkout module bundles repo for test jobs

* Fix test failures

* fix(modules): load local bundle sources in compatibility aliases

* fix: run worktree policy code in tests/CI and silence reexport deprecation

- Prefer src/<name>/main.py over app.py when SPECFACT_REPO_ROOT is set so
  policy init uses worktree templates.py (SPECFACT_POLICY_TEMPLATES_DIR).
- Policy engine module-package.yaml: version 0.1.5 and re-signed checksum.
- conftest: set SPECFACT_REPO_ROOT, SPECFACT_POLICY_TEMPLATES_DIR; add
  bundle package roots when specfact-cli-modules present.
- Policy engine integration tests: rely on conftest env, clear registry
  and re-register before invoke so loader uses worktree.
- test_reexport_shims: filter deprecation warning for legacy analyze import.

Made-with: Cursor

* fix: defer specfact_backlog import in shims so CI can register bridges

- backlog and policy_engine __init__.py: import specfact_backlog only in
  __getattr__ (cached), not at module load. Allows loading .src.adapters.*
  for bridge registration without requiring specfact_backlog installed.
- Re-sign backlog and policy_engine module-package.yaml after init changes.
- openspec: update module-migration-02 tasks.md.

Made-with: Cursor

* fix: defer bundle import in all module shims to fix CI collection errors

- Apply deferred import (only in __getattr__, cached) to analyze, contract,
  drift, enforce, generate, import_cmd, migrate, patch_mode, plan, project,
  repro, sdd, spec, sync, validate. Matches backlog and policy_engine.
- Prevents ImportError when tests import specfact_cli.modules.<name>.src.*
  without specfact_backlog/specfact_govern/specfact_project/specfact_spec
  installed (e.g. CI). Fixes 78 collection errors.
- Re-sign all affected module-package.yaml manifests.

Made-with: Cursor

* fix(ci): include module shims in hatch cache key so CI uses current code

* feat(modules): registry descriptions, --bump-version for publish, tasks and format fixes

- Add description to registry index entries in publish-module.py (module search)
- Add --bump-version patch|minor|major for bundle re-publish in publish-module.py
- Format fixes in validate-modules-repo-sync.py (SIM108, B007)
- Mark completed tasks in module-migration-02-bundle-extraction tasks.md
- Update test for publish_bundle(bump_version=) signature

Made-with: Cursor

* Add missing migration tasks to the open change to completely isolate modules into specfact-cli-modules repo.

* Add gap analysis and update changes

* Update follow-up changes to avoid ambiguities and overlaps

* docs: complete migration-02 section-18 parity and 17.8 gate evidence

* docs: mark migration-02 import-categorization commit checkpoint done

* Update change constraints and blockers for module migration

* docs: add migration-05 issue #334 and complete task 17.10.4

* Update change constraints and blockers for module migration

---------

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

* Implement blockers to prepare for module-migration-03 change. (#336)

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

* feat: module-migration-03 core slimming closeout and registry fixes (#317) (#341)

* Prepare module-migration-03 removal of old built-in modules

* feat(core): delete specfact-project module source from core (migration-03)

Made-with: Cursor

* feat(core): delete specfact-backlog module source from core (migration-03)

Made-with: Cursor

* feat(core): delete specfact-codebase module source from core (migration-03)

Made-with: Cursor

* feat(core): delete specfact-spec module source from core (migration-03)

Made-with: Cursor

* feat(core): delete specfact-govern module source from core (migration-03)

Made-with: Cursor

* chore(tests): skip tests for removed modules when source absent (migration-03)

Add pytest.importorskip() for backlog, plan, sync, enforce, generate,
patch_mode, import_cmd so tests are skipped when module source was
removed from core. Preserves tests for later move to specfact-cli-modules.
Update tasks.md and TDD_EVIDENCE.md for Task 10 completion.

Made-with: Cursor

* feat(bootstrap): remove flat shims and non-core module registrations (migration-03)

- Remove _register_category_groups_and_shims (unconditional category/shim registration).
- Trim CORE_MODULE_ORDER to 4 core: init, auth, module-registry, upgrade.
- Add @beartype to _mount_installed_category_groups.
- Category groups and flat shims only for installed bundles via _mount_installed_category_groups.

Made-with: Cursor

* docs(openspec): mark Task 11.4 done in tasks.md

Made-with: Cursor

* feat(cli): conditional category group mount from installed bundles (migration-03)

- Add _RootCLIGroup (extends ProgressiveDisclosureGroup) with resolve_command
  override: unknown commands in KNOWN_BUNDLE_GROUP_OR_SHIM_NAMES show
  actionable error (not installed + specfact init / specfact module install).
- Root app uses cls=_RootCLIGroup. Main help docstring adds init/module
  install hint for workflow bundles.

Made-with: Cursor

* docs(openspec): mark Task 12.4 done in tasks.md

Made-with: Cursor

* feat(init): enforce mandatory bundle selection and profile presets (migration-03)

* Add module removal core tests

* docs(openspec): record Task 14 module signing gate (migration-03)

* feat: complete module-migration-03 core slimming and
  follow-up alignment (#317)

* Fix format error

* fix: handle detached HEAD registry branch selection and
  stabilize migration-03 CI tests

---------

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

* Finalize module-migration-02 change

* docs(backlog-auth): update auth docs and OpenSpec task status (#342)

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

* chore(openspec): archive completed changes and sync main specs

* docs(openspec): prefix module migration proposal titles with IDs

* Add bug change for ado required fields setting and update change order

* Update change order

* feat(core): finalize migration-03 auth removal and 3-core slim package (#317) (#343)

* Prepare module-migration-03 removal of old built-in modules

* feat(core): delete specfact-project module source from core (migration-03)

Made-with: Cursor

* feat(core): delete specfact-backlog module source from core (migration-03)

Made-with: Cursor

* feat(core): delete specfact-codebase module source from core (migration-03)

Made-with: Cursor

* feat(core): delete specfact-spec module source from core (migration-03)

Made-with: Cursor

* feat(core): delete specfact-govern module source from core (migration-03)

Made-with: Cursor

* chore(tests): skip tests for removed modules when source absent (migration-03)

Add pytest.importorskip() for backlog, plan, sync, enforce, generate,
patch_mode, import_cmd so tests are skipped when module source was
removed from core. Preserves tests for later move to specfact-cli-modules.
Update tasks.md and TDD_EVIDENCE.md for Task 10 completion.

Made-with: Cursor

* feat(bootstrap): remove flat shims and non-core module registrations (migration-03)

- Remove _register_category_groups_and_shims (unconditional category/shim registration).
- Trim CORE_MODULE_ORDER to 4 core: init, auth, module-registry, upgrade.
- Add @beartype to _mount_installed_category_groups.
- Category groups and flat shims only for installed bundles via _mount_installed_category_groups.

Made-with: Cursor

* docs(openspec): mark Task 11.4 done in tasks.md

Made-with: Cursor

* feat(cli): conditional category group mount from installed bundles (migration-03)

- Add _RootCLIGroup (extends ProgressiveDisclosureGroup) with resolve_command
  override: unknown commands in KNOWN_BUNDLE_GROUP_OR_SHIM_NAMES show
  actionable error (not installed + specfact init / specfact module install).
- Root app uses cls=_RootCLIGroup. Main help docstring adds init/module
  install hint for workflow bundles.

Made-with: Cursor

* docs(openspec): mark Task 12.4 done in tasks.md

Made-with: Cursor

* feat(init): enforce mandatory bundle selection and profile presets (migration-03)

* Add module removal core tests

* docs(openspec): record Task 14 module signing gate (migration-03)

* feat: complete module-migration-03 core slimming and
  follow-up alignment (#317)

* Fix format error

* fix: handle detached HEAD registry branch selection and
  stabilize migration-03 CI tests

* Prepare module-migration-03 removal of old built-in modules

* Prepare module-migration-03 removal of old built-in modules

* chore(tests): skip tests for removed modules when source absent (migration-03)

Add pytest.importorskip() for backlog, plan, sync, enforce, generate,
patch_mode, import_cmd so tests are skipped when module source was
removed from core. Preserves tests for later move to specfact-cli-modules.
Update tasks.md and TDD_EVIDENCE.md for Task 10 completion.

Made-with: Cursor

* feat(bootstrap): remove flat shims and non-core module registrations (migration-03)

- Remove _register_category_groups_and_shims (unconditional category/shim registration).
- Trim CORE_MODULE_ORDER to 4 core: init, auth, module-registry, upgrade.
- Add @beartype to _mount_installed_category_groups.
- Category groups and flat shims only for installed bundles via _mount_installed_category_groups.

Made-with: Cursor

* docs(openspec): mark Task 11.4 done in tasks.md

Made-with: Cursor

* feat(cli): conditional category group mount from installed bundles (migration-03)

- Add _RootCLIGroup (extends ProgressiveDisclosureGroup) with resolve_command
  override: unknown commands in KNOWN_BUNDLE_GROUP_OR_SHIM_NAMES show
  actionable error (not installed + specfact init / specfact module install).
- Root app uses cls=_RootCLIGroup. Main help docstring adds init/module
  install hint for workflow bundles.

Made-with: Cursor

* docs(openspec): mark Task 12.4 done in tasks.md

Made-with: Cursor

* feat(init): enforce mandatory bundle selection and profile presets (migration-03)

* Add module removal core tests

* docs(openspec): record Task 14 module signing gate (migration-03)

* feat: complete module-migration-03 core slimming and
  follow-up alignment (#317)

* Fix format error

* fix: handle detached HEAD registry branch selection and
  stabilize migration-03 CI tests

* feat(core): remove auth module from core and route auth via backlog (migration-03)

* docs(openspec): update migration-03 PR status and tracking

* docs(openspec): finalize migration-03 checklist and defer non-blocking gates

* Fix remaining auth findings and dependency in core cli

---------

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

* Archive module-migration-03 change

* feat: remove flat command shims (category-only CLI) (#344)

* feat: remove flat command shims from grouped registry

* Finalize change module-migration-04 implementation

---------

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

* Archived module-migration-04 and updated specs

* docs(openspec): finalize module-migration-05 tracking after modules PR merge (#345)

* Implement blockers to prepare for module-migration-03 change.

* Update migration change

* docs(openspec): close migration-05 PR tracking and change order

---------

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

* Archive module-migration-05 change and update specs

* test(migration-06): move legacy sync tests out of core (#346)

* feat(migration-06): core decoupling cleanup - boundary tests and inventory

- Add test_core_does_not_import_from_bundle_packages boundary regression test
- Update spec with ownership boundary and migration acceptance criteria
- Add CORE_DECOUPLING_INVENTORY.md (keep/move/interface classification)
- Record TDD evidence in TDD_EVIDENCE.md
- Update docs/reference/architecture.md with core vs modules-repo boundary
- Update openspec/CHANGE_ORDER.md status

No move candidates identified; core already decoupled from bundle packages.
Boundary test prevents future core->bundle coupling.

Refs #338

Made-with: Cursor

* chore(migration-06): mark all tasks complete

Made-with: Cursor

* feat(migration-06): extend scope - migrate package-specific artifacts per #338

- Add MIGRATION_REMOVAL_PLAN.md with phased removal of MIGRATE-tier code
- Add test_core_modules_do_not_import_migrate_tier boundary test
- Remove templates.bridge_templates (dead code; only tests used it)
- Remove tests/unit/templates/test_bridge_templates.py
- Update CORE_DECOUPLING_INVENTORY.md with removal status
- Update spec with MIGRATE-tier enforcement and package-specific removal

Phase 1 complete. Further MIGRATE-tier removal documented in plan.
Refs #338

Made-with: Cursor

* test(migration-06): move legacy sync tests out of core

---------

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

* Archived module-migration-06 change and updated specs

* test: module-migration-07 core test ownership cleanup (#347)

* test: finalize module-migration-07 core test ownership cleanup

* docs: mark module-migration-07 quality and PR tasks complete

* test: fix CI isolation failures for project and persona merge

* test: narrow migrated skips and restore core registry guardrails

* test: stabilize core CI by refining skips and bootstrap checks

* test: fix remaining PR failures via targeted core filtering

* fix: harden module package checks against import-mode class identity

* test: stabilize core slimming integration assertions

---------

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

* Archived backlog-core-07 change and updated specs

* Update some docs and archive latest finished changes and specs

* Add docs update change

* feat: add agile-01-feature-hierarchy change and update CHANGE_ORDER.md (#376)

- Create openspec/changes/agile-01-feature-hierarchy/ with proposal.md and tasks.md
- Add Epics #256 (Architecture Layer Integration), #257 (AI IDE Integration),
  and #258 (Integration Governance and Dogfooding) to CHANGE_ORDER.md parent issues table
- 25 GitHub Feature issues created (#351-#375), linked to their parent Epics
- Feature label created; issue #185 closed (ceremony-cockpit-01, archived 2026-02-18)

Co-authored-by: Dominikus Nold <djm81@users.noreply.github.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>

* docs: align core docs and sync pending changes (#377)

* docs: align core docs and sync pending changes

* fix: preserve partial staging in markdown autofix hook

---------

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

* fix: stabilize release test suite after module migration

* Update module

* Fix module install

* Fix module install

* Fix failed tests

* Fix marketplace client regression

* Fix install regression for specfact-cli (#380)

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

* Add changes to improve runtime validation and backlog module remaining migration to module

* refactor: remove backlog ownership from core cli (#384)

* refactor: remove backlog ownership from core cli

* fix: align CI marketplace validation paths

* test: stabilize command audit validation and add command-surface change

---------

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

* Add new command alignment change

* fix: finalize cli runtime validation regressions (#387)

* fix: finalize cli runtime validation regressions

* test: align satisfied dependency logging assertions

---------

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

* docs: archive cli-val-07 change

* Archive changes and update specs

* Add code-review change proposals

* test: align command surface regression coverage

* docs: add OpenSpec change for backlog-core commands migration (#390)

* feat: add OpenSpec change for backlog-core commands migration

Change: backlog-02-migrate-core-commands
- Add proposal, design, tasks, specs
- Add TDD_EVIDENCE.md with implementation progress
- GitHub Issue: #389

Rules applied: AGENTS.md Git Worktree Policy, TDD Hard Gate

Made-with: Cursor

* docs: update TDD_EVIDENCE and tasks for quality gate results

Made-with: Cursor

* docs: update TDD_EVIDENCE with test fix results

Made-with: Cursor

* docs: update TDD_EVIDENCE with all test fixes complete

Made-with: Cursor

---------

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

* fix: use POST instead of PATCH for ADO work item creation (#391)

* fix: use POST instead of PATCH for ADO work item creation

Azure DevOps API requires POST (not PATCH) for creating work items.

Also fixed category grouping to always register group commands.

Made-with: Cursor

* docs: add changelog entry for ADO POST fix

Made-with: Cursor

* chore: bump version to 0.40.4

Made-with: Cursor

* fix: update test mocks from PATCH to POST for ADO create

- Reverted incorrect unconditional _mount_installed_category_groups call

- Updated test_create_issue mocks to use requests.post instead of requests.patch

Made-with: Cursor

* test: skip category group test when bundles not installed

The test_bootstrap_with_category_grouping_disabled_registers_flat_commands test

expects bundles like specfact-codebase to be installed, but in CI they may not be.

Added pytest.skip() when 'code' command is not available.

Made-with: Cursor

---------

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

* docs: archive backlog-02-migrate-core-commands change

- Archived backlog-02-migrate-core-commands change

- Updated CHANGE_ORDER.md with implementation status

- Updated main specs with backlog-add, backlog-analyze-deps, backlog-delta, backlog-sync, backlog-verify-readiness

Made-with: Cursor

* feat: document code-review module scaffold (#410)

* feat: document code-review module scaffold

* chore: sync 0.41.0 release version artifacts

---------

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

* Add change for project codebase ownership

* Realign code import ownership surface (#412)

* Realign code import ownership surface

* Harden temp registry command audit test

---------

Signed-off-by: Dom <39115308+djm81@users.noreply.github.com>
Co-authored-by: Dominikus Nold <djm81@users.noreply.github.com>

* Update code review changes

* docs: update reward ledger OpenSpec tracking (#413)

Link the existing change issue, record TDD evidence, and align the OpenSpec artifacts with the bundle-owned DDL and paired worktree implementation flow.

Made-with: Cursor

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

* Track house-rules skill OpenSpec changes (#414)

Made-with: Cursor

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

* docs: Update change-proposal for code-review-07 (#415)

* Track house-rules skill OpenSpec changes

Made-with: Cursor

* Cursor: Apply local changes for cloud agent

---------

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

* Finalize code-review-07 status

* Finalize code-review-08 status

* feat: apply code-review-09 pre-commit integration

* fix: fall back when cached hatch test env is broken

* fix: avoid hatch env for coverage xml export

* fix: install type-check and lint tools directly in CI

* fix: install pytest fallback deps in test job

* fix: install pytest-cov for test fallback path

* Finalize code-review-09 status

* [Change] Align core docs with modules site ownership (#419)

* Align core docs with modules site ownership

* Close docs portal change PR task

---------

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

* fix: harden docs parity URL assertions

* Archive finished changes and update specs

* docs: fix command syntax parity after lean-core/modules split (v0.42.2) (#421)

Replace all stale CLI syntax families in authored docs with current
shipped commands. Adds docs parity tests that guard against regression.

Removed syntax families corrected:
- specfact project plan → project devops-flow / project snapshot / govern enforce sdd
- project import from-bridge → code import from-bridge
- specfact backlog policy → backlog verify-readiness / backlog refine
- specfact spec contract → spec validate / spec generate-tests / spec mock
- specfact spec sdd constitution → govern enforce sdd [BUNDLE]
- spec generate <prompt-subcommands> → AI IDE skills or removed

Updated docs: README.md, docs/index.md, docs/README.md,
docs/reference/commands.md (+4 reference docs),
docs/getting-started/ (4 files), docs/guides/ (21 files),
docs/examples/ (5 files), docs/prompts/ (2 files).

Added 11 new docs parity tests in test_release_docs_parity.py:
- 7 tests asserting removed syntax families stay absent
- 4 tests asserting current command families remain documented

Co-authored-by: Dominikus Nold <djm81@users.noreply.github.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>

* Archive finished changes and update specs

- Archive docs-03-command-syntax-parity (2026-03-18)
- Sync delta specs: cli-output + documentation-alignment updated with
  post-split command-surface alignment requirements and scenarios
- Update CHANGE_ORDER.md: mark docs-03 as archived

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

* Update evidence

* Potential fix for pull request finding 'Unused global variable'

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>

* docs: align core docs ownership and parity (#424)

* docs: fix command syntax parity after lean-core/modules split (v0.42.2)

Replace all stale CLI syntax families in authored docs with current
shipped commands. Adds docs parity tests that guard against regression.

Removed syntax families corrected:
- specfact project plan → project devops-flow / project snapshot / govern enforce sdd
- project import from-bridge → code import from-bridge
- specfact backlog policy → backlog verify-readiness / backlog refine
- specfact spec contract → spec validate / spec generate-tests / spec mock
- specfact spec sdd constitution → govern enforce sdd [BUNDLE]
- spec generate <prompt-subcommands> → AI IDE skills or removed

Updated docs: README.md, docs/index.md, docs/README.md,
docs/reference/commands.md (+4 reference docs),
docs/getting-started/ (4 files), docs/guides/ (21 files),
docs/examples/ (5 files), docs/prompts/ (2 files).

Added 11 new docs parity tests in test_release_docs_parity.py:
- 7 tests asserting removed syntax families stay absent
- 4 tests asserting current command families remain documented

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

* docs: align core docs ownership and parity

---------

Co-authored-by: Dominikus Nold <djm81@users.noreply.github.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>

* docs: fix quickstart install guidance

* docs: remove generated project plan docs

* Add code-review change

* fix: preserve native backlog import payloads (#429)

* fix: preserve native backlog import payloads

* fix: preserve imported proposal ids on reimport

---------

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

* fix: add docs review workflow and repair docs links (#428)

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

* fix: keep imported change ids stable across title changes (#431)

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

* fix: remove conflicting pages file copies

* Add docs sync changs

* docs: update openspec clean-code planning

* Update change status

* fix: code-review-zero-findings dogfood remediation (v0.42.3) (#435)

* fix: continue code review remediation and align module signing

* fix: complete code-review-zero-findings dogfood remediation (v0.42.3)

Eliminates full-scope code review findings (types, Radon CC, contracts, lint) and records OpenSpec change code-review-zero-findings with tests and CHANGELOG. Module manifests may need re-signing before merge per project policy.

Made-with: Cursor

* chore: re-sign bundled modules after content changes

* fix: resolve review follow-up regressions

* fix: run ci smart-test directly

* fix: restore ci test progress output

* fix: stabilize command audit ci test

---------

Signed-off-by: Dom <39115308+djm81@users.noreply.github.com>
Co-authored-by: Dominikus Nold <djm81@users.noreply.github.com>

* Add docs refactoring changes

* Add bug change tracking for encoding and resources

* docs: restructure core site IA to 6-section progressive nav (#442)

* docs: restructure core site IA from 5 flat sections to 6 progressive sections

Restructure docs.specfact.io from a flat 5-section sidebar to a 6-section
progressive navigation: Getting Started, Core CLI, Module System, Architecture,
Reference, Migration.

- Create docs/core-cli/, docs/module-system/, docs/migration/ directories
- Move 12 files to correct new sections with jekyll-redirect-from entries
- Write 3 new CLI reference pages: init.md, module.md, upgrade.md
- Replace first-steps.md with focused 5-minute quickstart
- Rewrite index.md as portal landing with core vs modules delineation
- Rewrite getting-started/README.md to link module tutorials to modules site
- Update sidebar navigation in _layouts/default.html
- Delete 6 obsolete files (competitive-analysis, ux-features, common-tasks,
  workflows, testing-terminal-output, guides/README)
- Add documentation-alignment delta spec for core-only focus policy

Implements: #438
OpenSpec: docs-05-core-site-ia-restructure

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

* docs: fix broken internal links after IA restructure

Update all relative links across 40 files to point to new file locations:
- ../reference/architecture.md → ../architecture/overview.md
- ../reference/debug-logging.md → ../core-cli/debug-logging.md
- ../reference/modes.md → ../core-cli/modes.md
- guides/ sibling links → ../module-system/ or ../migration/
- module-system/ back-links → ../guides/
- Remove links to deleted files (common-tasks, workflows)
- first-steps.md → quickstart.md

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

* fix: update test path for moved bootstrap-checklist and fix remaining broken links

- Update test_module_bootstrap_checklist_uses_current_bundle_ids to use
  new path docs/module-system/bootstrap-checklist.md
- Fix 2 remaining command-chains.md anchor links in migration-guide.md

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

---------

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

* fix: harden cross-platform runtime and IDE resource discovery (#443)

* fix: harden cross-platform runtime and IDE resource discovery

* fix: bump patch version to 0.42.4

* fix: restore init lifecycle compatibility

---------

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

* fix: resolve review type-safety findings

* Improve clarity and scope of ide prompt change

* feat(init): IDE prompt source catalog, --prompts, namespaced exports (#445)

* feat(init): IDE prompt source catalog, --prompts, namespaced exports

Implement init-ide-prompt-source-selection: discover core + module prompts,
default export all sources, interactive multi-select, non-interactive --prompts,
source-namespaced IDE paths. Fix project module roots to use metadata source
project. Extend discovery roots with user/marketplace. Update startup_checks
for nested exports. Bump init module to 0.1.14 with signed manifest.

Made-with: Cursor

* fix(init): scope VS Code prompt recommendations to exported sources

- Pass prompts_by_source into create_vscode_settings from copy_prompts_by_source_to_ide
- Strip prior .github/prompts/* recommendations on selective export to avoid stale paths
- Extract helpers for catalog paths and fallbacks; keep code review clean

Made-with: Cursor

---------

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

* fix tests

* release: bump version to 0.42.5 and update CHANGELOG

- Remove [Unreleased] sections; fold historical arch-08 notes under [0.34.0]
- Document init ide catalog, VS Code recommendations, integration test isolation

Made-with: Cursor

* Fix review findings

* feat(init): selective IDE prompt export cleanup and VS Code recommendation strip

- Prune stale exports and unselected catalog segments in copy_prompts_by_source_to_ide
- Strip only specfact*.prompt.md under .github/prompts/ when merging VS Code settings
- Tighten e2e missing-templates assertions to match CLI output
- Add unit tests for prompt path helper and selective export behavior

Made-with: Cursor

* Fix review findings

* Add missing import

* Bump patch version and changelog

* Fix failed tests

* Fix review findings

* docs: core vs modules URL contract and OpenSpec alignment (#448)

* docs: add core vs modules URL contract and OpenSpec alignment

Document cross-site permalink rules in docs/reference, extend documentation-alignment
and module-docs-ownership specs, update docs-07 and openspec config, and note the
dependency on modules URL policy in CHANGE_ORDER.

Made-with: Cursor

* docs: convert core handoff pages to modules canonical links (docs-07)

- Replace 20 duplicate guides/tutorials with thin summaries, prerequisites,
  and links to modules.specfact.io per URL contract
- Add docs/reference/core-to-modules-handoff-urls.md mapping table
- Align OpenSpec documentation-alignment spec delta with ADDED Requirements
- Complete docs-07-core-handoff-conversion tasks checklist

Refs: #439
Made-with: Cursor

---------

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

* feat(docs-12): docs command validation and cross-site link checks (#449)

* feat(docs-12): docs command validation and cross-site link checks

- Add check-docs-commands (Typer CliRunner prefix + --help) and exclusions for migration/illustrative pages
- Add check-cross-site-links with robust URL extraction; warn-only in docs-validate and CI while live site may lag
- Extend docs-review: Hatch env, validation steps, pytest tests/unit/docs/
- Opt-in handoff map HTTP test (SPECFACT_RUN_HANDOFF_URL_CHECK=1)
- OpenSpec deltas, TDD_EVIDENCE, tasks complete; CHANGELOG [Unreleased]

Made-with: Cursor

* fix(docs-validate): strip leading global flags before command path

- Parse --mode/--input-format/--output-format + value, then other root flags
- Add test for specfact --mode copilot import from-code …
- Fix showcase docs: hatch run contract-test-exploration (not specfact)

Made-with: Cursor

* fix(docs-12): harden link/command validators and spec wording

- Capitalize Markdown in cross-site link spec requirement
- Cross-site: redirect-only HTTP success, UTF-8 read failures, URL delimiter/trim fixes
- Docs commands: catch Typer exceptions on --help, UTF-8 read failures
- Tests: shared loader for check-cross-site-links module

Made-with: Cursor

---------

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

* fix(scripts): CliRunner without mix_stderr for Click 8.3+ compatibility (#451)

Default CliRunner() merges stderr into stdout; read stdout only so
accessing result.stderr does not raise when streams are combined.

Made-with: Cursor

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

* fix: review gates (semgrep print, radon CC, icontract, questionary types) (#452)

* fix: satisfy review gates for docs scripts and module_lifecycle typing

- Replace print() with Rich Console in docs validation scripts (semgrep)
- Split HTTP URL checks and doc scans to reduce cyclomatic complexity (radon)
- Add icontract require/ensure on public helpers; use CliRunner() without mix_stderr
- Cast questionary API for basedpyright reportUnknownMemberType

Made-with: Cursor

* fix(scripts): address #452 review (HTTP helpers, icontract, CLI streams)

- _http_success_code: use int directly after None guard
- _response_status: safe getcode via getattr/callable
- check-docs: drop @require preconditions duplicated by beartype
- _cli_invoke_streams_text: merge stdout + stderr for not-installed detection

Made-with: Cursor

---------

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

* Add speckit adapter alignment change and update affected change specs

* feat(adapters): spec-kit v0.4.x adapter alignment (#454)

* feat(adapters): spec-kit v0.4.x adapter alignment — extensions, presets, hooks, version detection, 7-command presets

Update SpecKitAdapter, ToolCapabilities, BridgeConfig presets, and
SpecKitScanner for spec-kit v0.4.3 compatibility:

- ToolCapabilities: 5 new optional fields (extensions, extension_commands,
  presets, hook_events, detected_version_source)
- SpecKitScanner: scan_extensions(), scan_presets(), scan_hook_events()
  with .extensionignore support and defensive JSON parsing
- SpecKitAdapter: 3-tier version detection (CLI → heuristic → None),
  refactored get_capabilities() with reduced cyclomatic complexity
- BridgeConfig: all 3 speckit presets expanded from 2 to 7 command
  mappings (specify, plan, tasks, implement, constitution, clarify, analyze)
- 42 new tests across 4 test files (110 targeted, 2248 full suite pass)
- Docs updated: comparison matrix, journey guide, integrations overview,
  adapter development guide

Closes #453

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

* fix: address CodeRabbit review findings

- Use get_bridge_logger instead of logging.getLogger in speckit adapter
  and scanner (production command path convention)
- Narrow except Exception to except OSError in _load_extensionignore
- Simplify redundant base_path conditional in get_capabilities
- Use SimpleNamespace instead of dynamic type() in tests
- Add subprocess.TimeoutExpired and OSError exception tests for CLI
  version detection
- Fix duplicate MD heading in bridge-adapter spec
- Add blank lines after markdown headings in proposal (MD022)

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

---------

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

* chore: bump version to 0.43.0 for spec-kit v0.4.x alignment (#455)

* chore: bump version to 0.43.0 and add changelog entry

Minor version bump for spec-kit v0.4.x adapter alignment feature.
Syncs version across pyproject.toml, setup.py, and __init__.py.
Adds changelog entry documenting new capabilities.

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

* Sync deps and fix changelog

* Sync deps and fix changelog

---------

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

* fix(packaging): remove workflow prompts from core wheel (packaging-02 #441, v0.43.1) (#456)

* fix(packaging): drop duplicate workflow prompts from core wheel (packaging-02 3.5)

Remove resources/prompts from wheel force-include and repo tree; canonical
copies remain in specfact-cli-modules bundles. Align startup IDE drift
checks and init template resolution with discover_prompt_template_files.
Bump to 0.43.1; re-sign init module 0.1.19. Update CHANGELOG, docs, OpenSpec.

Made-with: Cursor

* fix: address PR review (changelog, TDD evidence, startup checks, tests)

- Changelog 0.43.1 header uses Unreleased until release tag
- TDD_EVIDENCE: pre-fail block for Task 3.5 before passing verification
- TemplateCheckResult.sources_available; skip last_checked_version bump when no
  discoverable prompts; drift missing only when source exists
- Integration _fake_discover respects include_package_fallback
- test_validate_all_prompts uses tmp_path; re-enable file in default test run
- test_print_startup_checks_version_update_no_type uses stale version timestamp

Made-with: Cursor

* fix: address follow-up PR review (startup metadata, tests)

- Use ide_dir directly in TemplateCheckResult when IDE folder exists
- Set last_checked_version only after successful template-source checks
- Integration test: assert discover_prompt_template_files fallback + stable startup patches
- validate_all_prompts test: valid vs invalid specfact.*.md outcomes

Made-with: Cursor

---------

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

* Potential fix for pull request finding 'Empty except'

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>

* Fix changelog version

* docs: unify core docs portal UX (#459)

* docs: unify core docs portal UX

* Fix docs-13 core review findings

* Address docs-13 PR review feedback

* Address follow-up docs review feedback

---------

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

* Harden docs home URL test assertion

* feat: doc frontmatter validation, v0.43.2 review JSON gate, and pre-commit review UX (#463)

* chore(release): v0.43.2 pre-commit review JSON + OpenSpec dogfood rules

- Pre-commit gate writes ReviewReport JSON to .specfact/code-review.json
- openspec/config.yaml: require fresh review JSON and remediate findings
- Docs and unit tests updated

Made-with: Cursor

* fix: CodeRabbit — changelog, openspec TDD_EVIDENCE freshness, review hook timeout

- CHANGELOG 0.43.2: expanded entries, line wrap
- openspec/config.yaml: exclude TDD_EVIDENCE.md from review JSON staleness
- pre_commit_code_review: timeout 300s, TimeoutExpired handling
- tests: exact cwd, timeout assertion and timeout failure test

Made-with: Cursor

* Add code review to pre-commit and frontmatter docs validation

* Improve pre-commit script output

* Improve specfact code review findings output

* Fix review findings

* Improve pre-commit hook output

* Enable dev branch code review

* Update code review hook

* Fix contract review findings

* Fix review findings

* Fix review warnings

* feat: doc frontmatter hardening and code-review gate fixes

- Typer CLI for doc-frontmatter-check; safer owner resolution (split helpers for CC)
- Strict exempt handling; pre-commit hook matches USAGE-FAQ.md; review script JSON typing
- Shared test fixtures/types; integration/unit test updates; OpenSpec tasks and TDD evidence
- Changelog: pre-commit code-review-gate UX note

Made-with: Cursor

* Fix test failures and add docs review to github action runner

* Fix test failure due to UTF8 encoding

* Apply review findings

* Optimize pr orchestrator runtime

* Optimize pr orchestrator runtime

* Fix caching on pr-orchestrator

---------

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

* docs: archive doc-frontmatter-schema openspec change

* Apply suggestions from code review

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>

* fix: restore protocol stubs for type checking

* Add frontamtter check

* fix: harden protocol stubs for code quality

* Add PR test hardening change

* fix: remediate review findings and harden review gates

* fix: rebuild review report model for pydantic

* Add story and onboarding change

* Update change tracking

* Improve scope for ci/cd requirements

* docs: sharpen first-contact story and onboarding (#467)

* 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 review blockers and bump patch version

* test: harden modules docs url assertions

* fix: harden trustworthy green checks (#469)

* 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>

* fix: address CodeRabbit review findings for ci-02 (#471)

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

* fix: propagate docker actionlint exit code instead of masking failures (#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>

* fix: assert hook id stability and cd to repo root for local actionlint (#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>

* feat: clean-code-01-principle-gates — 7-principle charter gates, v0.44.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>

* feat: archive completed openspec changes and update main specs

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>

* Add new user onboarding change

* docs & tooling: new user onboarding + smart-test and pre-commit review 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>

* fix: code-review gate (Typer params), typer<0.24 vs semgrep, module upgrade 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 (#480)

* 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>

* archived implemented changes

* Archive and remove outdated changes

* Split and refactor change proposals between both repos

* Archive alignment change

* Add changes and github hierarchy scripts

* feat: add GitHub hierarchy cache sync (#492)

* feat: add github hierarchy cache sync

* Backport improvements from modules scripts

* Fix review findings

* Make github sync script executable

---------

Signed-off-by: Dom <39115308+djm81@users.noreply.github.com>
Co-authored-by: Dominikus Nold <djm81@users.noreply.github.com>

* [codex] Compact agent governance loading (#493)

* feat: compact agent governance loading

* docs: mark governance PR task complete

* docs: sync governance-03 github issue metadata

* fix: restore dev branch governance block

* Apply review findings

* docs: add sibling internal wiki context for OpenSpec design

Point AGENTS.md, Claude/Copilot/Cursor surfaces, and the OpenSpec rule at
docs/agent-rules/40-openspec-and-tdd.md to read-only wiki paths (hot.md,
graph.md, concepts) via absolute paths when specfact-cli-internal is present.
Update INDEX applicability notes and extend governance tests.

Made-with: Cursor

---------

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

* Archived github hierarchy change

* Update rules for openspec archive

* Potential fix for pull request finding 'Unused local variable'

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>

* Add wiki update notes

* Archive governance-03 change, format markdown, add wiki instructions for update

* Fix review findings

* Fix type errors

* fix: safe VS Code settings merge and project artifact writes (#490) (#496)

* fix: safe merge for VS Code settings.json on init ide (profile-04)

- Add project_artifact_write.merge_vscode_settings_prompt_recommendations with fail-safe
  on invalid JSON / bad chat shape; --force backs up to .specfact/recovery/ then replaces.
- Route ide_setup create_vscode_settings through helper; thread force; catch errors for CLI exit.
- Lint gate: scripts/verify_safe_project_writes.py blocks json.load/dump in ide_setup.py.
- Tests, installation docs, 0.45.2 changelog and version pins.

OpenSpec: profile-04-safe-project-artifact-writes
Made-with: Cursor

* fix(profile-04): satisfy review gate, pin setuptools for semgrep

- Refactor project_artifact_write merge path (KISS); icontract predicates
- Deduplicate ide_setup prompt helpers; import from project_artifact_write
- verify_safe_project_writes: ast.walk, contracts, beartype
- Pin setuptools<82 for Semgrep pkg_resources chain
- Update TDD_EVIDENCE and tasks checklist

Made-with: Cursor

* ci: run safe-write verifier in PR orchestrator lint job

Match hatch run lint by invoking scripts/verify_safe_project_writes.py
after ruff/basedpyright/pylint. Use set -euo pipefail so the first lint
failure is not masked by later commands.

Made-with: Cursor

* fix(profile-04): address CodeRabbit review (docs, guard, contracts, tests)

- Wrap installation.md VS Code merge paragraph to <=120 chars per line
- tasks 4.7 + TDD_EVIDENCE: openspec validate --strict sign-off
- verify_safe_project_writes: detect from-json import and aliases
- settings_relative_nonblank: reject absolute paths and .. segments
- ide_setup: _handle_structured_json_document_error for duplicate handlers
- ProjectWriteMode docstring (reserved policy surface); backup stamp + collision loop
- Tests: malformed settings preserved on init ide exit; force+chat coercion; AST guard tests

Made-with: Cursor

* fix(profile-04): JSON5 settings, repo containment, review follow-ups

- merge_vscode_settings: resolve containment before mkdir/write; JSON5 load/dump
  (JSONC comments; trailing_commas=False for strict JSON output)
- ide_setup: empty prompts_by_source skips catalog fallback (_finalize allow_empty_fallback)
- verify_safe_project_writes: detect import json as js attribute calls
- contract_predicates: prompt_files_all_strings accepts list[Any] for mixed-type checks
- Tests: symlink escape, JSONC merge, empty export strip, import-json-as-js guard
- tasks.md / TDD_EVIDENCE: wrap lines to <=120 chars; CHANGELOG + json5 dep + setup.py sync

Made-with: Cursor

* docs(profile-04): tasks pre-flight + full pytest; narrow icontract ensure

- tasks 1.1: hatch env create then smart-test-status and contract-test-status
- tasks 4.3: add hatch test --cover -v to quality gates
- TDD_EVIDENCE: shorter module-signatures and report lines (<=120 cols)
- project_artifact_write: isinstance(result, Path) in @ensure postconditions

Made-with: Cursor

* fix: clear specfact code review on safe-write modules

- verify_safe_project_writes: flatten json binding helpers; stderr writes
  instead of print; inline Import/ImportFrom loops to drop duplicate-shape DRY
- project_artifact_write: _VscodeChatMergeContext dataclass (KISS param count);
  typed chat_body cast before .get for pyright

Made-with: Cursor

* docs(profile-04): record hatch test --cover -v in T…
djm81 added a commit that referenced this pull request Apr 14, 2026
…y) (#502)

* feat(backlog): add backlog add for interactive issue creation (#289)

* feat: add interactive backlog issue creation flow

* feat(backlog): add interactive issue creation and mapping setup

* fix: align backlog protocol test fakes and module manifest versions

* Fix type error

* fix(backlog): persist ado sprint and normalize github create id

* fix(backlog-core): address review findings for add/config/github

---------

Signed-off-by: Dom <39115308+djm81@users.noreply.github.com>
Co-authored-by: Dominikus Nold <djm81@users.noreply.github.com>

* chore(openspec): archive completed changes and align architecture docs (#292)

* chore(openspec): archive completed changes and align architecture docs

* docs(architecture): refresh discrepancies report after arch-08 remediation

---------

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

* docs(change): Archive architecture discrepancy remediation change

* fix(codeql): preserve module contract marker and document fallback excepts

* fix(backlog): restore installed-runtime discovery parity and add backlog prompt (#294)

* fix(backlog): restore installed runtime discovery and add backlog prompt

* Archive bugfix change

---------

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

* fix(version): sync manifests to 0.36.1 and archive backlog-core-04 (#297)

* fix(backlog): restore installed runtime discovery and add backlog prompt

* Archive bugfix change

* fix(version): sync built-in module manifests to 0.36.1

---------

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

* fix: harden module lifecycle bootstrap and signing workflows (#299)

* fix: harden module lifecycle bootstrap and signing workflows

* fix: stabilize module signature hashing across environments

* fix: stabilize bundle module signature verification in CI

---------

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

* test: simplify monkeypatch callables in module_security tests

* Fix duplicate with statement

* chore(release): bump to v0.37.1 and harden signature gates

* test: fix init command regression assertions

* fix: release v0.37.2 with runtime crypto deps

* fix: address signature-backend warning and module version drift

* fix: use hatch build in PyPI publish workflow script (#304)

* fix: resolve startup module freshness home path dynamically (#306)

* fix: harden module signing workflow and reduce startup log noise

* test: align module migration compatibility with decoupled module versions

* fix: fail fast on invalid base ref in changed-only module signing

* fix: stabilize module precedence and backlog github mapping flow

* fix(module-registry): persist disables and correct bundled availability

* Re-sign module registry and fix / ignore local temp artifacts

* bump module registry version to 0.1.3

* fix(registry): restore protocol reporting logs in debug mode

* fix(backlog): harden refine writeback, prompts, and any-filter semantics (#311)

* fix(backlog): harden refine writeback, prompts, and daily any filters

* fix(github): default story type fallback to feature

* Fix format

* Fix codex review findings

* bump and sign changed modules

* chore(hooks): enforce module signature verification in pre-commit

* chore(hooks): add markdownlint to pre-commit checks

---------

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

* fix(hooks,ado): correct format gate and enforce iteration on direct
  id lookup

* Apply review findings and fix tests

* Pin virtualenv < 21 to avoid incaopatibility failure

* fix: finalize backlog-core-06 ado comment API versioning (#314)

* fix(backlog): harden refine writeback, prompts, and daily any filters

* fix(github): default story type fallback to feature

* Fix format

* Fix codex review findings

* bump and sign changed modules

* chore(hooks): enforce module signature verification in pre-commit

* chore(hooks): add markdownlint to pre-commit checks

* fix: finalize backlog-core-06 ado comment api versioning and ci hatch pins

* fix: address review findings for formatter safety and ado metric patch guards

* docs(openspec): update CHANGE_ORDER status tracking

* fix(ado): apply iteration filter for direct issue_id lookup

---------

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

* feat: Advanced marketplace features (marketplace-02) - dependency resolution, aliases, custom registries, publishing (#318)

* feat: advanced marketplace features (marketplace-02) - dependency resolution, aliases, custom registries, namespace enforcement, publishing

- dependency_resolver: resolve_dependencies(), --skip-deps, --force on install
- alias_manager: alias create/list/remove (no top-level alias commands)
- custom_registries: add-registry, list-registries, remove-registry; fetch_all_indexes; search Registry column
- module_installer: namespace/name enforcement, collision detection
- scripts/publish-module.py + .github/workflows/publish-modules.yml (optional signing)
- docs: publishing-modules, custom-registries, dependency-resolution; updated installing-modules, module-marketplace, commands
- version 0.38.0, CHANGELOG

Made-with: Cursor

* docs(openspec): defer 6.2.4 and 6.2.5 (index update/PR, workflow test) to later

Made-with: Cursor

* Add follow-up change proposals for marketplace

* Fix codex review findings

---------

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

* fix: complete marketplace publish registry PR flow and bump (#320)

0.38.1

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

* fix: update init ide hint and repair publish workflow
  condition

* feat(backlog): normalize daily summarize Markdown output (#323)

* feat(backlog): summarize Markdown normalization and TTY/CI rendering

* chore(openspec): drop implementation snapshot from change

* Update title

---------

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

* Update version

* Add github skills

* Add new marketplace changes

* feat(cli): category groups and flat shims using real module Typer (#331)

* feat(cli): category groups and flat shims using real module Typer

- Add category groups (code, backlog, project, spec, govern) with flatten same-name member
- Sort commands under backlog/project groups A–Z
- Fix flat shims to expose real module Typer so 'specfact sync bridge' and 'specfact plan update-idea' work
- Add first-run init, module grouping, OpenSpec change for 0.40.x remove-flat-shims
- Bump version to 0.39.0, CHANGELOG and OpenSpec updates

Made-with: Cursor

* Fix signature

* fix: resolve module grouping regressions and stabilize CI
  tests

* fix: keep uncategorized modules flat during grouped registration

---------

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

* Update docs regarding module migration change

* feat: module-migration-02 bundle extraction (#332)

* docs: add module-migration-02-bundle-extraction to CHANGE_ORDER.md

* feat: implement module-migration-02 bundle extraction

* fix(ci): checkout module bundles repo for test jobs

* Fix test failures

* fix(modules): load local bundle sources in compatibility aliases

* fix: run worktree policy code in tests/CI and silence reexport deprecation

- Prefer src/<name>/main.py over app.py when SPECFACT_REPO_ROOT is set so
  policy init uses worktree templates.py (SPECFACT_POLICY_TEMPLATES_DIR).
- Policy engine module-package.yaml: version 0.1.5 and re-signed checksum.
- conftest: set SPECFACT_REPO_ROOT, SPECFACT_POLICY_TEMPLATES_DIR; add
  bundle package roots when specfact-cli-modules present.
- Policy engine integration tests: rely on conftest env, clear registry
  and re-register before invoke so loader uses worktree.
- test_reexport_shims: filter deprecation warning for legacy analyze import.

Made-with: Cursor

* fix: defer specfact_backlog import in shims so CI can register bridges

- backlog and policy_engine __init__.py: import specfact_backlog only in
  __getattr__ (cached), not at module load. Allows loading .src.adapters.*
  for bridge registration without requiring specfact_backlog installed.
- Re-sign backlog and policy_engine module-package.yaml after init changes.
- openspec: update module-migration-02 tasks.md.

Made-with: Cursor

* fix: defer bundle import in all module shims to fix CI collection errors

- Apply deferred import (only in __getattr__, cached) to analyze, contract,
  drift, enforce, generate, import_cmd, migrate, patch_mode, plan, project,
  repro, sdd, spec, sync, validate. Matches backlog and policy_engine.
- Prevents ImportError when tests import specfact_cli.modules.<name>.src.*
  without specfact_backlog/specfact_govern/specfact_project/specfact_spec
  installed (e.g. CI). Fixes 78 collection errors.
- Re-sign all affected module-package.yaml manifests.

Made-with: Cursor

* fix(ci): include module shims in hatch cache key so CI uses current code

* feat(modules): registry descriptions, --bump-version for publish, tasks and format fixes

- Add description to registry index entries in publish-module.py (module search)
- Add --bump-version patch|minor|major for bundle re-publish in publish-module.py
- Format fixes in validate-modules-repo-sync.py (SIM108, B007)
- Mark completed tasks in module-migration-02-bundle-extraction tasks.md
- Update test for publish_bundle(bump_version=) signature

Made-with: Cursor

* Add missing migration tasks to the open change to completely isolate modules into specfact-cli-modules repo.

* Add gap analysis and update changes

* Update follow-up changes to avoid ambiguities and overlaps

* docs: complete migration-02 section-18 parity and 17.8 gate evidence

* docs: mark migration-02 import-categorization commit checkpoint done

* Update change constraints and blockers for module migration

* docs: add migration-05 issue #334 and complete task 17.10.4

* Update change constraints and blockers for module migration

---------

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

* Implement blockers to prepare for module-migration-03 change. (#336)

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

* feat: module-migration-03 core slimming closeout and registry fixes (#317) (#341)

* Prepare module-migration-03 removal of old built-in modules

* feat(core): delete specfact-project module source from core (migration-03)

Made-with: Cursor

* feat(core): delete specfact-backlog module source from core (migration-03)

Made-with: Cursor

* feat(core): delete specfact-codebase module source from core (migration-03)

Made-with: Cursor

* feat(core): delete specfact-spec module source from core (migration-03)

Made-with: Cursor

* feat(core): delete specfact-govern module source from core (migration-03)

Made-with: Cursor

* chore(tests): skip tests for removed modules when source absent (migration-03)

Add pytest.importorskip() for backlog, plan, sync, enforce, generate,
patch_mode, import_cmd so tests are skipped when module source was
removed from core. Preserves tests for later move to specfact-cli-modules.
Update tasks.md and TDD_EVIDENCE.md for Task 10 completion.

Made-with: Cursor

* feat(bootstrap): remove flat shims and non-core module registrations (migration-03)

- Remove _register_category_groups_and_shims (unconditional category/shim registration).
- Trim CORE_MODULE_ORDER to 4 core: init, auth, module-registry, upgrade.
- Add @beartype to _mount_installed_category_groups.
- Category groups and flat shims only for installed bundles via _mount_installed_category_groups.

Made-with: Cursor

* docs(openspec): mark Task 11.4 done in tasks.md

Made-with: Cursor

* feat(cli): conditional category group mount from installed bundles (migration-03)

- Add _RootCLIGroup (extends ProgressiveDisclosureGroup) with resolve_command
  override: unknown commands in KNOWN_BUNDLE_GROUP_OR_SHIM_NAMES show
  actionable error (not installed + specfact init / specfact module install).
- Root app uses cls=_RootCLIGroup. Main help docstring adds init/module
  install hint for workflow bundles.

Made-with: Cursor

* docs(openspec): mark Task 12.4 done in tasks.md

Made-with: Cursor

* feat(init): enforce mandatory bundle selection and profile presets (migration-03)

* Add module removal core tests

* docs(openspec): record Task 14 module signing gate (migration-03)

* feat: complete module-migration-03 core slimming and
  follow-up alignment (#317)

* Fix format error

* fix: handle detached HEAD registry branch selection and
  stabilize migration-03 CI tests

---------

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

* Finalize module-migration-02 change

* docs(backlog-auth): update auth docs and OpenSpec task status (#342)

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

* chore(openspec): archive completed changes and sync main specs

* docs(openspec): prefix module migration proposal titles with IDs

* Add bug change for ado required fields setting and update change order

* Update change order

* feat(core): finalize migration-03 auth removal and 3-core slim package (#317) (#343)

* Prepare module-migration-03 removal of old built-in modules

* feat(core): delete specfact-project module source from core (migration-03)

Made-with: Cursor

* feat(core): delete specfact-backlog module source from core (migration-03)

Made-with: Cursor

* feat(core): delete specfact-codebase module source from core (migration-03)

Made-with: Cursor

* feat(core): delete specfact-spec module source from core (migration-03)

Made-with: Cursor

* feat(core): delete specfact-govern module source from core (migration-03)

Made-with: Cursor

* chore(tests): skip tests for removed modules when source absent (migration-03)

Add pytest.importorskip() for backlog, plan, sync, enforce, generate,
patch_mode, import_cmd so tests are skipped when module source was
removed from core. Preserves tests for later move to specfact-cli-modules.
Update tasks.md and TDD_EVIDENCE.md for Task 10 completion.

Made-with: Cursor

* feat(bootstrap): remove flat shims and non-core module registrations (migration-03)

- Remove _register_category_groups_and_shims (unconditional category/shim registration).
- Trim CORE_MODULE_ORDER to 4 core: init, auth, module-registry, upgrade.
- Add @beartype to _mount_installed_category_groups.
- Category groups and flat shims only for installed bundles via _mount_installed_category_groups.

Made-with: Cursor

* docs(openspec): mark Task 11.4 done in tasks.md

Made-with: Cursor

* feat(cli): conditional category group mount from installed bundles (migration-03)

- Add _RootCLIGroup (extends ProgressiveDisclosureGroup) with resolve_command
  override: unknown commands in KNOWN_BUNDLE_GROUP_OR_SHIM_NAMES show
  actionable error (not installed + specfact init / specfact module install).
- Root app uses cls=_RootCLIGroup. Main help docstring adds init/module
  install hint for workflow bundles.

Made-with: Cursor

* docs(openspec): mark Task 12.4 done in tasks.md

Made-with: Cursor

* feat(init): enforce mandatory bundle selection and profile presets (migration-03)

* Add module removal core tests

* docs(openspec): record Task 14 module signing gate (migration-03)

* feat: complete module-migration-03 core slimming and
  follow-up alignment (#317)

* Fix format error

* fix: handle detached HEAD registry branch selection and
  stabilize migration-03 CI tests

* Prepare module-migration-03 removal of old built-in modules

* Prepare module-migration-03 removal of old built-in modules

* chore(tests): skip tests for removed modules when source absent (migration-03)

Add pytest.importorskip() for backlog, plan, sync, enforce, generate,
patch_mode, import_cmd so tests are skipped when module source was
removed from core. Preserves tests for later move to specfact-cli-modules.
Update tasks.md and TDD_EVIDENCE.md for Task 10 completion.

Made-with: Cursor

* feat(bootstrap): remove flat shims and non-core module registrations (migration-03)

- Remove _register_category_groups_and_shims (unconditional category/shim registration).
- Trim CORE_MODULE_ORDER to 4 core: init, auth, module-registry, upgrade.
- Add @beartype to _mount_installed_category_groups.
- Category groups and flat shims only for installed bundles via _mount_installed_category_groups.

Made-with: Cursor

* docs(openspec): mark Task 11.4 done in tasks.md

Made-with: Cursor

* feat(cli): conditional category group mount from installed bundles (migration-03)

- Add _RootCLIGroup (extends ProgressiveDisclosureGroup) with resolve_command
  override: unknown commands in KNOWN_BUNDLE_GROUP_OR_SHIM_NAMES show
  actionable error (not installed + specfact init / specfact module install).
- Root app uses cls=_RootCLIGroup. Main help docstring adds init/module
  install hint for workflow bundles.

Made-with: Cursor

* docs(openspec): mark Task 12.4 done in tasks.md

Made-with: Cursor

* feat(init): enforce mandatory bundle selection and profile presets (migration-03)

* Add module removal core tests

* docs(openspec): record Task 14 module signing gate (migration-03)

* feat: complete module-migration-03 core slimming and
  follow-up alignment (#317)

* Fix format error

* fix: handle detached HEAD registry branch selection and
  stabilize migration-03 CI tests

* feat(core): remove auth module from core and route auth via backlog (migration-03)

* docs(openspec): update migration-03 PR status and tracking

* docs(openspec): finalize migration-03 checklist and defer non-blocking gates

* Fix remaining auth findings and dependency in core cli

---------

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

* Archive module-migration-03 change

* feat: remove flat command shims (category-only CLI) (#344)

* feat: remove flat command shims from grouped registry

* Finalize change module-migration-04 implementation

---------

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

* Archived module-migration-04 and updated specs

* docs(openspec): finalize module-migration-05 tracking after modules PR merge (#345)

* Implement blockers to prepare for module-migration-03 change.

* Update migration change

* docs(openspec): close migration-05 PR tracking and change order

---------

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

* Archive module-migration-05 change and update specs

* test(migration-06): move legacy sync tests out of core (#346)

* feat(migration-06): core decoupling cleanup - boundary tests and inventory

- Add test_core_does_not_import_from_bundle_packages boundary regression test
- Update spec with ownership boundary and migration acceptance criteria
- Add CORE_DECOUPLING_INVENTORY.md (keep/move/interface classification)
- Record TDD evidence in TDD_EVIDENCE.md
- Update docs/reference/architecture.md with core vs modules-repo boundary
- Update openspec/CHANGE_ORDER.md status

No move candidates identified; core already decoupled from bundle packages.
Boundary test prevents future core->bundle coupling.

Refs #338

Made-with: Cursor

* chore(migration-06): mark all tasks complete

Made-with: Cursor

* feat(migration-06): extend scope - migrate package-specific artifacts per #338

- Add MIGRATION_REMOVAL_PLAN.md with phased removal of MIGRATE-tier code
- Add test_core_modules_do_not_import_migrate_tier boundary test
- Remove templates.bridge_templates (dead code; only tests used it)
- Remove tests/unit/templates/test_bridge_templates.py
- Update CORE_DECOUPLING_INVENTORY.md with removal status
- Update spec with MIGRATE-tier enforcement and package-specific removal

Phase 1 complete. Further MIGRATE-tier removal documented in plan.
Refs #338

Made-with: Cursor

* test(migration-06): move legacy sync tests out of core

---------

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

* Archived module-migration-06 change and updated specs

* test: module-migration-07 core test ownership cleanup (#347)

* test: finalize module-migration-07 core test ownership cleanup

* docs: mark module-migration-07 quality and PR tasks complete

* test: fix CI isolation failures for project and persona merge

* test: narrow migrated skips and restore core registry guardrails

* test: stabilize core CI by refining skips and bootstrap checks

* test: fix remaining PR failures via targeted core filtering

* fix: harden module package checks against import-mode class identity

* test: stabilize core slimming integration assertions

---------

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

* Archived backlog-core-07 change and updated specs

* Update some docs and archive latest finished changes and specs

* Add docs update change

* feat: add agile-01-feature-hierarchy change and update CHANGE_ORDER.md (#376)

- Create openspec/changes/agile-01-feature-hierarchy/ with proposal.md and tasks.md
- Add Epics #256 (Architecture Layer Integration), #257 (AI IDE Integration),
  and #258 (Integration Governance and Dogfooding) to CHANGE_ORDER.md parent issues table
- 25 GitHub Feature issues created (#351-#375), linked to their parent Epics
- Feature label created; issue #185 closed (ceremony-cockpit-01, archived 2026-02-18)

Co-authored-by: Dominikus Nold <djm81@users.noreply.github.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>

* docs: align core docs and sync pending changes (#377)

* docs: align core docs and sync pending changes

* fix: preserve partial staging in markdown autofix hook

---------

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

* fix: stabilize release test suite after module migration

* Update module

* Fix module install

* Fix module install

* Fix failed tests

* Fix marketplace client regression

* Fix install regression for specfact-cli (#380)

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

* Add changes to improve runtime validation and backlog module remaining migration to module

* refactor: remove backlog ownership from core cli (#384)

* refactor: remove backlog ownership from core cli

* fix: align CI marketplace validation paths

* test: stabilize command audit validation and add command-surface change

---------

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

* Add new command alignment change

* fix: finalize cli runtime validation regressions (#387)

* fix: finalize cli runtime validation regressions

* test: align satisfied dependency logging assertions

---------

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

* docs: archive cli-val-07 change

* Archive changes and update specs

* Add code-review change proposals

* test: align command surface regression coverage

* docs: add OpenSpec change for backlog-core commands migration (#390)

* feat: add OpenSpec change for backlog-core commands migration

Change: backlog-02-migrate-core-commands
- Add proposal, design, tasks, specs
- Add TDD_EVIDENCE.md with implementation progress
- GitHub Issue: #389

Rules applied: AGENTS.md Git Worktree Policy, TDD Hard Gate

Made-with: Cursor

* docs: update TDD_EVIDENCE and tasks for quality gate results

Made-with: Cursor

* docs: update TDD_EVIDENCE with test fix results

Made-with: Cursor

* docs: update TDD_EVIDENCE with all test fixes complete

Made-with: Cursor

---------

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

* fix: use POST instead of PATCH for ADO work item creation (#391)

* fix: use POST instead of PATCH for ADO work item creation

Azure DevOps API requires POST (not PATCH) for creating work items.

Also fixed category grouping to always register group commands.

Made-with: Cursor

* docs: add changelog entry for ADO POST fix

Made-with: Cursor

* chore: bump version to 0.40.4

Made-with: Cursor

* fix: update test mocks from PATCH to POST for ADO create

- Reverted incorrect unconditional _mount_installed_category_groups call

- Updated test_create_issue mocks to use requests.post instead of requests.patch

Made-with: Cursor

* test: skip category group test when bundles not installed

The test_bootstrap_with_category_grouping_disabled_registers_flat_commands test

expects bundles like specfact-codebase to be installed, but in CI they may not be.

Added pytest.skip() when 'code' command is not available.

Made-with: Cursor

---------

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

* docs: archive backlog-02-migrate-core-commands change

- Archived backlog-02-migrate-core-commands change

- Updated CHANGE_ORDER.md with implementation status

- Updated main specs with backlog-add, backlog-analyze-deps, backlog-delta, backlog-sync, backlog-verify-readiness

Made-with: Cursor

* feat: document code-review module scaffold (#410)

* feat: document code-review module scaffold

* chore: sync 0.41.0 release version artifacts

---------

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

* Add change for project codebase ownership

* Realign code import ownership surface (#412)

* Realign code import ownership surface

* Harden temp registry command audit test

---------

Signed-off-by: Dom <39115308+djm81@users.noreply.github.com>
Co-authored-by: Dominikus Nold <djm81@users.noreply.github.com>

* Update code review changes

* docs: update reward ledger OpenSpec tracking (#413)

Link the existing change issue, record TDD evidence, and align the OpenSpec artifacts with the bundle-owned DDL and paired worktree implementation flow.

Made-with: Cursor

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

* Track house-rules skill OpenSpec changes (#414)

Made-with: Cursor

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

* docs: Update change-proposal for code-review-07 (#415)

* Track house-rules skill OpenSpec changes

Made-with: Cursor

* Cursor: Apply local changes for cloud agent

---------

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

* Finalize code-review-07 status

* Finalize code-review-08 status

* feat: apply code-review-09 pre-commit integration

* fix: fall back when cached hatch test env is broken

* fix: avoid hatch env for coverage xml export

* fix: install type-check and lint tools directly in CI

* fix: install pytest fallback deps in test job

* fix: install pytest-cov for test fallback path

* Finalize code-review-09 status

* [Change] Align core docs with modules site ownership (#419)

* Align core docs with modules site ownership

* Close docs portal change PR task

---------

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

* fix: harden docs parity URL assertions

* Archive finished changes and update specs

* docs: fix command syntax parity after lean-core/modules split (v0.42.2) (#421)

Replace all stale CLI syntax families in authored docs with current
shipped commands. Adds docs parity tests that guard against regression.

Removed syntax families corrected:
- specfact project plan → project devops-flow / project snapshot / govern enforce sdd
- project import from-bridge → code import from-bridge
- specfact backlog policy → backlog verify-readiness / backlog refine
- specfact spec contract → spec validate / spec generate-tests / spec mock
- specfact spec sdd constitution → govern enforce sdd [BUNDLE]
- spec generate <prompt-subcommands> → AI IDE skills or removed

Updated docs: README.md, docs/index.md, docs/README.md,
docs/reference/commands.md (+4 reference docs),
docs/getting-started/ (4 files), docs/guides/ (21 files),
docs/examples/ (5 files), docs/prompts/ (2 files).

Added 11 new docs parity tests in test_release_docs_parity.py:
- 7 tests asserting removed syntax families stay absent
- 4 tests asserting current command families remain documented

Co-authored-by: Dominikus Nold <djm81@users.noreply.github.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>

* Archive finished changes and update specs

- Archive docs-03-command-syntax-parity (2026-03-18)
- Sync delta specs: cli-output + documentation-alignment updated with
  post-split command-surface alignment requirements and scenarios
- Update CHANGE_ORDER.md: mark docs-03 as archived

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

* Update evidence

* Potential fix for pull request finding 'Unused global variable'

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>

* docs: align core docs ownership and parity (#424)

* docs: fix command syntax parity after lean-core/modules split (v0.42.2)

Replace all stale CLI syntax families in authored docs with current
shipped commands. Adds docs parity tests that guard against regression.

Removed syntax families corrected:
- specfact project plan → project devops-flow / project snapshot / govern enforce sdd
- project import from-bridge → code import from-bridge
- specfact backlog policy → backlog verify-readiness / backlog refine
- specfact spec contract → spec validate / spec generate-tests / spec mock
- specfact spec sdd constitution → govern enforce sdd [BUNDLE]
- spec generate <prompt-subcommands> → AI IDE skills or removed

Updated docs: README.md, docs/index.md, docs/README.md,
docs/reference/commands.md (+4 reference docs),
docs/getting-started/ (4 files), docs/guides/ (21 files),
docs/examples/ (5 files), docs/prompts/ (2 files).

Added 11 new docs parity tests in test_release_docs_parity.py:
- 7 tests asserting removed syntax families stay absent
- 4 tests asserting current command families remain documented

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

* docs: align core docs ownership and parity

---------

Co-authored-by: Dominikus Nold <djm81@users.noreply.github.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>

* docs: fix quickstart install guidance

* docs: remove generated project plan docs

* Add code-review change

* fix: preserve native backlog import payloads (#429)

* fix: preserve native backlog import payloads

* fix: preserve imported proposal ids on reimport

---------

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

* fix: add docs review workflow and repair docs links (#428)

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

* fix: keep imported change ids stable across title changes (#431)

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

* fix: remove conflicting pages file copies

* Add docs sync changs

* docs: update openspec clean-code planning

* Update change status

* fix: code-review-zero-findings dogfood remediation (v0.42.3) (#435)

* fix: continue code review remediation and align module signing

* fix: complete code-review-zero-findings dogfood remediation (v0.42.3)

Eliminates full-scope code review findings (types, Radon CC, contracts, lint) and records OpenSpec change code-review-zero-findings with tests and CHANGELOG. Module manifests may need re-signing before merge per project policy.

Made-with: Cursor

* chore: re-sign bundled modules after content changes

* fix: resolve review follow-up regressions

* fix: run ci smart-test directly

* fix: restore ci test progress output

* fix: stabilize command audit ci test

---------

Signed-off-by: Dom <39115308+djm81@users.noreply.github.com>
Co-authored-by: Dominikus Nold <djm81@users.noreply.github.com>

* Add docs refactoring changes

* Add bug change tracking for encoding and resources

* docs: restructure core site IA to 6-section progressive nav (#442)

* docs: restructure core site IA from 5 flat sections to 6 progressive sections

Restructure docs.specfact.io from a flat 5-section sidebar to a 6-section
progressive navigation: Getting Started, Core CLI, Module System, Architecture,
Reference, Migration.

- Create docs/core-cli/, docs/module-system/, docs/migration/ directories
- Move 12 files to correct new sections with jekyll-redirect-from entries
- Write 3 new CLI reference pages: init.md, module.md, upgrade.md
- Replace first-steps.md with focused 5-minute quickstart
- Rewrite index.md as portal landing with core vs modules delineation
- Rewrite getting-started/README.md to link module tutorials to modules site
- Update sidebar navigation in _layouts/default.html
- Delete 6 obsolete files (competitive-analysis, ux-features, common-tasks,
  workflows, testing-terminal-output, guides/README)
- Add documentation-alignment delta spec for core-only focus policy

Implements: #438
OpenSpec: docs-05-core-site-ia-restructure

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

* docs: fix broken internal links after IA restructure

Update all relative links across 40 files to point to new file locations:
- ../reference/architecture.md → ../architecture/overview.md
- ../reference/debug-logging.md → ../core-cli/debug-logging.md
- ../reference/modes.md → ../core-cli/modes.md
- guides/ sibling links → ../module-system/ or ../migration/
- module-system/ back-links → ../guides/
- Remove links to deleted files (common-tasks, workflows)
- first-steps.md → quickstart.md

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

* fix: update test path for moved bootstrap-checklist and fix remaining broken links

- Update test_module_bootstrap_checklist_uses_current_bundle_ids to use
  new path docs/module-system/bootstrap-checklist.md
- Fix 2 remaining command-chains.md anchor links in migration-guide.md

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

---------

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

* fix: harden cross-platform runtime and IDE resource discovery (#443)

* fix: harden cross-platform runtime and IDE resource discovery

* fix: bump patch version to 0.42.4

* fix: restore init lifecycle compatibility

---------

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

* fix: resolve review type-safety findings

* Improve clarity and scope of ide prompt change

* feat(init): IDE prompt source catalog, --prompts, namespaced exports (#445)

* feat(init): IDE prompt source catalog, --prompts, namespaced exports

Implement init-ide-prompt-source-selection: discover core + module prompts,
default export all sources, interactive multi-select, non-interactive --prompts,
source-namespaced IDE paths. Fix project module roots to use metadata source
project. Extend discovery roots with user/marketplace. Update startup_checks
for nested exports. Bump init module to 0.1.14 with signed manifest.

Made-with: Cursor

* fix(init): scope VS Code prompt recommendations to exported sources

- Pass prompts_by_source into create_vscode_settings from copy_prompts_by_source_to_ide
- Strip prior .github/prompts/* recommendations on selective export to avoid stale paths
- Extract helpers for catalog paths and fallbacks; keep code review clean

Made-with: Cursor

---------

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

* fix tests

* release: bump version to 0.42.5 and update CHANGELOG

- Remove [Unreleased] sections; fold historical arch-08 notes under [0.34.0]
- Document init ide catalog, VS Code recommendations, integration test isolation

Made-with: Cursor

* Fix review findings

* feat(init): selective IDE prompt export cleanup and VS Code recommendation strip

- Prune stale exports and unselected catalog segments in copy_prompts_by_source_to_ide
- Strip only specfact*.prompt.md under .github/prompts/ when merging VS Code settings
- Tighten e2e missing-templates assertions to match CLI output
- Add unit tests for prompt path helper and selective export behavior

Made-with: Cursor

* Fix review findings

* Add missing import

* Bump patch version and changelog

* Fix failed tests

* Fix review findings

* docs: core vs modules URL contract and OpenSpec alignment (#448)

* docs: add core vs modules URL contract and OpenSpec alignment

Document cross-site permalink rules in docs/reference, extend documentation-alignment
and module-docs-ownership specs, update docs-07 and openspec config, and note the
dependency on modules URL policy in CHANGE_ORDER.

Made-with: Cursor

* docs: convert core handoff pages to modules canonical links (docs-07)

- Replace 20 duplicate guides/tutorials with thin summaries, prerequisites,
  and links to modules.specfact.io per URL contract
- Add docs/reference/core-to-modules-handoff-urls.md mapping table
- Align OpenSpec documentation-alignment spec delta with ADDED Requirements
- Complete docs-07-core-handoff-conversion tasks checklist

Refs: #439
Made-with: Cursor

---------

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

* feat(docs-12): docs command validation and cross-site link checks (#449)

* feat(docs-12): docs command validation and cross-site link checks

- Add check-docs-commands (Typer CliRunner prefix + --help) and exclusions for migration/illustrative pages
- Add check-cross-site-links with robust URL extraction; warn-only in docs-validate and CI while live site may lag
- Extend docs-review: Hatch env, validation steps, pytest tests/unit/docs/
- Opt-in handoff map HTTP test (SPECFACT_RUN_HANDOFF_URL_CHECK=1)
- OpenSpec deltas, TDD_EVIDENCE, tasks complete; CHANGELOG [Unreleased]

Made-with: Cursor

* fix(docs-validate): strip leading global flags before command path

- Parse --mode/--input-format/--output-format + value, then other root flags
- Add test for specfact --mode copilot import from-code …
- Fix showcase docs: hatch run contract-test-exploration (not specfact)

Made-with: Cursor

* fix(docs-12): harden link/command validators and spec wording

- Capitalize Markdown in cross-site link spec requirement
- Cross-site: redirect-only HTTP success, UTF-8 read failures, URL delimiter/trim fixes
- Docs commands: catch Typer exceptions on --help, UTF-8 read failures
- Tests: shared loader for check-cross-site-links module

Made-with: Cursor

---------

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

* fix(scripts): CliRunner without mix_stderr for Click 8.3+ compatibility (#451)

Default CliRunner() merges stderr into stdout; read stdout only so
accessing result.stderr does not raise when streams are combined.

Made-with: Cursor

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

* fix: review gates (semgrep print, radon CC, icontract, questionary types) (#452)

* fix: satisfy review gates for docs scripts and module_lifecycle typing

- Replace print() with Rich Console in docs validation scripts (semgrep)
- Split HTTP URL checks and doc scans to reduce cyclomatic complexity (radon)
- Add icontract require/ensure on public helpers; use CliRunner() without mix_stderr
- Cast questionary API for basedpyright reportUnknownMemberType

Made-with: Cursor

* fix(scripts): address #452 review (HTTP helpers, icontract, CLI streams)

- _http_success_code: use int directly after None guard
- _response_status: safe getcode via getattr/callable
- check-docs: drop @require preconditions duplicated by beartype
- _cli_invoke_streams_text: merge stdout + stderr for not-installed detection

Made-with: Cursor

---------

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

* Add speckit adapter alignment change and update affected change specs

* feat(adapters): spec-kit v0.4.x adapter alignment (#454)

* feat(adapters): spec-kit v0.4.x adapter alignment — extensions, presets, hooks, version detection, 7-command presets

Update SpecKitAdapter, ToolCapabilities, BridgeConfig presets, and
SpecKitScanner for spec-kit v0.4.3 compatibility:

- ToolCapabilities: 5 new optional fields (extensions, extension_commands,
  presets, hook_events, detected_version_source)
- SpecKitScanner: scan_extensions(), scan_presets(), scan_hook_events()
  with .extensionignore support and defensive JSON parsing
- SpecKitAdapter: 3-tier version detection (CLI → heuristic → None),
  refactored get_capabilities() with reduced cyclomatic complexity
- BridgeConfig: all 3 speckit presets expanded from 2 to 7 command
  mappings (specify, plan, tasks, implement, constitution, clarify, analyze)
- 42 new tests across 4 test files (110 targeted, 2248 full suite pass)
- Docs updated: comparison matrix, journey guide, integrations overview,
  adapter development guide

Closes #453

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

* fix: address CodeRabbit review findings

- Use get_bridge_logger instead of logging.getLogger in speckit adapter
  and scanner (production command path convention)
- Narrow except Exception to except OSError in _load_extensionignore
- Simplify redundant base_path conditional in get_capabilities
- Use SimpleNamespace instead of dynamic type() in tests
- Add subprocess.TimeoutExpired and OSError exception tests for CLI
  version detection
- Fix duplicate MD heading in bridge-adapter spec
- Add blank lines after markdown headings in proposal (MD022)

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

---------

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

* chore: bump version to 0.43.0 for spec-kit v0.4.x alignment (#455)

* chore: bump version to 0.43.0 and add changelog entry

Minor version bump for spec-kit v0.4.x adapter alignment feature.
Syncs version across pyproject.toml, setup.py, and __init__.py.
Adds changelog entry documenting new capabilities.

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

* Sync deps and fix changelog

* Sync deps and fix changelog

---------

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

* fix(packaging): remove workflow prompts from core wheel (packaging-02 #441, v0.43.1) (#456)

* fix(packaging): drop duplicate workflow prompts from core wheel (packaging-02 3.5)

Remove resources/prompts from wheel force-include and repo tree; canonical
copies remain in specfact-cli-modules bundles. Align startup IDE drift
checks and init template resolution with discover_prompt_template_files.
Bump to 0.43.1; re-sign init module 0.1.19. Update CHANGELOG, docs, OpenSpec.

Made-with: Cursor

* fix: address PR review (changelog, TDD evidence, startup checks, tests)

- Changelog 0.43.1 header uses Unreleased until release tag
- TDD_EVIDENCE: pre-fail block for Task 3.5 before passing verification
- TemplateCheckResult.sources_available; skip last_checked_version bump when no
  discoverable prompts; drift missing only when source exists
- Integration _fake_discover respects include_package_fallback
- test_validate_all_prompts uses tmp_path; re-enable file in default test run
- test_print_startup_checks_version_update_no_type uses stale version timestamp

Made-with: Cursor

* fix: address follow-up PR review (startup metadata, tests)

- Use ide_dir directly in TemplateCheckResult when IDE folder exists
- Set last_checked_version only after successful template-source checks
- Integration test: assert discover_prompt_template_files fallback + stable startup patches
- validate_all_prompts test: valid vs invalid specfact.*.md outcomes

Made-with: Cursor

---------

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

* Potential fix for pull request finding 'Empty except'

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>

* Fix changelog version

* docs: unify core docs portal UX (#459)

* docs: unify core docs portal UX

* Fix docs-13 core review findings

* Address docs-13 PR review feedback

* Address follow-up docs review feedback

---------

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

* Harden docs home URL test assertion

* feat: doc frontmatter validation, v0.43.2 review JSON gate, and pre-commit review UX (#463)

* chore(release): v0.43.2 pre-commit review JSON + OpenSpec dogfood rules

- Pre-commit gate writes ReviewReport JSON to .specfact/code-review.json
- openspec/config.yaml: require fresh review JSON and remediate findings
- Docs and unit tests updated

Made-with: Cursor

* fix: CodeRabbit — changelog, openspec TDD_EVIDENCE freshness, review hook timeout

- CHANGELOG 0.43.2: expanded entries, line wrap
- openspec/config.yaml: exclude TDD_EVIDENCE.md from review JSON staleness
- pre_commit_code_review: timeout 300s, TimeoutExpired handling
- tests: exact cwd, timeout assertion and timeout failure test

Made-with: Cursor

* Add code review to pre-commit and frontmatter docs validation

* Improve pre-commit script output

* Improve specfact code review findings output

* Fix review findings

* Improve pre-commit hook output

* Enable dev branch code review

* Update code review hook

* Fix contract review findings

* Fix review findings

* Fix review warnings

* feat: doc frontmatter hardening and code-review gate fixes

- Typer CLI for doc-frontmatter-check; safer owner resolution (split helpers for CC)
- Strict exempt handling; pre-commit hook matches USAGE-FAQ.md; review script JSON typing
- Shared test fixtures/types; integration/unit test updates; OpenSpec tasks and TDD evidence
- Changelog: pre-commit code-review-gate UX note

Made-with: Cursor

* Fix test failures and add docs review to github action runner

* Fix test failure due to UTF8 encoding

* Apply review findings

* Optimize pr orchestrator runtime

* Optimize pr orchestrator runtime

* Fix caching on pr-orchestrator

---------

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

* docs: archive doc-frontmatter-schema openspec change

* Apply suggestions from code review

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>

* fix: restore protocol stubs for type checking

* Add frontamtter check

* fix: harden protocol stubs for code quality

* Add PR test hardening change

* fix: remediate review findings and harden review gates

* fix: rebuild review report model for pydantic

* Add story and onboarding change

* Update change tracking

* Improve scope for ci/cd requirements

* docs: sharpen first-contact story and onboarding (#467)

* 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 review blockers and bump patch version

* test: harden modules docs url assertions

* fix: harden trustworthy green checks (#469)

* 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>

* fix: address CodeRabbit review findings for ci-02 (#471)

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

* fix: propagate docker actionlint exit code instead of masking failures (#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>

* fix: assert hook id stability and cd to repo root for local actionlint (#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>

* feat: clean-code-01-principle-gates — 7-principle charter gates, v0.44.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>

* feat: archive completed openspec changes and update main specs

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>

* Add new user onboarding change

* docs & tooling: new user onboarding + smart-test and pre-commit review 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>

* fix: code-review gate (Typer params), typer<0.24 vs semgrep, module upgrade 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 (#480)

* 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>

* archived implemented changes

* Archive and remove outdated changes

* Split and refactor change proposals between both repos

* Archive alignment change

* Add changes and github hierarchy scripts

* feat: add GitHub hierarchy cache sync (#492)

* feat: add github hierarchy cache sync

* Backport improvements from modules scripts

* Fix review findings

* Make github sync script executable

---------

Signed-off-by: Dom <39115308+djm81@users.noreply.github.com>
Co-authored-by: Dominikus Nold <djm81@users.noreply.github.com>

* [codex] Compact agent governance loading (#493)

* feat: compact agent governance loading

* docs: mark governance PR task complete

* docs: sync governance-03 github issue metadata

* fix: restore dev branch governance block

* Apply review findings

* docs: add sibling internal wiki context for OpenSpec design

Point AGENTS.md, Claude/Copilot/Cursor surfaces, and the OpenSpec rule at
docs/agent-rules/40-openspec-and-tdd.md to read-only wiki paths (hot.md,
graph.md, concepts) via absolute paths when specfact-cli-internal is present.
Update INDEX applicability notes and extend governance tests.

Made-with: Cursor

---------

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

* Archived github hierarchy change

* Update rules for openspec archive

* Potential fix for pull request finding 'Unused local variable'

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>

* Add wiki update notes

* Archive governance-03 change, format markdown, add wiki instructions for update

* Fix review findings

* Fix type errors

* fix: safe VS Code settings merge and project artifact writes (#490) (#496)

* fix: safe merge for VS Code settings.json on init ide (profile-04)

- Add project_artifact_write.merge_vscode_settings_prompt_recommendations with fail-safe
  on invalid JSON / bad chat shape; --force backs up to .specfact/recovery/ then replaces.
- Route ide_setup create_vscode_settings through helper; thread force; catch errors for CLI exit.
- Lint gate: scripts/verify_safe_project_writes.py blocks json.load/dump in ide_setup.py.
- Tests, installation docs, 0.45.2 changelog and version pins.

OpenSpec: profile-04-safe-project-artifact-writes
Made-with: Cursor

* fix(profile-04): satisfy review gate, pin setuptools for semgrep

- Refactor project_artifact_write merge path (KISS); icontract predicates
- Deduplicate ide_setup prompt helpers; import from project_artifact_write
- verify_safe_project_writes: ast.walk, contracts, beartype
- Pin setuptools<82 for Semgrep pkg_resources chain
- Update TDD_EVIDENCE and tasks checklist

Made-with: Cursor

* ci: run safe-write verifier in PR orchestrator lint job

Match hatch run lint by invoking scripts/verify_safe_project_writes.py
after ruff/basedpyright/pylint. Use set -euo pipefail so the first lint
failure is not masked by later commands.

Made-with: Cursor

* fix(profile-04): address CodeRabbit review (docs, guard, contracts, tests)

- Wrap installation.md VS Code merge paragraph to <=120 chars per line
- tasks 4.7 + TDD_EVIDENCE: openspec validate --strict sign-off
- verify_safe_project_writes: detect from-json import and aliases
- settings_relative_nonblank: reject absolute paths and .. segments
- ide_setup: _handle_structured_json_document_error for duplicate handlers
- ProjectWriteMode docstring (reserved policy surface); backup stamp + collision loop
- Tests: malformed settings preserved on init ide exit; force+chat coercion; AST guard tests

Made-with: Cursor

* fix(profile-04): JSON5 settings, repo containment, review follow-ups

- merge_vscode_settings: resolve containment before mkdir/write; JSON5 load/dump
  (JSONC comments; trailing_commas=False for strict JSON output)
- ide_setup: empty prompts_by_source skips catalog fallback (_finalize allow_empty_fallback)
- verify_safe_project_writes: detect import json as js attribute calls
- contract_predicates: prompt_files_all_strings accepts list[Any] for mixed-type checks
- Tests: symlink escape, JSONC merge, empty export strip, import-json-as-js guard
- tasks.md / TDD_EVIDENCE: wrap lines to <=120 chars; CHANGELOG + json5 dep + setup.py sync

Made-with: Cursor

* docs(profile-04): tasks pre-flight + full pytest; narrow icontract ensure

- tasks 1.1: hatch env create then smart-test-status and contract-test-status
- tasks 4.3: add hatch test --cover -v to quality gates
- TDD_EVIDENCE: shorter module-signatures and report lines (<=120 cols)
- project_artifact_write: isinstance(result, Path) in @ensure postconditions

Made-with: Cursor

* fix: clear specfact code review on safe-write modules

- verify_safe_project_writes: flatten json binding helpers; stderr writes
  instead of print; inline Import/ImportFrom loops to drop duplicate-shape DRY
- project_artifact_write: _VscodeChatMergeContext dataclass (KISS param count);
  typed chat_body cast before .get for pyright

Made-with: Cursor

* docs(profile-04): record hatch test --cover -v in TDD_EVIDENCE

Align passing evidence with tasks.md 4.3 full-suite coverage gate.

Made-with: Cursor

* fix: reduce KISS blockers (bridge sync contexts, tools, partial adapters)

Refactors high-parameter call sites into dataclasses/context objects and splits hot spots (export devops pipeline, smart_test_coverage incremental run, suggest_frontmatter, crosshair summary loop).

API: BridgeSync.export_change_proposals_to_devops(adapter_type, ExportChangeProposalsOptions | None); LoggerSetup.create_logger(name, LoggerCreateOptions | None); run_crosshair(path, CrosshairRunOptions | None).

Full specfact code review --scope full still reports error-severity kiss/radon findings (remaining nesting/LOC and param counts in ADO, analyzers, generators, source_scanner, module_installer, bundle-mapper, etc.). Gate PASS requires follow-up.

Made-with: Cursor

* Fix review findings and sign modules

* fix(tests): register dynamic check_doc_frontmatter module; align _update_cache tests

- Insert check_doc_frontmatter into sys.modules before exec_module so
  dataclasses can resolve string annotations (fixes Docs Review / agent
  rules governance fixture).
- Call SmartCoverageManager._update_cache with _SmartCacheUpdate after
  signature refactor (fixes basedpyright reportCallIssue).

Made-with: Cursor

* fix(tests): align install_module mocks with InstallModuleOptions; register verify_bundle script

- Monkeypatch/patch fakes now accept (module_id, options=None) matching
  install_module(module_id, InstallModuleOptions(...)).
- Read install_root, trust_non_official, non_interactive, reinstall from
  InstallModuleOptions in CLI command tests.
- Dynamic load of verify-bundle-published registers sys.modules before
  exec_module (same dataclass annotation issue as check_doc_frontmatter).

Made-with: Cursor

---------

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

* Fix review findings (#498)

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

* feat(openspec): add marketplace-06-ci-module-signing change proposal

Moves module signing from local interactive requirement to CI step
triggered by PR approval (pull_request_review). Eliminates local private
key dependency for non-interactive development on feature/dev branches.
Trust boundary remains at main.

Scope:
- NEW .github/workflows/sign-modules-on-approval.yml
- MODIFY scripts/pre-commit-smart-checks.sh (branch-aware policy)
- MODIFY .github/workflows/pr-orchestrator.yml (split verify by target)
- MODIFY .github/workflows/sign-modules.yml (main-only enforcement)

GitHub: #500
Parent Feature: #353 (M…
djm81 added a commit that referenced this pull request Apr 14, 2026
* fix(version): sync manifests to 0.36.1 and archive backlog-core-04 (#297)

* fix(backlog): restore installed runtime discovery and add backlog prompt

* Archive bugfix change

* fix(version): sync built-in module manifests to 0.36.1

---------

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

* fix: harden module lifecycle bootstrap and signing workflows (#299)

* fix: harden module lifecycle bootstrap and signing workflows

* fix: stabilize module signature hashing across environments

* fix: stabilize bundle module signature verification in CI

---------

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

* test: simplify monkeypatch callables in module_security tests

* Fix duplicate with statement

* chore(release): bump to v0.37.1 and harden signature gates

* test: fix init command regression assertions

* fix: release v0.37.2 with runtime crypto deps

* fix: address signature-backend warning and module version drift

* fix: use hatch build in PyPI publish workflow script (#304)

* fix: resolve startup module freshness home path dynamically (#306)

* fix: harden module signing workflow and reduce startup log noise

* test: align module migration compatibility with decoupled module versions

* fix: fail fast on invalid base ref in changed-only module signing

* fix: stabilize module precedence and backlog github mapping flow

* fix(module-registry): persist disables and correct bundled availability

* Re-sign module registry and fix / ignore local temp artifacts

* bump module registry version to 0.1.3

* fix(registry): restore protocol reporting logs in debug mode

* fix(backlog): harden refine writeback, prompts, and any-filter semantics (#311)

* fix(backlog): harden refine writeback, prompts, and daily any filters

* fix(github): default story type fallback to feature

* Fix format

* Fix codex review findings

* bump and sign changed modules

* chore(hooks): enforce module signature verification in pre-commit

* chore(hooks): add markdownlint to pre-commit checks

---------

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

* fix(hooks,ado): correct format gate and enforce iteration on direct
  id lookup

* Apply review findings and fix tests

* Pin virtualenv < 21 to avoid incaopatibility failure

* fix: finalize backlog-core-06 ado comment API versioning (#314)

* fix(backlog): harden refine writeback, prompts, and daily any filters

* fix(github): default story type fallback to feature

* Fix format

* Fix codex review findings

* bump and sign changed modules

* chore(hooks): enforce module signature verification in pre-commit

* chore(hooks): add markdownlint to pre-commit checks

* fix: finalize backlog-core-06 ado comment api versioning and ci hatch pins

* fix: address review findings for formatter safety and ado metric patch guards

* docs(openspec): update CHANGE_ORDER status tracking

* fix(ado): apply iteration filter for direct issue_id lookup

---------

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

* feat: Advanced marketplace features (marketplace-02) - dependency resolution, aliases, custom registries, publishing (#318)

* feat: advanced marketplace features (marketplace-02) - dependency resolution, aliases, custom registries, namespace enforcement, publishing

- dependency_resolver: resolve_dependencies(), --skip-deps, --force on install
- alias_manager: alias create/list/remove (no top-level alias commands)
- custom_registries: add-registry, list-registries, remove-registry; fetch_all_indexes; search Registry column
- module_installer: namespace/name enforcement, collision detection
- scripts/publish-module.py + .github/workflows/publish-modules.yml (optional signing)
- docs: publishing-modules, custom-registries, dependency-resolution; updated installing-modules, module-marketplace, commands
- version 0.38.0, CHANGELOG

Made-with: Cursor

* docs(openspec): defer 6.2.4 and 6.2.5 (index update/PR, workflow test) to later

Made-with: Cursor

* Add follow-up change proposals for marketplace

* Fix codex review findings

---------

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

* fix: complete marketplace publish registry PR flow and bump (#320)

0.38.1

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

* fix: update init ide hint and repair publish workflow
  condition

* feat(backlog): normalize daily summarize Markdown output (#323)

* feat(backlog): summarize Markdown normalization and TTY/CI rendering

* chore(openspec): drop implementation snapshot from change

* Update title

---------

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

* Update version

* Add github skills

* Add new marketplace changes

* feat(cli): category groups and flat shims using real module Typer (#331)

* feat(cli): category groups and flat shims using real module Typer

- Add category groups (code, backlog, project, spec, govern) with flatten same-name member
- Sort commands under backlog/project groups A–Z
- Fix flat shims to expose real module Typer so 'specfact sync bridge' and 'specfact plan update-idea' work
- Add first-run init, module grouping, OpenSpec change for 0.40.x remove-flat-shims
- Bump version to 0.39.0, CHANGELOG and OpenSpec updates

Made-with: Cursor

* Fix signature

* fix: resolve module grouping regressions and stabilize CI
  tests

* fix: keep uncategorized modules flat during grouped registration

---------

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

* Update docs regarding module migration change

* feat: module-migration-02 bundle extraction (#332)

* docs: add module-migration-02-bundle-extraction to CHANGE_ORDER.md

* feat: implement module-migration-02 bundle extraction

* fix(ci): checkout module bundles repo for test jobs

* Fix test failures

* fix(modules): load local bundle sources in compatibility aliases

* fix: run worktree policy code in tests/CI and silence reexport deprecation

- Prefer src/<name>/main.py over app.py when SPECFACT_REPO_ROOT is set so
  policy init uses worktree templates.py (SPECFACT_POLICY_TEMPLATES_DIR).
- Policy engine module-package.yaml: version 0.1.5 and re-signed checksum.
- conftest: set SPECFACT_REPO_ROOT, SPECFACT_POLICY_TEMPLATES_DIR; add
  bundle package roots when specfact-cli-modules present.
- Policy engine integration tests: rely on conftest env, clear registry
  and re-register before invoke so loader uses worktree.
- test_reexport_shims: filter deprecation warning for legacy analyze import.

Made-with: Cursor

* fix: defer specfact_backlog import in shims so CI can register bridges

- backlog and policy_engine __init__.py: import specfact_backlog only in
  __getattr__ (cached), not at module load. Allows loading .src.adapters.*
  for bridge registration without requiring specfact_backlog installed.
- Re-sign backlog and policy_engine module-package.yaml after init changes.
- openspec: update module-migration-02 tasks.md.

Made-with: Cursor

* fix: defer bundle import in all module shims to fix CI collection errors

- Apply deferred import (only in __getattr__, cached) to analyze, contract,
  drift, enforce, generate, import_cmd, migrate, patch_mode, plan, project,
  repro, sdd, spec, sync, validate. Matches backlog and policy_engine.
- Prevents ImportError when tests import specfact_cli.modules.<name>.src.*
  without specfact_backlog/specfact_govern/specfact_project/specfact_spec
  installed (e.g. CI). Fixes 78 collection errors.
- Re-sign all affected module-package.yaml manifests.

Made-with: Cursor

* fix(ci): include module shims in hatch cache key so CI uses current code

* feat(modules): registry descriptions, --bump-version for publish, tasks and format fixes

- Add description to registry index entries in publish-module.py (module search)
- Add --bump-version patch|minor|major for bundle re-publish in publish-module.py
- Format fixes in validate-modules-repo-sync.py (SIM108, B007)
- Mark completed tasks in module-migration-02-bundle-extraction tasks.md
- Update test for publish_bundle(bump_version=) signature

Made-with: Cursor

* Add missing migration tasks to the open change to completely isolate modules into specfact-cli-modules repo.

* Add gap analysis and update changes

* Update follow-up changes to avoid ambiguities and overlaps

* docs: complete migration-02 section-18 parity and 17.8 gate evidence

* docs: mark migration-02 import-categorization commit checkpoint done

* Update change constraints and blockers for module migration

* docs: add migration-05 issue #334 and complete task 17.10.4

* Update change constraints and blockers for module migration

---------

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

* Implement blockers to prepare for module-migration-03 change. (#336)

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

* feat: module-migration-03 core slimming closeout and registry fixes (#317) (#341)

* Prepare module-migration-03 removal of old built-in modules

* feat(core): delete specfact-project module source from core (migration-03)

Made-with: Cursor

* feat(core): delete specfact-backlog module source from core (migration-03)

Made-with: Cursor

* feat(core): delete specfact-codebase module source from core (migration-03)

Made-with: Cursor

* feat(core): delete specfact-spec module source from core (migration-03)

Made-with: Cursor

* feat(core): delete specfact-govern module source from core (migration-03)

Made-with: Cursor

* chore(tests): skip tests for removed modules when source absent (migration-03)

Add pytest.importorskip() for backlog, plan, sync, enforce, generate,
patch_mode, import_cmd so tests are skipped when module source was
removed from core. Preserves tests for later move to specfact-cli-modules.
Update tasks.md and TDD_EVIDENCE.md for Task 10 completion.

Made-with: Cursor

* feat(bootstrap): remove flat shims and non-core module registrations (migration-03)

- Remove _register_category_groups_and_shims (unconditional category/shim registration).
- Trim CORE_MODULE_ORDER to 4 core: init, auth, module-registry, upgrade.
- Add @beartype to _mount_installed_category_groups.
- Category groups and flat shims only for installed bundles via _mount_installed_category_groups.

Made-with: Cursor

* docs(openspec): mark Task 11.4 done in tasks.md

Made-with: Cursor

* feat(cli): conditional category group mount from installed bundles (migration-03)

- Add _RootCLIGroup (extends ProgressiveDisclosureGroup) with resolve_command
  override: unknown commands in KNOWN_BUNDLE_GROUP_OR_SHIM_NAMES show
  actionable error (not installed + specfact init / specfact module install).
- Root app uses cls=_RootCLIGroup. Main help docstring adds init/module
  install hint for workflow bundles.

Made-with: Cursor

* docs(openspec): mark Task 12.4 done in tasks.md

Made-with: Cursor

* feat(init): enforce mandatory bundle selection and profile presets (migration-03)

* Add module removal core tests

* docs(openspec): record Task 14 module signing gate (migration-03)

* feat: complete module-migration-03 core slimming and
  follow-up alignment (#317)

* Fix format error

* fix: handle detached HEAD registry branch selection and
  stabilize migration-03 CI tests

---------

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

* Finalize module-migration-02 change

* docs(backlog-auth): update auth docs and OpenSpec task status (#342)

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

* chore(openspec): archive completed changes and sync main specs

* docs(openspec): prefix module migration proposal titles with IDs

* Add bug change for ado required fields setting and update change order

* Update change order

* feat(core): finalize migration-03 auth removal and 3-core slim package (#317) (#343)

* Prepare module-migration-03 removal of old built-in modules

* feat(core): delete specfact-project module source from core (migration-03)

Made-with: Cursor

* feat(core): delete specfact-backlog module source from core (migration-03)

Made-with: Cursor

* feat(core): delete specfact-codebase module source from core (migration-03)

Made-with: Cursor

* feat(core): delete specfact-spec module source from core (migration-03)

Made-with: Cursor

* feat(core): delete specfact-govern module source from core (migration-03)

Made-with: Cursor

* chore(tests): skip tests for removed modules when source absent (migration-03)

Add pytest.importorskip() for backlog, plan, sync, enforce, generate,
patch_mode, import_cmd so tests are skipped when module source was
removed from core. Preserves tests for later move to specfact-cli-modules.
Update tasks.md and TDD_EVIDENCE.md for Task 10 completion.

Made-with: Cursor

* feat(bootstrap): remove flat shims and non-core module registrations (migration-03)

- Remove _register_category_groups_and_shims (unconditional category/shim registration).
- Trim CORE_MODULE_ORDER to 4 core: init, auth, module-registry, upgrade.
- Add @beartype to _mount_installed_category_groups.
- Category groups and flat shims only for installed bundles via _mount_installed_category_groups.

Made-with: Cursor

* docs(openspec): mark Task 11.4 done in tasks.md

Made-with: Cursor

* feat(cli): conditional category group mount from installed bundles (migration-03)

- Add _RootCLIGroup (extends ProgressiveDisclosureGroup) with resolve_command
  override: unknown commands in KNOWN_BUNDLE_GROUP_OR_SHIM_NAMES show
  actionable error (not installed + specfact init / specfact module install).
- Root app uses cls=_RootCLIGroup. Main help docstring adds init/module
  install hint for workflow bundles.

Made-with: Cursor

* docs(openspec): mark Task 12.4 done in tasks.md

Made-with: Cursor

* feat(init): enforce mandatory bundle selection and profile presets (migration-03)

* Add module removal core tests

* docs(openspec): record Task 14 module signing gate (migration-03)

* feat: complete module-migration-03 core slimming and
  follow-up alignment (#317)

* Fix format error

* fix: handle detached HEAD registry branch selection and
  stabilize migration-03 CI tests

* Prepare module-migration-03 removal of old built-in modules

* Prepare module-migration-03 removal of old built-in modules

* chore(tests): skip tests for removed modules when source absent (migration-03)

Add pytest.importorskip() for backlog, plan, sync, enforce, generate,
patch_mode, import_cmd so tests are skipped when module source was
removed from core. Preserves tests for later move to specfact-cli-modules.
Update tasks.md and TDD_EVIDENCE.md for Task 10 completion.

Made-with: Cursor

* feat(bootstrap): remove flat shims and non-core module registrations (migration-03)

- Remove _register_category_groups_and_shims (unconditional category/shim registration).
- Trim CORE_MODULE_ORDER to 4 core: init, auth, module-registry, upgrade.
- Add @beartype to _mount_installed_category_groups.
- Category groups and flat shims only for installed bundles via _mount_installed_category_groups.

Made-with: Cursor

* docs(openspec): mark Task 11.4 done in tasks.md

Made-with: Cursor

* feat(cli): conditional category group mount from installed bundles (migration-03)

- Add _RootCLIGroup (extends ProgressiveDisclosureGroup) with resolve_command
  override: unknown commands in KNOWN_BUNDLE_GROUP_OR_SHIM_NAMES show
  actionable error (not installed + specfact init / specfact module install).
- Root app uses cls=_RootCLIGroup. Main help docstring adds init/module
  install hint for workflow bundles.

Made-with: Cursor

* docs(openspec): mark Task 12.4 done in tasks.md

Made-with: Cursor

* feat(init): enforce mandatory bundle selection and profile presets (migration-03)

* Add module removal core tests

* docs(openspec): record Task 14 module signing gate (migration-03)

* feat: complete module-migration-03 core slimming and
  follow-up alignment (#317)

* Fix format error

* fix: handle detached HEAD registry branch selection and
  stabilize migration-03 CI tests

* feat(core): remove auth module from core and route auth via backlog (migration-03)

* docs(openspec): update migration-03 PR status and tracking

* docs(openspec): finalize migration-03 checklist and defer non-blocking gates

* Fix remaining auth findings and dependency in core cli

---------

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

* Archive module-migration-03 change

* feat: remove flat command shims (category-only CLI) (#344)

* feat: remove flat command shims from grouped registry

* Finalize change module-migration-04 implementation

---------

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

* Archived module-migration-04 and updated specs

* docs(openspec): finalize module-migration-05 tracking after modules PR merge (#345)

* Implement blockers to prepare for module-migration-03 change.

* Update migration change

* docs(openspec): close migration-05 PR tracking and change order

---------

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

* Archive module-migration-05 change and update specs

* test(migration-06): move legacy sync tests out of core (#346)

* feat(migration-06): core decoupling cleanup - boundary tests and inventory

- Add test_core_does_not_import_from_bundle_packages boundary regression test
- Update spec with ownership boundary and migration acceptance criteria
- Add CORE_DECOUPLING_INVENTORY.md (keep/move/interface classification)
- Record TDD evidence in TDD_EVIDENCE.md
- Update docs/reference/architecture.md with core vs modules-repo boundary
- Update openspec/CHANGE_ORDER.md status

No move candidates identified; core already decoupled from bundle packages.
Boundary test prevents future core->bundle coupling.

Refs #338

Made-with: Cursor

* chore(migration-06): mark all tasks complete

Made-with: Cursor

* feat(migration-06): extend scope - migrate package-specific artifacts per #338

- Add MIGRATION_REMOVAL_PLAN.md with phased removal of MIGRATE-tier code
- Add test_core_modules_do_not_import_migrate_tier boundary test
- Remove templates.bridge_templates (dead code; only tests used it)
- Remove tests/unit/templates/test_bridge_templates.py
- Update CORE_DECOUPLING_INVENTORY.md with removal status
- Update spec with MIGRATE-tier enforcement and package-specific removal

Phase 1 complete. Further MIGRATE-tier removal documented in plan.
Refs #338

Made-with: Cursor

* test(migration-06): move legacy sync tests out of core

---------

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

* Archived module-migration-06 change and updated specs

* test: module-migration-07 core test ownership cleanup (#347)

* test: finalize module-migration-07 core test ownership cleanup

* docs: mark module-migration-07 quality and PR tasks complete

* test: fix CI isolation failures for project and persona merge

* test: narrow migrated skips and restore core registry guardrails

* test: stabilize core CI by refining skips and bootstrap checks

* test: fix remaining PR failures via targeted core filtering

* fix: harden module package checks against import-mode class identity

* test: stabilize core slimming integration assertions

---------

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

* Archived backlog-core-07 change and updated specs

* Update some docs and archive latest finished changes and specs

* Add docs update change

* feat: add agile-01-feature-hierarchy change and update CHANGE_ORDER.md (#376)

- Create openspec/changes/agile-01-feature-hierarchy/ with proposal.md and tasks.md
- Add Epics #256 (Architecture Layer Integration), #257 (AI IDE Integration),
  and #258 (Integration Governance and Dogfooding) to CHANGE_ORDER.md parent issues table
- 25 GitHub Feature issues created (#351-#375), linked to their parent Epics
- Feature label created; issue #185 closed (ceremony-cockpit-01, archived 2026-02-18)

Co-authored-by: Dominikus Nold <djm81@users.noreply.github.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>

* docs: align core docs and sync pending changes (#377)

* docs: align core docs and sync pending changes

* fix: preserve partial staging in markdown autofix hook

---------

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

* fix: stabilize release test suite after module migration

* Update module

* Fix module install

* Fix module install

* Fix failed tests

* Fix marketplace client regression

* Fix install regression for specfact-cli (#380)

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

* Add changes to improve runtime validation and backlog module remaining migration to module

* refactor: remove backlog ownership from core cli (#384)

* refactor: remove backlog ownership from core cli

* fix: align CI marketplace validation paths

* test: stabilize command audit validation and add command-surface change

---------

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

* Add new command alignment change

* fix: finalize cli runtime validation regressions (#387)

* fix: finalize cli runtime validation regressions

* test: align satisfied dependency logging assertions

---------

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

* docs: archive cli-val-07 change

* Archive changes and update specs

* Add code-review change proposals

* test: align command surface regression coverage

* docs: add OpenSpec change for backlog-core commands migration (#390)

* feat: add OpenSpec change for backlog-core commands migration

Change: backlog-02-migrate-core-commands
- Add proposal, design, tasks, specs
- Add TDD_EVIDENCE.md with implementation progress
- GitHub Issue: #389

Rules applied: AGENTS.md Git Worktree Policy, TDD Hard Gate

Made-with: Cursor

* docs: update TDD_EVIDENCE and tasks for quality gate results

Made-with: Cursor

* docs: update TDD_EVIDENCE with test fix results

Made-with: Cursor

* docs: update TDD_EVIDENCE with all test fixes complete

Made-with: Cursor

---------

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

* fix: use POST instead of PATCH for ADO work item creation (#391)

* fix: use POST instead of PATCH for ADO work item creation

Azure DevOps API requires POST (not PATCH) for creating work items.

Also fixed category grouping to always register group commands.

Made-with: Cursor

* docs: add changelog entry for ADO POST fix

Made-with: Cursor

* chore: bump version to 0.40.4

Made-with: Cursor

* fix: update test mocks from PATCH to POST for ADO create

- Reverted incorrect unconditional _mount_installed_category_groups call

- Updated test_create_issue mocks to use requests.post instead of requests.patch

Made-with: Cursor

* test: skip category group test when bundles not installed

The test_bootstrap_with_category_grouping_disabled_registers_flat_commands test

expects bundles like specfact-codebase to be installed, but in CI they may not be.

Added pytest.skip() when 'code' command is not available.

Made-with: Cursor

---------

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

* docs: archive backlog-02-migrate-core-commands change

- Archived backlog-02-migrate-core-commands change

- Updated CHANGE_ORDER.md with implementation status

- Updated main specs with backlog-add, backlog-analyze-deps, backlog-delta, backlog-sync, backlog-verify-readiness

Made-with: Cursor

* feat: document code-review module scaffold (#410)

* feat: document code-review module scaffold

* chore: sync 0.41.0 release version artifacts

---------

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

* Add change for project codebase ownership

* Realign code import ownership surface (#412)

* Realign code import ownership surface

* Harden temp registry command audit test

---------

Signed-off-by: Dom <39115308+djm81@users.noreply.github.com>
Co-authored-by: Dominikus Nold <djm81@users.noreply.github.com>

* Update code review changes

* docs: update reward ledger OpenSpec tracking (#413)

Link the existing change issue, record TDD evidence, and align the OpenSpec artifacts with the bundle-owned DDL and paired worktree implementation flow.

Made-with: Cursor

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

* Track house-rules skill OpenSpec changes (#414)

Made-with: Cursor

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

* docs: Update change-proposal for code-review-07 (#415)

* Track house-rules skill OpenSpec changes

Made-with: Cursor

* Cursor: Apply local changes for cloud agent

---------

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

* Finalize code-review-07 status

* Finalize code-review-08 status

* feat: apply code-review-09 pre-commit integration

* fix: fall back when cached hatch test env is broken

* fix: avoid hatch env for coverage xml export

* fix: install type-check and lint tools directly in CI

* fix: install pytest fallback deps in test job

* fix: install pytest-cov for test fallback path

* Finalize code-review-09 status

* [Change] Align core docs with modules site ownership (#419)

* Align core docs with modules site ownership

* Close docs portal change PR task

---------

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

* fix: harden docs parity URL assertions

* Archive finished changes and update specs

* docs: fix command syntax parity after lean-core/modules split (v0.42.2) (#421)

Replace all stale CLI syntax families in authored docs with current
shipped commands. Adds docs parity tests that guard against regression.

Removed syntax families corrected:
- specfact project plan → project devops-flow / project snapshot / govern enforce sdd
- project import from-bridge → code import from-bridge
- specfact backlog policy → backlog verify-readiness / backlog refine
- specfact spec contract → spec validate / spec generate-tests / spec mock
- specfact spec sdd constitution → govern enforce sdd [BUNDLE]
- spec generate <prompt-subcommands> → AI IDE skills or removed

Updated docs: README.md, docs/index.md, docs/README.md,
docs/reference/commands.md (+4 reference docs),
docs/getting-started/ (4 files), docs/guides/ (21 files),
docs/examples/ (5 files), docs/prompts/ (2 files).

Added 11 new docs parity tests in test_release_docs_parity.py:
- 7 tests asserting removed syntax families stay absent
- 4 tests asserting current command families remain documented

Co-authored-by: Dominikus Nold <djm81@users.noreply.github.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>

* Archive finished changes and update specs

- Archive docs-03-command-syntax-parity (2026-03-18)
- Sync delta specs: cli-output + documentation-alignment updated with
  post-split command-surface alignment requirements and scenarios
- Update CHANGE_ORDER.md: mark docs-03 as archived

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

* Update evidence

* Potential fix for pull request finding 'Unused global variable'

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>

* docs: align core docs ownership and parity (#424)

* docs: fix command syntax parity after lean-core/modules split (v0.42.2)

Replace all stale CLI syntax families in authored docs with current
shipped commands. Adds docs parity tests that guard against regression.

Removed syntax families corrected:
- specfact project plan → project devops-flow / project snapshot / govern enforce sdd
- project import from-bridge → code import from-bridge
- specfact backlog policy → backlog verify-readiness / backlog refine
- specfact spec contract → spec validate / spec generate-tests / spec mock
- specfact spec sdd constitution → govern enforce sdd [BUNDLE]
- spec generate <prompt-subcommands> → AI IDE skills or removed

Updated docs: README.md, docs/index.md, docs/README.md,
docs/reference/commands.md (+4 reference docs),
docs/getting-started/ (4 files), docs/guides/ (21 files),
docs/examples/ (5 files), docs/prompts/ (2 files).

Added 11 new docs parity tests in test_release_docs_parity.py:
- 7 tests asserting removed syntax families stay absent
- 4 tests asserting current command families remain documented

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

* docs: align core docs ownership and parity

---------

Co-authored-by: Dominikus Nold <djm81@users.noreply.github.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>

* docs: fix quickstart install guidance

* docs: remove generated project plan docs

* Add code-review change

* fix: preserve native backlog import payloads (#429)

* fix: preserve native backlog import payloads

* fix: preserve imported proposal ids on reimport

---------

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

* fix: add docs review workflow and repair docs links (#428)

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

* fix: keep imported change ids stable across title changes (#431)

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

* fix: remove conflicting pages file copies

* Add docs sync changs

* docs: update openspec clean-code planning

* Update change status

* fix: code-review-zero-findings dogfood remediation (v0.42.3) (#435)

* fix: continue code review remediation and align module signing

* fix: complete code-review-zero-findings dogfood remediation (v0.42.3)

Eliminates full-scope code review findings (types, Radon CC, contracts, lint) and records OpenSpec change code-review-zero-findings with tests and CHANGELOG. Module manifests may need re-signing before merge per project policy.

Made-with: Cursor

* chore: re-sign bundled modules after content changes

* fix: resolve review follow-up regressions

* fix: run ci smart-test directly

* fix: restore ci test progress output

* fix: stabilize command audit ci test

---------

Signed-off-by: Dom <39115308+djm81@users.noreply.github.com>
Co-authored-by: Dominikus Nold <djm81@users.noreply.github.com>

* Add docs refactoring changes

* Add bug change tracking for encoding and resources

* docs: restructure core site IA to 6-section progressive nav (#442)

* docs: restructure core site IA from 5 flat sections to 6 progressive sections

Restructure docs.specfact.io from a flat 5-section sidebar to a 6-section
progressive navigation: Getting Started, Core CLI, Module System, Architecture,
Reference, Migration.

- Create docs/core-cli/, docs/module-system/, docs/migration/ directories
- Move 12 files to correct new sections with jekyll-redirect-from entries
- Write 3 new CLI reference pages: init.md, module.md, upgrade.md
- Replace first-steps.md with focused 5-minute quickstart
- Rewrite index.md as portal landing with core vs modules delineation
- Rewrite getting-started/README.md to link module tutorials to modules site
- Update sidebar navigation in _layouts/default.html
- Delete 6 obsolete files (competitive-analysis, ux-features, common-tasks,
  workflows, testing-terminal-output, guides/README)
- Add documentation-alignment delta spec for core-only focus policy

Implements: #438
OpenSpec: docs-05-core-site-ia-restructure

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

* docs: fix broken internal links after IA restructure

Update all relative links across 40 files to point to new file locations:
- ../reference/architecture.md → ../architecture/overview.md
- ../reference/debug-logging.md → ../core-cli/debug-logging.md
- ../reference/modes.md → ../core-cli/modes.md
- guides/ sibling links → ../module-system/ or ../migration/
- module-system/ back-links → ../guides/
- Remove links to deleted files (common-tasks, workflows)
- first-steps.md → quickstart.md

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

* fix: update test path for moved bootstrap-checklist and fix remaining broken links

- Update test_module_bootstrap_checklist_uses_current_bundle_ids to use
  new path docs/module-system/bootstrap-checklist.md
- Fix 2 remaining command-chains.md anchor links in migration-guide.md

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

---------

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

* fix: harden cross-platform runtime and IDE resource discovery (#443)

* fix: harden cross-platform runtime and IDE resource discovery

* fix: bump patch version to 0.42.4

* fix: restore init lifecycle compatibility

---------

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

* fix: resolve review type-safety findings

* Improve clarity and scope of ide prompt change

* feat(init): IDE prompt source catalog, --prompts, namespaced exports (#445)

* feat(init): IDE prompt source catalog, --prompts, namespaced exports

Implement init-ide-prompt-source-selection: discover core + module prompts,
default export all sources, interactive multi-select, non-interactive --prompts,
source-namespaced IDE paths. Fix project module roots to use metadata source
project. Extend discovery roots with user/marketplace. Update startup_checks
for nested exports. Bump init module to 0.1.14 with signed manifest.

Made-with: Cursor

* fix(init): scope VS Code prompt recommendations to exported sources

- Pass prompts_by_source into create_vscode_settings from copy_prompts_by_source_to_ide
- Strip prior .github/prompts/* recommendations on selective export to avoid stale paths
- Extract helpers for catalog paths and fallbacks; keep code review clean

Made-with: Cursor

---------

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

* fix tests

* release: bump version to 0.42.5 and update CHANGELOG

- Remove [Unreleased] sections; fold historical arch-08 notes under [0.34.0]
- Document init ide catalog, VS Code recommendations, integration test isolation

Made-with: Cursor

* Fix review findings

* feat(init): selective IDE prompt export cleanup and VS Code recommendation strip

- Prune stale exports and unselected catalog segments in copy_prompts_by_source_to_ide
- Strip only specfact*.prompt.md under .github/prompts/ when merging VS Code settings
- Tighten e2e missing-templates assertions to match CLI output
- Add unit tests for prompt path helper and selective export behavior

Made-with: Cursor

* Fix review findings

* Add missing import

* Bump patch version and changelog

* Fix failed tests

* Fix review findings

* docs: core vs modules URL contract and OpenSpec alignment (#448)

* docs: add core vs modules URL contract and OpenSpec alignment

Document cross-site permalink rules in docs/reference, extend documentation-alignment
and module-docs-ownership specs, update docs-07 and openspec config, and note the
dependency on modules URL policy in CHANGE_ORDER.

Made-with: Cursor

* docs: convert core handoff pages to modules canonical links (docs-07)

- Replace 20 duplicate guides/tutorials with thin summaries, prerequisites,
  and links to modules.specfact.io per URL contract
- Add docs/reference/core-to-modules-handoff-urls.md mapping table
- Align OpenSpec documentation-alignment spec delta with ADDED Requirements
- Complete docs-07-core-handoff-conversion tasks checklist

Refs: #439
Made-with: Cursor

---------

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

* feat(docs-12): docs command validation and cross-site link checks (#449)

* feat(docs-12): docs command validation and cross-site link checks

- Add check-docs-commands (Typer CliRunner prefix + --help) and exclusions for migration/illustrative pages
- Add check-cross-site-links with robust URL extraction; warn-only in docs-validate and CI while live site may lag
- Extend docs-review: Hatch env, validation steps, pytest tests/unit/docs/
- Opt-in handoff map HTTP test (SPECFACT_RUN_HANDOFF_URL_CHECK=1)
- OpenSpec deltas, TDD_EVIDENCE, tasks complete; CHANGELOG [Unreleased]

Made-with: Cursor

* fix(docs-validate): strip leading global flags before command path

- Parse --mode/--input-format/--output-format + value, then other root flags
- Add test for specfact --mode copilot import from-code …
- Fix showcase docs: hatch run contract-test-exploration (not specfact)

Made-with: Cursor

* fix(docs-12): harden link/command validators and spec wording

- Capitalize Markdown in cross-site link spec requirement
- Cross-site: redirect-only HTTP success, UTF-8 read failures, URL delimiter/trim fixes
- Docs commands: catch Typer exceptions on --help, UTF-8 read failures
- Tests: shared loader for check-cross-site-links module

Made-with: Cursor

---------

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

* fix(scripts): CliRunner without mix_stderr for Click 8.3+ compatibility (#451)

Default CliRunner() merges stderr into stdout; read stdout only so
accessing result.stderr does not raise when streams are combined.

Made-with: Cursor

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

* fix: review gates (semgrep print, radon CC, icontract, questionary types) (#452)

* fix: satisfy review gates for docs scripts and module_lifecycle typing

- Replace print() with Rich Console in docs validation scripts (semgrep)
- Split HTTP URL checks and doc scans to reduce cyclomatic complexity (radon)
- Add icontract require/ensure on public helpers; use CliRunner() without mix_stderr
- Cast questionary API for basedpyright reportUnknownMemberType

Made-with: Cursor

* fix(scripts): address #452 review (HTTP helpers, icontract, CLI streams)

- _http_success_code: use int directly after None guard
- _response_status: safe getcode via getattr/callable
- check-docs: drop @require preconditions duplicated by beartype
- _cli_invoke_streams_text: merge stdout + stderr for not-installed detection

Made-with: Cursor

---------

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

* Add speckit adapter alignment change and update affected change specs

* feat(adapters): spec-kit v0.4.x adapter alignment (#454)

* feat(adapters): spec-kit v0.4.x adapter alignment — extensions, presets, hooks, version detection, 7-command presets

Update SpecKitAdapter, ToolCapabilities, BridgeConfig presets, and
SpecKitScanner for spec-kit v0.4.3 compatibility:

- ToolCapabilities: 5 new optional fields (extensions, extension_commands,
  presets, hook_events, detected_version_source)
- SpecKitScanner: scan_extensions(), scan_presets(), scan_hook_events()
  with .extensionignore support and defensive JSON parsing
- SpecKitAdapter: 3-tier version detection (CLI → heuristic → None),
  refactored get_capabilities() with reduced cyclomatic complexity
- BridgeConfig: all 3 speckit presets expanded from 2 to 7 command
  mappings (specify, plan, tasks, implement, constitution, clarify, analyze)
- 42 new tests across 4 test files (110 targeted, 2248 full suite pass)
- Docs updated: comparison matrix, journey guide, integrations overview,
  adapter development guide

Closes #453

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

* fix: address CodeRabbit review findings

- Use get_bridge_logger instead of logging.getLogger in speckit adapter
  and scanner (production command path convention)
- Narrow except Exception to except OSError in _load_extensionignore
- Simplify redundant base_path conditional in get_capabilities
- Use SimpleNamespace instead of dynamic type() in tests
- Add subprocess.TimeoutExpired and OSError exception tests for CLI
  version detection
- Fix duplicate MD heading in bridge-adapter spec
- Add blank lines after markdown headings in proposal (MD022)

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

---------

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

* chore: bump version to 0.43.0 for spec-kit v0.4.x alignment (#455)

* chore: bump version to 0.43.0 and add changelog entry

Minor version bump for spec-kit v0.4.x adapter alignment feature.
Syncs version across pyproject.toml, setup.py, and __init__.py.
Adds changelog entry documenting new capabilities.

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

* Sync deps and fix changelog

* Sync deps and fix changelog

---------

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

* fix(packaging): remove workflow prompts from core wheel (packaging-02 #441, v0.43.1) (#456)

* fix(packaging): drop duplicate workflow prompts from core wheel (packaging-02 3.5)

Remove resources/prompts from wheel force-include and repo tree; canonical
copies remain in specfact-cli-modules bundles. Align startup IDE drift
checks and init template resolution with discover_prompt_template_files.
Bump to 0.43.1; re-sign init module 0.1.19. Update CHANGELOG, docs, OpenSpec.

Made-with: Cursor

* fix: address PR review (changelog, TDD evidence, startup checks, tests)

- Changelog 0.43.1 header uses Unreleased until release tag
- TDD_EVIDENCE: pre-fail block for Task 3.5 before passing verification
- TemplateCheckResult.sources_available; skip last_checked_version bump when no
  discoverable prompts; drift missing only when source exists
- Integration _fake_discover respects include_package_fallback
- test_validate_all_prompts uses tmp_path; re-enable file in default test run
- test_print_startup_checks_version_update_no_type uses stale version timestamp

Made-with: Cursor

* fix: address follow-up PR review (startup metadata, tests)

- Use ide_dir directly in TemplateCheckResult when IDE folder exists
- Set last_checked_version only after successful template-source checks
- Integration test: assert discover_prompt_template_files fallback + stable startup patches
- validate_all_prompts test: valid vs invalid specfact.*.md outcomes

Made-with: Cursor

---------

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

* Potential fix for pull request finding 'Empty except'

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>

* Fix changelog version

* docs: unify core docs portal UX (#459)

* docs: unify core docs portal UX

* Fix docs-13 core review findings

* Address docs-13 PR review feedback

* Address follow-up docs review feedback

---------

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

* Harden docs home URL test assertion

* feat: doc frontmatter validation, v0.43.2 review JSON gate, and pre-commit review UX (#463)

* chore(release): v0.43.2 pre-commit review JSON + OpenSpec dogfood rules

- Pre-commit gate writes ReviewReport JSON to .specfact/code-review.json
- openspec/config.yaml: require fresh review JSON and remediate findings
- Docs and unit tests updated

Made-with: Cursor

* fix: CodeRabbit — changelog, openspec TDD_EVIDENCE freshness, review hook timeout

- CHANGELOG 0.43.2: expanded entries, line wrap
- openspec/config.yaml: exclude TDD_EVIDENCE.md from review JSON staleness
- pre_commit_code_review: timeout 300s, TimeoutExpired handling
- tests: exact cwd, timeout assertion and timeout failure test

Made-with: Cursor

* Add code review to pre-commit and frontmatter docs validation

* Improve pre-commit script output

* Improve specfact code review findings output

* Fix review findings

* Improve pre-commit hook output

* Enable dev branch code review

* Update code review hook

* Fix contract review findings

* Fix review findings

* Fix review warnings

* feat: doc frontmatter hardening and code-review gate fixes

- Typer CLI for doc-frontmatter-check; safer owner resolution (split helpers for CC)
- Strict exempt handling; pre-commit hook matches USAGE-FAQ.md; review script JSON typing
- Shared test fixtures/types; integration/unit test updates; OpenSpec tasks and TDD evidence
- Changelog: pre-commit code-review-gate UX note

Made-with: Cursor

* Fix test failures and add docs review to github action runner

* Fix test failure due to UTF8 encoding

* Apply review findings

* Optimize pr orchestrator runtime

* Optimize pr orchestrator runtime

* Fix caching on pr-orchestrator

---------

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

* docs: archive doc-frontmatter-schema openspec change

* Apply suggestions from code review

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>

* fix: restore protocol stubs for type checking

* Add frontamtter check

* fix: harden protocol stubs for code quality

* Add PR test hardening change

* fix: remediate review findings and harden review gates

* fix: rebuild review report model for pydantic

* Add story and onboarding change

* Update change tracking

* Improve scope for ci/cd requirements

* docs: sharpen first-contact story and onboarding (#467)

* 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 review blockers and bump patch version

* test: harden modules docs url assertions

* fix: harden trustworthy green checks (#469)

* 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>

* fix: address CodeRabbit review findings for ci-02 (#471)

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

* fix: propagate docker actionlint exit code instead of masking failures (#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>

* fix: assert hook id stability and cd to repo root for local actionlint (#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>

* feat: clean-code-01-principle-gates — 7-principle charter gates, v0.44.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>

* feat: archive completed openspec changes and update main specs

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>

* Add new user onboarding change

* docs & tooling: new user onboarding + smart-test and pre-commit review 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>

* fix: code-review gate (Typer params), typer<0.24 vs semgrep, module upgrade 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 (#480)

* 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>

* archived implemented changes

* Archive and remove outdated changes

* Split and refactor change proposals between both repos

* Archive alignment change

* Add changes and github hierarchy scripts

* feat: add GitHub hierarchy cache sync (#492)

* feat: add github hierarchy cache sync

* Backport improvements from modules scripts

* Fix review findings

* Make github sync script executable

---------

Signed-off-by: Dom <39115308+djm81@users.noreply.github.com>
Co-authored-by: Dominikus Nold <djm81@users.noreply.github.com>

* [codex] Compact agent governance loading (#493)

* feat: compact agent governance loading

* docs: mark governance PR task complete

* docs: sync governance-03 github issue metadata

* fix: restore dev branch governance block

* Apply review findings

* docs: add sibling internal wiki context for OpenSpec design

Point AGENTS.md, Claude/Copilot/Cursor surfaces, and the OpenSpec rule at
docs/agent-rules/40-openspec-and-tdd.md to read-only wiki paths (hot.md,
graph.md, concepts) via absolute paths when specfact-cli-internal is present.
Update INDEX applicability notes and extend governance tests.

Made-with: Cursor

---------

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

* Archived github hierarchy change

* Update rules for openspec archive

* Potential fix for pull request finding 'Unused local variable'

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>

* Add wiki update notes

* Archive governance-03 change, format markdown, add wiki instructions for update

* Fix review findings

* Fix type errors

* fix: safe VS Code settings merge and project artifact writes (#490) (#496)

* fix: safe merge for VS Code settings.json on init ide (profile-04)

- Add project_artifact_write.merge_vscode_settings_prompt_recommendations with fail-safe
  on invalid JSON / bad chat shape; --force backs up to .specfact/recovery/ then replaces.
- Route ide_setup create_vscode_settings through helper; thread force; catch errors for CLI exit.
- Lint gate: scripts/verify_safe_project_writes.py blocks json.load/dump in ide_setup.py.
- Tests, installation docs, 0.45.2 changelog and version pins.

OpenSpec: profile-04-safe-project-artifact-writes
Made-with: Cursor

* fix(profile-04): satisfy review gate, pin setuptools for semgrep

- Refactor project_artifact_write merge path (KISS); icontract predicates
- Deduplicate ide_setup prompt helpers; import from project_artifact_write
- verify_safe_project_writes: ast.walk, contracts, beartype
- Pin setuptools<82 for Semgrep pkg_resources chain
- Update TDD_EVIDENCE and tasks checklist

Made-with: Cursor

* ci: run safe-write verifier in PR orchestrator lint job

Match hatch run lint by invoking scripts/verify_safe_project_writes.py
after ruff/basedpyright/pylint. Use set -euo pipefail so the first lint
failure is not masked by later commands.

Made-with: Cursor

* fix(profile-04): address CodeRabbit review (docs, guard, contracts, tests)

- Wrap installation.md VS Code merge paragraph to <=120 chars per line
- tasks 4.7 + TDD_EVIDENCE: openspec validate --strict sign-off
- verify_safe_project_writes: detect from-json import and aliases
- settings_relative_nonblank: reject absolute paths and .. segments
- ide_setup: _handle_structured_json_document_error for duplicate handlers
- ProjectWriteMode docstring (reserved policy surface); backup stamp + collision loop
- Tests: malformed settings preserved on init ide exit; force+chat coercion; AST guard tests

Made-with: Cursor

* fix(profile-04): JSON5 settings, repo containment, review follow-ups

- merge_vscode_settings: resolve containment before mkdir/write; JSON5 load/dump
  (JSONC comments; trailing_commas=False for strict JSON output)
- ide_setup: empty prompts_by_source skips catalog fallback (_finalize allow_empty_fallback)
- verify_safe_project_writes: detect import json as js attribute calls
- contract_predicates: prompt_files_all_strings accepts list[Any] for mixed-type checks
- Tests: symlink escape, JSONC merge, empty export strip, import-json-as-js guard
- tasks.md / TDD_EVIDENCE: wrap lines to <=120 chars; CHANGELOG + json5 dep + setup.py sync

Made-with: Cursor

* docs(profile-04): tasks pre-flight + full pytest; narrow icontract ensure

- tasks 1.1: hatch env create then smart-test-status and contract-test-status
- tasks 4.3: add hatch test --cover -v to quality gates
- TDD_EVIDENCE: shorter module-signatures and report lines (<=120 cols)
- project_artifact_write: isinstance(result, Path) in @ensure postconditions

Made-with: Cursor

* fix: clear specfact code review on safe-write modules

- verify_safe_project_writes: flatten json binding helpers; stderr writes
  instead of print; inline Import/ImportFrom loops to drop duplicate-shape DRY
- project_artifact_write: _VscodeChatMergeContext dataclass (KISS param count);
  typed chat_body cast before .get for pyright

Made-with: Cursor

* docs(profile-04): record hatch test --cover -v in TDD_EVIDENCE

Align passing evidence with tasks.md 4.3 full-suite coverage gate.

Made-with: Cursor

* fix: reduce KISS blockers (bridge sync contexts, tools, partial adapters)

Refactors high-parameter call sites into dataclasses/context objects and splits hot spots (export devops pipeline, smart_test_coverage incremental run, suggest_frontmatter, crosshair summary loop).

API: BridgeSync.export_change_proposals_to_devops(adapter_type, ExportChangeProposalsOptions | None); LoggerSetup.create_logger(name, LoggerCreateOptions | None); run_crosshair(path, CrosshairRunOptions | None).

Full specfact code review --scope full still reports error-severity kiss/radon findings (remaining nesting/LOC and param counts in ADO, analyzers, generators, source_scanner, module_installer, bundle-mapper, etc.). Gate PASS requires follow-up.

Made-with: Cursor

* Fix review findings and sign modules

* fix(tests): register dynamic check_doc_frontmatter module; align _update_cache tests

- Insert check_doc_frontmatter into sys.modules before exec_module so
  dataclasses can resolve string annotations (fixes Docs Review / agent
  rules governance fixture).
- Call SmartCoverageManager._update_cache with _SmartCacheUpdate after
  signature refactor (fixes basedpyright reportCallIssue).

Made-with: Cursor

* fix(tests): align install_module mocks with InstallModuleOptions; register verify_bundle script

- Monkeypatch/patch fakes now accept (module_id, options=None) matching
  install_module(module_id, InstallModuleOptions(...)).
- Read install_root, trust_non_official, non_interactive, reinstall from
  InstallModuleOptions in CLI command tests.
- Dynamic load of verify-bundle-published registers sys.modules before
  exec_module (same dataclass annotation issue as check_doc_frontmatter).

Made-with: Cursor

---------

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

* Fix review findings (#498)

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

* feat(openspec): add marketplace-06-ci-module-signing change proposal

Moves module signing from local interactive requirement to CI step
triggered by PR approval (pull_request_review). Eliminates local private
key dependency for non-interactive development on feature/dev branches.
Trust boundary remains at main.

Scope:
- NEW .github/workflows/sign-modules-on-approval.yml
- MODIFY scripts/pre-commit-smart-checks.sh (branch-aware policy)
- MODIFY .github/workflows/pr-orchestrator.yml (split verify by target)
- MODIFY .github/workflows/sign-modules.yml (main-only enforcement)

GitHub: #500
Parent Feature: #353 (Marketplace Module Distribution) → #194 (Architecture Epic)
Paired modules change: specfact-cli-modules#185

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

* chore(pre-commit): modular hooks + branch-aware module verify (#501)

* chore(pre-commit): modular hooks aligned with specfact-cli-modules

- Add scripts/pre-commit-quality-checks.sh (block1 stages + block2; all for manual/shim)
- Replace monolithic smart-checks with shim to quality-checks all
- .pre-commit-config: fail_fast, verify-module-signatures + check-version-sources,
  cli-block1-* hooks, cli-block2, doc frontmatter
- Match modules: hatch run lint when Python staged; scoped code review paths
- CLI extras: Markdown fix/lint, workflow actionlint (no packages/ bundle-import gate)
- Bump to 0.46.1; docs: README, CONTRIBUTING, code-review.md, agent-rules/70

Made-with: Cursor

* fix(pre-commit): branch-aware module verify hook (marketplace-06 policy)

- Add scripts/pre-commit-verify-modules.sh and git-branch-module-signature-flag.sh
- Point verify-module-signatures hook at wrapper (script); skip when no staged module paths
- pre-commit-quality-checks all: delegate module step to wrapper; safe-change allowlist
- Tests + CONTRIBUTING/CHANGELOG alignment

Made-with: Cursor

* fix(pre-commit): address r…
djm81 added a commit that referenced this pull request Apr 16, 2026
…#509)

* fix: address signature-backend warning and module version drift

* fix: use hatch build in PyPI publish workflow script (#304)

* fix: resolve startup module freshness home path dynamically (#306)

* fix: harden module signing workflow and reduce startup log noise

* test: align module migration compatibility with decoupled module versions

* fix: fail fast on invalid base ref in changed-only module signing

* fix: stabilize module precedence and backlog github mapping flow

* fix(module-registry): persist disables and correct bundled availability

* Re-sign module registry and fix / ignore local temp artifacts

* bump module registry version to 0.1.3

* fix(registry): restore protocol reporting logs in debug mode

* fix(backlog): harden refine writeback, prompts, and any-filter semantics (#311)

* fix(backlog): harden refine writeback, prompts, and daily any filters

* fix(github): default story type fallback to feature

* Fix format

* Fix codex review findings

* bump and sign changed modules

* chore(hooks): enforce module signature verification in pre-commit

* chore(hooks): add markdownlint to pre-commit checks

---------

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

* fix(hooks,ado): correct format gate and enforce iteration on direct
  id lookup

* Apply review findings and fix tests

* Pin virtualenv < 21 to avoid incaopatibility failure

* fix: finalize backlog-core-06 ado comment API versioning (#314)

* fix(backlog): harden refine writeback, prompts, and daily any filters

* fix(github): default story type fallback to feature

* Fix format

* Fix codex review findings

* bump and sign changed modules

* chore(hooks): enforce module signature verification in pre-commit

* chore(hooks): add markdownlint to pre-commit checks

* fix: finalize backlog-core-06 ado comment api versioning and ci hatch pins

* fix: address review findings for formatter safety and ado metric patch guards

* docs(openspec): update CHANGE_ORDER status tracking

* fix(ado): apply iteration filter for direct issue_id lookup

---------

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

* feat: Advanced marketplace features (marketplace-02) - dependency resolution, aliases, custom registries, publishing (#318)

* feat: advanced marketplace features (marketplace-02) - dependency resolution, aliases, custom registries, namespace enforcement, publishing

- dependency_resolver: resolve_dependencies(), --skip-deps, --force on install
- alias_manager: alias create/list/remove (no top-level alias commands)
- custom_registries: add-registry, list-registries, remove-registry; fetch_all_indexes; search Registry column
- module_installer: namespace/name enforcement, collision detection
- scripts/publish-module.py + .github/workflows/publish-modules.yml (optional signing)
- docs: publishing-modules, custom-registries, dependency-resolution; updated installing-modules, module-marketplace, commands
- version 0.38.0, CHANGELOG

Made-with: Cursor

* docs(openspec): defer 6.2.4 and 6.2.5 (index update/PR, workflow test) to later

Made-with: Cursor

* Add follow-up change proposals for marketplace

* Fix codex review findings

---------

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

* fix: complete marketplace publish registry PR flow and bump (#320)

0.38.1

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

* fix: update init ide hint and repair publish workflow
  condition

* feat(backlog): normalize daily summarize Markdown output (#323)

* feat(backlog): summarize Markdown normalization and TTY/CI rendering

* chore(openspec): drop implementation snapshot from change

* Update title

---------

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

* Update version

* Add github skills

* Add new marketplace changes

* feat(cli): category groups and flat shims using real module Typer (#331)

* feat(cli): category groups and flat shims using real module Typer

- Add category groups (code, backlog, project, spec, govern) with flatten same-name member
- Sort commands under backlog/project groups A–Z
- Fix flat shims to expose real module Typer so 'specfact sync bridge' and 'specfact plan update-idea' work
- Add first-run init, module grouping, OpenSpec change for 0.40.x remove-flat-shims
- Bump version to 0.39.0, CHANGELOG and OpenSpec updates

Made-with: Cursor

* Fix signature

* fix: resolve module grouping regressions and stabilize CI
  tests

* fix: keep uncategorized modules flat during grouped registration

---------

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

* Update docs regarding module migration change

* feat: module-migration-02 bundle extraction (#332)

* docs: add module-migration-02-bundle-extraction to CHANGE_ORDER.md

* feat: implement module-migration-02 bundle extraction

* fix(ci): checkout module bundles repo for test jobs

* Fix test failures

* fix(modules): load local bundle sources in compatibility aliases

* fix: run worktree policy code in tests/CI and silence reexport deprecation

- Prefer src/<name>/main.py over app.py when SPECFACT_REPO_ROOT is set so
  policy init uses worktree templates.py (SPECFACT_POLICY_TEMPLATES_DIR).
- Policy engine module-package.yaml: version 0.1.5 and re-signed checksum.
- conftest: set SPECFACT_REPO_ROOT, SPECFACT_POLICY_TEMPLATES_DIR; add
  bundle package roots when specfact-cli-modules present.
- Policy engine integration tests: rely on conftest env, clear registry
  and re-register before invoke so loader uses worktree.
- test_reexport_shims: filter deprecation warning for legacy analyze import.

Made-with: Cursor

* fix: defer specfact_backlog import in shims so CI can register bridges

- backlog and policy_engine __init__.py: import specfact_backlog only in
  __getattr__ (cached), not at module load. Allows loading .src.adapters.*
  for bridge registration without requiring specfact_backlog installed.
- Re-sign backlog and policy_engine module-package.yaml after init changes.
- openspec: update module-migration-02 tasks.md.

Made-with: Cursor

* fix: defer bundle import in all module shims to fix CI collection errors

- Apply deferred import (only in __getattr__, cached) to analyze, contract,
  drift, enforce, generate, import_cmd, migrate, patch_mode, plan, project,
  repro, sdd, spec, sync, validate. Matches backlog and policy_engine.
- Prevents ImportError when tests import specfact_cli.modules.<name>.src.*
  without specfact_backlog/specfact_govern/specfact_project/specfact_spec
  installed (e.g. CI). Fixes 78 collection errors.
- Re-sign all affected module-package.yaml manifests.

Made-with: Cursor

* fix(ci): include module shims in hatch cache key so CI uses current code

* feat(modules): registry descriptions, --bump-version for publish, tasks and format fixes

- Add description to registry index entries in publish-module.py (module search)
- Add --bump-version patch|minor|major for bundle re-publish in publish-module.py
- Format fixes in validate-modules-repo-sync.py (SIM108, B007)
- Mark completed tasks in module-migration-02-bundle-extraction tasks.md
- Update test for publish_bundle(bump_version=) signature

Made-with: Cursor

* Add missing migration tasks to the open change to completely isolate modules into specfact-cli-modules repo.

* Add gap analysis and update changes

* Update follow-up changes to avoid ambiguities and overlaps

* docs: complete migration-02 section-18 parity and 17.8 gate evidence

* docs: mark migration-02 import-categorization commit checkpoint done

* Update change constraints and blockers for module migration

* docs: add migration-05 issue #334 and complete task 17.10.4

* Update change constraints and blockers for module migration

---------

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

* Implement blockers to prepare for module-migration-03 change. (#336)

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

* feat: module-migration-03 core slimming closeout and registry fixes (#317) (#341)

* Prepare module-migration-03 removal of old built-in modules

* feat(core): delete specfact-project module source from core (migration-03)

Made-with: Cursor

* feat(core): delete specfact-backlog module source from core (migration-03)

Made-with: Cursor

* feat(core): delete specfact-codebase module source from core (migration-03)

Made-with: Cursor

* feat(core): delete specfact-spec module source from core (migration-03)

Made-with: Cursor

* feat(core): delete specfact-govern module source from core (migration-03)

Made-with: Cursor

* chore(tests): skip tests for removed modules when source absent (migration-03)

Add pytest.importorskip() for backlog, plan, sync, enforce, generate,
patch_mode, import_cmd so tests are skipped when module source was
removed from core. Preserves tests for later move to specfact-cli-modules.
Update tasks.md and TDD_EVIDENCE.md for Task 10 completion.

Made-with: Cursor

* feat(bootstrap): remove flat shims and non-core module registrations (migration-03)

- Remove _register_category_groups_and_shims (unconditional category/shim registration).
- Trim CORE_MODULE_ORDER to 4 core: init, auth, module-registry, upgrade.
- Add @beartype to _mount_installed_category_groups.
- Category groups and flat shims only for installed bundles via _mount_installed_category_groups.

Made-with: Cursor

* docs(openspec): mark Task 11.4 done in tasks.md

Made-with: Cursor

* feat(cli): conditional category group mount from installed bundles (migration-03)

- Add _RootCLIGroup (extends ProgressiveDisclosureGroup) with resolve_command
  override: unknown commands in KNOWN_BUNDLE_GROUP_OR_SHIM_NAMES show
  actionable error (not installed + specfact init / specfact module install).
- Root app uses cls=_RootCLIGroup. Main help docstring adds init/module
  install hint for workflow bundles.

Made-with: Cursor

* docs(openspec): mark Task 12.4 done in tasks.md

Made-with: Cursor

* feat(init): enforce mandatory bundle selection and profile presets (migration-03)

* Add module removal core tests

* docs(openspec): record Task 14 module signing gate (migration-03)

* feat: complete module-migration-03 core slimming and
  follow-up alignment (#317)

* Fix format error

* fix: handle detached HEAD registry branch selection and
  stabilize migration-03 CI tests

---------

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

* Finalize module-migration-02 change

* docs(backlog-auth): update auth docs and OpenSpec task status (#342)

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

* chore(openspec): archive completed changes and sync main specs

* docs(openspec): prefix module migration proposal titles with IDs

* Add bug change for ado required fields setting and update change order

* Update change order

* feat(core): finalize migration-03 auth removal and 3-core slim package (#317) (#343)

* Prepare module-migration-03 removal of old built-in modules

* feat(core): delete specfact-project module source from core (migration-03)

Made-with: Cursor

* feat(core): delete specfact-backlog module source from core (migration-03)

Made-with: Cursor

* feat(core): delete specfact-codebase module source from core (migration-03)

Made-with: Cursor

* feat(core): delete specfact-spec module source from core (migration-03)

Made-with: Cursor

* feat(core): delete specfact-govern module source from core (migration-03)

Made-with: Cursor

* chore(tests): skip tests for removed modules when source absent (migration-03)

Add pytest.importorskip() for backlog, plan, sync, enforce, generate,
patch_mode, import_cmd so tests are skipped when module source was
removed from core. Preserves tests for later move to specfact-cli-modules.
Update tasks.md and TDD_EVIDENCE.md for Task 10 completion.

Made-with: Cursor

* feat(bootstrap): remove flat shims and non-core module registrations (migration-03)

- Remove _register_category_groups_and_shims (unconditional category/shim registration).
- Trim CORE_MODULE_ORDER to 4 core: init, auth, module-registry, upgrade.
- Add @beartype to _mount_installed_category_groups.
- Category groups and flat shims only for installed bundles via _mount_installed_category_groups.

Made-with: Cursor

* docs(openspec): mark Task 11.4 done in tasks.md

Made-with: Cursor

* feat(cli): conditional category group mount from installed bundles (migration-03)

- Add _RootCLIGroup (extends ProgressiveDisclosureGroup) with resolve_command
  override: unknown commands in KNOWN_BUNDLE_GROUP_OR_SHIM_NAMES show
  actionable error (not installed + specfact init / specfact module install).
- Root app uses cls=_RootCLIGroup. Main help docstring adds init/module
  install hint for workflow bundles.

Made-with: Cursor

* docs(openspec): mark Task 12.4 done in tasks.md

Made-with: Cursor

* feat(init): enforce mandatory bundle selection and profile presets (migration-03)

* Add module removal core tests

* docs(openspec): record Task 14 module signing gate (migration-03)

* feat: complete module-migration-03 core slimming and
  follow-up alignment (#317)

* Fix format error

* fix: handle detached HEAD registry branch selection and
  stabilize migration-03 CI tests

* Prepare module-migration-03 removal of old built-in modules

* Prepare module-migration-03 removal of old built-in modules

* chore(tests): skip tests for removed modules when source absent (migration-03)

Add pytest.importorskip() for backlog, plan, sync, enforce, generate,
patch_mode, import_cmd so tests are skipped when module source was
removed from core. Preserves tests for later move to specfact-cli-modules.
Update tasks.md and TDD_EVIDENCE.md for Task 10 completion.

Made-with: Cursor

* feat(bootstrap): remove flat shims and non-core module registrations (migration-03)

- Remove _register_category_groups_and_shims (unconditional category/shim registration).
- Trim CORE_MODULE_ORDER to 4 core: init, auth, module-registry, upgrade.
- Add @beartype to _mount_installed_category_groups.
- Category groups and flat shims only for installed bundles via _mount_installed_category_groups.

Made-with: Cursor

* docs(openspec): mark Task 11.4 done in tasks.md

Made-with: Cursor

* feat(cli): conditional category group mount from installed bundles (migration-03)

- Add _RootCLIGroup (extends ProgressiveDisclosureGroup) with resolve_command
  override: unknown commands in KNOWN_BUNDLE_GROUP_OR_SHIM_NAMES show
  actionable error (not installed + specfact init / specfact module install).
- Root app uses cls=_RootCLIGroup. Main help docstring adds init/module
  install hint for workflow bundles.

Made-with: Cursor

* docs(openspec): mark Task 12.4 done in tasks.md

Made-with: Cursor

* feat(init): enforce mandatory bundle selection and profile presets (migration-03)

* Add module removal core tests

* docs(openspec): record Task 14 module signing gate (migration-03)

* feat: complete module-migration-03 core slimming and
  follow-up alignment (#317)

* Fix format error

* fix: handle detached HEAD registry branch selection and
  stabilize migration-03 CI tests

* feat(core): remove auth module from core and route auth via backlog (migration-03)

* docs(openspec): update migration-03 PR status and tracking

* docs(openspec): finalize migration-03 checklist and defer non-blocking gates

* Fix remaining auth findings and dependency in core cli

---------

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

* Archive module-migration-03 change

* feat: remove flat command shims (category-only CLI) (#344)

* feat: remove flat command shims from grouped registry

* Finalize change module-migration-04 implementation

---------

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

* Archived module-migration-04 and updated specs

* docs(openspec): finalize module-migration-05 tracking after modules PR merge (#345)

* Implement blockers to prepare for module-migration-03 change.

* Update migration change

* docs(openspec): close migration-05 PR tracking and change order

---------

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

* Archive module-migration-05 change and update specs

* test(migration-06): move legacy sync tests out of core (#346)

* feat(migration-06): core decoupling cleanup - boundary tests and inventory

- Add test_core_does_not_import_from_bundle_packages boundary regression test
- Update spec with ownership boundary and migration acceptance criteria
- Add CORE_DECOUPLING_INVENTORY.md (keep/move/interface classification)
- Record TDD evidence in TDD_EVIDENCE.md
- Update docs/reference/architecture.md with core vs modules-repo boundary
- Update openspec/CHANGE_ORDER.md status

No move candidates identified; core already decoupled from bundle packages.
Boundary test prevents future core->bundle coupling.

Refs #338

Made-with: Cursor

* chore(migration-06): mark all tasks complete

Made-with: Cursor

* feat(migration-06): extend scope - migrate package-specific artifacts per #338

- Add MIGRATION_REMOVAL_PLAN.md with phased removal of MIGRATE-tier code
- Add test_core_modules_do_not_import_migrate_tier boundary test
- Remove templates.bridge_templates (dead code; only tests used it)
- Remove tests/unit/templates/test_bridge_templates.py
- Update CORE_DECOUPLING_INVENTORY.md with removal status
- Update spec with MIGRATE-tier enforcement and package-specific removal

Phase 1 complete. Further MIGRATE-tier removal documented in plan.
Refs #338

Made-with: Cursor

* test(migration-06): move legacy sync tests out of core

---------

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

* Archived module-migration-06 change and updated specs

* test: module-migration-07 core test ownership cleanup (#347)

* test: finalize module-migration-07 core test ownership cleanup

* docs: mark module-migration-07 quality and PR tasks complete

* test: fix CI isolation failures for project and persona merge

* test: narrow migrated skips and restore core registry guardrails

* test: stabilize core CI by refining skips and bootstrap checks

* test: fix remaining PR failures via targeted core filtering

* fix: harden module package checks against import-mode class identity

* test: stabilize core slimming integration assertions

---------

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

* Archived backlog-core-07 change and updated specs

* Update some docs and archive latest finished changes and specs

* Add docs update change

* feat: add agile-01-feature-hierarchy change and update CHANGE_ORDER.md (#376)

- Create openspec/changes/agile-01-feature-hierarchy/ with proposal.md and tasks.md
- Add Epics #256 (Architecture Layer Integration), #257 (AI IDE Integration),
  and #258 (Integration Governance and Dogfooding) to CHANGE_ORDER.md parent issues table
- 25 GitHub Feature issues created (#351-#375), linked to their parent Epics
- Feature label created; issue #185 closed (ceremony-cockpit-01, archived 2026-02-18)

Co-authored-by: Dominikus Nold <djm81@users.noreply.github.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>

* docs: align core docs and sync pending changes (#377)

* docs: align core docs and sync pending changes

* fix: preserve partial staging in markdown autofix hook

---------

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

* fix: stabilize release test suite after module migration

* Update module

* Fix module install

* Fix module install

* Fix failed tests

* Fix marketplace client regression

* Fix install regression for specfact-cli (#380)

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

* Add changes to improve runtime validation and backlog module remaining migration to module

* refactor: remove backlog ownership from core cli (#384)

* refactor: remove backlog ownership from core cli

* fix: align CI marketplace validation paths

* test: stabilize command audit validation and add command-surface change

---------

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

* Add new command alignment change

* fix: finalize cli runtime validation regressions (#387)

* fix: finalize cli runtime validation regressions

* test: align satisfied dependency logging assertions

---------

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

* docs: archive cli-val-07 change

* Archive changes and update specs

* Add code-review change proposals

* test: align command surface regression coverage

* docs: add OpenSpec change for backlog-core commands migration (#390)

* feat: add OpenSpec change for backlog-core commands migration

Change: backlog-02-migrate-core-commands
- Add proposal, design, tasks, specs
- Add TDD_EVIDENCE.md with implementation progress
- GitHub Issue: #389

Rules applied: AGENTS.md Git Worktree Policy, TDD Hard Gate

Made-with: Cursor

* docs: update TDD_EVIDENCE and tasks for quality gate results

Made-with: Cursor

* docs: update TDD_EVIDENCE with test fix results

Made-with: Cursor

* docs: update TDD_EVIDENCE with all test fixes complete

Made-with: Cursor

---------

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

* fix: use POST instead of PATCH for ADO work item creation (#391)

* fix: use POST instead of PATCH for ADO work item creation

Azure DevOps API requires POST (not PATCH) for creating work items.

Also fixed category grouping to always register group commands.

Made-with: Cursor

* docs: add changelog entry for ADO POST fix

Made-with: Cursor

* chore: bump version to 0.40.4

Made-with: Cursor

* fix: update test mocks from PATCH to POST for ADO create

- Reverted incorrect unconditional _mount_installed_category_groups call

- Updated test_create_issue mocks to use requests.post instead of requests.patch

Made-with: Cursor

* test: skip category group test when bundles not installed

The test_bootstrap_with_category_grouping_disabled_registers_flat_commands test

expects bundles like specfact-codebase to be installed, but in CI they may not be.

Added pytest.skip() when 'code' command is not available.

Made-with: Cursor

---------

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

* docs: archive backlog-02-migrate-core-commands change

- Archived backlog-02-migrate-core-commands change

- Updated CHANGE_ORDER.md with implementation status

- Updated main specs with backlog-add, backlog-analyze-deps, backlog-delta, backlog-sync, backlog-verify-readiness

Made-with: Cursor

* feat: document code-review module scaffold (#410)

* feat: document code-review module scaffold

* chore: sync 0.41.0 release version artifacts

---------

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

* Add change for project codebase ownership

* Realign code import ownership surface (#412)

* Realign code import ownership surface

* Harden temp registry command audit test

---------

Signed-off-by: Dom <39115308+djm81@users.noreply.github.com>
Co-authored-by: Dominikus Nold <djm81@users.noreply.github.com>

* Update code review changes

* docs: update reward ledger OpenSpec tracking (#413)

Link the existing change issue, record TDD evidence, and align the OpenSpec artifacts with the bundle-owned DDL and paired worktree implementation flow.

Made-with: Cursor

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

* Track house-rules skill OpenSpec changes (#414)

Made-with: Cursor

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

* docs: Update change-proposal for code-review-07 (#415)

* Track house-rules skill OpenSpec changes

Made-with: Cursor

* Cursor: Apply local changes for cloud agent

---------

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

* Finalize code-review-07 status

* Finalize code-review-08 status

* feat: apply code-review-09 pre-commit integration

* fix: fall back when cached hatch test env is broken

* fix: avoid hatch env for coverage xml export

* fix: install type-check and lint tools directly in CI

* fix: install pytest fallback deps in test job

* fix: install pytest-cov for test fallback path

* Finalize code-review-09 status

* [Change] Align core docs with modules site ownership (#419)

* Align core docs with modules site ownership

* Close docs portal change PR task

---------

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

* fix: harden docs parity URL assertions

* Archive finished changes and update specs

* docs: fix command syntax parity after lean-core/modules split (v0.42.2) (#421)

Replace all stale CLI syntax families in authored docs with current
shipped commands. Adds docs parity tests that guard against regression.

Removed syntax families corrected:
- specfact project plan → project devops-flow / project snapshot / govern enforce sdd
- project import from-bridge → code import from-bridge
- specfact backlog policy → backlog verify-readiness / backlog refine
- specfact spec contract → spec validate / spec generate-tests / spec mock
- specfact spec sdd constitution → govern enforce sdd [BUNDLE]
- spec generate <prompt-subcommands> → AI IDE skills or removed

Updated docs: README.md, docs/index.md, docs/README.md,
docs/reference/commands.md (+4 reference docs),
docs/getting-started/ (4 files), docs/guides/ (21 files),
docs/examples/ (5 files), docs/prompts/ (2 files).

Added 11 new docs parity tests in test_release_docs_parity.py:
- 7 tests asserting removed syntax families stay absent
- 4 tests asserting current command families remain documented

Co-authored-by: Dominikus Nold <djm81@users.noreply.github.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>

* Archive finished changes and update specs

- Archive docs-03-command-syntax-parity (2026-03-18)
- Sync delta specs: cli-output + documentation-alignment updated with
  post-split command-surface alignment requirements and scenarios
- Update CHANGE_ORDER.md: mark docs-03 as archived

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

* Update evidence

* Potential fix for pull request finding 'Unused global variable'

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>

* docs: align core docs ownership and parity (#424)

* docs: fix command syntax parity after lean-core/modules split (v0.42.2)

Replace all stale CLI syntax families in authored docs with current
shipped commands. Adds docs parity tests that guard against regression.

Removed syntax families corrected:
- specfact project plan → project devops-flow / project snapshot / govern enforce sdd
- project import from-bridge → code import from-bridge
- specfact backlog policy → backlog verify-readiness / backlog refine
- specfact spec contract → spec validate / spec generate-tests / spec mock
- specfact spec sdd constitution → govern enforce sdd [BUNDLE]
- spec generate <prompt-subcommands> → AI IDE skills or removed

Updated docs: README.md, docs/index.md, docs/README.md,
docs/reference/commands.md (+4 reference docs),
docs/getting-started/ (4 files), docs/guides/ (21 files),
docs/examples/ (5 files), docs/prompts/ (2 files).

Added 11 new docs parity tests in test_release_docs_parity.py:
- 7 tests asserting removed syntax families stay absent
- 4 tests asserting current command families remain documented

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

* docs: align core docs ownership and parity

---------

Co-authored-by: Dominikus Nold <djm81@users.noreply.github.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>

* docs: fix quickstart install guidance

* docs: remove generated project plan docs

* Add code-review change

* fix: preserve native backlog import payloads (#429)

* fix: preserve native backlog import payloads

* fix: preserve imported proposal ids on reimport

---------

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

* fix: add docs review workflow and repair docs links (#428)

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

* fix: keep imported change ids stable across title changes (#431)

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

* fix: remove conflicting pages file copies

* Add docs sync changs

* docs: update openspec clean-code planning

* Update change status

* fix: code-review-zero-findings dogfood remediation (v0.42.3) (#435)

* fix: continue code review remediation and align module signing

* fix: complete code-review-zero-findings dogfood remediation (v0.42.3)

Eliminates full-scope code review findings (types, Radon CC, contracts, lint) and records OpenSpec change code-review-zero-findings with tests and CHANGELOG. Module manifests may need re-signing before merge per project policy.

Made-with: Cursor

* chore: re-sign bundled modules after content changes

* fix: resolve review follow-up regressions

* fix: run ci smart-test directly

* fix: restore ci test progress output

* fix: stabilize command audit ci test

---------

Signed-off-by: Dom <39115308+djm81@users.noreply.github.com>
Co-authored-by: Dominikus Nold <djm81@users.noreply.github.com>

* Add docs refactoring changes

* Add bug change tracking for encoding and resources

* docs: restructure core site IA to 6-section progressive nav (#442)

* docs: restructure core site IA from 5 flat sections to 6 progressive sections

Restructure docs.specfact.io from a flat 5-section sidebar to a 6-section
progressive navigation: Getting Started, Core CLI, Module System, Architecture,
Reference, Migration.

- Create docs/core-cli/, docs/module-system/, docs/migration/ directories
- Move 12 files to correct new sections with jekyll-redirect-from entries
- Write 3 new CLI reference pages: init.md, module.md, upgrade.md
- Replace first-steps.md with focused 5-minute quickstart
- Rewrite index.md as portal landing with core vs modules delineation
- Rewrite getting-started/README.md to link module tutorials to modules site
- Update sidebar navigation in _layouts/default.html
- Delete 6 obsolete files (competitive-analysis, ux-features, common-tasks,
  workflows, testing-terminal-output, guides/README)
- Add documentation-alignment delta spec for core-only focus policy

Implements: #438
OpenSpec: docs-05-core-site-ia-restructure

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

* docs: fix broken internal links after IA restructure

Update all relative links across 40 files to point to new file locations:
- ../reference/architecture.md → ../architecture/overview.md
- ../reference/debug-logging.md → ../core-cli/debug-logging.md
- ../reference/modes.md → ../core-cli/modes.md
- guides/ sibling links → ../module-system/ or ../migration/
- module-system/ back-links → ../guides/
- Remove links to deleted files (common-tasks, workflows)
- first-steps.md → quickstart.md

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

* fix: update test path for moved bootstrap-checklist and fix remaining broken links

- Update test_module_bootstrap_checklist_uses_current_bundle_ids to use
  new path docs/module-system/bootstrap-checklist.md
- Fix 2 remaining command-chains.md anchor links in migration-guide.md

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

---------

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

* fix: harden cross-platform runtime and IDE resource discovery (#443)

* fix: harden cross-platform runtime and IDE resource discovery

* fix: bump patch version to 0.42.4

* fix: restore init lifecycle compatibility

---------

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

* fix: resolve review type-safety findings

* Improve clarity and scope of ide prompt change

* feat(init): IDE prompt source catalog, --prompts, namespaced exports (#445)

* feat(init): IDE prompt source catalog, --prompts, namespaced exports

Implement init-ide-prompt-source-selection: discover core + module prompts,
default export all sources, interactive multi-select, non-interactive --prompts,
source-namespaced IDE paths. Fix project module roots to use metadata source
project. Extend discovery roots with user/marketplace. Update startup_checks
for nested exports. Bump init module to 0.1.14 with signed manifest.

Made-with: Cursor

* fix(init): scope VS Code prompt recommendations to exported sources

- Pass prompts_by_source into create_vscode_settings from copy_prompts_by_source_to_ide
- Strip prior .github/prompts/* recommendations on selective export to avoid stale paths
- Extract helpers for catalog paths and fallbacks; keep code review clean

Made-with: Cursor

---------

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

* fix tests

* release: bump version to 0.42.5 and update CHANGELOG

- Remove [Unreleased] sections; fold historical arch-08 notes under [0.34.0]
- Document init ide catalog, VS Code recommendations, integration test isolation

Made-with: Cursor

* Fix review findings

* feat(init): selective IDE prompt export cleanup and VS Code recommendation strip

- Prune stale exports and unselected catalog segments in copy_prompts_by_source_to_ide
- Strip only specfact*.prompt.md under .github/prompts/ when merging VS Code settings
- Tighten e2e missing-templates assertions to match CLI output
- Add unit tests for prompt path helper and selective export behavior

Made-with: Cursor

* Fix review findings

* Add missing import

* Bump patch version and changelog

* Fix failed tests

* Fix review findings

* docs: core vs modules URL contract and OpenSpec alignment (#448)

* docs: add core vs modules URL contract and OpenSpec alignment

Document cross-site permalink rules in docs/reference, extend documentation-alignment
and module-docs-ownership specs, update docs-07 and openspec config, and note the
dependency on modules URL policy in CHANGE_ORDER.

Made-with: Cursor

* docs: convert core handoff pages to modules canonical links (docs-07)

- Replace 20 duplicate guides/tutorials with thin summaries, prerequisites,
  and links to modules.specfact.io per URL contract
- Add docs/reference/core-to-modules-handoff-urls.md mapping table
- Align OpenSpec documentation-alignment spec delta with ADDED Requirements
- Complete docs-07-core-handoff-conversion tasks checklist

Refs: #439
Made-with: Cursor

---------

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

* feat(docs-12): docs command validation and cross-site link checks (#449)

* feat(docs-12): docs command validation and cross-site link checks

- Add check-docs-commands (Typer CliRunner prefix + --help) and exclusions for migration/illustrative pages
- Add check-cross-site-links with robust URL extraction; warn-only in docs-validate and CI while live site may lag
- Extend docs-review: Hatch env, validation steps, pytest tests/unit/docs/
- Opt-in handoff map HTTP test (SPECFACT_RUN_HANDOFF_URL_CHECK=1)
- OpenSpec deltas, TDD_EVIDENCE, tasks complete; CHANGELOG [Unreleased]

Made-with: Cursor

* fix(docs-validate): strip leading global flags before command path

- Parse --mode/--input-format/--output-format + value, then other root flags
- Add test for specfact --mode copilot import from-code …
- Fix showcase docs: hatch run contract-test-exploration (not specfact)

Made-with: Cursor

* fix(docs-12): harden link/command validators and spec wording

- Capitalize Markdown in cross-site link spec requirement
- Cross-site: redirect-only HTTP success, UTF-8 read failures, URL delimiter/trim fixes
- Docs commands: catch Typer exceptions on --help, UTF-8 read failures
- Tests: shared loader for check-cross-site-links module

Made-with: Cursor

---------

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

* fix(scripts): CliRunner without mix_stderr for Click 8.3+ compatibility (#451)

Default CliRunner() merges stderr into stdout; read stdout only so
accessing result.stderr does not raise when streams are combined.

Made-with: Cursor

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

* fix: review gates (semgrep print, radon CC, icontract, questionary types) (#452)

* fix: satisfy review gates for docs scripts and module_lifecycle typing

- Replace print() with Rich Console in docs validation scripts (semgrep)
- Split HTTP URL checks and doc scans to reduce cyclomatic complexity (radon)
- Add icontract require/ensure on public helpers; use CliRunner() without mix_stderr
- Cast questionary API for basedpyright reportUnknownMemberType

Made-with: Cursor

* fix(scripts): address #452 review (HTTP helpers, icontract, CLI streams)

- _http_success_code: use int directly after None guard
- _response_status: safe getcode via getattr/callable
- check-docs: drop @require preconditions duplicated by beartype
- _cli_invoke_streams_text: merge stdout + stderr for not-installed detection

Made-with: Cursor

---------

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

* Add speckit adapter alignment change and update affected change specs

* feat(adapters): spec-kit v0.4.x adapter alignment (#454)

* feat(adapters): spec-kit v0.4.x adapter alignment — extensions, presets, hooks, version detection, 7-command presets

Update SpecKitAdapter, ToolCapabilities, BridgeConfig presets, and
SpecKitScanner for spec-kit v0.4.3 compatibility:

- ToolCapabilities: 5 new optional fields (extensions, extension_commands,
  presets, hook_events, detected_version_source)
- SpecKitScanner: scan_extensions(), scan_presets(), scan_hook_events()
  with .extensionignore support and defensive JSON parsing
- SpecKitAdapter: 3-tier version detection (CLI → heuristic → None),
  refactored get_capabilities() with reduced cyclomatic complexity
- BridgeConfig: all 3 speckit presets expanded from 2 to 7 command
  mappings (specify, plan, tasks, implement, constitution, clarify, analyze)
- 42 new tests across 4 test files (110 targeted, 2248 full suite pass)
- Docs updated: comparison matrix, journey guide, integrations overview,
  adapter development guide

Closes #453

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

* fix: address CodeRabbit review findings

- Use get_bridge_logger instead of logging.getLogger in speckit adapter
  and scanner (production command path convention)
- Narrow except Exception to except OSError in _load_extensionignore
- Simplify redundant base_path conditional in get_capabilities
- Use SimpleNamespace instead of dynamic type() in tests
- Add subprocess.TimeoutExpired and OSError exception tests for CLI
  version detection
- Fix duplicate MD heading in bridge-adapter spec
- Add blank lines after markdown headings in proposal (MD022)

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

---------

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

* chore: bump version to 0.43.0 for spec-kit v0.4.x alignment (#455)

* chore: bump version to 0.43.0 and add changelog entry

Minor version bump for spec-kit v0.4.x adapter alignment feature.
Syncs version across pyproject.toml, setup.py, and __init__.py.
Adds changelog entry documenting new capabilities.

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

* Sync deps and fix changelog

* Sync deps and fix changelog

---------

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

* fix(packaging): remove workflow prompts from core wheel (packaging-02 #441, v0.43.1) (#456)

* fix(packaging): drop duplicate workflow prompts from core wheel (packaging-02 3.5)

Remove resources/prompts from wheel force-include and repo tree; canonical
copies remain in specfact-cli-modules bundles. Align startup IDE drift
checks and init template resolution with discover_prompt_template_files.
Bump to 0.43.1; re-sign init module 0.1.19. Update CHANGELOG, docs, OpenSpec.

Made-with: Cursor

* fix: address PR review (changelog, TDD evidence, startup checks, tests)

- Changelog 0.43.1 header uses Unreleased until release tag
- TDD_EVIDENCE: pre-fail block for Task 3.5 before passing verification
- TemplateCheckResult.sources_available; skip last_checked_version bump when no
  discoverable prompts; drift missing only when source exists
- Integration _fake_discover respects include_package_fallback
- test_validate_all_prompts uses tmp_path; re-enable file in default test run
- test_print_startup_checks_version_update_no_type uses stale version timestamp

Made-with: Cursor

* fix: address follow-up PR review (startup metadata, tests)

- Use ide_dir directly in TemplateCheckResult when IDE folder exists
- Set last_checked_version only after successful template-source checks
- Integration test: assert discover_prompt_template_files fallback + stable startup patches
- validate_all_prompts test: valid vs invalid specfact.*.md outcomes

Made-with: Cursor

---------

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

* Potential fix for pull request finding 'Empty except'

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>

* Fix changelog version

* docs: unify core docs portal UX (#459)

* docs: unify core docs portal UX

* Fix docs-13 core review findings

* Address docs-13 PR review feedback

* Address follow-up docs review feedback

---------

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

* Harden docs home URL test assertion

* feat: doc frontmatter validation, v0.43.2 review JSON gate, and pre-commit review UX (#463)

* chore(release): v0.43.2 pre-commit review JSON + OpenSpec dogfood rules

- Pre-commit gate writes ReviewReport JSON to .specfact/code-review.json
- openspec/config.yaml: require fresh review JSON and remediate findings
- Docs and unit tests updated

Made-with: Cursor

* fix: CodeRabbit — changelog, openspec TDD_EVIDENCE freshness, review hook timeout

- CHANGELOG 0.43.2: expanded entries, line wrap
- openspec/config.yaml: exclude TDD_EVIDENCE.md from review JSON staleness
- pre_commit_code_review: timeout 300s, TimeoutExpired handling
- tests: exact cwd, timeout assertion and timeout failure test

Made-with: Cursor

* Add code review to pre-commit and frontmatter docs validation

* Improve pre-commit script output

* Improve specfact code review findings output

* Fix review findings

* Improve pre-commit hook output

* Enable dev branch code review

* Update code review hook

* Fix contract review findings

* Fix review findings

* Fix review warnings

* feat: doc frontmatter hardening and code-review gate fixes

- Typer CLI for doc-frontmatter-check; safer owner resolution (split helpers for CC)
- Strict exempt handling; pre-commit hook matches USAGE-FAQ.md; review script JSON typing
- Shared test fixtures/types; integration/unit test updates; OpenSpec tasks and TDD evidence
- Changelog: pre-commit code-review-gate UX note

Made-with: Cursor

* Fix test failures and add docs review to github action runner

* Fix test failure due to UTF8 encoding

* Apply review findings

* Optimize pr orchestrator runtime

* Optimize pr orchestrator runtime

* Fix caching on pr-orchestrator

---------

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

* docs: archive doc-frontmatter-schema openspec change

* Apply suggestions from code review

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>

* fix: restore protocol stubs for type checking

* Add frontamtter check

* fix: harden protocol stubs for code quality

* Add PR test hardening change

* fix: remediate review findings and harden review gates

* fix: rebuild review report model for pydantic

* Add story and onboarding change

* Update change tracking

* Improve scope for ci/cd requirements

* docs: sharpen first-contact story and onboarding (#467)

* 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 review blockers and bump patch version

* test: harden modules docs url assertions

* fix: harden trustworthy green checks (#469)

* 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>

* fix: address CodeRabbit review findings for ci-02 (#471)

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

* fix: propagate docker actionlint exit code instead of masking failures (#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>

* fix: assert hook id stability and cd to repo root for local actionlint (#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>

* feat: clean-code-01-principle-gates — 7-principle charter gates, v0.44.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>

* feat: archive completed openspec changes and update main specs

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>

* Add new user onboarding change

* docs & tooling: new user onboarding + smart-test and pre-commit review 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>

* fix: code-review gate (Typer params), typer<0.24 vs semgrep, module upgrade 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 (#480)

* 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>

* archived implemented changes

* Archive and remove outdated changes

* Split and refactor change proposals between both repos

* Archive alignment change

* Add changes and github hierarchy scripts

* feat: add GitHub hierarchy cache sync (#492)

* feat: add github hierarchy cache sync

* Backport improvements from modules scripts

* Fix review findings

* Make github sync script executable

---------

Signed-off-by: Dom <39115308+djm81@users.noreply.github.com>
Co-authored-by: Dominikus Nold <djm81@users.noreply.github.com>

* [codex] Compact agent governance loading (#493)

* feat: compact agent governance loading

* docs: mark governance PR task complete

* docs: sync governance-03 github issue metadata

* fix: restore dev branch governance block

* Apply review findings

* docs: add sibling internal wiki context for OpenSpec design

Point AGENTS.md, Claude/Copilot/Cursor surfaces, and the OpenSpec rule at
docs/agent-rules/40-openspec-and-tdd.md to read-only wiki paths (hot.md,
graph.md, concepts) via absolute paths when specfact-cli-internal is present.
Update INDEX applicability notes and extend governance tests.

Made-with: Cursor

---------

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

* Archived github hierarchy change

* Update rules for openspec archive

* Potential fix for pull request finding 'Unused local variable'

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>

* Add wiki update notes

* Archive governance-03 change, format markdown, add wiki instructions for update

* Fix review findings

* Fix type errors

* fix: safe VS Code settings merge and project artifact writes (#490) (#496)

* fix: safe merge for VS Code settings.json on init ide (profile-04)

- Add project_artifact_write.merge_vscode_settings_prompt_recommendations with fail-safe
  on invalid JSON / bad chat shape; --force backs up to .specfact/recovery/ then replaces.
- Route ide_setup create_vscode_settings through helper; thread force; catch errors for CLI exit.
- Lint gate: scripts/verify_safe_project_writes.py blocks json.load/dump in ide_setup.py.
- Tests, installation docs, 0.45.2 changelog and version pins.

OpenSpec: profile-04-safe-project-artifact-writes
Made-with: Cursor

* fix(profile-04): satisfy review gate, pin setuptools for semgrep

- Refactor project_artifact_write merge path (KISS); icontract predicates
- Deduplicate ide_setup prompt helpers; import from project_artifact_write
- verify_safe_project_writes: ast.walk, contracts, beartype
- Pin setuptools<82 for Semgrep pkg_resources chain
- Update TDD_EVIDENCE and tasks checklist

Made-with: Cursor

* ci: run safe-write verifier in PR orchestrator lint job

Match hatch run lint by invoking scripts/verify_safe_project_writes.py
after ruff/basedpyright/pylint. Use set -euo pipefail so the first lint
failure is not masked by later commands.

Made-with: Cursor

* fix(profile-04): address CodeRabbit review (docs, guard, contracts, tests)

- Wrap installation.md VS Code merge paragraph to <=120 chars per line
- tasks 4.7 + TDD_EVIDENCE: openspec validate --strict sign-off
- verify_safe_project_writes: detect from-json import and aliases
- settings_relative_nonblank: reject absolute paths and .. segments
- ide_setup: _handle_structured_json_document_error for duplicate handlers
- ProjectWriteMode docstring (reserved policy surface); backup stamp + collision loop
- Tests: malformed settings preserved on init ide exit; force+chat coercion; AST guard tests

Made-with: Cursor

* fix(profile-04): JSON5 settings, repo containment, review follow-ups

- merge_vscode_settings: resolve containment before mkdir/write; JSON5 load/dump
  (JSONC comments; trailing_commas=False for strict JSON output)
- ide_setup: empty prompts_by_source skips catalog fallback (_finalize allow_empty_fallback)
- verify_safe_project_writes: detect import json as js attribute calls
- contract_predicates: prompt_files_all_strings accepts list[Any] for mixed-type checks
- Tests: symlink escape, JSONC merge, empty export strip, import-json-as-js guard
- tasks.md / TDD_EVIDENCE: wrap lines to <=120 chars; CHANGELOG + json5 dep + setup.py sync

Made-with: Cursor

* docs(profile-04): tasks pre-flight + full pytest; narrow icontract ensure

- tasks 1.1: hatch env create then smart-test-status and contract-test-status
- tasks 4.3: add hatch test --cover -v to quality gates
- TDD_EVIDENCE: shorter module-signatures and report lines (<=120 cols)
- project_artifact_write: isinstance(result, Path) in @ensure postconditions

Made-with: Cursor

* fix: clear specfact code review on safe-write modules

- verify_safe_project_writes: flatten json binding helpers; stderr writes
  instead of print; inline Import/ImportFrom loops to drop duplicate-shape DRY
- project_artifact_write: _VscodeChatMergeContext dataclass (KISS param count);
  typed chat_body cast before .get for pyright

Made-with: Cursor

* docs(profile-04): record hatch test --cover -v in TDD_EVIDENCE

Align passing evidence with tasks.md 4.3 full-suite coverage gate.

Made-with: Cursor

* fix: reduce KISS blockers (bridge sync contexts, tools, partial adapters)

Refactors high-parameter call sites into dataclasses/context objects and splits hot spots (export devops pipeline, smart_test_coverage incremental run, suggest_frontmatter, crosshair summary loop).

API: BridgeSync.export_change_proposals_to_devops(adapter_type, ExportChangeProposalsOptions | None); LoggerSetup.create_logger(name, LoggerCreateOptions | None); run_crosshair(path, CrosshairRunOptions | None).

Full specfact code review --scope full still reports error-severity kiss/radon findings (remaining nesting/LOC and param counts in ADO, analyzers, generators, source_scanner, module_installer, bundle-mapper, etc.). Gate PASS requires follow-up.

Made-with: Cursor

* Fix review findings and sign modules

* fix(tests): register dynamic check_doc_frontmatter module; align _update_cache tests

- Insert check_doc_frontmatter into sys.modules before exec_module so
  dataclasses can resolve string annotations (fixes Docs Review / agent
  rules governance fixture).
- Call SmartCoverageManager._update_cache with _SmartCacheUpdate after
  signature refactor (fixes basedpyright reportCallIssue).

Made-with: Cursor

* fix(tests): align install_module mocks with InstallModuleOptions; register verify_bundle script

- Monkeypatch/patch fakes now accept (module_id, options=None) matching
  install_module(module_id, InstallModuleOptions(...)).
- Read install_root, trust_non_official, non_interactive, reinstall from
  InstallModuleOptions in CLI command tests.
- Dynamic load of verify-bundle-published registers sys.modules before
  exec_module (same dataclass annotation issue as check_doc_frontmatter).

Made-with: Cursor

---------

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

* Fix review findings (#498)

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

* feat(openspec): add marketplace-06-ci-module-signing change proposal

Moves module signing from local interactive requirement to CI step
triggered by PR approval (pull_request_review). Eliminates local private
key dependency for non-interactive development on feature/dev branches.
Trust boundary remains at main.

Scope:
- NEW .github/workflows/sign-modules-on-approval.yml
- MODIFY scripts/pre-commit-smart-checks.sh (branch-aware policy)
- MODIFY .github/workflows/pr-orchestrator.yml (split verify by target)
- MODIFY .github/workflows/sign-modules.yml (main-only enforcement)

GitHub: #500
Parent Feature: #353 (Marketplace Module Distribution) → #194 (Architecture Epic)
Paired modules change: specfact-cli-modules#185

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

* chore(pre-commit): modular hooks + branch-aware module verify (#501)

* chore(pre-commit): modular hooks aligned with specfact-cli-modules

- Add scripts/pre-commit-quality-checks.sh (block1 stages + block2; all for manual/shim)
- Replace monolithic smart-checks with shim to quality-checks all
- .pre-commit-config: fail_fast, verify-module-signatures + check-version-sources,
  cli-block1-* hooks, cli-block2, doc frontmatter
- Match modules: hatch run lint when Python staged; scoped code review paths
- CLI extras: Markdown fix/lint, workflow actionlint (no packages/ bundle-import gate)
- Bump to 0.46.1; docs: README, CONTRIBUTING, code-review.md, agent-rules/70

Made-with: Cursor

* fix(pre-commit): branch-aware module verify hook (marketplace-06 policy)

- Add scripts/pre-commit-verify-modules.sh and git-branch-module-signature-flag.sh
- Point verify-module-signatures hook at wrapper (script); skip when no staged module paths
- pre-commit-quality-checks all: delegate module step to wrapper; safe-change allowlist
- Tests + CONTRIBUTING/CHANGELOG alignment

Made-with: Cursor

* fix(pre-commit): address review — portable quality checks and signature policy

- Emit require/omit from git-branch-module-signature-flag; pass --require-signature only on main
- Resolve repo root in pre-commit-smart-checks via git rev-parse for .git/hooks copies
- Harden pre-commit-quality-checks: ACMR staged paths, pipefail, no xargs -r, safe loops
- CHANGELOG/CONTRIBUTING: Added vs Changed; document verifier CLI (no --allow-unsigned)
- Tests: omit/require expectations, detached HEAD; shim asserts repo-root exec

Made-with: Cursor

* docs: align signing and verification docs with verifier CLI

- Document checksum-only vs --require-signature; clarify --allow-unsigned is sign-modules.py only
- Add pre-commit and CI branch policy to module-security, signing guide, publishing, agent gates
- Refresh marketplace-06 OpenSpec proposal/design/tasks/spec delta; openspec validate --strict OK
- CHANGELOG: note d…
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Dependency resolution and management enhancement New feature or request

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

[Change] docs-new-user-onboarding: vibe-coder uvx entry path + wow-path CLI fixes

1 participant