Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
492 commits
Select commit Hold shift + click to select a range
23ef66c
Merge branch 'main' into dev
djm81 Mar 6, 2026
d578657
Fix install regression for specfact-cli (#380)
djm81 Mar 6, 2026
5c8b661
Merge branch 'main' into dev
djm81 Mar 6, 2026
3de7b1c
Merge branch 'dev' of https://github.com/nold-ai/specfact-cli into dev
djm81 Mar 6, 2026
40e9695
Add changes to improve runtime validation and backlog module remainin…
djm81 Mar 6, 2026
978cc82
refactor: remove backlog ownership from core cli (#384)
djm81 Mar 6, 2026
00658a3
Add new command alignment change
djm81 Mar 6, 2026
f8e5af1
Merge branch 'dev' of https://github.com/nold-ai/specfact-cli into dev
djm81 Mar 6, 2026
08f028a
Merge branch 'main' into dev
djm81 Mar 6, 2026
332949e
fix: finalize cli runtime validation regressions (#387)
djm81 Mar 9, 2026
2a4a0ab
docs: archive cli-val-07 change
djm81 Mar 9, 2026
d031281
Archive changes and update specs
djm81 Mar 9, 2026
d21e157
Merge branch 'main' into dev
djm81 Mar 9, 2026
216f03f
Add code-review change proposals
djm81 Mar 10, 2026
e979938
test: align command surface regression coverage
djm81 Mar 10, 2026
9612cff
docs: add OpenSpec change for backlog-core commands migration (#390)
djm81 Mar 10, 2026
bd5badd
fix: use POST instead of PATCH for ADO work item creation (#391)
djm81 Mar 11, 2026
0448022
docs: archive backlog-02-migrate-core-commands change
djm81 Mar 11, 2026
e91e672
feat: document code-review module scaffold (#410)
djm81 Mar 11, 2026
aa494ff
Add change for project codebase ownership
djm81 Mar 11, 2026
b62292c
Merge branch 'main' into dev
djm81 Mar 11, 2026
67aaf31
Realign code import ownership surface (#412)
djm81 Mar 12, 2026
1f4d236
Update code review changes
djm81 Mar 16, 2026
516b4c7
docs: update reward ledger OpenSpec tracking (#413)
djm81 Mar 16, 2026
8579fe5
Track house-rules skill OpenSpec changes (#414)
djm81 Mar 16, 2026
ff8d041
docs: Update change-proposal for code-review-07 (#415)
djm81 Mar 16, 2026
b524f3a
Finalize code-review-07 status
djm81 Mar 16, 2026
097d8ef
Finalize code-review-08 status
djm81 Mar 16, 2026
37efea0
feat: apply code-review-09 pre-commit integration
djm81 Mar 17, 2026
fa503da
fix: fall back when cached hatch test env is broken
djm81 Mar 17, 2026
6e828e7
fix: avoid hatch env for coverage xml export
djm81 Mar 17, 2026
0aa178f
fix: install type-check and lint tools directly in CI
djm81 Mar 17, 2026
9f6a749
fix: install pytest fallback deps in test job
djm81 Mar 17, 2026
c451134
fix: install pytest-cov for test fallback path
djm81 Mar 17, 2026
f328223
Merge branch 'main' into dev
djm81 Mar 17, 2026
9146118
Merge branch 'main' into dev
djm81 Mar 17, 2026
0aa017d
Finalize code-review-09 status
djm81 Mar 17, 2026
f067288
[Change] Align core docs with modules site ownership (#419)
djm81 Mar 17, 2026
e456d46
fix: harden docs parity URL assertions
djm81 Mar 17, 2026
41052e6
Archive finished changes and update specs
djm81 Mar 17, 2026
05e81bb
Merge branch 'main' into dev
djm81 Mar 17, 2026
0648162
docs: fix command syntax parity after lean-core/modules split (v0.42.…
djm81 Mar 17, 2026
a6978a2
Archive finished changes and update specs
djm81 Mar 17, 2026
0273f1a
Update evidence
djm81 Mar 17, 2026
8ec2c11
Potential fix for pull request finding 'Unused global variable'
djm81 Mar 17, 2026
7d63dd8
Merge branch 'main' into dev
djm81 Mar 18, 2026
a77e5fd
docs: align core docs ownership and parity (#424)
djm81 Mar 20, 2026
664d4e4
docs: fix quickstart install guidance
djm81 Mar 20, 2026
09688de
docs: remove generated project plan docs
djm81 Mar 20, 2026
f7cca1e
Merge branch 'main' into dev
djm81 Mar 20, 2026
f4e91be
Add code-review change
djm81 Mar 20, 2026
37dfecb
fix: preserve native backlog import payloads (#429)
djm81 Mar 20, 2026
b54aaa6
fix: add docs review workflow and repair docs links (#428)
djm81 Mar 20, 2026
ae7f05c
fix: keep imported change ids stable across title changes (#431)
djm81 Mar 20, 2026
7449714
Merge branch 'main' into dev
djm81 Mar 20, 2026
65726fb
fix: remove conflicting pages file copies
djm81 Mar 20, 2026
fbb3b83
Merge branch 'main' into dev
djm81 Mar 20, 2026
c6c47fc
Add docs sync changs
djm81 Mar 20, 2026
eaa87ac
docs: update openspec clean-code planning
djm81 Mar 22, 2026
f602dba
Update change status
djm81 Mar 22, 2026
58314e5
fix: code-review-zero-findings dogfood remediation (v0.42.3) (#435)
djm81 Mar 23, 2026
fb3c5fd
Merge branch 'main' into dev
djm81 Mar 23, 2026
2809390
Add docs refactoring changes
djm81 Mar 23, 2026
215df59
Add bug change tracking for encoding and resources
djm81 Mar 24, 2026
2a60f15
docs: restructure core site IA to 6-section progressive nav (#442)
djm81 Mar 24, 2026
81bca26
fix: harden cross-platform runtime and IDE resource discovery (#443)
djm81 Mar 24, 2026
852f446
fix: resolve review type-safety findings
djm81 Mar 24, 2026
2bbde33
Merge branch 'main' into dev
djm81 Mar 24, 2026
8272233
Improve clarity and scope of ide prompt change
djm81 Mar 25, 2026
2f0675c
feat(init): IDE prompt source catalog, --prompts, namespaced exports …
djm81 Mar 25, 2026
278142e
fix tests
djm81 Mar 25, 2026
38a9d21
release: bump version to 0.42.5 and update CHANGELOG
djm81 Mar 25, 2026
f552107
Fix review findings
djm81 Mar 25, 2026
dab2ffe
feat(init): selective IDE prompt export cleanup and VS Code recommend…
djm81 Mar 25, 2026
fbb2307
Fix review findings
djm81 Mar 25, 2026
71e760b
Merge branch 'main' into dev
djm81 Mar 25, 2026
41dc0db
Add missing import
djm81 Mar 25, 2026
2b26098
Bump patch version and changelog
djm81 Mar 25, 2026
90da7da
Fix failed tests
djm81 Mar 25, 2026
1eca7a9
Fix review findings
djm81 Mar 25, 2026
07c19b4
Merge branch 'main' into dev
djm81 Mar 26, 2026
db4ddc3
docs: core vs modules URL contract and OpenSpec alignment (#448)
djm81 Mar 26, 2026
96f35d7
feat(docs-12): docs command validation and cross-site link checks (#449)
djm81 Mar 26, 2026
f11cb9e
fix(scripts): CliRunner without mix_stderr for Click 8.3+ compatibili…
djm81 Mar 26, 2026
7ccb122
fix: review gates (semgrep print, radon CC, icontract, questionary ty…
djm81 Mar 26, 2026
d516657
Merge branch 'main' into dev
djm81 Mar 26, 2026
86bdc7c
Add speckit adapter alignment change and update affected change specs
djm81 Mar 27, 2026
f92c820
feat(adapters): spec-kit v0.4.x adapter alignment (#454)
djm81 Mar 27, 2026
dd1e359
chore: bump version to 0.43.0 for spec-kit v0.4.x alignment (#455)
djm81 Mar 27, 2026
eec640e
fix(packaging): remove workflow prompts from core wheel (packaging-02…
djm81 Mar 27, 2026
f7fefdd
Potential fix for pull request finding 'Empty except'
djm81 Mar 28, 2026
280d158
Merge branch 'main' into dev
djm81 Mar 28, 2026
0cc2c3c
Fix changelog version
djm81 Mar 28, 2026
c1c2e47
docs: unify core docs portal UX (#459)
djm81 Mar 28, 2026
ce49cd5
Harden docs home URL test assertion
djm81 Mar 28, 2026
cb08cbb
Merge branch 'main' into dev
djm81 Mar 29, 2026
715d472
feat: doc frontmatter validation, v0.43.2 review JSON gate, and pre-c…
djm81 Mar 29, 2026
edc89a7
docs: archive doc-frontmatter-schema openspec change
djm81 Mar 29, 2026
85572f2
Apply suggestions from code review
djm81 Mar 29, 2026
117d568
fix: restore protocol stubs for type checking
djm81 Mar 29, 2026
582a53c
Add frontamtter check
djm81 Mar 29, 2026
4c4ef24
fix: harden protocol stubs for code quality
djm81 Mar 29, 2026
52ee695
Add PR test hardening change
djm81 Mar 29, 2026
644474a
fix: remediate review findings and harden review gates
djm81 Mar 30, 2026
3eff782
fix: rebuild review report model for pydantic
djm81 Mar 30, 2026
e44f15a
Merge branch 'main' into dev
djm81 Mar 30, 2026
93ff11e
Add story and onboarding change
djm81 Mar 30, 2026
506679e
Update change tracking
djm81 Mar 30, 2026
f84aa39
Improve scope for ci/cd requirements
djm81 Mar 30, 2026
11391c9
docs: sharpen first-contact story and onboarding (#467)
djm81 Mar 30, 2026
0fc5f1f
fix: harden review blockers and bump patch version
djm81 Mar 30, 2026
ab42fd0
test: harden modules docs url assertions
djm81 Mar 30, 2026
93b6dee
Merge branch 'main' into dev
djm81 Mar 30, 2026
c5efee3
fix: harden trustworthy green checks (#469)
djm81 Mar 30, 2026
30c70f3
fix: address CodeRabbit review findings for ci-02 (#471)
djm81 Mar 30, 2026
7709718
fix: propagate docker actionlint exit code instead of masking failure…
djm81 Mar 30, 2026
1ffdace
fix: assert hook id stability and cd to repo root for local actionlin…
djm81 Mar 30, 2026
4dcf207
Merge branch 'main' into dev
djm81 Mar 30, 2026
9dbe9d4
feat: clean-code-01-principle-gates — 7-principle charter gates, v0.4…
djm81 Mar 31, 2026
9855d35
feat: archive completed openspec changes and update main specs
djm81 Mar 31, 2026
e9e75d4
Merge branch 'main' into dev
djm81 Mar 31, 2026
6663324
Add new user onboarding change
djm81 Apr 1, 2026
b4a7ecf
docs & tooling: new user onboarding + smart-test and pre-commit revie…
djm81 Apr 2, 2026
e87058b
fix: code-review gate (Typer params), typer<0.24 vs semgrep, module u…
djm81 Apr 3, 2026
9696489
docs: restructure README for star conversion (#480)
djm81 Apr 3, 2026
8fe4a26
Merge branch 'main' into dev
djm81 Apr 3, 2026
903b131
Merge branch 'main' into dev
djm81 Apr 5, 2026
f1f1919
archived implemented changes
djm81 Apr 5, 2026
17ac397
Archive and remove outdated changes
djm81 Apr 5, 2026
9900b72
Split and refactor change proposals between both repos
djm81 Apr 8, 2026
2a73434
Merge remote-tracking branch 'origin/main' into dev
djm81 Apr 8, 2026
e8c3848
Archive alignment change
djm81 Apr 8, 2026
98cf86e
Merge branch 'main' into dev
djm81 Apr 8, 2026
5b5bac7
Add changes and github hierarchy scripts
djm81 Apr 9, 2026
280ac57
feat: add GitHub hierarchy cache sync (#492)
djm81 Apr 9, 2026
1b314a1
[codex] Compact agent governance loading (#493)
djm81 Apr 10, 2026
647ce0c
Archived github hierarchy change
djm81 Apr 10, 2026
338aa92
Update from dev
djm81 Apr 10, 2026
c5083cf
Update rules for openspec archive
djm81 Apr 10, 2026
74c566b
Potential fix for pull request finding 'Unused local variable'
djm81 Apr 10, 2026
685bd4e
Add wiki update notes
djm81 Apr 10, 2026
fdcc51a
Merge branch 'dev' of https://github.com/nold-ai/specfact-cli into dev
djm81 Apr 10, 2026
6c9f03b
Archive governance-03 change, format markdown, add wiki instructions …
djm81 Apr 10, 2026
de48d48
Fix review findings
djm81 Apr 10, 2026
186120e
Fix type errors
djm81 Apr 10, 2026
73b8f48
Merge branch 'main' into dev
djm81 Apr 10, 2026
951f3ae
fix: safe VS Code settings merge and project artifact writes (#490) (…
djm81 Apr 12, 2026
14f3b41
Fix review findings (#498)
djm81 Apr 12, 2026
6096c3c
feat(openspec): add marketplace-06-ci-module-signing change proposal
djm81 Apr 13, 2026
448328b
chore(pre-commit): modular hooks + branch-aware module verify (#501)
djm81 Apr 14, 2026
f7e3fd2
apply code review fixes
djm81 Apr 14, 2026
96879a9
apply code review fixes
djm81 Apr 14, 2026
cdf7e4d
merge: integrate origin/dev with local PyPI pre-commit and type-check…
djm81 Apr 14, 2026
29fdca8
merge: integrate origin/main into dev (conflicts resolved favoring dev)
djm81 Apr 14, 2026
3ffec56
fix(pre-commit): include staged deletions in staged_files() for Block 2
djm81 Apr 14, 2026
95ccde3
Fix review findings
djm81 Apr 14, 2026
c8a1116
Fix code review findings
djm81 Apr 14, 2026
b9b8691
feat(ci): module signing on PR approval and manual workflow_dispatch …
djm81 Apr 14, 2026
01e7351
Feature/ci module sign on approval (#504)
djm81 Apr 14, 2026
b2cc72f
feat(ci): workflow_dispatch for sign-modules-on-approval (#505)
djm81 Apr 14, 2026
a1dda6d
fix(ci): module signing workflows, PyPI version check, and review gate
djm81 Apr 14, 2026
85e7b5a
fix(modules): bump init to 0.1.28 for enforce-version-bump on dev
djm81 Apr 14, 2026
e7efd7d
Merge branch 'main' into dev
djm81 Apr 14, 2026
e61a8a2
chore(release): v0.46.2 — require signatures on all PRs to main
djm81 Apr 14, 2026
1ceddab
sign changed package
djm81 Apr 14, 2026
48ea131
fix(modules): bump init to 0.1.29 for dev→main PR version gate
djm81 Apr 14, 2026
7e9504e
Signed modules and bumped version
djm81 Apr 14, 2026
b34f9fb
Signed modules and bumped version
djm81 Apr 14, 2026
55c4c97
Fix sign flow
djm81 Apr 14, 2026
7091747
Merge branch 'main' into dev
djm81 Apr 15, 2026
5d0d82f
feat: dep-security-cleanup (license gate, pycg, commentjson, review e…
djm81 Apr 16, 2026
01d1bb1
apply review findings
djm81 Apr 16, 2026
5125725
Fix publish module and security gate findings
djm81 Apr 16, 2026
4df303c
Fix findings and publish bug
djm81 Apr 16, 2026
bbea309
Fix review findings and publish modules flow
djm81 Apr 16, 2026
1c1624d
Update publish and sign flows
djm81 Apr 16, 2026
e69ea29
Update publish and sign flows
djm81 Apr 16, 2026
ef07858
chore(modules): auto-sign bundled manifests [skip ci] (#510)
github-actions[bot] Apr 16, 2026
daa73c6
Apply code review findings
djm81 Apr 16, 2026
e62d223
Merge branch 'dev' of https://github.com/nold-ai/specfact-cli into dev
djm81 Apr 16, 2026
1e255e5
Fix failed tests
djm81 Apr 16, 2026
ce3bbb4
[codex] Add five-pillar governance OpenSpec wave (#531)
djm81 Apr 19, 2026
f48b156
[codex] stabilize module install and init state (#535)
djm81 Apr 28, 2026
0200ba5
chore(modules): auto-sign bundled manifests [skip ci] (#536)
github-actions[bot] Apr 28, 2026
b6505f4
Merge branch 'main' into dev
djm81 Apr 28, 2026
d0eb4a4
fix: remove unused checksum tuple in verifier
djm81 Apr 28, 2026
be171d3
chore: reduce low-signal coderabbit review noise
djm81 Apr 28, 2026
73741e4
fix: address codex review findings
djm81 Apr 28, 2026
d209150
fix: tighten local gate scope and module verification
djm81 Apr 28, 2026
01702e6
Merge branch 'main' into dev
djm81 Apr 28, 2026
9b7d968
Make `specfact upgrade` install-method-aware (uv/uvx support, pipx/pi…
djm81 May 3, 2026
3f349fc
chore(modules): auto-sign bundled manifests [skip ci] (#540)
github-actions[bot] May 3, 2026
7179e77
fix(upgrade): prefer pipx before uv tool detection
djm81 May 3, 2026
6e65c7d
fix(upgrade): address PR 541 review findings
djm81 May 3, 2026
88f3d90
fix(cli,upgrade): address PR 541 critical findings
djm81 May 3, 2026
082dc06
Update module manifest from main
djm81 May 3, 2026
990d1e8
chore(modules): auto-sign bundled manifests [skip ci] (#546)
github-actions[bot] May 3, 2026
cb00a4b
Fix module upgrade signature and version bump
djm81 May 3, 2026
27afdb5
Fix signature
djm81 May 3, 2026
d470837
chore(modules): auto-sign bundled manifests [skip ci] (#548)
github-actions[bot] May 3, 2026
86e7e70
fix(ci): terminate module publish output list
djm81 May 3, 2026
8a0aa0d
Merge branch 'main' into dev
djm81 May 3, 2026
bed4721
fix(cli): forward bare lazy subcommands (#549)
djm81 May 3, 2026
11a5e1e
Merge branch 'main' into dev
djm81 May 3, 2026
7724ea6
chore(openspec): park 21 deferred proposals + simplify CHANGE_ORDER (…
djm81 May 6, 2026
197c0d1
Ignore claude settings.json
djm81 May 6, 2026
8000f06
docs: refine telemetry change to active opt-in (#555)
djm81 May 6, 2026
a7a5336
Merge branch 'main' into dev
djm81 May 6, 2026
469af46
fix runtime module discovery reliability (#558)
djm81 May 7, 2026
fab4fa6
chore(modules): auto-sign bundled manifests [skip ci] (#559)
github-actions[bot] May 7, 2026
694fdb2
Merge branch 'main' into dev
djm81 May 8, 2026
abc2db1
Merge branch 'dev' of https://github.com/nold-ai/specfact-cli into dev
djm81 May 8, 2026
a021c53
Merge branch 'main' into dev
djm81 May 8, 2026
4f38ece
[codex] Add module scope version diagnostics (#566)
djm81 May 14, 2026
0c25c8a
chore(modules): auto-sign bundled manifests [skip ci] (#567)
github-actions[bot] May 14, 2026
4322275
fix: address module dependency review findings
djm81 May 17, 2026
3b0f198
fix: address dependency review follow-ups
djm81 May 17, 2026
59be197
Fix dependency resolver bounds and bundle dependency validation
djm81 May 17, 2026
f32da81
Merge branch 'main' into dev
djm81 May 17, 2026
3b13b54
Fix bundled module publish summary quoting
djm81 May 17, 2026
09e3c25
Merge branch 'main' into dev
djm81 May 20, 2026
3f74602
fix(upgrade): suppress benign pipx spaced-home warning (#574)
djm81 May 20, 2026
4ccb2d0
chore(bundled-modules): snapshot from dev@3f74602 (#576)
github-actions[bot] May 20, 2026
5394186
chore(modules): auto-sign bundled manifests [skip ci] (#575)
github-actions[bot] May 20, 2026
717c74d
fix(upgrade): tolerate undecodable child output
djm81 May 20, 2026
15b507c
chore(modules): auto-sign bundled manifests [skip ci] (#578)
github-actions[bot] May 20, 2026
e7b13db
chore(bundled-modules): snapshot from dev@717c74d (#579)
github-actions[bot] May 20, 2026
7d88cb6
Fix registry
djm81 May 20, 2026
b58f924
fix: keep core bundled registry URLs scoped (#580)
djm81 May 20, 2026
edc9651
chore(release): prepare core cli 0.46.28 (#582)
djm81 May 21, 2026
5d5ce89
Merge branch 'main' into dev
djm81 May 21, 2026
03b742f
Merge branch 'main' into dev
djm81 May 21, 2026
47f8e19
Harden CLI command reliability gates (#595)
djm81 Jun 1, 2026
8118ff2
chore(modules): auto-sign bundled manifests [skip ci] (#596)
github-actions[bot] Jun 1, 2026
c6b57a8
chore(bundled-modules): snapshot from dev@47f8e19 (#597)
github-actions[bot] Jun 1, 2026
a711057
fix: align release command validation with modules dev
djm81 Jun 1, 2026
06afb70
fix: tolerate code import alias help ambiguity
djm81 Jun 1, 2026
7e5b1c2
chore(fix): Fix code review findings and PR failure
djm81 Jun 2, 2026
82ed1ba
chore: fix PR 598 validation failures
djm81 Jun 2, 2026
9837a13
chore(modules): auto-sign bundled manifests [skip ci] (#599)
github-actions[bot] Jun 2, 2026
ed37663
chore(bundled-modules): snapshot from dev@82ed1ba (#600)
github-actions[bot] Jun 2, 2026
c4fd804
Merge branch 'main' into dev
djm81 Jun 2, 2026
b298fc1
docs: position SpecFact as AI-bloat defense CLI (#601)
djm81 Jun 2, 2026
dcc5a03
chore: archive completed docs OpenSpec change (#603)
djm81 Jun 2, 2026
c3d6c68
Archive upgrade-01 change
djm81 Jun 2, 2026
c8faa8f
Merge branch 'main' into dev
djm81 Jun 2, 2026
bd26c1f
Reframe roadmap around validation evidence
Jun 6, 2026
4081b54
fix: address validation roadmap review feedback
Jun 6, 2026
fa92e4e
fix: address coderabbit review annotations
Jun 6, 2026
4023d7d
fix: clarify remaining coderabbit review contracts
Jun 6, 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
66 changes: 66 additions & 0 deletions .agents/skills/openspec-workflows/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
---
name: openspec-workflows
description: Create OpenSpec changes from implementation plans, and validate existing changes before implementation. Use when the user wants to turn a plan document into an OpenSpec change proposal, or validate that a change is safe to implement (breaking changes, dependency analysis).
license: MIT
metadata:
author: openspec
version: "1.0"
---

Two workflows for managing OpenSpec changes at the proposal stage.

**Input**: Optionally specify a workflow name (`create` or `validate`) and a target (plan path or change ID). If omitted, ask the user which workflow they need.

## Workflow Selection

Determine which workflow to run:

| User Intent | Workflow | Reference |
|---|---|---|
| Turn a plan into an OpenSpec change | **Create Change from Plan** | `references/create-change-from-plan.md` |
| Validate a change before implementation | **Validate Change** | `references/validate-change.md` |

If the user's intent is unclear, use **AskUserQuestion** to ask which workflow they need.

## Create Change from Plan

Turns an implementation plan document into a fully formed OpenSpec change with proposal, specs, design, and tasks — including GitHub issue creation for public repos.

**When to use**: The user has a plan document (typically in `specfact-cli-internal/docs/internal/implementation/`) and wants to create an OpenSpec change from it.

**Load** `references/create-change-from-plan.md` and follow the full workflow.

**Key steps**:
1. Select and parse the plan document
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 worktree tasks (worktree creation first, PR last, cleanup after merge), validate against `openspec/config.yaml`
6. Create GitHub issue (public repos only)

## Validate Change

Performs dry-run simulation to detect breaking changes, analyze dependencies, and verify format compliance before implementation begins.

**When to use**: The user wants to validate that an existing change is safe to implement — check for breaking interface changes, missing dependency updates, and format compliance.

**Load** `references/validate-change.md` and follow the full workflow.

**Key steps**:
1. Select the change (by ID or interactive list)
2. Parse all change artifacts (proposal, tasks, design, spec deltas)
3. Simulate interface changes in a temporary workspace
4. Analyze dependencies and detect breaking changes
5. Present findings and get user decision if breaking changes found
6. Run `openspec validate <change-id> --strict`
7. Create `CHANGE_VALIDATION.md` report

## Guardrails

- Read `openspec/config.yaml` for project context and rules
- Read `AGENTS.md` for project conventions
- 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 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
@@ -0,0 +1,314 @@
# Workflow: Create OpenSpec Change from Plan

## Table of Contents

- [Guardrails](#guardrails)
- [Step 1: Plan Selection](#step-1-plan-selection)
- [Step 2: Plan Review and Alignment](#step-2-plan-review-and-alignment)
- [Step 3: Integrity Re-Check](#step-3-integrity-re-check)
- [Step 4: OpenSpec Change Creation](#step-4-openspec-change-creation)
- [Step 5: Proposal Review and Improvement](#step-5-proposal-review-and-improvement)
- [Step 6: GitHub Issue Creation](#step-6-github-issue-creation)
- [Step 7: Create GitHub Issue via gh CLI](#step-7-create-github-issue-via-gh-cli)
- [Step 8: Completion](#step-8-completion)

## Guardrails

- Read `openspec/config.yaml` during the workflow (before or at Step 5) for project context and TDD/SDD rules.
- Favor straightforward, minimal implementations. Keep changes tightly scoped.
- Never proceed with ambiguities or conflicts — ask for clarification interactively.
- 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 (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

**If plan path provided**: Resolve to absolute path, verify file exists.

**If no plan path provided**:
1. Search for plans in:
- `specfact-cli-internal/docs/internal/brownfield-strategy/` (`*.md`)
- `specfact-cli-internal/docs/internal/implementation/` (`*.md`)
- `specfact-cli/docs/` (if accessible)
2. Display numbered list with file path, title (first heading), last modified date.
3. Prompt user to select.

## Step 2: Plan Review and Alignment

### 2.1: Read and Parse Plan

1. Read plan file completely.
2. Extract:
- Title and purpose (first H1)
- **Target repository** (look for `**Repository**:` in header metadata, e.g. `` `nold-ai/specfact-cli` ``)
- Phases/tasks with descriptions
- Files to create/modify (note repository prefixes)
- Dependencies, success metrics, estimated effort
3. Identify referenced targets (files, directories, repositories).

### 2.2: Cross-Reference Check

1. Search `specfact-cli-internal/docs/internal/brownfield-strategy/` for overlapping plans.
2. Search `specfact-cli-internal/docs/internal/implementation/` for conflicting implementation plans.
3. Extract conflicting info, overlapping scope, dependency relationships, timeline conflicts.

### 2.3: Target Validation

For each target in the plan:
- **Files**: Check existence, readability, location, structure matches assumptions.
- **Directories**: Check existence, structure.
- **Repositories**: Verify in workspace, structure matches, access ok.
- **Code refs**: Verify functions/classes exist, structure matches.

### 2.4: Alignment Analysis

Check:
1. **Accuracy**: File paths correct? Repos referenced accurately? Commands valid?
2. **Correctness**: Technical details accurate? Implementation approaches align with codebase?
3. **Ambiguities**: Unclear requirements, vague acceptance criteria, missing context.
4. **Conflicts**: With other plans, overlapping scope, timeline/resource conflicts.
5. **Consistency**: With CLAUDE.md conventions, OpenSpec conventions, existing patterns.

### 2.5: Issue Detection and Interactive Resolution

**If issues found**:
1. Categorize: Critical (must resolve), Warning (should resolve), Info (non-blocking).
2. Present: `[CRITICAL/WARNING/INFO] <category>: <description>` with context and suggested resolutions.
3. Resolve interactively: For critical issues, prompt for clarification. For warnings, ask resolve or skip.
4. Re-validate after resolution. Loop until all critical issues resolved.

## Step 3: Integrity Re-Check

1. Re-run all checks from Step 2 with updated understanding.
2. Verify user clarifications are consistent.
3. Check for new issues introduced by clarifications.
4. If misalignments remain, go back to Step 2.5.

## Step 4: OpenSpec Change Creation

### 4.1: Determine Change Name

1. Extract from plan title, convert to kebab-case.
2. Ensure unique (check existing changes in `openspec/changes/`).

### 4.2: Execute OPSX Fast-Forward

Invoke the `opsx:ff` skill with the change name:
- Use the plan as source of requirements.
- Map plan phases/tasks to OpenSpec capabilities.
- The opsx:ff workflow creates: change directory, proposal.md, specs/, design.md, tasks.md.
- It reads `openspec/config.yaml` for project context and per-artifact rules.

### 4.3: Extract Change ID

1. Identify created change ID.
2. Verify change directory: `openspec/changes/<change-id>/`.
3. Verify artifacts created: proposal.md, tasks.md, specs/.

## Step 5: Proposal Review and Improvement

### 5.1: Review Against Config and Project Rules

1. **Read `openspec/config.yaml`**:
- Project context: Tech stack, constraints, architecture patterns.
- Development discipline (SDD + TDD): (1) Specs first, (2) Tests second (expect failure), (3) Code last.
- Per-artifact rules: `rules.tasks` — TDD order, test-before-code.

2. **Read and apply project rules** from CLAUDE.md:
- Contract-first development, testing requirements, code conventions.

3. **Verify config.yaml rules applied**:
- Source Tracking section (if public-facing).
- GitHub issue creation task (if public repo).
- 2-hour maximum chunks.
- TDD: test tasks before implementation.

### 5.2: Update Tasks with Quality Standards and Git Workflow

#### 5.2.1: Determine Branch Type

- `add-*`, `create-*`, `implement-*`, `enhance-*` -> `feature/`
- `fix-*`, `correct-*`, `repair-*` -> `bugfix/`
- `update-*`, `modify-*`, `refactor-*` -> `feature/`
- `hotfix-*`, `urgent-*` -> `hotfix/`
- Default: `feature/`

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

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

Add as first task in tasks.md:

```markdown
## 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 Bootstrap Hatch environment: `hatch env create`
- [ ] 1.1.5 Run pre-flight checks: `hatch run smart-test-status`
- [ ] 1.1.6 Run pre-flight checks: `hatch run contract-test-status`
- [ ] 1.1.7 `git branch --show-current` (verify correct branch)
```

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

```markdown
- [ ] 1.1.2a `gh issue develop <issue-number> --repo <target-repo> --base dev --name <branch-type>/<change-id>` (creates remote branch from `dev` 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:
- Testing requirements (unit, contract, integration, E2E).
- Code quality checks: `hatch run format`, `hatch run type-check`, `hatch run contract-test`.
- Validation: `openspec validate <change-id> --strict`.

#### 5.2.4: Enforce TDD-first in tasks.md

1. **Add "TDD / SDD order (enforced)" section** at top of tasks.md (after title, before first numbered task):
- State: per config.yaml, tests before code for any behavior-changing task.
- Order: (1) Spec deltas, (2) Tests from scenarios (expect failure), (3) Code last.
- "Do not implement production code until tests exist and have been run (expecting failure)."
- Separate with `---`.

2. **Reorder each behavior-changing section**: Test tasks before implementation tasks.

3. **Verify**: Scan tasks.md — any section with both test and implementation tasks must have tests first.

#### 5.2.5: Add PR Creation Task (LAST TASK)

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

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.
3. Create PR: `gh pr create --repo <target-repo> --base dev --head <branch> --title "<type>: <desc>" --body-file <body-file>`
4. Link to project (specfact-cli only): `gh project item-add 1 --owner nold-ai --url <PR_URL>`
5. Verify Development link on issue, project board.
6. Update project status to "In Progress" (if applicable).

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).

### 5.4: Validate with OpenSpec

1. Verify format: proposal.md has `# Change:` title, `## Why`, `## What Changes`, `## Impact`. Tasks.md uses `## 1.` numbered format.
2. Check status: `openspec status --change "<change-id>" --json`.
3. Run: `openspec validate <change-id> --strict`. Fix and re-run until passing.

### 5.5: Markdown Linting

Run `markdownlint --config .markdownlint.json --fix` on all `.md` files in the change directory. Fix remaining issues manually.

## Step 6: GitHub Issue Creation

### 6.1: Determine Target Repository

1. Extract target repo from plan header (`**Repository**:` field).
2. Decision:
- `specfact-cli` or `platform-frontend` (public) -> create issue, proceed to 6.2.
- `specfact-cli-internal` (internal) -> skip issue creation, go to Step 8.
- Not specified -> ask user.

### 6.2: Sanitize Proposal Content

For public issues:
- **Remove**: Competitive analysis, market positioning, internal strategy, effort estimates.
- **Preserve**: User-facing value, feature descriptions, acceptance criteria, API changes.

Format per config.yaml:
- Title: `[Change] <Brief Description>`
- Labels: `enhancement`, `change-proposal`
- Body: `## Why`, `## What Changes`, `## Acceptance Criteria`
- Footer: `*OpenSpec Change Proposal: <change-id>*`

Show sanitized content to user for approval before creating.

## Step 7: Create GitHub Issue via gh CLI

1. Write sanitized content to temp file.
2. Create issue:

```bash
gh issue create \
--repo <target-repo> \
--title "[Change] <title>" \
--body-file /tmp/github-issue-<change-id>.md \
--label "enhancement" \
--label "change-proposal"
```

3. For specfact-cli: link to project `gh project item-add 1 --owner nold-ai --url <ISSUE_URL>`.
4. Update `proposal.md` Source Tracking section:

```markdown
## Source Tracking

<!-- source_repo: <target-repo> -->
- **GitHub Issue**: #<number>
- **Issue URL**: <url>
- **Last Synced Status**: proposed
```

5. Cleanup temp file.

## Step 8: Completion

Display summary:

```text
Change ID: <change-id>
Location: openspec/changes/<change-id>/

Validation:
- OpenSpec validation passed
- Markdown linting passed
- Config.yaml rules applied (TDD-first enforced)
- Git workflow tasks added (branch + PR)

GitHub Issue (if public):
- Issue #<number> created: <url>
- Source tracking updated

Next Steps:
1. Review: openspec/changes/<change-id>/proposal.md
2. Review: openspec/changes/<change-id>/tasks.md
3. Verify TDD order and git workflow in tasks
4. Apply when ready: invoke opsx:apply skill
```

## Error Handling

- **Plan not found**: Search and suggest alternatives.
- **Validation failures**: Present clearly, allow interactive resolution.
- **OpenSpec validation fails**: Fix and re-validate, don't proceed until passing.
- **gh CLI unavailable**: Inform user, provide manual creation instructions.
- **Issue creation fails**: Log error, allow retry, don't fail entire workflow.
- **Project linking fails**: Log warning, continue (non-critical).
Loading
Loading