Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
700c360
perf: optimize startup performance with metadata tracking and update …
djm81 Jan 27, 2026
4b167dd
Merge branch 'main' into dev
djm81 Jan 27, 2026
e4782ea
fix: add missing ADO field mappings and assignee display (#145)
djm81 Jan 27, 2026
a2f6ac7
Merge branch 'main' into dev
djm81 Jan 27, 2026
c74a773
fix: mitigate code scanning vulnerabilities (#148)
djm81 Jan 27, 2026
af030dc
fix: detect GitHub remotes using ssh:// and git:// URLs
djm81 Jan 27, 2026
db827a0
chore: bump version to 0.26.9 and update changelog
djm81 Jan 27, 2026
1ade334
Merge branch 'main' into dev
djm81 Jan 27, 2026
5c1cb41
fix: compare GitHub SSH hostnames case-insensitively
djm81 Jan 27, 2026
68cc345
Merge branch 'main' into dev
djm81 Jan 27, 2026
dfeb7ca
Add openspec and workflow commands for transparency
djm81 Jan 27, 2026
9e1f22d
Add specs from openspec
djm81 Jan 27, 2026
115e402
Remove aisp change which wasn't implemented
djm81 Jan 27, 2026
2675361
Fix openspec gitignore pattern
djm81 Jan 27, 2026
573fb7b
Update gitignore
djm81 Jan 27, 2026
907501e
Update contribution standards to use openspec for SDD
djm81 Jan 27, 2026
568000c
Merge branch 'main' into dev
djm81 Jan 27, 2026
fe082f6
Migrate to new opsx openspec commands
djm81 Jan 27, 2026
036afbe
Migrate workflow and openspec config
djm81 Jan 28, 2026
5a1493f
fix: bump version to 0.26.10 for PyPI publish
djm81 Jan 28, 2026
da606a1
Update version and changelog
djm81 Jan 28, 2026
608f317
Add canonical user-friendly workitem url for ado workitems
djm81 Jan 28, 2026
719256c
Update to support OSPX
djm81 Jan 28, 2026
1f94d7c
Merge branch 'main' into dev
djm81 Jan 28, 2026
bbf730a
feat(backlog): implement refine --import-from-tmp and fix type-check …
djm81 Jan 28, 2026
080743a
Merge branch 'main' into dev
djm81 Jan 28, 2026
5ab46a5
Merge branch 'main' into dev
djm81 Jan 28, 2026
1cdfc66
feat: debug logs under ~/.specfact/logs and release 0.26.13 (#159)
djm81 Jan 29, 2026
6bd9d7f
Potential fix for pull request finding 'Empty except'
djm81 Jan 29, 2026
d7d194b
Fix unused variable review
djm81 Jan 29, 2026
39563fc
Fix unused variable review
djm81 Jan 29, 2026
d15485a
Fix type and test errors
djm81 Jan 29, 2026
6c9c9b9
Merge branch 'main' into dev
djm81 Jan 29, 2026
bd9b96a
Finalize change
djm81 Jan 29, 2026
c7e4546
Change for debug logs archived
djm81 Jan 29, 2026
09e8040
Merge branch 'main' into dev
djm81 Jan 29, 2026
642e1a9
fix: improve ADO backlog refine error logging and user-facing error U…
djm81 Jan 29, 2026
64365db
Merge branch 'main' into dev
djm81 Jan 29, 2026
0d0abba
feat: backlog refine --ignore-refined and --id, startup docs (fixes #…
djm81 Jan 30, 2026
aad02cd
Add change proposals for full scrum support
djm81 Jan 30, 2026
a3c3fb4
Merge branch 'main' into dev
djm81 Jan 30, 2026
1f054c5
Add support for systematic, structured issue creation with copilot help
djm81 Jan 30, 2026
899b9c2
feat(backlog): daily standup defaults, iteration/sprint, unassigned i…
djm81 Feb 3, 2026
b596766
Issue 179 resolution (#180)
djm81 Feb 3, 2026
bb7214f
Merge branch 'main' into dev
djm81 Feb 3, 2026
61a820c
fix(backlog): address CodeQL/Codex PR 181 findings
djm81 Feb 3, 2026
10fee30
Update openspec enforcement rules
djm81 Feb 3, 2026
8e770dc
Structure openspec changes
djm81 Feb 3, 2026
5782860
Fix ruff finding
djm81 Feb 3, 2026
05c592d
Fix linter issues with StrEnum and parameters
djm81 Feb 3, 2026
f7e3d0f
Fix tests and depcreation warnings
djm81 Feb 3, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
140 changes: 99 additions & 41 deletions .cursor/rules/automatic-openspec-workflow.mdc
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,31 @@ alwaysApply: true

# Automatic OpenSpec Workflow

This rule ensures that all code changes in the specfact-cli codebase are properly tracked through OpenSpec change proposals, following the spec-driven development workflow.
This rule ensures that all code changes in the specfact-cli codebase are properly tracked through OpenSpec change proposals, following the spec-driven development workflow. **No application code may be modified without a corresponding OpenSpec change (new or delta) unless the user explicitly opts out.**

## Critical: Before Any Code Modification

**Do not add, modify, or delete any application code** (in `src/`, `tools/`, tests, or significant docs) until all of the following are done:

1. **Read and apply `openspec/config.yaml`:**
- Use the project context (tech stack, constraints, architecture, SDD+TDD discipline) for all artifact work.
- Apply per-artifact rules (proposal, specs, design, tasks) when creating or updating any change artifact.

2. **Ensure an OpenSpec change exists for the intended modification:**
- **New work:** Create a new change (e.g. via `/opsx:new`, `/opsx:ff`, or `/wf-create-change-from-plan`).
- **Existing change:** Update the existing change (proposal, specs, design, tasks) or create a **delta change** that updates the existing spec (e.g. via openspec archive after implementation).
- There must be no code change without a corresponding change proposal (new or delta) that describes it.

3. **Validate the change before implementing:**
- Run `openspec validate <change-id> --strict`.
- Optionally run `/wf-validate-change <change-id>` for breaking-change and dependency analysis.
- Do not proceed to implementation until validation passes (or the user explicitly overrides).

**Exception:** Only when the user explicitly says "skip openspec", "direct implementation", "simple fix", "just fix it", or similar, may you implement without creating or updating an OpenSpec change.

## When This Rule Applies

This rule automatically triggers when the user requests to:
This rule applies to **every** request that would result in:

- **Add** new features, functions, classes, or capabilities
- **Modify** existing code, functions, or behavior
Expand All @@ -19,46 +39,50 @@ This rule automatically triggers when the user requests to:
- **Implement** new features or capabilities
- **Enhance** existing functionality
- **Remove** features or code (unless explicitly a simple deletion)
- **Bug fixes** that restore intended behavior (including simple fixes)
- **Tests for existing behavior** (adding tests to existing code)
- **Typos, formatting, or comments** (cosmetic changes)
- **Dependency updates** (breaking and non-breaking)
- **Configuration changes** (including simple config updates)

For any such request, **before** writing or modifying any code, follow the steps below so that a change (new or delta) exists and is validated. If the work relates to an already-implemented change, create an OpenSpec delta change to update the existing spec (e.g. via openspec archive after implementation).

## What This Rule Does NOT Apply To

Skip OpenSpec workflow for:
Skip OpenSpec workflow only when:

- **Bug fixes** that restore intended behavior (simple fixes)
- **Typos, formatting, or comments** (cosmetic changes)
- **Dependency updates** (non-breaking)
- **Configuration changes** (simple config updates)
- **Tests for existing behavior** (adding tests to existing code)
- **User explicitly says "skip openspec"** or "direct implementation"
- **User explicitly says** "skip openspec", "no openspec", "direct implementation", "implement directly", "simple fix", or "just fix it"

## Automatic Workflow Steps

### Step 1: Detect Change Request
### Step 1: Detect Change Request (No Code Modification Yet)

When user requests a change, immediately:
When user requests a change, **do not write or modify any application code yet**. Instead:

1. **Parse the request** to understand:
- What is being changed (feature, function, module, etc.)
- Scope of change (new feature, modification, refactor)
- Affected files or modules (if mentioned)

2. **Determine if OpenSpec workflow is needed:**
- If request matches "What This Rule Applies To" β†’ proceed
- If request matches "When This Rule Applies" β†’ proceed with Steps 2–4 (create/update change, validate), then implement only after change is ready
- If request matches "What This Rule Does NOT Apply To" β†’ skip OpenSpec, implement directly
- If unclear β†’ ask user: "Should this be tracked as an OpenSpec change, or is this a simple fix?"

3. **Read `openspec/config.yaml`** before creating or updating any change artifact. Apply project context and per-artifact rules to all proposal, spec, design, and task content.

### Step 2: Search for Existing OpenSpec Changes

**Before creating a new change, always check for existing work:**

1. **Navigate to specfact-cli-internal workspace:**
- Change directory to `/home/dom/git/nold-ai/specfact-cli-internal`
1. **Navigate to specfact-cli workspace:**
- Change directory to `specfact-cli` inside the project workspace
- Verify `openspec/` directory exists

2. **List active changes:**

```bash
cd /home/dom/git/nold-ai/specfact-cli-internal
cd <project-workspace>/specfact-cli
openspec list
```

Expand All @@ -78,6 +102,8 @@ When user requests a change, immediately:

### Step 3: Create or Update OpenSpec Change

**Required:** Use `openspec/config.yaml` (project context and per-artifact rules) for all artifact creation and updates. Do not create or update proposal, specs, design, or tasks without applying config.yaml rules.

**If creating a new change:**

1. **Gather requirements:**
Expand All @@ -96,16 +122,16 @@ When user requests a change, immediately:
3. **Execute workflow command:**

**For ad-hoc changes (no plan document):**
- Use: `/openspec-proposal` command directly
- Use: `/opsx-explore` to research codebase for potential conflicts, dependencies, and clarify, then use `/opsx-new` (or `/opsx:ff`) to create the change proposal
- Follow the command steps:
- Review `openspec/config.yaml` (OPSX) or `openspec/project.md` (legacy) and existing specs
- Review `openspec/config.yaml` and existing specs
- Choose unique verb-led `change-id`
- Scaffold `proposal.md`, `tasks.md`, optional `design.md`
- Create spec deltas in `changes/<id>/specs/<capability>/spec.md`
- Validate with `openspec validate <id> --strict`

**For changes from plan documents:**
- Use: `/specfact-cli-internal/wf-create-change-from-plan <plan-path>`
- Use: `/specfact-cli/wf-create-change-from-plan <plan-path>`
- Follow the workflow steps:
- Plan selection and discovery
- Plan review and alignment check
Expand All @@ -125,38 +151,47 @@ When user requests a change, immediately:
- Read `openspec/changes/<change-id>/proposal.md`
- Read `openspec/changes/<change-id>/tasks.md`
- Read `openspec/changes/<change-id>/specs/` (if exists)
- Read `openspec/changes/<change-id>/design.md` (if exists)
- Read `openspec/changes/<change-id>/CHANGE_VALIDATION.md` (if exists)

2. **Update change artifacts:**
- Update `proposal.md` if scope changed
- Add new tasks to `tasks.md` if needed
- Add new tasks to `tasks.md` if needed and adhere to config.yaml rules
- Update spec deltas if requirements changed
- Update design.md if architectural decisions changed

3. **Validate updated change:**

```bash
cd /home/dom/git/nold-ai/specfact-cli-internal
cd <project-workspace>/specfact-cli
openspec validate <change-id> --strict
```

Then run `/specfact-cli/wf-validate-change <change-id>` to validate the updated change
- If validation fails, fix issues in proposal.md, tasks.md, design.md (if exists), or spec deltas
- Re-validate until passing
- Continue until validation passes
- If validation passes, update CHANGE_VALIDATION.md with validation result

4. **Inform user:**
- "Updated existing OpenSpec change: `<change-id>`"

### Step 4: Verify and Apply Change

**After change is created or updated:**
**After change is created or updated (still no code modification until user confirms):**

1. **Review the change:**
- Display summary of the change proposal
- Show key tasks and requirements
- Confirm with user: "OpenSpec change ready. Proceed with implementation?"

2. **If user confirms or if workflow requires immediate application:**
- Execute: `/specfact-cli-internal/wf-apply-change <change-id>`
- Execute: `/opsx:apply <change-id>` (or `/specfact-cli/wf-apply-change <change-id>`)
- Follow workflow steps:
- Change selection
- Read change artifacts
- Execute openspec-apply workflow
- Complete tasks sequentially
- Complete tasks sequentially (TDD: tests first, then code)
- Update task checklist
- Completion and summary

Expand All @@ -165,41 +200,62 @@ When user requests a change, immediately:
- Suggest reviewing `proposal.md` and `tasks.md`
- Wait for user confirmation before applying

### Step 5: After Implementationβ€”Verify, Validate, and Sync Backlog

**After each code modification (at the end of implementation):**

1. **Verify:**
- Run quality gates: `hatch run format`, `hatch run type-check`, `hatch run contract-test`, `hatch test` (or `hatch run smart-test`).
- Ensure all tests pass and contracts are satisfied.

2. **Validate the change:**
- Run `openspec validate <change-id> --strict`.
- Optionally run `/wf-validate-change <change-id>` for breaking-change and dependency audit.
- If validation fails, fix proposal/specs/design/tasks and re-validate before considering the change complete.

3. **Sync backlog (GitHub issues and Source Tracking):**
- **If the change targets a public repo** (e.g. specfact-cli, platform-frontend):
- **If no GitHub issue exists yet:** Create the issue per config.yaml (title `[Change] <Brief Description>`, labels `enhancement` and `change-proposal`, body from proposal). Update `proposal.md` Source Tracking section with issue number, URL, repository, and status.
- **If an issue already exists:** Sync the issue with the change (e.g. update issue body/status from proposal, ensure Development link to branch/PR). Update `proposal.md` Source Tracking section with current status (e.g. "Last Synced Status: in-progress" or "done").
- Ensure backlog and code stay in sync: proposal Source Tracking and the GitHub issue reflect the current state of the change.

## Implementation Pattern

**Example workflow:**

```
```text
User: "Add a new command to list all backlog items"

AI (automatically):
1. Detects: "Add" β†’ triggers OpenSpec workflow
2. Searches: `openspec list` β†’ no related changes found
3. Creates: `/openspec-proposal` (for ad-hoc changes)
- Asks for clarifications if needed
- Creates change proposal
- Validates change
4. Verifies: Shows change summary
5. Applies: `/specfact-cli-internal/wf-apply-change <change-id>`
- Implements the change
1. Reads openspec/config.yaml (project context and per-artifact rules). Does not modify code yet.
2. Detects: "Add" β†’ triggers OpenSpec workflow
3. Searches: openspec list β†’ no related changes found
4. Creates: /opsx-explore then /opsx-new (or /opsx:ff) or /wf-create-change-from-plan
- Applies config.yaml rules to all artifacts
- Creates change proposal, spec deltas, tasks
- Validates: openspec validate <id> --strict
5. Verifies: Shows change summary; "Proceed with implementation?"
6. Applies: /opsx:apply <change-id> (or /wf-apply-change <change-id>)
- Implements the change (TDD: tests first, then code)
- Updates tasks
- Completes workflow
7. After implementation: Verify (quality gates), validate (openspec validate), sync backlog
- Create or update GitHub issue if public repo; update proposal Source Tracking
```

## Error Handling

- **If `openspec` command not found:**
- Inform user: "OpenSpec CLI not available. Proceeding with direct implementation."
- Skip OpenSpec workflow, implement directly
- Inform user: "OpenSpec CLI not available. No code modification will be made until an OpenSpec change exists (create one manually or install OpenSpec CLI)."
- Do not modify application code unless the user explicitly confirms: "Proceed without OpenSpec" or similar.

- **If specfact-cli-internal workspace not accessible:**
- Inform user: "Cannot access OpenSpec workspace. Proceeding with direct implementation."
- Skip OpenSpec workflow, implement directly
- **If specfact-cli workspace or openspec/ directory not accessible:**
- Inform user: "Cannot access OpenSpec workspace. No code modification will be made until a change exists."
- Do not modify application code unless the user explicitly confirms to proceed without OpenSpec.

- **If change validation fails:**
- Fix validation errors
- Fix validation errors in proposal, specs, design, or tasks
- Re-validate until passing
- Do not proceed with implementation until validation passes
- Do not proceed with implementation until validation passes (or user explicitly overrides)

- **If user explicitly requests to skip:**
- Respect user request: "Skipping OpenSpec workflow as requested."
Expand Down Expand Up @@ -227,6 +283,8 @@ This rule works alongside:
## Notes

- This rule applies to the **specfact-cli** codebase specifically
- **Mandatory before any code modification:** Read and apply `openspec/config.yaml` (project context and per-artifact rules). Ensure an OpenSpec change (new or delta) exists and is validated. No code change without a corresponding change proposal unless the user explicitly opts out.
- **Mandatory after each implementation:** Verify (quality gates), validate (`openspec validate <id> --strict`), and sync backlog (create or update GitHub issue, update proposal Source Tracking) so backlog and code stay in sync.
- For other repositories, this rule may not apply (check repository-specific rules)
- **Important workspace distinction:**
- **OpenSpec changes** are stored in `specfact-cli/openspec/changes/`
Expand Down
1 change: 1 addition & 0 deletions .cursorrules
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
- When starting a new chat session, capture the current timestamp from the client system using the `run_terminal_cmd` tool with `date "+%Y-%m-%d %H:%M:%S %z"` to ensure accurate timestamps are used in logs, commits, and other time-sensitive operations.
- When starting a new chat session, get familiar with the build and test guide (refer to `.cursor/rules/testing-and-build-guide.mdc`).
- When starting a new task, first check the project overview and current status in `README.md` and `AGENTS.md`.
- **OpenSpec (before code)**: Before modifying application code, follow the OpenSpec workflow in `.cursor/rules/automatic-openspec-workflow.mdc`: read and apply `openspec/config.yaml`, ensure an OpenSpec change (new or delta) exists and is validated, then implement. Exception: only when the user explicitly says "skip openspec", "direct implementation", "simple fix", or similar.
- **Branch Protection**: This repository has branch protection enabled for `dev` and `main` branches. All changes must be made via Pull Requests:
- Create a feature branch: `git checkout -b feature/your-feature-name`
- Create a bugfix branch: `git checkout -b bugfix/your-bugfix-name`
Expand Down
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,20 @@ All notable changes to this project will be documented in this file.

---

## [0.26.17] - 2026-02-03

### Fixed (0.26.17)

- **Daily standup exports: comment annotations** (fixes [#179](https://github.com/nold-ai/specfact-cli/issues/179))
- **`--comments` / `--annotations`**: Include item descriptions and comment annotations in `--copilot-export` and
`--summarize`/`--summarize-to` outputs when the adapter supports `get_comments` (GitHub).
- **Docs**: Updated daily standup tutorial and guides to document the new flags and outputs.

### Changed (0.26.17)

- **Version**: Bumped to 0.26.17 for issue [#179](https://github.com/nold-ai/specfact-cli/issues/179)

---
## [0.26.16] - 2026-02-02

### Added (0.26.16)
Expand Down
Loading
Loading