Skip to content

Merge dev into main#447

Merged
djm81 merged 322 commits intomainfrom
dev
Mar 25, 2026
Merged

Merge dev into main#447
djm81 merged 322 commits intomainfrom
dev

Conversation

@djm81
Copy link
Copy Markdown
Collaborator

@djm81 djm81 commented Mar 25, 2026

Description

This pull request merges dev into main to ship the current integration branch. Highlights since the last promotion include:

  • specfact init ide: Prompt source catalog, --prompts selection, flat export under .github/prompts/ (and other IDE roots) for editor/agent discoverability, core-vs-module deduplication by template basename, legacy segment cleanup, and VS Code chat.promptFilesRecommendations alignment.
  • Runtime / resources: Cross-platform runtime and IDE resource discovery hardening.
  • Docs: Core site IA and related documentation updates.
  • Quality: Code-review and backlog-related fixes, contract/test follow-ups.

Fixes #(n/a — batch merge from dev)

New Features #(see commits on dev since last main promotion)

Contract References: Existing @icontract / @beartype on touched public APIs (e.g. ide_setup, init commands); no new public contract surface required for this merge description.

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) — where applicable in merged changes
  • Type checking enforced (@beartype decorators applied)
  • CrossHair exploration completed: hatch run contract-test-exploration
  • Contract violations reviewed and addressed — per CI / local gates on dev

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 — where tests exist on dev
  • Error handling tested with invalid inputs
  • Rich console output verified manually or with snapshots

How Has This Been Tested?

Contract-First Approach: dev is validated by CI (contract layers, pytest, pre-commit). Init IDE changes are covered by unit tests in tests/unit/utils/test_ide_setup.py and tests/unit/modules/init/test_init_ide_prompt_selection.py.

Manual Testing

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

Automated Testing

  • Contract validation passes
  • Property-based tests cover edge cases — where applicable
  • Scenario tests cover user workflows
  • All existing tests still pass — on dev / CI

Test Environment

  • Python version: 3.11+ (per pyproject.toml)
  • OS: Linux / macOS / Windows (CI matrix)

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) — only where changed in this batch
  • I have added/updated docstrings (Google style)
  • I have made corresponding changes to documentation — where included on dev
  • My changes generate no new warnings (basedpyright, ruff, pylint) — target state on dev
  • All tests pass locally / in CI
  • I have added tests that prove my fix/feature works — for new behavior on dev
  • Any dependent changes have been merged — dev includes merges from main as needed

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 for this merge PR (CLI/infra batch).

djm81 and others added 30 commits February 6, 2026 23:08
Co-authored-by: Dominikus Nold <djm81@users.noreply.github.com>
Co-authored-by: Dominikus Nold <djm81@users.noreply.github.com>
* feat: add ModuleIOContract protocol and core-module isolation

- Create ModuleIOContract protocol with four core operations

- Add static analysis enforcement preventing core->module imports

- Add ProjectBundle schema versioning (schema_version field)

- Update 5 modules to implement ModuleIOContract

- Add protocol compliance tracking in module discovery

- Create docs for ProjectBundle schema and module contracts

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

* chore: update arch-04 task tracking after implementation and PR

* test: fix flaky help assertions and typing warnings

---------

Co-authored-by: Dominikus Nold <djm81@users.noreply.github.com>
Co-authored-by: Dominikus Nold <djm81@users.noreply.github.com>
Add three OpenSpec changes from Module Marketplace Decoupling Plan:
- arch-07-schema-extension-system: Schema extension mechanism for ProjectBundle
- marketplace-01-central-module-registry: Central registry MVP with module discovery
- marketplace-02-advanced-marketplace-features: Dependency resolution and custom registries

All changes include:
- Proposal, design, specs, tasks, and validation artifacts
- Source tracking linked to GitHub issues #213, #214, #215
- TDD/SDD ordering with contract-first development
- Backward compatibility guarantees

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
* docs: add openspec change arch-05 bridge registry

* feat: apply arch-05 bridge registry workflow

* docs: update arch-05 apply task execution state

* fix: resolve arch-05 protocol reporting and duplicate lifecycle logs

* fix: close arch-05 review gaps for protocol reporting

* docs: mark arch-05 PR task complete

* fix: complete arch-05 module io contract migration

* fix: make module protocol startup reporting user-friendly

* fix: make debug logging work for eager cli flags

* fix: print active debug log path on debug startup

* fix: harden repro output and telemetry fallback behavior

* test: fix service bridge metadata typing in unit tests

* fix: add strict crosshair mode and clearer repro diagnostics

* fix: remove contracts import side-effects for crosshair

* fix: make crosshair exploration output specific and deduplicated

* fix: make crosshair exploration skip noisy signature-limited files

* ci: reduce specfact workflow env setup overhead

* ci: avoid hatch env sync in specfact validation workflow

* fix: stabilize crosshair exploration for side-effectful modules

* fix: improve crosshair compatibility for backlog converters

* ci: require crosshair in specfact repro workflows

* Apply fixes on crosshair tests

