Skip to content

Commit 1682dfe

Browse files
djm81cursoragentgithub-code-quality[bot]claude
authored
Release v0.38.1: Marketplace publish workflow registry PR completion (dev → main) (#321)
* perf: optimize startup performance with metadata tracking and update command (#142) * feat: implement backlog field mapping and refinement improvements - Add FieldMapper abstract base class with canonical field names - Implement GitHubFieldMapper and AdoFieldMapper - Add custom field mapping support with YAML templates - Add field validation in refinement (story_points, business_value, priority) - Add comprehensive unit and integration tests (42 tests) - Add custom field mapping documentation - Fix custom_field_mapping parameter connection - Add early validation for custom mapping files Implements OpenSpec change: improve-backlog-field-mapping-and-refinement * perf: optimize startup performance with metadata tracking and update command - Add metadata management module for tracking version and check timestamps - Optimize startup checks to only run when needed: - Template checks: Only after version changes detected - Version checks: Limited to once per day (24h threshold) - Add --skip-checks flag for CI/CD environments - Add new 'specfact update' command for manual update checking and installation - Add comprehensive unit and integration tests (35 tests, all passing) - Update startup_checks to use metadata for conditional execution - Ensure backward compatibility (first-time users still get all checks) Performance Impact: - Startup time: Reduced from several seconds to < 1-2 seconds - Network requests: Reduced from every startup to once per day - File system operations: Reduced from every startup to only after version changes Fixes #140 Implements OpenSpec change: optimize-startup-performance * feat: request offline_access scope for Azure DevOps refresh tokens - Add offline_access scope to Azure DevOps OAuth requests - Refresh tokens now last 90 days (vs 1 hour for access tokens) - Automatic token refresh via persistent cache (no re-authentication needed) - Update documentation to reflect 90-day refresh token lifetime This addresses the issue where tokens were expiring too quickly. Refresh tokens obtained via offline_access scope enable automatic token renewal for 90 days without user interaction. Fixes token lifetime limitation issue * feat: improve CLI UX with banner control and upgrade command - Change banner to hidden by default, shown on first run or with --banner flag - Add simple version line (SpecFact CLI - vXYZ) for regular use - Rename 'update' command to 'upgrade' to avoid confusion - Update documentation for new banner behavior and upgrade command - Update startup checks message to reference 'specfact upgrade' * fix: suppress version line in test mode and fix field mapping issues - Suppress version line output in test mode and for help/version commands to prevent test failures - Fix ADO custom field mapping to honor --custom-field-mapping on writeback - Fix GitHub issue body updates to prevent duplicate sections - Ensure proper type handling for story points and business value calculations * Fix failed tests * chore: bump version to 0.26.7 and update changelog - Fixed adapter token validation tests (ADO and GitHub) - Resolved test timeout issues (commit history, AST parsing, Semgrep) - Improved test file discovery to exclude virtual environments - Added file size limits for AST parsing to prevent timeouts --------- Co-authored-by: Dominikus Nold <djm81@users.noreply.github.com> * fix: add missing ADO field mappings and assignee display (#145) * fix: add missing ADO field mappings and assignee display - Add Microsoft.VSTS.Common.AcceptanceCriteria to default field mappings - Update AdoFieldMapper to support multiple field name alternatives - Fix assignee extraction to include displayName, uniqueName, and mail - Add assignee display in preview output - Add interactive template mapping command (specfact backlog map-fields) - Update specfact init to copy backlog field mapping templates - Extend documentation with step-by-step guides Fixes #144 * test: add unit tests for ADO field mapping and assignee fixes - Add tests for Microsoft.VSTS.Common.AcceptanceCriteria field extraction - Add tests for multiple field name alternatives - Add tests for assignee extraction with displayName, uniqueName, mail - Add tests for assignee filtering with multiple identifiers - Add tests for assignee display in preview output - Add tests for interactive mapping command - Add tests for template copying in init command - Update existing tests to match new assignee extraction behavior * docs: update init command docstring to mention template copying * docs: update documentation for ADO field mapping and interactive mapping features - Update authentication guide with ADO token resolution priority - Update custom field mapping guide with interactive mapping details - Update backlog refinement guide with progress indicators and required field display - Update Azure DevOps adapter guide with field mapping improvements - Update command reference with map-fields command documentation - Update troubleshooting guide with ADO-specific issues - Update README files with new features - Update getting started guide with template initialization Co-authored-by: Cursor <cursoragent@cursor.com> * fix: address review findings for ADO field mapping - Prefer System.* fields over Microsoft.VSTS.Common.* when writing updates (fixes issue where PATCH requests could fail for Scrum templates) - Preserve existing work_item_type_mappings when saving field mappings (prevents silent erasure of custom work item type mappings) Fixes review comments: - P1: Prefer System.AcceptanceCriteria when writing updates - P2: Preserve existing work_item_type_mappings on save Co-authored-by: Cursor <cursoragent@cursor.com> --------- Co-authored-by: Dominikus Nold <djm81@users.noreply.github.com> Co-authored-by: Cursor <cursoragent@cursor.com> * fix: mitigate code scanning vulnerabilities (#148) * fix: mitigate code scanning vulnerabilities - Fix ReDoS vulnerability in github_mapper.py by replacing regex with line-by-line processing - Fix incomplete URL sanitization in github.py, bridge_sync.py, and ado.py using proper URL parsing - Add explicit permissions blocks to 7 GitHub Actions jobs following least-privilege model Resolves all 13 code scanning findings: - 1 ReDoS error - 5 URL sanitization warnings - 7 missing workflow permissions warnings Fixes #147 Co-authored-by: Cursor <cursoragent@cursor.com> * fix: accept GitHub SSH host aliases in repo detection Accept ssh.github.com (port 443) in addition to github.com when detecting GitHub repositories via SSH remotes. This ensures repositories using git@ssh.github.com:owner/repo.git are properly detected as GitHub repos. Addresses review feedback on PR #148 Co-authored-by: Cursor <cursoragent@cursor.com> * fix: prevent async cleanup issues in test mode Remove manual Live display cleanup that could cause EOFError. The _safe_progress_display function already handles test mode by skipping progress display, so direct save path is sufficient. Fixes test_unlock_section failure with EOFError/ValueError. Co-authored-by: Cursor <cursoragent@cursor.com> --------- Co-authored-by: Dominikus Nold <djm81@users.noreply.github.com> Co-authored-by: Cursor <cursoragent@cursor.com> * fix: detect GitHub remotes using ssh:// and git:// URLs Extend URL pattern matching to support ssh://git@github.com/owner/repo.git and git://github.com/owner/repo.git formats in addition to existing https?:// and scp-style git@host:path URLs. This fixes a regression where these valid GitHub URL formats were not detected, causing detect() to return false for repos using these schemes. Addresses review feedback on PR #149 Co-authored-by: Cursor <cursoragent@cursor.com> * chore: bump version to 0.26.9 and update changelog - Update version from 0.26.8 to 0.26.9 - Add changelog entry for GitHub remote detection fix and code scanning fixes Co-authored-by: Cursor <cursoragent@cursor.com> * fix: compare GitHub SSH hostnames case-insensitively Lowercase host_part before comparison to handle mixed-case hostnames like git@GitHub.com:org/repo.git. This restores the case-insensitive behavior from the previous config_content.lower() check and prevents regression where valid GitHub repos with mixed-case hostnames would not be detected. Addresses review feedback on PR #150 Co-authored-by: Cursor <cursoragent@cursor.com> * Add openspec and workflow commands for transparency * Add specs from openspec * Remove aisp change which wasn't implemented * Fix openspec gitignore pattern * Update gitignore * Update contribution standards to use openspec for SDD * Migrate to new opsx openspec commands * Migrate workflow and openspec config * fix: bump version to 0.26.10 for PyPI publish - Sync version across pyproject.toml, setup.py, src/__init__.py, src/specfact_cli/__init__.py - Add CHANGELOG entry for 0.26.10 (fixes incorrect version publish issue) Co-authored-by: Cursor <cursoragent@cursor.com> * Update version and changelog * Add canonical user-friendly workitem url for ado workitems * Update to support OSPX * feat(backlog): implement refine --import-from-tmp and fix type-check (#156) * feat(backlog): implement --import-from-tmp for refine export/import round-trip - Add _parse_refined_export_markdown() to parse export-format markdown (ID, Body, Acceptance Criteria, optional title/metrics) - Import branch: read file, match by ID, update items; --write calls adapter.update_backlog_item() - Remove 'Import functionality pending implementation' message - Unit tests for parser (single item, AC/metrics, header-only, blocks without ID) - Bump version to 0.26.11 and sync across pyproject.toml, setup.py, src/__init__.py, src/specfact_cli/__init__.py - OpenSpec change: implement-backlog-refine-import-from-tmp (proposal, tasks, spec delta) Fixes #155 Co-authored-by: Cursor <cursoragent@cursor.com> * Fix type check issues --------- Co-authored-by: Dominikus Nold <djm81@users.noreply.github.com> Co-authored-by: Cursor <cursoragent@cursor.com> * feat: debug logs under ~/.specfact/logs and release 0.26.13 (#159) * feat: add debug logs under ~/.specfact/logs with operation metadata - User-level log dir: get_specfact_home_logs_dir() (~/.specfact/logs, 0o755) - debug_print() routes to console and rotating specfact-debug.log when --debug - debug_log_operation() for structured metadata (ADO, GitHub, backlog, init) - CLI init_debug_log_file() when --debug; help text updated Closes #158 OpenSpec change: add-debug-logs-specfact-home Co-authored-by: Cursor <cursoragent@cursor.com> * Add debug logging for selected commands at first * release: 0.26.13 - debug log parity for upgrade, versions and changelog - Log upgrade success (up to date) to ~/.specfact/logs/specfact-debug.log - Bump version to 0.26.13; sync pyproject.toml, setup.py, src/__init__.py, specfact_cli/__init__.py - CHANGELOG: 0.26.13 Fixed entry for upgrade debug parity Co-authored-by: Cursor <cursoragent@cursor.com> * Remove pr markdown --------- Co-authored-by: Dominikus Nold <djm81@users.noreply.github.com> Co-authored-by: Cursor <cursoragent@cursor.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 unused variable review * Fix unused variable review * Fix type and test errors * Finalize change * Change for debug logs archived * fix: improve ADO backlog refine error logging and user-facing error UX (#164) * Improving error logging capabilities * small fix on changelog * Archived change --------- Co-authored-by: Dominikus Nold <djm81@users.noreply.github.com> * feat: backlog refine --ignore-refined and --id, startup docs (fixes #166) (#167) * feat: backlog refine --ignore-refined and --id, startup docs (fixes #166) OpenSpec change: improve-backlog-refine-and-cli-startup. Adds --ignore-refined/--no-ignore-refined, --id <issue-id>; helper _item_needs_refinement; interactive refinement prompt section; version 0.26.15. * Add change for this branch and improve change create workflow * Improve refinement prompt and add specification feedback, update docs and add backlog refinement tutorial * Fix spec update and tasks * Improve pr orchestrator pipeline triggers --------- Co-authored-by: Dominikus Nold <djm81@users.noreply.github.com> * Add change proposals for full scrum support * Add support for systematic, structured issue creation with copilot help * feat(backlog): daily standup defaults, iteration/sprint, unassigned items view (#174) * Issue 179 resolution (#180) * fix(backlog): address CodeQL/Codex PR 181 findings - Replace empty except with debug_log_operation in _load_standup_config and _load_backlog_config (correct signature: operation, target, status, error) - Add dim console message in sprint end date parse except block - Gate summarize prompt description/comments on --comments; add include_comments to _build_summarize_prompt_content and call site - Add test for metadata-only summarize when include_comments=False; update existing test to pass include_comments=True Co-authored-by: Cursor <cursoragent@cursor.com> * Update openspec enforcement rules * Structure openspec changes * Fix ruff finding * Fix linter issues with StrEnum and parameters * Fix tests and depcreation warnings * Improve sync script * Add change for modular command registry * Fix review finding on dev sync script * Update modular change proposal * feat: CLI modular command registry and lazy load (arch-01) (#196) * feat: CLI modular command registry and lazy load (arch-01) Co-authored-by: Cursor <cursoragent@cursor.com> * Add missing exports * Fix lazy loading review findigns * Removed example package and fixed tests * Fix test failures and lazy load logic for modules * Fix tests --------- Co-authored-by: Dominikus Nold <djm81@users.noreply.github.com> Co-authored-by: Cursor <cursoragent@cursor.com> * docs: document CLI modules design; sync version and cleanup - Add Modules design section to architecture (registry, module packages, state) - Update module structure tree with registry/ and modules/ - Cross-reference directory-structure to architecture#modules-design - Changelog, version, and project file updates; remove obsolete commands/prompts Co-authored-by: Cursor <cursoragent@cursor.com> * Archive modular change and specs * Fix banner display on help screen * Improve action runner on main * Setup claude skills and instructions * feat: module package separation for command implementations (#200) * feat: separate module package command implementations * docs: finalize openspec apply checklist for arch-02 * Archived arch-02 change and updated specs * fix: restore plan sync shared compatibility import --------- Co-authored-by: Dominikus Nold <djm81@users.noreply.github.com> * fix: address CodeQL and Codex review findings from PR #201 - Fix unreachable code in contract init (Prompt.ask after raise typer.Exit) - Replace empty except with print_warning for contract file load failures - Fix repo-root fallback path depth in backlog commands after module migration Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * feat: module lifecycle management, init split, and interactive module UX (#204) * Release v0.28.0: Module package separation for command implementations (#201) * perf: optimize startup performance with metadata tracking and update command (#142) * feat: implement backlog field mapping and refinement improvements - Add FieldMapper abstract base class with canonical field names - Implement GitHubFieldMapper and AdoFieldMapper - Add custom field mapping support with YAML templates - Add field validation in refinement (story_points, business_value, priority) - Add comprehensive unit and integration tests (42 tests) - Add custom field mapping documentation - Fix custom_field_mapping parameter connection - Add early validation for custom mapping files Implements OpenSpec change: improve-backlog-field-mapping-and-refinement * perf: optimize startup performance with metadata tracking and update command - Add metadata management module for tracking version and check timestamps - Optimize startup checks to only run when needed: - Template checks: Only after version changes detected - Version checks: Limited to once per day (24h threshold) - Add --skip-checks flag for CI/CD environments - Add new 'specfact update' command for manual update checking and installation - Add comprehensive unit and integration tests (35 tests, all passing) - Update startup_checks to use metadata for conditional execution - Ensure backward compatibility (first-time users still get all checks) Performance Impact: - Startup time: Reduced from several seconds to < 1-2 seconds - Network requests: Reduced from every startup to once per day - File system operations: Reduced from every startup to only after version changes Fixes #140 Implements OpenSpec change: optimize-startup-performance * feat: request offline_access scope for Azure DevOps refresh tokens - Add offline_access scope to Azure DevOps OAuth requests - Refresh tokens now last 90 days (vs 1 hour for access tokens) - Automatic token refresh via persistent cache (no re-authentication needed) - Update documentation to reflect 90-day refresh token lifetime This addresses the issue where tokens were expiring too quickly. Refresh tokens obtained via offline_access scope enable automatic token renewal for 90 days without user interaction. Fixes token lifetime limitation issue * feat: improve CLI UX with banner control and upgrade command - Change banner to hidden by default, shown on first run or with --banner flag - Add simple version line (SpecFact CLI - vXYZ) for regular use - Rename 'update' command to 'upgrade' to avoid confusion - Update documentation for new banner behavior and upgrade command - Update startup checks message to reference 'specfact upgrade' * fix: suppress version line in test mode and fix field mapping issues - Suppress version line output in test mode and for help/version commands to prevent test failures - Fix ADO custom field mapping to honor --custom-field-mapping on writeback - Fix GitHub issue body updates to prevent duplicate sections - Ensure proper type handling for story points and business value calculations * Fix failed tests * chore: bump version to 0.26.7 and update changelog - Fixed adapter token validation tests (ADO and GitHub) - Resolved test timeout issues (commit history, AST parsing, Semgrep) - Improved test file discovery to exclude virtual environments - Added file size limits for AST parsing to prevent timeouts --------- Co-authored-by: Dominikus Nold <djm81@users.noreply.github.com> * fix: add missing ADO field mappings and assignee display (#145) * fix: add missing ADO field mappings and assignee display - Add Microsoft.VSTS.Common.AcceptanceCriteria to default field mappings - Update AdoFieldMapper to support multiple field name alternatives - Fix assignee extraction to include displayName, uniqueName, and mail - Add assignee display in preview output - Add interactive template mapping command (specfact backlog map-fields) - Update specfact init to copy backlog field mapping templates - Extend documentation with step-by-step guides Fixes #144 * test: add unit tests for ADO field mapping and assignee fixes - Add tests for Microsoft.VSTS.Common.AcceptanceCriteria field extraction - Add tests for multiple field name alternatives - Add tests for assignee extraction with displayName, uniqueName, mail - Add tests for assignee filtering with multiple identifiers - Add tests for assignee display in preview output - Add tests for interactive mapping command - Add tests for template copying in init command - Update existing tests to match new assignee extraction behavior * docs: update init command docstring to mention template copying * docs: update documentation for ADO field mapping and interactive mapping features - Update authentication guide with ADO token resolution priority - Update custom field mapping guide with interactive mapping details - Update backlog refinement guide with progress indicators and required field display - Update Azure DevOps adapter guide with field mapping improvements - Update command reference with map-fields command documentation - Update troubleshooting guide with ADO-specific issues - Update README files with new features - Update getting started guide with template initialization Co-authored-by: Cursor <cursoragent@cursor.com> * fix: address review findings for ADO field mapping - Prefer System.* fields over Microsoft.VSTS.Common.* when writing updates (fixes issue where PATCH requests could fail for Scrum templates) - Preserve existing work_item_type_mappings when saving field mappings (prevents silent erasure of custom work item type mappings) Fixes review comments: - P1: Prefer System.AcceptanceCriteria when writing updates - P2: Preserve existing work_item_type_mappings on save Co-authored-by: Cursor <cursoragent@cursor.com> --------- Co-authored-by: Dominikus Nold <djm81@users.noreply.github.com> Co-authored-by: Cursor <cursoragent@cursor.com> * fix: mitigate code scanning vulnerabilities (#148) * fix: mitigate code scanning vulnerabilities - Fix ReDoS vulnerability in github_mapper.py by replacing regex with line-by-line processing - Fix incomplete URL sanitization in github.py, bridge_sync.py, and ado.py using proper URL parsing - Add explicit permissions blocks to 7 GitHub Actions jobs following least-privilege model Resolves all 13 code scanning findings: - 1 ReDoS error - 5 URL sanitization warnings - 7 missing workflow permissions warnings Fixes #147 Co-authored-by: Cursor <cursoragent@cursor.com> * fix: accept GitHub SSH host aliases in repo detection Accept ssh.github.com (port 443) in addition to github.com when detecting GitHub repositories via SSH remotes. This ensures repositories using git@ssh.github.com:owner/repo.git are properly detected as GitHub repos. Addresses review feedback on PR #148 Co-authored-by: Cursor <cursoragent@cursor.com> * fix: prevent async cleanup issues in test mode Remove manual Live display cleanup that could cause EOFError. The _safe_progress_display function already handles test mode by skipping progress display, so direct save path is sufficient. Fixes test_unlock_section failure with EOFError/ValueError. Co-authored-by: Cursor <cursoragent@cursor.com> --------- Co-authored-by: Dominikus Nold <djm81@users.noreply.github.com> Co-authored-by: Cursor <cursoragent@cursor.com> * fix: detect GitHub remotes using ssh:// and git:// URLs Extend URL pattern matching to support ssh://git@github.com/owner/repo.git and git://github.com/owner/repo.git formats in addition to existing https?:// and scp-style git@host:path URLs. This fixes a regression where these valid GitHub URL formats were not detected, causing detect() to return false for repos using these schemes. Addresses review feedback on PR #149 Co-authored-by: Cursor <cursoragent@cursor.com> * chore: bump version to 0.26.9 and update changelog - Update version from 0.26.8 to 0.26.9 - Add changelog entry for GitHub remote detection fix and code scanning fixes Co-authored-by: Cursor <cursoragent@cursor.com> * fix: compare GitHub SSH hostnames case-insensitively Lowercase host_part before comparison to handle mixed-case hostnames like git@GitHub.com:org/repo.git. This restores the case-insensitive behavior from the previous config_content.lower() check and prevents regression where valid GitHub repos with mixed-case hostnames would not be detected. Addresses review feedback on PR #150 Co-authored-by: Cursor <cursoragent@cursor.com> * Add openspec and workflow commands for transparency * Add specs from openspec * Remove aisp change which wasn't implemented * Fix openspec gitignore pattern * Update gitignore * Update contribution standards to use openspec for SDD * Migrate to new opsx openspec commands * Migrate workflow and openspec config * fix: bump version to 0.26.10 for PyPI publish - Sync version across pyproject.toml, setup.py, src/__init__.py, src/specfact_cli/__init__.py - Add CHANGELOG entry for 0.26.10 (fixes incorrect version publish issue) Co-authored-by: Cursor <cursoragent@cursor.com> * Update version and changelog * Add canonical user-friendly workitem url for ado workitems * Update to support OSPX * feat(backlog): implement refine --import-from-tmp and fix type-check (#156) * feat(backlog): implement --import-from-tmp for refine export/import round-trip - Add _parse_refined_export_markdown() to parse export-format markdown (ID, Body, Acceptance Criteria, optional title/metrics) - Import branch: read file, match by ID, update items; --write calls adapter.update_backlog_item() - Remove 'Import functionality pending implementation' message - Unit tests for parser (single item, AC/metrics, header-only, blocks without ID) - Bump version to 0.26.11 and sync across pyproject.toml, setup.py, src/__init__.py, src/specfact_cli/__init__.py - OpenSpec change: implement-backlog-refine-import-from-tmp (proposal, tasks, spec delta) Fixes #155 Co-authored-by: Cursor <cursoragent@cursor.com> * Fix type check issues --------- Co-authored-by: Dominikus Nold <djm81@users.noreply.github.com> Co-authored-by: Cursor <cursoragent@cursor.com> * feat: debug logs under ~/.specfact/logs and release 0.26.13 (#159) * feat: add debug logs under ~/.specfact/logs with operation metadata - User-level log dir: get_specfact_home_logs_dir() (~/.specfact/logs, 0o755) - debug_print() routes to console and rotating specfact-debug.log when --debug - debug_log_operation() for structured metadata (ADO, GitHub, backlog, init) - CLI init_debug_log_file() when --debug; help text updated Closes #158 OpenSpec change: add-debug-logs-specfact-home Co-authored-by: Cursor <cursoragent@cursor.com> * Add debug logging for selected commands at first * release: 0.26.13 - debug log parity for upgrade, versions and changelog - Log upgrade success (up to date) to ~/.specfact/logs/specfact-debug.log - Bump version to 0.26.13; sync pyproject.toml, setup.py, src/__init__.py, specfact_cli/__init__.py - CHANGELOG: 0.26.13 Fixed entry for upgrade debug parity Co-authored-by: Cursor <cursoragent@cursor.com> * Remove pr markdown --------- Co-authored-by: Dominikus Nold <djm81@users.noreply.github.com> Co-authored-by: Cursor <cursoragent@cursor.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 unused variable review * Fix unused variable review * Fix type and test errors * Finalize change * Change for debug logs archived * fix: improve ADO backlog refine error logging and user-facing error UX (#164) * Improving error logging capabilities * small fix on changelog * Archived change --------- Co-authored-by: Dominikus Nold <djm81@users.noreply.github.com> * feat: backlog refine --ignore-refined and --id, startup docs (fixes #166) (#167) * feat: backlog refine --ignore-refined and --id, startup docs (fixes #166) OpenSpec change: improve-backlog-refine-and-cli-startup. Adds --ignore-refined/--no-ignore-refined, --id <issue-id>; helper _item_needs_refinement; interactive refinement prompt section; version 0.26.15. * Add change for this branch and improve change create workflow * Improve refinement prompt and add specification feedback, update docs and add backlog refinement tutorial * Fix spec update and tasks * Improve pr orchestrator pipeline triggers --------- Co-authored-by: Dominikus Nold <djm81@users.noreply.github.com> * Add change proposals for full scrum support * Add support for systematic, structured issue creation with copilot help * feat(backlog): daily standup defaults, iteration/sprint, unassigned items view (#174) * Issue 179 resolution (#180) * fix(backlog): address CodeQL/Codex PR 181 findings - Replace empty except with debug_log_operation in _load_standup_config and _load_backlog_config (correct signature: operation, target, status, error) - Add dim console message in sprint end date parse except block - Gate summarize prompt description/comments on --comments; add include_comments to _build_summarize_prompt_content and call site - Add test for metadata-only summarize when include_comments=False; update existing test to pass include_comments=True Co-authored-by: Cursor <cursoragent@cursor.com> * Update openspec enforcement rules * Structure openspec changes * Fix ruff finding * Fix linter issues with StrEnum and parameters * Fix tests and depcreation warnings * Improve sync script * Add change for modular command registry * Fix review finding on dev sync script * Update modular change proposal * feat: CLI modular command registry and lazy load (arch-01) (#196) * feat: CLI modular command registry and lazy load (arch-01) Co-authored-by: Cursor <cursoragent@cursor.com> * Add missing exports * Fix lazy loading review findigns * Removed example package and fixed tests * Fix test failures and lazy load logic for modules * Fix tests --------- Co-authored-by: Dominikus Nold <djm81@users.noreply.github.com> Co-authored-by: Cursor <cursoragent@cursor.com> * docs: document CLI modules design; sync version and cleanup - Add Modules design section to architecture (registry, module packages, state) - Update module structure tree with registry/ and modules/ - Cross-reference directory-structure to architecture#modules-design - Changelog, version, and project file updates; remove obsolete commands/prompts Co-authored-by: Cursor <cursoragent@cursor.com> * Archive modular change and specs * Fix banner display on help screen * Improve action runner on main * Setup claude skills and instructions * feat: module package separation for command implementations (#200) * feat: separate module package command implementations * docs: finalize openspec apply checklist for arch-02 * Archived arch-02 change and updated specs * fix: restore plan sync shared compatibility import --------- Co-authored-by: Dominikus Nold <djm81@users.noreply.github.com> * fix: address CodeQL and Codex review findings from PR #201 - Fix unreachable code in contract init (Prompt.ask after raise typer.Exit) - Replace empty except with print_warning for contract file load failures - Fix repo-root fallback path depth in backlog commands after module migration Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> --------- 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> Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com> Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com> * feat: add module lifecycle management and split init ide setup * docs: update arch-03 tasks after pr creation * docs: update init help text for module lifecycle and ide split * Format missing * fix: tighten ado assignee typing for basedpyright warning * fix: honor init install-deps and tighten ado typing * test: satisfy bundle converter constructor typing * test: isolate module registry state in migration compatibility test * Update change * disable claude review due to high costs --------- 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> Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com> Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com> * archived change for module improvements * fix: address review feedback in init and boundary tests * Fix test setup for tmpfiles * docs: add openspec change arch-05 bridge registry (#210) Co-authored-by: Dominikus Nold <djm81@users.noreply.github.com> * docs: add openspec change arch-06 manifest security (#211) Co-authored-by: Dominikus Nold <djm81@users.noreply.github.com> * feat: Core Contracts and Module Interface Formalization (#209) * 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> * Update specs and archive arch-04 change * Fix changelog format * docs: align arch-05 scope with protocol migration cleanup (#212) Co-authored-by: Dominikus Nold <djm81@users.noreply.github.com> * docs: add OpenSpec changes for module marketplace phases 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> * feat: apply arch-05 bridge registry implementation (#216) * 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> * Archive arch-05 change after implementation * fix: address post-merge review findings and restore lazy registration * fix: refresh project console per invocation in tests * fix: detect runtime interface protocol ops in source scan * fix: harden project console refresh and protocol source scan * fix: refresh import command console for each invocation * fix: resolve type-check errors and harden protocol scanning * fix: stabilize module protocol scan and project console lifecycle * Refine pending changes for new modular ecosystem and marketplace integration * fix: update stale spec-delta paths in tasks.md after change renames 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> * docs: rewrite CHANGE_ORDER.md for module-scoped changes and full dependency 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> * feat(backlog): daily/refine comment context, interactive standup posting, 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> * fix(backlog): satisfy interactive daily adapter typing * fix(backlog): bypass default daily limit for issue-window flags * fix: parse backlog refine writeback fields and refactor refine command (#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> * fix: avoid raw label fallback when description block is missing * fix: harden backlog refine prompt scaffold and mixed-format parsing (#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> * Finish change * chore: bump version to 0.30.4 and update changelog * Add MEMORY.md for claude code * Archive backlog writeback field split change * Archived flask support sidecar change * feat: add backlog-core module — dependency analysis and command suites (#231) * fix(backlog-core): remove unused module io contract global * fix: rename LICENSE.md to LICENSE for GitHub license detection (#233) GitHub's licensee gem only recognizes standard filenames (LICENSE, LICENSE.txt) — LICENSE.md caused the repo to show "Other" instead of "Apache License 2.0". Updated all references across pyproject.toml, README, docs, workflows, and FAQ. Co-authored-by: Dominikus Nold <djm81@users.noreply.github.com> Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com> * fix: restore standard Apache 2.0 license text for GitHub detection (#235) The LICENSE body had two non-standard edits that pushed it below GitHub licensee's ~95% similarity threshold, causing "Other" instead of "Apache License 2.0". Restored the canonical text; only the copyright line in the appendix is customized (as intended by the Apache template). Signed-off-by: Dom <39115308+djm81@users.noreply.github.com> Co-authored-by: Dominikus Nold <djm81@users.noreply.github.com> Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com> * Add openspec changes for architecture level enhancement * feat(ci): attach test and repro log artifacts to PR orchestrator runs (#262) * feat(ci): attach test and repro log artifacts to PR orchestrator runs - Tests job: run smart-test-full, upload logs/tests/ as test-logs artifact - Contract-first-ci: capture repro to logs/repro/, upload repro-logs and repro-reports - Docs: CI and GitHub Actions section in troubleshooting (artifact names, usage) - Version 0.31.1, CHANGELOG entry Implements OpenSpec change ci-01-pr-orchestrator-log-artifacts. Fixes #260. Co-authored-by: Cursor <cursoragent@cursor.com> * Fix workflow and test * ci(pr-orchestrator): add log artifacts for all pipeline jobs - type-check: capture output to logs/type-check/, upload type-check-logs - lint: capture to logs/lint/, upload lint-logs - compat-py311: capture to logs/compat-py311/, upload compat-py311-logs - quality-gates: capture to logs/quality-gates/, upload quality-gates-logs - compat-py311: use hatch -e ENV run run (not hatch test) for pytest - docs: list all CI artifact names and jobs in troubleshooting Co-authored-by: Cursor <cursoragent@cursor.com> --------- Co-authored-by: Dominikus Nold <djm81@users.noreply.github.com> Co-authored-by: Cursor <cursoragent@cursor.com> * feat: enhanced module manifest security and integrity (arch-06) (#263) * feat: enhanced module manifest security and integrity (arch-06) Co-authored-by: Cursor <cursoragent@cursor.com> * fix: remove duplicate ModulePackageMetadata import (ruff F811) * Fix failed tests * Fix type-check errors --------- Co-authored-by: Dominikus Nold <djm81@users.noreply.github.com> Co-authored-by: Cursor <cursoragent@cursor.com> * feat: Schema Extension System for Modular ProjectBundle Extensions (arch-07) (#265) * feat: add schema extension system for modular ProjectBundle extensions Enables modules to extend Feature and ProjectBundle with namespaced custom fields without modifying core models, supporting marketplace-ready interoperability. - Add extensions dict field to Feature and ProjectBundle models - Implement type-safe get/set extension accessors with namespace enforcement - Extend module manifest schema with schema_extensions declaration - Add ExtensionRegistry for collision detection and introspection - Extend module lifecycle registration to load and validate extensions OpenSpec Change: arch-07-schema-extension-system Resolves #213 * feat: schema extension system (arch-07) and quality gate fixes - Add extensions field and get_extension/set_extension to Feature and ProjectBundle - Add SchemaExtension model and schema_extensions to ModulePackageMetadata - Add ExtensionRegistry with collision detection; integrate in module registration - Parse schema_extensions in discover_package_metadata - Docs: extending-projectbundle guide, architecture section, sidebar - Version 0.32.0, CHANGELOG entry, TDD_EVIDENCE - Format: E402 (imports at top in project.py), UP042 (StrEnum in backlog-core), RUF043/B017 in schema extension tests - Type-check: pass schema_metadata/project_metadata in BundleManifest test calls OpenSpec Change: arch-07-schema-extension-system Resolves #213 Co-authored-by: Cursor <cursoragent@cursor.com> * Update change progress * Add docs guides and update changes * Use v0.32.0 as version and combine arch-06/arch-07 * Update change order plan --------- Co-authored-by: Dominikus Nold <djm81@users.noreply.github.com> Co-authored-by: Cursor <cursoragent@cursor.com> * Fix codeql findings * feat(workflow): standardize worktree-first development flow (#268) * feat(workflow): standardize worktree-first development flow * docs(openspec): mark workflow-01 delivery tasks complete * Apply review finding --------- Co-authored-by: Dominikus Nold <djm81@users.noreply.github.com> * Fix review finding * feat: implement policy-engine-01 unified policy framework (#270) * feat(policy-engine): implement unified policy framework * docs(openspec): mark policy-engine-01 implemented in change order * fix(policy-engine): make module io contract compliant * feat(policy-engine): add policy init templates and docs coverage * fix: refine grouped policy limit semantics and outputs * docs: clarify policy engine value for new users --------- Co-authored-by: Dominikus Nold <djm81@users.noreply.github.com> * fix: harden policy module imports and snapshot path resolution * Update backlog core change to cover workspace level modules * 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> --------- 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> Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com> Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 869a413 commit 1682dfe

File tree

11 files changed

+330
-30
lines changed

11 files changed

+330
-30
lines changed

.github/workflows/publish-modules.yml

Lines changed: 73 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ jobs:
2424
env:
2525
SPECFACT_MODULE_PRIVATE_SIGN_KEY: ${{ secrets.SPECFACT_MODULE_PRIVATE_SIGN_KEY }}
2626
SPECFACT_MODULE_PRIVATE_SIGN_KEY_PASSPHRASE: ${{ secrets.SPECFACT_MODULE_PRIVATE_SIGN_KEY_PASSPHRASE }}
27+
SPECFACT_MODULES_REPO_TOKEN: ${{ secrets.SPECFACT_MODULES_REPO_TOKEN }}
28+
REGISTRY_REPO: nold-ai/specfact-cli-modules
2729
steps:
2830
- name: Checkout repository
2931
uses: actions/checkout@v4
@@ -76,14 +78,83 @@ jobs:
7678
fi
7779
7880
- name: Publish module
81+
id: publish
7982
run: |
8083
if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then
8184
MODULE_PATH="${{ github.event.inputs.module_path }}"
8285
else
8386
MODULE_PATH="${{ steps.resolve.outputs.module_path }}"
8487
fi
8588
mkdir -p dist
86-
python scripts/publish-module.py "$MODULE_PATH" -o dist
89+
python scripts/publish-module.py "$MODULE_PATH" -o dist --index-fragment dist/registry-entry.yaml
90+
91+
- name: Read published module metadata
92+
id: entry
93+
run: |
94+
python - <<'PY'
95+
import os
96+
from pathlib import Path
97+
import yaml
98+
99+
data = yaml.safe_load(Path("dist/registry-entry.yaml").read_text(encoding="utf-8"))
100+
module_id = str(data["id"])
101+
module_version = str(data["latest_version"])
102+
module_slug = module_id.replace("/", "-")
103+
104+
out = Path(os.environ["GITHUB_OUTPUT"])
105+
with out.open("a", encoding="utf-8") as fp:
106+
fp.write(f"module_id={module_id}\n")
107+
fp.write(f"module_version={module_version}\n")
108+
fp.write(f"module_slug={module_slug}\n")
109+
PY
110+
111+
- name: Validate registry repo token
112+
run: |
113+
if [ -z "${SPECFACT_MODULES_REPO_TOKEN}" ]; then
114+
echo "::error::Missing secret SPECFACT_MODULES_REPO_TOKEN."
115+
exit 1
116+
fi
117+
118+
- name: Checkout registry repository
119+
uses: actions/checkout@v4
120+
with:
121+
repository: ${{ env.REGISTRY_REPO }}
122+
token: ${{ env.SPECFACT_MODULES_REPO_TOKEN }}
123+
path: specfact-cli-modules
124+
125+
- name: Update registry index
126+
id: update_index
127+
run: |
128+
python scripts/update-registry-index.py \
129+
--index-path specfact-cli-modules/registry/index.json \
130+
--entry-fragment dist/registry-entry.yaml \
131+
--changed-flag /tmp/index_changed.txt
132+
CHANGED=$(tr -d '\n' < /tmp/index_changed.txt)
133+
echo "changed=${CHANGED}" >> "$GITHUB_OUTPUT"
134+
135+
- name: Create registry PR
136+
if: steps.update_index.outputs.changed == 'true'
137+
env:
138+
GH_TOKEN: ${{ env.SPECFACT_MODULES_REPO_TOKEN }}
139+
run: |
140+
BRANCH="auto/publish-${{ steps.entry.outputs.module_slug }}-${{ github.run_id }}"
141+
TITLE="chore(registry): publish ${{ steps.entry.outputs.module_id }} v${{ steps.entry.outputs.module_version }}"
142+
BODY=$'Automated registry update from publish-modules workflow.\n\n- Module: `${{ steps.entry.outputs.module_id }}`\n- Version: `${{ steps.entry.outputs.module_version }}`\n- Source run: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}'
143+
144+
cd specfact-cli-modules
145+
git config user.name "github-actions[bot]"
146+
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
147+
git checkout -b "${BRANCH}"
148+
git add registry/index.json
149+
git commit -m "${TITLE}"
150+
git push origin "${BRANCH}"
151+
152+
gh pr create \
153+
--repo "${REGISTRY_REPO}" \
154+
--base main \
155+
--head "${BRANCH}" \
156+
--title "${TITLE}" \
157+
--body "${BODY}"
87158
88159
- name: Upload module artifacts
89160
uses: actions/upload-artifact@v4
@@ -92,3 +163,4 @@ jobs:
92163
path: |
93164
dist/*.tar.gz
94165
dist/*.sha256
166+
dist/registry-entry.yaml

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ __pycache__/
2323
*.pyo
2424
*.pyd
2525
*.py.bak
26+
.cache/
2627

2728
# ChromaDB data files
2829
data/

CHANGELOG.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,21 @@ All notable changes to this project will be documented in this file.
88
**Important:** Changes need to be documented below this block as this is the header section. Each section should be separated by a horizontal rule. Newer changelog entries need to be added on top of prior ones to keep the history chronological with most recent changes first.
99

1010

11+
---
12+
13+
## [0.38.1] - 2026-02-27
14+
15+
### Added
16+
17+
- Publish workflow now updates `specfact-cli-modules/registry/index.json` using a generated registry entry fragment and opens an automated PR against `nold-ai/specfact-cli-modules` when the index changes.
18+
- Added `scripts/update-registry-index.py` to perform deterministic index upsert operations and emit a change flag for CI decision logic.
19+
- Added unit tests for registry index upsert behavior in `tests/unit/scripts/test_update_registry_index.py`.
20+
21+
### Changed
22+
23+
- `.github/workflows/publish-modules.yml` now includes registry-repo checkout, index update, and PR creation flow using `SPECFACT_MODULES_REPO_TOKEN`.
24+
- Marketplace-02 OpenSpec evidence/tasks were updated to mark tasks `6.2.4` and `6.2.5` complete with recorded TDD and local end-to-end validation.
25+
1126
---
1227

1328
## [0.38.0] - 2026-02-27

openspec/changes/marketplace-02-advanced-marketplace-features/TDD_EVIDENCE.md

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,11 +48,24 @@
4848

4949
## 6. Module publishing automation (publish-module.py + workflow)
5050

51-
### Post-implementation (manual verification)
51+
### Pre-implementation (failing tests)
52+
53+
- **Timestamp**: `2026-02-27T07:43:31Z`
54+
- **Command**: `hatch run pytest tests/unit/scripts/test_update_registry_index.py -q`
55+
- **Result**: 2 failed (`FileNotFoundError: scripts/update-registry-index.py` did not exist).
56+
57+
### Post-implementation (passing + workflow simulation)
5258

5359
- **Script**: `scripts/publish-module.py` — validates manifest (name, version, commands; optional namespace/publisher/tier), builds tarball, writes `.sha256`, optional `--sign` and `--index-fragment`. Contract fixes: `@require` lambdas use correct parameter names (`manifest_path`, `tarball_path`).
54-
- **Manual test**: `python scripts/publish-module.py /tmp/sample-module -o /tmp/pub-out` produced tarball and checksum; `--index-fragment /tmp/pub-out/entry.yaml` wrote index fragment.
55-
- **Workflow**: `.github/workflows/publish-modules.yml` — trigger on tags `*-v*` and workflow_dispatch; resolves module path from tag (e.g. `backlog-v0.1.0``src/specfact_cli/modules/backlog` or `modules/backlog`); runs publish script; uploads `dist/*.tar.gz` and `dist/*.sha256` as artifacts. 6.2.4 (index update/PR) and 6.2.5 (test in repo) left for follow-up.
60+
- **Script**: `scripts/update-registry-index.py` — upserts entry fragment into `registry/index.json`, keeps module IDs deterministic via sorted order, and emits change flag for workflow branching.
61+
- **Timestamp**: `2026-02-27T07:42:08Z`
62+
- **Command**: `hatch run pytest tests/unit/scripts/test_update_registry_index.py -q`
63+
- **Result**: 2 passed.
64+
- **Workflow (implemented)**: `.github/workflows/publish-modules.yml` now writes `dist/registry-entry.yaml`, checks out `nold-ai/specfact-cli-modules`, updates `registry/index.json`, and creates a registry PR via `gh pr create` when index changed.
65+
- **Local repo simulation**:
66+
- Publish command: `python scripts/publish-module.py <sample-module> -o <dist> --index-fragment <dist>/registry-entry.yaml`
67+
- Index update command: `python scripts/update-registry-index.py --index-path <test-repo>/registry/index.json --entry-fragment <dist>/registry-entry.yaml --changed-flag <tmp>/changed.txt`
68+
- Result: `CHANGED=true`, branch `auto/publish-nold-ai-backlog-test`, commit `chore(registry): publish nold-ai/backlog v0.1.0`, index contains `nold-ai/backlog@0.1.0`.
5669

5770

5871
### Re-signing module_registry for full tests
@@ -69,4 +82,3 @@ hatch run python scripts/sign-modules.py src/specfact_cli/modules/module_registr
6982
```
7083

7184
The publish-modules workflow uses the same env vars (via repository secrets) to optionally sign the manifest before packaging.
72-

openspec/changes/marketplace-02-advanced-marketplace-features/tasks.md

Lines changed: 38 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,9 @@ Do not implement production code until tests exist and have been run (expecting
6060
- [x] 3.2 Create alias_manager.py
6161
- [x] 3.2.1 Create src/specfact_cli/registry/alias_manager.py
6262
- [x] 3.2.2 Implement create_alias() with JSON storage
63-
- [x] 3.2.3 Add contracts: @require valid alias and module_id format
63+
- [x] 3.2.3 Add contracts: @require valid alias and command_name (alias → command name, not module_id)
6464
- [x] 3.2.4 Implement list_aliases() and remove_alias()
65-
- [x] 3.2.5 Implement resolve_command() with alias lookup
65+
- [x] 3.2.5 Implement resolve_command() with alias lookup (returns stored command name for dispatch)
6666
- [x] 3.2.6 Add built-in shadowing detection with warning
6767
- [x] 3.2.7 Add @beartype decorators
6868
- [x] 3.2.8 Verify tests pass
@@ -139,9 +139,9 @@ Do not implement production code until tests exist and have been run (expecting
139139
- [x] 6.2.1 Create .github/workflows/publish-modules.yml
140140
- [x] 6.2.2 Configure trigger on release tag pattern
141141
- [x] 6.2.3 Add validation, packaging, signing steps
142-
- [ ] 6.2.4 Add index.json update and PR creation
143-
- [ ] 6.2.5 Test workflow with test repository
144-
- *Deferred: 6.2.4 and 6.2.5 to be done later (registry index update/PR and workflow test in repo).*
142+
- [x] 6.2.4 Add index.json update and PR creation
143+
- [x] 6.2.5 Test workflow with test repository
144+
- Validation note: local end-to-end simulation verified publish -> index update -> registry branch commit flow using a temporary `specfact-cli-modules` test repository; PR creation path is wired via `gh pr create` in workflow and requires `SPECFACT_MODULES_REPO_TOKEN` in CI.
145145

146146
## 7. Quality gates
147147

@@ -223,23 +223,40 @@ Do not implement production code until tests exist and have been run (expecting
223223
- [x] 10.1.3 Include Co-Authored-By: Claude Sonnet 4.5
224224
- [x] 10.1.4 `git push -u origin feature/marketplace-02-advanced-marketplace-features`
225225

226-
- [ ] 10.2 Create PR body
227-
- [ ] 10.2.1 Copy PR template to temp file
228-
- [ ] 10.2.2 Fill in issue reference (if exists)
229-
- [ ] 10.2.3 Add OpenSpec change ID
230-
- [ ] 10.2.4 Describe advanced marketplace features
226+
- [x] 10.2 Create PR body
227+
- [x] 10.2.1 Copy PR template to temp file
228+
- [x] 10.2.2 Fill in issue reference (if exists)
229+
- [x] 10.2.3 Add OpenSpec change ID
230+
- [x] 10.2.4 Describe advanced marketplace features
231231

232-
- [ ] 10.3 Create PR via gh CLI
233-
- [ ] 10.3.1 `gh pr create --repo nold-ai/specfact-cli --base dev --head feature/marketplace-02-advanced-marketplace-features --title "feat: Advanced Marketplace Features for Production Readiness" --body-file <file>`
234-
- [ ] 10.3.2 Capture PR URL
232+
- [x] 10.3 Create PR via gh CLI
233+
- [x] 10.3.1 `gh pr create --repo nold-ai/specfact-cli --base dev --head feature/marketplace-02-advanced-marketplace-features --title "feat: Advanced Marketplace Features for Production Readiness" --body-file <file>`
234+
- [x] 10.3.2 Capture PR URL (PR #318)
235235

236-
- [ ] 10.4 Link to project
237-
- [ ] 10.4.1 `gh project item-add 1 --owner nold-ai --url <PR_URL>`
236+
- [x] 10.4 Link to project
237+
- [x] 10.4.1 `gh project item-add 1 --owner nold-ai --url <PR_URL>` (done by maintainer)
238238

239-
- [ ] 10.5 Verify PR setup
240-
- [ ] 10.5.1 Check PR shows correct base and head
241-
- [ ] 10.5.2 Verify CI checks running
242-
- [ ] 10.5.3 Verify project board shows PR
239+
- [x] 10.5 Verify PR setup
240+
- [x] 10.5.1 Check PR shows correct base and head
241+
- [x] 10.5.2 Verify CI checks running
242+
- [x] 10.5.3 Verify project board shows PR
243243

244-
- [ ] 10.6 Cleanup
245-
- [ ] 10.6.1 Remove temp files
244+
- [x] 10.6 Cleanup
245+
- [x] 10.6.1 Remove temp files
246+
247+
## 11. Merge to dev and release to main
248+
249+
- [x] 11.1 Merge feature PR to dev
250+
- [x] 11.1.1 PR #318 merged to dev
251+
- [x] 11.1.2 P1 review fixes applied (add-registry `--id` type, alias → command name, install consults custom registries)
252+
- [x] 11.1.3 All changes pushed to dev
253+
254+
- [x] 11.2 Create release PR (dev → main)
255+
- [x] 11.2.1 Fill .github/pull_request_template.md for v0.38.0 release
256+
- [x] 11.2.2 `gh pr create --base main --head dev --title "Release v0.38.0: Advanced marketplace features (dev → main)" --body-file <file>`
257+
- [x] 11.2.3 PR #319 created: https://github.com/nold-ai/specfact-cli/pull/319
258+
259+
- [x] 11.3 Merge release PR to main (when ready)
260+
- [ ] 11.3.1 Merge PR #319 to main
261+
- [ ] 11.3.2 Tag release if applicable
262+
- [ ] 11.3.3 Verify PyPI/CI publish if configured

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
44

55
[project]
66
name = "specfact-cli"
7-
version = "0.38.0"
7+
version = "0.38.1"
88
description = "The swiss knife CLI for agile DevOps teams. Keep backlog, specs, tests, and code in sync with validation and contract enforcement for new projects and long-lived codebases."
99
readme = "README.md"
1010
requires-python = ">=3.11"

scripts/update-registry-index.py

Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
#!/usr/bin/env python3
2+
"""Upsert a module entry fragment into a registry index.json file."""
3+
4+
from __future__ import annotations
5+
6+
import argparse
7+
import json
8+
import sys
9+
from pathlib import Path
10+
11+
import yaml
12+
from beartype import beartype
13+
from icontract import ensure, require
14+
15+
16+
@beartype
17+
@require(lambda index_path: index_path.exists() and index_path.is_file(), "index_path must exist and be a file")
18+
@ensure(lambda result: isinstance(result, dict), "Returns dict")
19+
def _load_index(index_path: Path) -> dict:
20+
"""Load registry index JSON payload."""
21+
payload = json.loads(index_path.read_text(encoding="utf-8"))
22+
if not isinstance(payload, dict):
23+
raise ValueError("Index payload must be a JSON object")
24+
modules = payload.get("modules")
25+
if not isinstance(modules, list):
26+
raise ValueError("Index payload must include a list at key 'modules'")
27+
return payload
28+
29+
30+
@beartype
31+
@require(lambda entry_fragment: entry_fragment.exists() and entry_fragment.is_file(), "entry_fragment must exist")
32+
@ensure(lambda result: isinstance(result, dict), "Returns dict")
33+
def _load_entry(entry_fragment: Path) -> dict:
34+
"""Load YAML/JSON entry fragment generated by publish-module.py."""
35+
raw = yaml.safe_load(entry_fragment.read_text(encoding="utf-8"))
36+
if not isinstance(raw, dict):
37+
raise ValueError("Entry fragment must be a mapping object")
38+
required_keys = ("id", "latest_version", "download_url", "checksum_sha256")
39+
missing = [key for key in required_keys if not raw.get(key)]
40+
if missing:
41+
raise ValueError(f"Entry fragment missing required keys: {', '.join(missing)}")
42+
return raw
43+
44+
45+
@beartype
46+
def _upsert_entry(index_payload: dict, entry: dict) -> bool:
47+
"""Insert or update module entry by id; return True if payload changed."""
48+
modules = index_payload.get("modules", [])
49+
if not isinstance(modules, list):
50+
raise ValueError("Index payload key 'modules' must be a list")
51+
52+
entry_id = str(entry["id"])
53+
for i, existing in enumerate(modules):
54+
if isinstance(existing, dict) and str(existing.get("id", "")) == entry_id:
55+
if existing == entry:
56+
return False
57+
modules[i] = entry
58+
return True
59+
60+
modules.append(entry)
61+
modules.sort(key=lambda item: str(item.get("id", "")))
62+
return True
63+
64+
65+
@beartype
66+
def main(argv: list[str] | None = None) -> int:
67+
"""CLI entry point."""
68+
parser = argparse.ArgumentParser(description="Upsert one module entry into registry index.json")
69+
parser.add_argument("--index-path", type=Path, required=True, help="Path to registry index.json")
70+
parser.add_argument("--entry-fragment", type=Path, required=True, help="Path to YAML/JSON module entry fragment")
71+
parser.add_argument("--changed-flag", type=Path, help="Write 'true' or 'false' to this file based on changes")
72+
args = parser.parse_args(argv)
73+
74+
try:
75+
index_payload = _load_index(args.index_path.resolve())
76+
entry = _load_entry(args.entry_fragment.resolve())
77+
changed = _upsert_entry(index_payload, entry)
78+
except (ValueError, json.JSONDecodeError) as exc:
79+
print(f"Error: {exc}", file=sys.stderr)
80+
return 1
81+
82+
if changed:
83+
args.index_path.write_text(json.dumps(index_payload, indent=2, sort_keys=False) + "\n", encoding="utf-8")
84+
print(f"Updated {args.index_path}")
85+
else:
86+
print(f"No changes needed in {args.index_path}")
87+
88+
if args.changed_flag:
89+
args.changed_flag.write_text("true\n" if changed else "false\n", encoding="utf-8")
90+
91+
return 0
92+
93+
94+
if __name__ == "__main__":
95+
sys.exit(main())

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
if __name__ == "__main__":
88
_setup = setup(
99
name="specfact-cli",
10-
version="0.38.0",
10+
version="0.38.1",
1111
description=(
1212
"The swiss knife CLI for agile DevOps teams. Keep backlog, specs, tests, and code in sync with "
1313
"validation and contract enforcement for new projects and long-lived codebases."

src/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@
33
"""
44

55
# Package version: keep in sync with pyproject.toml, setup.py, src/specfact_cli/__init__.py
6-
__version__ = "0.38.0"
6+
__version__ = "0.38.1"

src/specfact_cli/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,6 @@
88
- Supporting agile ceremonies and team workflows
99
"""
1010

11-
__version__ = "0.38.0"
11+
__version__ = "0.38.1"
1212

1313
__all__ = ["__version__"]

0 commit comments

Comments
 (0)