Skip to content

release: merge dev into main (v0.43.1)#457

Merged
djm81 merged 333 commits intomainfrom
dev
Mar 28, 2026
Merged

release: merge dev into main (v0.43.1)#457
djm81 merged 333 commits intomainfrom
dev

Conversation

@djm81
Copy link
Copy Markdown
Collaborator

@djm81 djm81 commented Mar 27, 2026

Description

Release v0.43.1 by merging dev into main. This promotes the current pyproject.toml / CHANGELOG.md state on dev (version 0.43.1) for PyPI publish on merge to main per CI.

Highlights (v0.43.1)

  • Packaging: Workflow slash-command prompts (specfact.*.md) are no longer duplicated in the core wheel; canonical copies live in specfact-cli-modules bundle packages. Install bundles (or a dev repo checkout with resources/prompts/) for specfact init ide prompt export.
  • Startup: IDE template drift checks resolve sources via the same installed-module discovery path as specfact init ide, not a single core resources/prompts directory inside the wheel.

Included train since main: Spec-Kit v0.4.x adapter alignment (v0.43.0), docs validation / cross-site contract work, init IDE prompt catalog and related fixes, and packaging-02 (#441, #456) through current dev.

Fixes #441 (packaging-02 — core prompt cleanup; see also #456)

New Features N/A (patch release; see CHANGELOG for 0.43.0 feature notes included in this merge)

Contract References: No new public API surface; existing @icontract / @beartype on touched modules unchanged in intent.

Type of Change

Please check all that apply:

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

Contract-First Testing Evidence

Required for all changes affecting CLI commands or public APIs:

Contract Validation

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

Test Execution

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

Test Quality

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

How Has This Been Tested?

Contract-First Approach: Release train validated on dev via CI and PR checks before merge; this PR only promotes devmain.

Manual Testing

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

Automated Testing

  • Contract validation passes (CI on dev)
  • Property-based tests cover edge cases
  • Scenario tests cover user workflows
  • All existing tests still pass (CI on dev)

Test Environment

  • Python version: 3.11+ (per pyproject.toml; CI matrix)
  • OS: Linux (CI); contributors use macOS/Windows as applicable

Checklist

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

Quality Gates Status

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

Screenshots/Recordings (if applicable)

N/A — release promotion PR.

Release notes

  • CHANGELOG.md on dev lists [0.43.1] - Unreleased. Before or when merging this PR, consider setting the release date on that section (or a follow-up commit on main) so published docs match the tag.

djm81 and others added 30 commits February 10, 2026 10:39
Corrects three broken spec-delta references flagged in PR #221 review:
- backlog-core-02: add-backlog-add-interactive-issue-creation → backlog-core-02-interactive-issue-creation
- backlog-scrum-02: sprint-planning-capacity-commitment-support → backlog-scrum-02-sprint-planning
- backlog-scrum-03: story-complexity-splitting-hints-support → backlog-scrum-03-story-complexity

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
…ndency graph

- Replace old flat backlog-01..09 naming with module-scoped groups:
  backlog-core, backlog-scrum, backlog-kanban, backlog-safe,
  policy-engine, patch-mode, bundle-mapper, ceremony-cockpit
- Add arch-06/07 and marketplace-01/02 as pending changes
- Mark arch-01 through arch-05 as implemented (archived 2026-02-04..10)
- Update all GitHub issue numbers to current (incl. new #208, #213, #214,
  #215, #220 from recent changes)
- Clarify hard vs optional dependencies; optional deps are graceful no-ops
  and not set as GitHub blockers
- Update implementation waves to reflect current unblocked state (Wave 0 done)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
…ing, and filter parity (#222)

* feat(backlog): finalize daily/refine comment context, interactive posting, and docs parity

* docs(openspec): mark backlog-scrum-01 standup change checklist complete

* fix(openspec): mark backlog-refinement delta as ADDED for archive apply

* Archived completed change backlog-scrum-01

* fix(backlog): make map-fields exit cleanly under CliRunner

* Fix format

* fix(backlog): stabilize map-fields tests in non-interactive env

* docs(agents): enforce signed-commit handoff flow

---------

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

* fix: parse backlog refine writeback fields and refactor refine command

* fix: preserve heading-style narrative sections in refine parser

* chore: sync OpenSpec change to GitHub issue tracking

---------

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

* fix: harden backlog refine prompt scaffold and parsing

* fix: normalize mixed notes parsing and boundary flushing

---------

Co-authored-by: Dominikus Nold <djm81@users.noreply.github.com>
Signed-off-by: Dom <39115308+djm81@users.noreply.github.com>
djm81 and others added 13 commits March 26, 2026 00:33
* 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

- 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>
…ty (#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>
…pes) (#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>
* 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 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>
…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>
@chatgpt-codex-connector
Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Mar 27, 2026

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 6e0c94c6-4312-4af5-a91e-b4ffe644c59e

📥 Commits

Reviewing files that changed from the base of the PR and between eec640e and f7fefdd.

📒 Files selected for processing (1)
  • src/specfact_cli/adapters/speckit.py

📝 Walkthrough

Summary by CodeRabbit

  • New Features

    • Enhanced Spec‑Kit v0.4.x support: auto-detects extensions, presets, hook events and reports detected version source.
  • Improvements

    • Version detection for Spec‑Kit via CLI probe with filesystem heuristics.
    • IDE init/template export now sources workflow prompts from installed bundle modules (no core duplication).
    • Startup drift checks resolve templates across discovered sources.
  • Documentation

    • Guides updated for adapter development, IDE workflow, integrations and comparisons.
  • Chores

    • Package bumped to v0.43.1.

Walkthrough

Implements Spec‑Kit v0.4.x adapter alignment and packaging refactor: extends ToolCapabilities with extension/preset/hook/version-source fields; adds scanner methods and CLI+heuristic version detection; removes bundled workflow prompts from the core wheel; and updates IDE prompt discovery and startup drift checks to prefer installed-module sources.

Changes

Cohort / File(s) Summary
Version & Packaging
pyproject.toml, setup.py, src/__init__.py, src/specfact_cli/__init__.py, src/specfact_cli/modules/init/module-package.yaml
Bumped package version to 0.43.1, adjusted rich constraint, and updated init module package metadata and integrity.
ToolCapabilities & BridgeConfig
src/specfact_cli/models/capabilities.py, src/specfact_cli/models/bridge.py
Added optional fields to ToolCapabilities (extensions, extension_commands, presets, hook_events, detected_version_source) and expanded Spec‑Kit presets to include seven slash commands (specify, plan, tasks, implement, constitution, clarify, analyze) with updated triggers/refs.
Spec‑Kit Adapter & Scanner
src/specfact_cli/adapters/speckit.py, src/specfact_cli/importers/speckit_scanner.py
Added CLI and heuristic version detection (with timeout/skip for cross‑repo), layout detection, and methods to populate new capability fields; added scan_extensions(), scan_presets(), scan_hook_events() with .extensionignore and malformed‑JSON handling.
IDE Init / Template Discovery
src/specfact_cli/modules/init/src/commands.py, src/specfact_cli/utils/ide_setup.py, src/specfact_cli/utils/startup_checks.py
Switched template resolution to discover_prompt_template_files(..., include_package_fallback=True), changed drift checks to use discovered sources map, added sources_available to template check results, and adjusted metadata-flush logic.
Bundled Prompts Removal
resources/prompts/* (many specfact.*.md, shared/cli-enforcement.md)
Removed core-bundled workflow prompt files; prompts now come from installed bundle modules.
Docs & Guides
docs/guides/... (adapter-development, ai-ide-workflow, integrations-overview, speckit-comparison, speckit-journey)
Documented new ToolCapabilities fields, updated specfact init ide sourcing behavior, expanded Spec‑Kit command listings and version/extension detection descriptions.
OpenSpec / Change Tracking
openspec/CHANGE_ORDER.md, openspec/changes/...speckit-02-v04-adapter-alignment/..., packaging-02 TDD/proposal/tasks
Added speckit‑02 change folder (proposal/design/specs/TDD/validation) and marked packaging task 3.5 complete; updated change order and blocked relationships.
Requirements / Sync Kernel
openspec/changes/requirements-03-backlog-sync/proposal.md, openspec/changes/sync-01-unified-kernel/proposal.md
Added EXTEND behavior to import Spec‑Kit backlog issue mappings via ToolCapabilities.extension_commands and proposed detect_external_sync_actors() integration.
Tests
tests/unit/adapters/test_speckit.py, tests/unit/importers/test_speckit_scanner.py, tests/unit/models/*, tests/unit/utils/*, tests/integration/*, tests/unit/prompts/*
Added/updated tests for version detection (CLI/heuristic/timeout), extension/preset/hook scanning, new ToolCapabilities fields, expanded BridgeConfig expectations, and template discovery changes; updated integration startup checks test to mock discovery.
Test Config
tests/conftest.py
Removed one prompt test from migrated skip patterns so it is collected normally.

Sequence Diagram(s)

sequenceDiagram
    participant IDE as IDE Startup
    participant Checks as Startup Checks
    participant Discover as Template Discovery
    participant Scanner as SpecKitScanner
    participant Adapter as SpecKitAdapter

    IDE->>Checks: _run_startup_templates_segment()
    Checks->>Discover: discover_prompt_template_files(repo_path, include_package_fallback=True)
    Discover->>Scanner: enumerate installed-module & package prompt files
    Scanner-->>Discover: template paths grouped by basename
    Discover-->>Checks: basename→source map
    Checks->>Checks: compare IDE exports vs discovered sources
    alt sources available
        Checks-->>IDE: TemplateCheckResult(sources_available=True, templates_outdated/...)
    else sources unavailable
        Checks-->>IDE: TemplateCheckResult(sources_available=False)
    end
    IDE->>IDE: only flush metadata if sources_available=True
Loading
sequenceDiagram
    participant Adapter as SpecKitAdapter
    participant CLI as specify CLI
    participant Heuristics as Heuristic Detector
    participant Scanner as SpecKitScanner
    participant Result as ToolCapabilities

    Adapter->>Adapter: determine base_path / is_cross_repo
    alt not cross-repo
        Adapter->>CLI: _detect_version_from_cli(repo_path) (with timeout)
        CLI-->>Adapter: version or None
    else cross-repo
        Adapter->>Heuristics: skip CLI probe
    end
    Adapter->>Heuristics: _detect_version_from_heuristics(repo_path) if CLI None/Skipped
    Heuristics-->>Adapter: version or None, source="heuristic"
    Adapter->>Scanner: scan_extensions()
    Scanner-->>Adapter: list[extensions + commands]
    Adapter->>Scanner: scan_presets()
    Scanner-->>Adapter: list[presets]
    Adapter->>Scanner: scan_hook_events()
    Scanner-->>Adapter: list[hook_events]
    Adapter->>Result: populate ToolCapabilities(version, detected_version_source, extensions, extension_commands, presets, hook_events)
Loading
sequenceDiagram
    participant Scanner as SpecKitScanner.scan_extensions()
    participant FS as File System
    participant Catalog as catalog.json
    participant Ignore as .extensionignore
    participant Result as list[dict]

    Scanner->>FS: check for extensions/ dir and catalog files
    alt catalogs found
        Scanner->>Catalog: parse JSON
        Catalog-->>Scanner: raw extension entries
        Scanner->>Ignore: read .extensionignore (if present)
        Ignore-->>Scanner: excluded names
        Scanner->>Scanner: filter excluded entries
        Scanner-->>Result: return filtered extension metadata
    else no catalogs
        Scanner-->>Result: return []
    end
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~60 minutes

Possibly related issues

  • #244 — Adds and wires ToolCapabilities.extension_commands and sync‑kernel hooks used to detect/coordinate Spec‑Kit backlog extensions; this PR populates that field and scanner data.
  • #116 (specfact-cli-modules#116) — Requires ToolCapabilities.extension_commands to be populated by modules; scanner/adapter changes here feed that requirement.
  • #243 — Extends SyncProviderProtocol to detect external sync actors; this PR provides the adapter/scanner data to satisfy that behavior.

Possibly related PRs

Suggested labels

bug, documentation, openspec, architecture

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (1 warning, 1 inconclusive)

Check name Status Explanation Resolution
Out of Scope Changes check ⚠️ Warning Significant out-of-scope changes detected beyond issue #441 objectives: Spec-Kit v0.4.x adapter alignment (ToolCapabilities extensions, SpecKitScanner, BridgeConfig), extensive documentation updates, IDE template resolution refactoring, and startup checks redesign are not mentioned in the linked #441 issue. Clarify which changes directly address #441 (Windows encoding/backlog automation robustness) versus which are bundled features from the dev train. Document alignment between included v0.43.0 features and issue #441 resolution.
Linked Issues check ❓ Inconclusive Issue #441 concerns Windows console encoding and environment-coupled module resolution for backlog automation. While the raw summary shows extensive packaging/startup/module discovery changes, no explicit modifications to UTF-8 handling, Rich output hardening, or backlog-specific robustness are documented. Verify whether code changes address console encoding issues, external module detection, and backlog automation cross-environment support described in #441, or if #441 was resolved separately before this merge.
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The PR title 'release: merge dev into main (v0.43.1)' clearly summarizes the main change: a release promotion of version 0.43.1 from dev to main.
Description check ✅ Passed The PR description is comprehensive and mostly follows the template with clear highlights, objectives, type of change checkboxes, contract validation notes, and testing evidence from CI on dev.
Docstring Coverage ✅ Passed Docstring coverage is 88.24% which is sufficient. The required threshold is 80.00%.

✏️ 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 dev

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

@djm81 djm81 self-assigned this Mar 27, 2026
@djm81 djm81 added enhancement New feature or request dependencies Dependency resolution and management labels Mar 27, 2026
@djm81 djm81 moved this from Todo to In Progress in SpecFact CLI Mar 27, 2026
Comment thread src/specfact_cli/adapters/speckit.py Fixed
Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com>
Signed-off-by: Dom <39115308+djm81@users.noreply.github.com>
@djm81 djm81 merged commit 366ad4d into main Mar 28, 2026
34 checks passed
@github-project-automation github-project-automation bot moved this from In Progress to Done in SpecFact CLI Mar 28, 2026
@coderabbitai coderabbitai bot mentioned this pull request Apr 8, 2026
41 tasks
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] Spec-Kit v0.4.x Adapter Alignment [Bug] Windows backlog automation fails with console encoding and environment-coupled module resolution

1 participant