You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* 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
---------
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>
Copy file name to clipboardExpand all lines: .cursor/commands/wf-create-change-from-plan.md
+34-9Lines changed: 34 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -16,6 +16,7 @@ Create an OpenSpec change proposal from a plan document (e.g., documentation imp
16
16
17
17
**Guardrails**
18
18
19
+
-**Read `openspec/config.yaml`** during the workflow (before or at Step 5) to get project context and the TDD/SDD rules; use them when updating tasks.md so that tests-before-code is enforced.
19
20
- Favor straightforward, minimal implementations first and add complexity only when it is requested or clearly required.
20
21
- Keep changes tightly scoped to the requested outcome.
21
22
- Never proceed with ambiguities or conflicts - always ask for clarification interactively.
@@ -24,6 +25,7 @@ Create an OpenSpec change proposal from a plan document (e.g., documentation imp
24
25
-**CRITICAL**: Only create GitHub issues in the target repository specified by the plan. Never create issues in a different repository than the plan's target.
25
26
- For public-facing changes, always sanitize content before creating GitHub issues.
26
27
-**CRITICAL Git Workflow**: Always add tasks to create a git branch (feature/bugfix/hotfix based on change-id) BEFORE any code modifications, and create a Pull Request to `dev` branch AFTER all tasks are complete. Never work directly on protected branches (main/dev). Branch naming: `<branch-type>/<change-id>`.
28
+
-**CRITICAL TDD**: Per config.yaml, test tasks MUST come before implementation tasks. Write tests from spec scenarios first; run tests and expect failure; then implement until tests pass.
27
29
28
30
**Workflow Steps**
29
31
@@ -248,9 +250,9 @@ Execute the `/opsx:ff` command to create all artifacts at once:
248
250
-**proposal.md**: Must include Why, What Changes, Capabilities, Impact sections. Capabilities section is critical - each capability needs a spec file.
249
251
-**specs/<capability>/spec.md**: Use Given/When/Then format for scenarios. Reference existing patterns in openspec/specs/.
-**tasks.md**: Break into 2-hour maximum chunks. Include contract decorator tasks, test tasks, quality gate tasks, git workflow tasks (branch creation first, PR creation last).
253
+
-**tasks.md**: Break into 2-hour maximum chunks. **Per config.yaml:** Test tasks MUST come before implementation tasks (TDD). Include contract decorator tasks, test tasks, quality gate tasks, git workflow tasks (branch creation first, PR creation last). Step 5.2.4 will add a TDD order section and reorder tasks so tests-before-code is explicit.
252
254
253
-
5.**Note**: After OPSX completes, Step 5 will add git workflow tasks (branch creation and PR creation)and quality standards if not already included.
255
+
5.**Note**: After OPSX completes, Step 5 will read config.yaml, add git workflow tasks (branch creation and PR creation), **enforce TDD-first in tasks.md** (Step 5.2.4), and add quality standards if not already included.
254
256
255
257
**4.3: Extract Change ID**
256
258
@@ -265,10 +267,12 @@ Execute the `/opsx:ff` command to create all artifacts at once:
-**Development discipline (SDD + TDD)** in context: (1) Specs first, (2) Tests second—write unit/integration tests from spec scenarios; run tests and **expect failure**, (3) Code last—implement until tests pass.
273
+
-**Per-artifact rules**: `rules.tasks` in config.yaml—Enforce SDD+TDD order: (1) Branch creation, (2) Spec deltas, (3) Write tests from spec scenarios; run tests and expect failure (no implementation yet), (4) Implement code until tests pass, (5) Quality gates, (6) Documentation, (7) PR creation. Also: "Test tasks MUST come before implementation tasks: write tests derived from specs first, then implement. Do not implement before tests exist for the changed behavior."
274
+
- Use this context for Step 5.2.4 (TDD enforcement in tasks.md).
275
+
- Verify artifacts follow config.yaml rules.
272
276
273
277
2.**Read and apply rules from `specfact-cli/.cursor/rules/`:**
274
278
-**spec-fact-cli-rules.mdc**: Problem analysis, centralize logic, testing requirements, contract-first approach
@@ -281,6 +285,7 @@ Execute the `/opsx:ff` command to create all artifacts at once:
281
285
- Proposal includes Source Tracking section (if public-facing change)
282
286
- Tasks include GitHub issue creation task (if public-facing change in public repo)
283
287
- Tasks follow 2-hour maximum chunk rule
288
+
-**Tasks enforce TDD: test tasks before implementation tasks** (see Step 5.2.4)
284
289
- All artifacts reference existing architecture patterns where applicable
285
290
286
291
**5.2: Update Tasks with Quality Standards and Git Workflow**
@@ -349,7 +354,24 @@ For each task in `tasks.md` (after branch creation task), ensure it includes:
**5.2.4: Enforce TDD-first in tasks.md (use config.yaml)**
358
+
359
+
**Required:** Use the Development discipline and `rules.tasks` from `openspec/config.yaml` (read in Step 5.1). Ensure tasks.md enforces tests before code.
360
+
361
+
1.**Add a "TDD / SDD order (enforced)" section** at the top of `tasks.md` (after the title, before the first numbered task section, e.g. before `## 1. Create git branch`):
362
+
- State that per `openspec/config.yaml`, **tests before code** apply to any task that adds or changes behavior.
363
+
- List the order: (1) Spec deltas define behavior (Given/When/Then), (2) **Tests second**—write unit/integration tests from those scenarios; run tests and **expect failure** (no implementation yet), (3) **Code last**—implement until tests pass and behavior satisfies the spec.
364
+
- Add: "Do not implement production code for new behavior until the corresponding tests exist and have been run (expecting failure)."
365
+
- Use a horizontal rule `---` to separate this block from the numbered tasks.
366
+
367
+
2.**For each task section that adds or changes behavior** (e.g. a section that has both "add tests" and "implement" subtasks):
368
+
-**Reorder** so that "write tests from spec scenarios" (and "run tests; expect failure") appears **before** any "implement" or "add code" tasks for that behavior.
369
+
- If the current order is "implement 3.1, 3.2, 3.3, then add tests 3.4", rewrite to: "**Tests first:** 3.1 Write tests from change spec scenarios (e.g. `changes/.../specs/<capability>/spec.md`); run tests; **expect failure**. 3.2–3.N Implement (add options, helper, etc.). 3.N+1 Run tests again; **expect pass**; then quality gates."
370
+
- Add a short **TDD for this section** reminder in the section heading or first bullet where applicable (e.g. "TDD: tests first, then code").
371
+
372
+
3.**Verify:** Scan tasks.md for any block that has both test tasks and implementation tasks; ensure test tasks come first. Config.yaml: "Test tasks MUST come before implementation tasks."
Copy file name to clipboardExpand all lines: CHANGELOG.md
+19Lines changed: 19 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,6 +9,25 @@ All notable changes to this project will be documented in this file.
9
9
10
10
---
11
11
12
+
## [0.26.15] - 2026-01-30
13
+
14
+
### Added (0.26.15)
15
+
16
+
-**Backlog refine: ignore-refined and single-item by ID** (OpenSpec change `improve-backlog-refine-and-cli-startup`, fixes [#166](https://github.com/nold-ai/specfact-cli/issues/166))
17
+
-**`--ignore-refined` / `--no-ignore-refined`**: Default on; when set, only items that need refinement are shown (limit applies to unrefined items). Use `--no-ignore-refined` to include already-refined items.
18
+
-**`--id <issue-id>`**: Refine only the backlog item with the given issue or work item ID; exits with error if not found.
19
+
-**Helper**: `_item_needs_refinement(item)` in `backlog_commands.py` to decide if an item needs refinement (missing sections or low confidence).
20
+
-**Fetch behavior**: When both `--ignore-refined` and `--limit` are set, fetches more candidates (e.g. limit × 5) then filters and slices so limit applies to items needing refinement.
21
+
-**Docs**: `docs/guides/backlog-refinement.md` documents `--ignore-refined`, `--no-ignore-refined`, and `--id`; AGENTS.md documents `--skip-checks` for faster startup.
22
+
-**Prompt**: `resources/prompts/specfact.backlog-refine.md` adds "Interactive refinement (Copilot mode)" with loop: present story → list ambiguities → ask clarification → re-refine until user approves → then mark done and next story.
23
+
-**Startup**: Comment in `cli.py` confirms version line is printed before startup checks.
24
+
25
+
### Changed (0.26.15)
26
+
27
+
-**Version**: Bumped to 0.26.15; synced in `pyproject.toml`, `setup.py`, `src/__init__.py`, `src/specfact_cli/__init__.py`.
0 commit comments