Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
132 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
15d710b
Improve sync script
djm81 Feb 3, 2026
b223161
Merge branch 'main' into dev
djm81 Feb 3, 2026
870db6a
Add change for modular command registry
djm81 Feb 3, 2026
5404c18
Fix review finding on dev sync script
djm81 Feb 3, 2026
e4650dd
Update modular change proposal
djm81 Feb 4, 2026
c44013e
feat: CLI modular command registry and lazy load (arch-01) (#196)
djm81 Feb 4, 2026
542183c
docs: document CLI modules design; sync version and cleanup
djm81 Feb 4, 2026
c4b10d8
Archive modular change and specs
djm81 Feb 4, 2026
a7a83c2
Merge branch 'main' into dev
djm81 Feb 4, 2026
2faf547
Merge branch 'dev' of https://github.com/nold-ai/specfact-cli into dev
djm81 Feb 4, 2026
b5d2680
Fix banner display on help screen
djm81 Feb 4, 2026
077ff3f
Improve action runner on main
djm81 Feb 4, 2026
7567149
Merge branch 'main' into dev
djm81 Feb 4, 2026
8a0a38f
Setup claude skills and instructions
djm81 Feb 5, 2026
336efb5
feat: module package separation for command implementations (#200)
djm81 Feb 6, 2026
ad023f5
Merge branch 'main' into dev
djm81 Feb 6, 2026
8b4adcb
fix: address CodeQL and Codex review findings from PR #201
djm81 Feb 6, 2026
b44ce9c
Merge branch 'main' into dev
djm81 Feb 6, 2026
a6b9d32
feat: module lifecycle management, init split, and interactive module…
djm81 Feb 6, 2026
de89bba
archived change for module improvements
djm81 Feb 6, 2026
b4edcfb
Merge branch 'main' into dev
djm81 Feb 6, 2026
bc71080
fix: address review feedback in init and boundary tests
djm81 Feb 6, 2026
e5d7002
Fix test setup for tmpfiles
djm81 Feb 6, 2026
c97080b
Merge branch 'main' into dev
djm81 Feb 6, 2026
46b1357
docs: add openspec change arch-05 bridge registry (#210)
djm81 Feb 8, 2026
20410a6
docs: add openspec change arch-06 manifest security (#211)
djm81 Feb 8, 2026
04aba4b
feat: Core Contracts and Module Interface Formalization (#209)
djm81 Feb 8, 2026
0f492f6
Update specs and archive arch-04 change
djm81 Feb 8, 2026
7656d7c
Fix changelog format
djm81 Feb 8, 2026
b826fb6
docs: align arch-05 scope with protocol migration cleanup (#212)
djm81 Feb 8, 2026
c8ec9bb
docs: add OpenSpec changes for module marketplace phases
djm81 Feb 9, 2026
b6e1fe1
feat: apply arch-05 bridge registry implementation (#216)
djm81 Feb 10, 2026
f10e14e
Archive arch-05 change after implementation
djm81 Feb 10, 2026
285a9ff
Merge branch 'main' into dev
djm81 Feb 10, 2026
5075d0c
fix: address post-merge review findings and restore lazy registration
djm81 Feb 10, 2026
31e6924
fix: refresh project console per invocation in tests
djm81 Feb 10, 2026
d7ca6af
fix: detect runtime interface protocol ops in source scan
djm81 Feb 10, 2026
0e5463f
fix: harden project console refresh and protocol source scan
djm81 Feb 10, 2026
57c729b
fix: refresh import command console for each invocation
djm81 Feb 10, 2026
e270e09
fix: resolve type-check errors and harden protocol scanning
djm81 Feb 10, 2026
7cc1c48
fix: stabilize module protocol scan and project console lifecycle
djm81 Feb 10, 2026
5996a1d
Merge branch 'main' into dev
djm81 Feb 10, 2026
81527a5
Refine pending changes for new modular ecosystem and marketplace inte…
djm81 Feb 10, 2026
6fd151a
fix: update stale spec-delta paths in tasks.md after change renames
djm81 Feb 10, 2026
22640fa
docs: rewrite CHANGE_ORDER.md for module-scoped changes and full depe…
djm81 Feb 10, 2026
e7d69d6
Merge branch 'main' into dev
djm81 Feb 10, 2026
9a7f9f6
feat(backlog): daily/refine comment context, interactive standup post…
djm81 Feb 11, 2026
e61d56b
fix(backlog): satisfy interactive daily adapter typing
djm81 Feb 11, 2026
fff65e9
fix(backlog): bypass default daily limit for issue-window flags
djm81 Feb 11, 2026
b2a8ab5
Merge branch 'main' into dev
djm81 Feb 11, 2026
88ea93c
fix: parse backlog refine writeback fields and refactor refine comman…
djm81 Feb 12, 2026
f3c5759
fix: avoid raw label fallback when description block is missing
djm81 Feb 12, 2026
f9f2fcc
Merge branch 'main' into dev
djm81 Feb 12, 2026
1870cfe
fix: harden backlog refine prompt scaffold and mixed-format parsing (…
djm81 Feb 12, 2026
16db526
Finish change
djm81 Feb 12, 2026
a3e8ff2
chore: bump version to 0.30.4 and update changelog
djm81 Feb 12, 2026
1bdcbc9
Merge branch 'main' into dev
djm81 Feb 12, 2026
998ab59
Add MEMORY.md for claude code
djm81 Feb 12, 2026
bedf75c
Archive backlog writeback field split change
djm81 Feb 12, 2026
6e66806
Archived flask support sidecar change
djm81 Feb 12, 2026
7d6c550
feat: add backlog-core module β€” dependency analysis and command suite…
djm81 Feb 13, 2026
4d1f950
Merge branch 'main' into dev
djm81 Feb 13, 2026
47ea3f4
fix(backlog-core): remove unused module io contract global
djm81 Feb 13, 2026
2509412
Fixed conflict
djm81 Feb 14, 2026
d8d17a5
fix: rename LICENSE.md to LICENSE for GitHub license detection (#233)
djm81 Feb 14, 2026
100c94f
fix: restore standard Apache 2.0 license text for GitHub detection (#…
djm81 Feb 14, 2026
002cf19
Merge branch 'main' into dev
djm81 Feb 14, 2026
ee0b766
Add openspec changes for architecture level enhancement
djm81 Feb 15, 2026
540c96a
Merge branch 'dev' of https://github.com/nold-ai/specfact-cli into dev
djm81 Feb 15, 2026
ea430ab
Merge branch 'main' into dev
djm81 Feb 15, 2026
6dc73ca
Merge branch 'main' into dev
djm81 Feb 16, 2026
d621e91
Merge branch 'dev' of https://github.com/nold-ai/specfact-cli into dev
djm81 Feb 16, 2026
1b06427
feat(ci): attach test and repro log artifacts to PR orchestrator runs…
djm81 Feb 16, 2026
0bc52a5
feat: enhanced module manifest security and integrity (arch-06) (#263)
djm81 Feb 16, 2026
3f09ee7
feat: Schema Extension System for Modular ProjectBundle Extensions (a…
djm81 Feb 16, 2026
e959e61
Merge branch 'main' into dev
djm81 Feb 16, 2026
ba08744
Fix codeql findings
djm81 Feb 16, 2026
a3a3b6a
Merge branch 'dev' of https://github.com/nold-ai/specfact-cli into dev
djm81 Feb 16, 2026
87a499f
Merge branch 'main' into dev
djm81 Feb 17, 2026
faf3b2e
feat(workflow): standardize worktree-first development flow (#268)
djm81 Feb 17, 2026
5c72c9f
Fix review finding
djm81 Feb 17, 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
4 changes: 2 additions & 2 deletions .claude/skills/openspec-workflows/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ Turns an implementation plan document into a fully formed OpenSpec change with p
2. Cross-reference against existing plans and validate targets
3. Resolve any issues interactively
4. Create the OpenSpec change via `opsx:ff` skill
5. Review and improve: enforce TDD-first, add git workflow tasks (branch first, PR last), validate against `openspec/config.yaml`
5. Review and improve: enforce TDD-first, add git worktree tasks (worktree creation first, PR last, cleanup after merge), validate against `openspec/config.yaml`
6. Create GitHub issue (public repos only)

## Validate Change
Expand All @@ -62,5 +62,5 @@ Performs dry-run simulation to detect breaking changes, analyze dependencies, an
- Never modify production code during validation β€” use temp workspaces
- Never proceed with ambiguities β€” ask for clarification
- Enforce TDD-first ordering in tasks (per config.yaml)
- Enforce git workflow: branch creation first task, PR creation last task
- Enforce git worktree workflow: worktree creation first task, PR creation last task, worktree cleanup after merge β€” never switch the primary checkout away from `dev`
- Only create GitHub issues in the target repository specified by the plan
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
- Do not write code during the proposal stage. Only create design documents (proposal.md, tasks.md, design.md, spec deltas).
- Always validate alignment against existing plans and implementation reality before proceeding.
- **CRITICAL**: Only create GitHub issues in the target repository specified by the plan.
- **CRITICAL Git Workflow**: Add tasks to create a git branch (feature/bugfix/hotfix based on change-id) BEFORE any code modifications, and create a PR to `dev` AFTER all tasks complete. Never work on protected branches (main/dev). Branch naming: `<branch-type>/<change-id>`.
- **CRITICAL Git Workflow (Worktree Policy)**: Use git worktrees for parallel development β€” never switch the primary checkout away from `dev`. Add a worktree creation task as the FIRST task, and PR creation as the LAST task. Never work on protected branches (`main`/`dev`) directly. Branch naming: `<branch-type>/<change-id>`. Worktree path: `../specfact-cli-worktrees/<branch-type>/<change-id>`. All subsequent tasks execute inside the worktree directory.
- **CRITICAL TDD**: Per config.yaml, test tasks MUST come before implementation tasks.

## Step 1: Plan Selection
Expand Down Expand Up @@ -137,20 +137,30 @@ Invoke the `opsx:ff` skill with the change name:

Branch name: `<branch-type>/<change-id>`. Target: `dev`.

#### 5.2.2: Add Git Branch Creation Task (FIRST TASK)
#### 5.2.2: Add Git Worktree Creation Task (FIRST TASK)

Add as first task in tasks.md:

```markdown
## 1. Create git branch from dev
## 1. Create git worktree for this change

- [ ] 1.1 Fetch latest and create a worktree with a new branch from `origin/dev`.
- [ ] 1.1.1 `git fetch origin`
- [ ] 1.1.2 `git worktree add ../specfact-cli-worktrees/<branch-type>/<change-id> -b <branch-type>/<change-id> origin/dev`
- [ ] 1.1.3 Change into the worktree: `cd ../specfact-cli-worktrees/<branch-type>/<change-id>`
- [ ] 1.1.4 Create a virtual environment: `python -m venv .venv && source .venv/bin/activate && pip install -e ".[dev]"`
- [ ] 1.1.5 `git branch --show-current` (verify correct branch)
```

**If a GitHub issue exists**, use `gh issue develop` to link the branch before creating the worktree:

- [ ] 1.1 Ensure on dev and up to date; create branch `<branch-type>/<change-id>`; verify.
- [ ] 1.1.1 `git checkout dev && git pull origin dev`
- [ ] 1.1.2 `gh issue develop <issue-number> --repo <target-repo> --name <branch-type>/<change-id> --checkout` (if issue exists)
- [ ] 1.1.3 Or: `git checkout -b <branch-type>/<change-id>` (if no issue)
- [ ] 1.1.4 `git branch --show-current`
```markdown
- [ ] 1.1.2a `gh issue develop <issue-number> --repo <target-repo> --name <branch-type>/<change-id>` (creates remote branch linked to issue)
- [ ] 1.1.2b `git fetch origin && git worktree add ../specfact-cli-worktrees/<branch-type>/<change-id> <branch-type>/<change-id>`
```

All remaining tasks in tasks.md MUST run inside the worktree directory, not the primary checkout.

#### 5.2.3: Update Tasks with Quality Standards

For each task, ensure:
Expand All @@ -174,8 +184,8 @@ For each task, ensure:

Add as last task in tasks.md. Only create PR if target repo is public (specfact-cli, platform-frontend).

Key steps:
1. Prepare commit: `git add .`, commit with conventional message, push.
Key steps (run from inside the worktree directory):
1. Prepare commit: `git add .`, commit with conventional message, push with `-u`: `git push -u origin <branch-type>/<change-id>`.
2. Create PR body from `.github/pull_request_template.md`:
- Use full repo path format for issue refs: `Fixes nold-ai/specfact-cli#<number>`
- Include OpenSpec change ID in description.
Expand All @@ -186,6 +196,21 @@ Key steps:

PR title format: `feat:` for feature/, `fix:` for bugfix/, etc.

#### 5.2.6: Add Worktree Cleanup Task (AFTER MERGE)

Add a note after the PR task for post-merge cleanup:

```markdown
## Post-merge cleanup (after PR is merged)

- [ ] Return to primary checkout: `cd .../specfact-cli`
- [ ] `git fetch origin`
- [ ] `git worktree remove ../specfact-cli-worktrees/<branch-type>/<change-id>`
- [ ] `git branch -d <branch-type>/<change-id>`
- [ ] `git worktree prune`
- [ ] (Optional) `git push origin --delete <branch-type>/<change-id>`
```

### 5.3: Update Proposal with Quality Gates

Update proposal.md with: quality standards section, git workflow requirements, acceptance criteria (branch created, tests pass, contracts validated, docs updated, PR created).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,9 @@
- Hierarchical numbered sections: `## 1.`, `## 2.`
- Tasks: `- [ ] 1.1 [Description]`
- Sub-tasks: `- [ ] 1.1.1 [Description]`
- Rules: 2-hour max chunks, contract tasks, test tasks, quality gates, git workflow (branch first, PR last)
- Rules: 2-hour max chunks, contract tasks, test tasks, quality gates, git worktree workflow (worktree creation first, PR last, cleanup after merge)

7. **Read tasks.md**: Extract tasks, files to create/modify/delete, task dependencies. Verify branch creation first, PR creation last.
7. **Read tasks.md**: Extract tasks, files to create/modify/delete, task dependencies. Verify worktree creation first, PR creation last, worktree cleanup after merge.

8. **Read design.md** (if exists): Architectural decisions, interface changes, contracts, migration plans. Verify bridge adapter docs, sequence diagrams for multi-repo.

Expand Down
29 changes: 18 additions & 11 deletions .cursor/commands/wf-create-change-from-plan.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Create an OpenSpec change proposal from a plan document (e.g., documentation imp
- Always validate alignment against existing plans and implementation reality before proceeding.
- **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.
- For public-facing changes, always sanitize content before creating GitHub issues.
- **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>`.
- **CRITICAL Git Workflow**: Always add tasks to create a git branch (feature/bugfix/hotfix/chore based on change-id) in a dedicated worktree 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), and avoid implementation work from the primary `specfact-cli` checkout when worktrees are available. Branch naming: `<branch-type>/<change-id>`.
- **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.

**Workflow Steps**
Expand Down Expand Up @@ -308,6 +308,7 @@ Execute the `/opsx:ff` command to create all artifacts at once:
- Branch type: `feature`, `bugfix`, `hotfix`, etc.
- Branch name: `<branch-type>/<change-id>`
- Target branch: `dev` (default, unless user specifies otherwise)
- Worktree path: `../specfact-cli-worktrees/<branch-type>/<change-id>`

**5.2.2: Add Git Branch Creation Task (FIRST TASK)**

Expand All @@ -317,16 +318,21 @@ Execute the `/opsx:ff` command to create all artifacts at once:
- Task: "Create git branch `<branch-type>/<change-id>` from `dev` branch"
- **CRITICAL**: This must be the FIRST task - no code modifications before branch creation
- **If GitHub issue exists**: Use `gh issue develop` to automatically link branch to issue
- **If no GitHub issue**: Use standard `git checkout -b` command
- **Use worktree helper**: Prefer `scripts/worktree.sh create <branch-type>/<change-id>`
- **If helper is unavailable**: Use `git worktree add` directly (not `git checkout -b` in primary checkout)
- Steps:

- [ ] 1.1.1 Ensure we're on dev and up to date: `git checkout dev && git pull origin dev`
- [ ] 1.1.2 Create branch with Development link to issue (if exists): `gh issue develop <issue-number> --repo <target-owner>/<target-name> --name <branch-type>/<change-id> --checkout`
- [ ] 1.1.3 Or create branch without issue link: `git checkout -b <branch-type>/<change-id>` (if no issue)
- [ ] 1.1.4 Verify branch was created: `git branch --show-current`
- [ ] 1.1.1 Ensure primary checkout `dev` is up to date: `git checkout dev && git pull origin dev`
- [ ] 1.1.2 Create dedicated worktree branch: `scripts/worktree.sh create <branch-type>/<change-id>` (preferred) or `git worktree add ../specfact-cli-worktrees/<branch-type>/<change-id> -b <branch-type>/<change-id> origin/dev`
- [ ] 1.1.3 Enter worktree and verify branch: `cd ../specfact-cli-worktrees/<branch-type>/<change-id> && git branch --show-current`
- [ ] 1.1.4 Bootstrap worktree environment: `hatch env create`
- [ ] 1.1.5 Run pre-flight status checks from worktree root: `hatch run smart-test-status` and `hatch run contract-test-status`
- [ ] 1.1.6 If Hatch path permissions fail, set writable overrides (for example `HATCH_DATA_DIR=/tmp/hatch-data`, `HATCH_CACHE_DIR=/tmp/hatch-cache`) and retry pre-flight
- [ ] 1.1.7 If issue exists, link branch in GitHub Development section (for example with `gh issue develop` or manual link)
- [ ] 1.1.8 Run all implementation commands from the worktree path, not primary `specfact-cli`

- **Validation**: Verify branch exists and is checked out. If issue exists, verify Development link appears on issue page.
- **Rationale**: Prevents accidental commits to protected branches (main/dev) and ensures proper branch isolation. Using `gh issue develop` automatically creates Development link between branch and issue.
- **Validation**: Verify branch exists in the worktree path and is checked out there. If issue exists, verify Development link appears on issue page.
- **Rationale**: Prevents accidental commits to protected branches (main/dev), ensures branch/path isolation, and avoids mixed changes in the primary checkout.

**5.2.3: Update Existing Tasks with Quality Standards**

Expand Down Expand Up @@ -536,7 +542,8 @@ Update `proposal.md` to include:
- Validation requirements

2. **Git workflow requirements:**
- Branch creation: Work must be done in feature/bugfix/hotfix branch (not on main/dev)
- Branch creation: Work must be done in feature/bugfix/hotfix/chore branch (not on main/dev)
- Worktree execution: Run implementation from dedicated worktree path (`../specfact-cli-worktrees/<type>/<change-id>`), not primary checkout
- Branch protection: `main` and `dev` branches are protected - no direct commits
- Pull Request: All changes must be merged via PR to `dev` branch
- Branch naming: `<branch-type>/<change-id>` format
Expand Down Expand Up @@ -948,7 +955,7 @@ Validation:
βœ“ Markdown linting passed (auto-fixed where possible)
βœ“ Project rules applied (config.yaml read; TDD-first enforced in tasks.md)
βœ“ Quality standards integrated
βœ“ Git workflow tasks added (branch creation + PR creation)
βœ“ Git workflow tasks added (worktree branch creation + PR creation)
βœ“ TDD order section and test-before-code task order applied

GitHub Issue (if target repository supports issues):
Expand All @@ -963,7 +970,7 @@ Next Steps:
3. Verify TDD and git workflow are reflected:
- tasks.md has "TDD / SDD order (enforced)" section at top
- For behavior changes: test tasks before implementation tasks
- First task: Create branch `<branch-type>/<change-id>`
- First task: Create worktree branch `<branch-type>/<change-id>` and switch to worktree path
- Last task: Create PR to `dev` branch
4. Apply change when ready: /opsx:apply <change-id> (or /openspec-apply <change-id> for legacy)
```
Expand Down
6 changes: 4 additions & 2 deletions .cursor/commands/wf-validate-change.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,13 +99,15 @@ Perform a dry-run validation of an OpenSpec change proposal to detect breaking c
- Check task format: Must use `- [ ] 1.1 [Description]` (not `- Task 1:` or `- [ ] Task 1:`)
- Check sub-task format: Must use `- [ ] 1.1.1 [Description]` (indented, not `- [ ] 1.1.1:` without description)
- Verify tasks follow config.yaml rules: 2-hour maximum chunks, contract decorator tasks, test tasks, quality gate tasks, git workflow tasks
- Verify git workflow tasks are worktree-aware: first task creates `<branch-type>/<change-id>` in dedicated worktree path and subsequent implementation runs from worktree (not primary checkout)
- If format issues found, note them for reporting

7. **Read `tasks.md`:**
- Extract: implementation tasks
- Identify: files to create/modify/delete
- Note: dependencies between tasks
- Verify: Branch creation is first task, PR creation is last task (per config.yaml)
- Verify: Worktree branch creation is first task and PR creation is last task (per config.yaml)
- Verify: tasks include worktree bootstrap pre-flight before implementation (`hatch env create`, `hatch run smart-test-status`, `hatch run contract-test-status`, with fallback guidance for `HATCH_DATA_DIR` / `HATCH_CACHE_DIR` if needed)

8. **Read `design.md` (if exists):**
- Extract: architectural decisions, trade-offs
Expand Down Expand Up @@ -459,7 +461,7 @@ Impact Assessment: <High/Medium/Low>
- Contract decorator tasks: <Present/Missing>
- Test tasks: <Present/Missing>
- Quality gate tasks: <Present/Missing>
- Git workflow tasks: <Present/Missing> (branch creation first, PR creation last)
- Git workflow tasks: <Present/Missing> (worktree branch creation first, PR creation last, implementation from worktree path)
- GitHub issue creation task: <Present/Missing> (if public-facing change per config.yaml)
- **specs Format**: <Pass/Fail>
- Given/When/Then format: <Verified/Not verified>
Expand Down
70 changes: 70 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,76 @@ Use `from specfact_cli.common import get_bridge_logger` and avoid `print()` in p
- `bugfix/your-bugfix-name`
- `hotfix/your-hotfix-name`

### Git Worktree Policy (Parallel Development)

Use git worktrees for parallel development branches only.

- Allowed branch types in worktrees: `feature/*`, `bugfix/*`, `hotfix/*`, `chore/*`
- Forbidden in worktrees: `dev`, `main`
- The primary checkout remains the canonical `dev` workspace

Canonical layout:

- Primary checkout: `.../specfact-cli` (tracks `dev`)
- Worktrees root: `.../specfact-cli-worktrees/<branch-type>/<branch-slug>`
- Worktree folder name MUST reflect the branch slug

Preferred helper commands (from repository root):

```bash
scripts/worktree.sh create feature/<branch-slug>
scripts/worktree.sh list
scripts/worktree.sh cleanup feature/<branch-slug>
```

Create a new worktree from `origin/dev`:

```bash
git fetch origin
git worktree add ../specfact-cli-worktrees/feature/<branch-slug> -b feature/<branch-slug> origin/dev
```

Attach an existing local branch to a worktree:

```bash
git fetch origin
git worktree add ../specfact-cli-worktrees/feature/<branch-slug> feature/<branch-slug>
```

Operational rules:

- Never create a worktree for `dev` or `main`
- One branch maps to exactly one worktree path at a time
- Keep branch naming consistent: `<type>/<ticket>-<short-topic>`
- Keep one active OpenSpec change scope per branch where possible
- Create a separate virtual environment inside each worktree (for example, `.venv/`)
- Bootstrap Hatch once per new worktree before running quality gates: `hatch env create`
- Run quick pre-flight checks from the worktree root: `hatch run smart-test-status` and `hatch run contract-test-status`
- If Hatch cannot write to default home/cache paths, set writable overrides (for example `HATCH_DATA_DIR=/tmp/hatch-data` and `HATCH_CACHE_DIR=/tmp/hatch-cache`)
- Run all quality gates from inside the active worktree before commit/PR

Conflict avoidance:

- Check `openspec/CHANGE_ORDER.md` before creating new parallel branches
- Avoid concurrent branches editing the same `openspec/changes/<change-id>/` directory
- Rebase frequently on `origin/dev` in each worktree
- Use `git worktree list` daily to detect stale or incorrect branch/path attachments

Local cleanup after merge to `dev`:

```bash
git fetch origin
git worktree remove ../specfact-cli-worktrees/feature/<branch-slug>
git branch -d feature/<branch-slug>
git worktree prune
```

If remote cleanup is needed:

```bash
git push origin --delete feature/<branch-slug>
```

### Pre-Commit Checklist

Run all steps in order before committing. Every step must pass with no errors.
Expand Down
16 changes: 16 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,22 @@ All notable changes to this project will be documented in this file.

---

## [0.32.1] - 2026-02-17

### Added

- Git worktree lifecycle helper: `scripts/worktree.sh` with `create`, `list`, `cleanup`, and `help` commands.
- Worktree helper unit tests: `tests/unit/tools/test_worktree_helper.py` covering protected-branch rejection, branch-type guardrails, deterministic paths, and cleanup behavior.
- New OpenSpec change package: `workflow-01-git-worktree-management` with proposal, design, spec delta, validation report, and TDD evidence.

### Changed

- Repository instructions now enforce worktree-first development for parallel branches and explicitly block `dev`/`main` worktrees.
- OpenSpec workflow command docs (`.cursor/commands/wf-create-change-from-plan.md`, `.cursor/commands/wf-validate-change.md`) now require dedicated worktree execution and validate worktree-aware task structure.
- Active OpenSpec change task files were normalized to worktree-first branch setup commands to reduce direct-work-on-`dev` risk.

---

## [0.32.0] - 2026-02-16

### Added
Expand Down
Loading
Loading