* ci: speed up workflow setup with cache and lean hatch installs

* ci: pin contract scenario test env to py3.12

* ci: improve contract test progress logging

* ci: increase and expose smart test timeout for scenario runs

* Fix test failure logic

* Fix test failure logic

* Reformat files

* Fix contract test findings

* Update docs integrity

---------

Co-authored-by: Dominikus Nold <djm81@users.noreply.github.com>
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>
djm81 and others added 20 commits March 20, 2026 23:50
* 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>
* 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

* fix: bump patch version to 0.42.4

* fix: restore init lifecycle compatibility

---------

Co-authored-by: Dominikus Nold <djm81@users.noreply.github.com>
…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>
- 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
…ation 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
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Mar 25, 2026

Caution

Review failed

Pull request was closed or merged during review

📝 Walkthrough

Summary by CodeRabbit

Release Notes v0.42.6

  • Bug Fixes
    • Fixed IDE multi-source prompt export to use a flat directory layout instead of per-source subfolders for improved discoverability
    • Eliminated duplicate prompt exports when core and module sources share the same template filename
    • Added automatic cleanup of legacy prompt directories and stale exports when selected sources change

Walkthrough

Release version 0.42.6 patches IDE prompt export behavior: exports now use flat directory layout instead of per-source subfolders, core prompts omit basenames already provided by modules, and legacy per-source segment directories are removed during re-export when source selection changes.

Changes

Cohort / File(s) Summary
Version Bumps
pyproject.toml, setup.py, src/__init__.py, src/specfact_cli/__init__.py
Incremented package version from 0.42.5 to 0.42.6 across all version declaration files.
Module Metadata
src/specfact_cli/modules/init/module-package.yaml
Updated init module package version from 0.1.17 to 0.1.18; regenerated integrity checksum and signature fields.
Documentation & Specifications
CHANGELOG.md, openspec/changes/init-ide-prompt-source-selection/spec.md, openspec/changes/init-ide-prompt-source-selection/TDD_EVIDENCE.md
Added changelog entry documenting multi-source flat export, basename deduplication, and legacy cleanup behavior; updated specification to define flat directory layout and deterministic basename collision rules; recorded test execution evidence.
Core IDE Export Logic
src/specfact_cli/utils/ide_setup.py
Significant refactor: replaced per-source segment export with basename-based merging; added _core_prompts_excluding_module_basenames() and _merge_prompt_export_outputs_by_basename(); removed segment-based functions; updated expected_ide_prompt_export_paths() to return flat paths; added _cleanup_legacy_multisource_segment_dirs() and _prune_flat_specfact_exports_not_in_expected(); updated VS Code/Copilot path generation for flat layout.
Command Documentation
src/specfact_cli/modules/init/src/commands.py
Updated copy_templates_to_ide docstring to reflect "multi-source flat export" behavior instead of "namespaced multi-source export."
Unit Tests
tests/unit/utils/test_ide_setup.py, tests/unit/modules/init/test_init_ide_prompt_selection.py, tests/unit/specfact_cli/registry/test_init_module_lifecycle_ux.py
Added monkeypatching of _module_prompt_sources_catalog to isolate catalog discovery; added test for flat export glob patterns; updated assertions for flat export paths; added module basename collision tests.
End-to-End Tests
tests/e2e/test_init_command.py
Added autouse fixture to stub module prompt sources; updated path assertions and test setup from namespaced layout (.../commands/core) to flat layout (.../commands); adjusted skip/overwrite and auto-detection scenarios to reflect flat structure.

Sequence Diagram(s)

(Skipped: Changes are primarily internal refactoring of IDE export logic within a single module. While complex, the flow is straightforward internal data transformation without multi-component interactions that benefit from visualization.)

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~50 minutes

The PR requires careful review of the new basename-merging logic and flat export layout in ide_setup.py, validation that the core-exclusion deduplication works correctly across module sources, verification of test coverage across multiple test files with heterogeneous assertion updates, and confirmation that legacy per-source directory cleanup does not inadvertently remove user files.

Possibly related issues

  • IDE Prompt Source Selection #382: Directly addressed by this PR's IDE prompt source-selection orchestration in ide_setup.py, including catalog discovery, core-exclusion by basename, and flat export/merge functions.

Possibly related PRs

Suggested labels

enhancement, bug

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Title check ❓ Inconclusive The title is vague and does not clearly convey the main changes; it only indicates a branch merge without specifying what features or fixes are being shipped. Consider updating the title to reflect key changes, e.g., 'Merge dev: add specfact init ide features, flat export layout, and cross-platform hardening'.
✅ Passed checks (2 passed)
Check name Status Explanation
Description check ✅ Passed The description is well-structured, comprehensive, and covers highlights, testing evidence, and quality gates, meeting the template requirements for a batch/integration merge.
Docstring Coverage ✅ Passed Docstring coverage is 83.72% 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.

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: 41dc0dba14

ℹ️ 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/utils/ide_setup.py
@djm81 djm81 merged commit 21f5557 into main Mar 25, 2026
34 of 35 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant