Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
149 commits
Select commit Hold shift + click to select a range
b285276
feat(log-tool): Enhance log viewing experience with list-first design…
tautcony Aug 31, 2026
dce2e82
refactor: simplify LogEntryViewModel by removing unused structured no…
tautcony Aug 31, 2026
e7cf9e3
feat: add CodeGraph configuration and documentation for improved code…
tautcony Sep 1, 2026
38f2841
refactor: update method signatures and simplify logic in various files
tautcony Sep 1, 2026
84aab0e
refactor: replace magic numbers with named constants for clarity in I…
tautcony Sep 1, 2026
4857d57
chore: update dependencies and improve applyExpression option naming …
tautcony Sep 1, 2026
2657ce9
chore: update OpenSpec skills to version 1.11.0
tautcony Sep 1, 2026
57afd50
refactor: change logging mechanism to remove message keys and enhance…
tautcony Sep 1, 2026
5cb7d3d
chore: refactor documentation comments for clarity and consistency
tautcony Sep 2, 2026
a0cd42f
docs: add UI visual consistency guidelines for Avalonia interface
tautcony Sep 2, 2026
e95eb79
refactor: change static methods to instance methods for chapter expor…
tautcony Sep 2, 2026
b67073a
style: enhance CSS layout for improved responsiveness and visual cons…
tautcony Sep 2, 2026
127ca26
feat: add log folder opening option to log messages in multiple langu…
tautcony Sep 2, 2026
be237da
chore: update npm install commands to ignore scripts and improve asyn…
tautcony Sep 2, 2026
cb24184
fix: update ShellService to use system path for cmd.exe on Windows
tautcony Sep 2, 2026
0e7a4f9
refactor: improve ClpiClipInfo data processing and add helper methods…
tautcony Sep 2, 2026
9ed219f
docs: update README files for clarity and consistency across sections
tautcony Sep 3, 2026
c56c3c8
chore: update Avalonia and related package versions to latest releases
tautcony Sep 7, 2026
3e26dd5
docs: add instructions for checking Avalonia.Headless.XUnit compatibi…
tautcony Sep 7, 2026
a2f4677
docs: update AGENTS.md to streamline project guidelines and remove ou…
tautcony Sep 7, 2026
6e72f03
feat: enhance MainWindowViewModel with chapter and selection counts, …
tautcony Sep 8, 2026
1eba855
feat: Implement customizable keyboard shortcuts for Avalonia UI
tautcony Sep 8, 2026
1071398
fix: update Python tool sync and verification commands to include --n…
tautcony Sep 9, 2026
98cb3d5
refactor: improve code readability by adding braces to control flow s…
tautcony Sep 9, 2026
869bdbd
chore: upload legacy source code from v1.7
tautcony Sep 9, 2026
8587f2e
fix: update Python version requirement to >=3.9 in pyproject.toml and…
tautcony Sep 9, 2026
cb012a6
docs: Add English ChangeLog for version history and updates
tautcony Sep 9, 2026
6bb0bff
docs: organize code map by structure contracts and state
tautcony Oct 1, 2026
5502f41
feat(core): parse DVD disc chapter timing
tautcony Oct 2, 2026
ac7b06c
feat(infrastructure): route DVD disc imports
tautcony Oct 2, 2026
3d910b9
feat(avalonia): improve DVD import presentation
tautcony Oct 2, 2026
186cbd9
fix(infrastructure): resolve cmd.exe from PATH
tautcony Oct 2, 2026
760eaba
refactor(infrastructure): simplify DVD directory detection
tautcony Oct 2, 2026
dea2f14
feat(core): add immutable chapter document model
tautcony Oct 3, 2026
3a21cb8
feat(core): add atomic editable document transactions
tautcony Oct 3, 2026
eed4aa4
feat(core): add branching session edit history
tautcony Oct 3, 2026
5a6f707
Implement unified content operation candidates
tautcony Oct 3, 2026
e65b789
Implement current-document clip operations
tautcony Oct 3, 2026
b3244f1
feat: add shared host history workflows
tautcony Oct 3, 2026
ce1c3f2
feat(session): implement lifecycle and export baselines
tautcony Oct 3, 2026
f209d55
feat(core): add one-shot compatibility adapters
tautcony Oct 3, 2026
b1126a1
refactor(session): remove interactive projection paths
tautcony Oct 3, 2026
05f2f85
feat(wasm): add browser E2E acceptance coverage
tautcony Oct 3, 2026
7d0816e
test(wasm): cover branching history and session workflows
tautcony Oct 3, 2026
aab34ce
fix(wasm): sync generated localization resources
tautcony Oct 3, 2026
9255568
fix(ci): pass repository-relative WASM paths
tautcony Oct 3, 2026
686d7d2
fix(wasm): run site preparation from E2E package
tautcony Oct 3, 2026
b17438d
fix(wasm): restore localized chapter table label
tautcony Oct 3, 2026
b827f09
chore(deps-dev): bump brace-expansion in /packages/chaptertool
dependabot[bot] Oct 4, 2026
6f86389
feat(expression): add live candidate previews
tautcony Oct 4, 2026
90bb423
fix(avalonia): widen expression editor on desktop
tautcony Oct 4, 2026
6b20aa5
fix(wasm): isolate tool dialogs and cover responsive layouts
tautcony Oct 4, 2026
0262e8e
feat: improve expression preview interaction
tautcony Oct 4, 2026
30d309d
docs(editing): define unified editing and unbounded session history
tautcony Oct 6, 2026
eed3098
docs(expression): document shared preview and apply interaction
tautcony Oct 6, 2026
022d26f
feat(ci): share local checks and parallelize pipeline stages
tautcony Oct 6, 2026
0c5cf4d
chore(deps-dev): bump source-map-js in /packages/chaptertool
dependabot[bot] Oct 6, 2026
e2b8de5
feat(ci): add reviewed Linux screenshot baseline generation
tautcony Oct 6, 2026
e2a64ce
test(wasm): verify expression diagnostics in the review view
tautcony Oct 6, 2026
6bca6c8
test(wasm): refresh expression review Linux visual baselines
tautcony Oct 6, 2026
0a2b810
chore(scripts): retain reusable WASM visual maintenance tools
tautcony Oct 6, 2026
9519842
Merge pull request #30: update brace-expansion to 5.0.12
tautcony Oct 6, 2026
0e2b760
Merge pull request #31: update source-map-js to 1.2.2
tautcony Oct 6, 2026
fd6a566
chore(deps): refresh compatible NuGet, npm, and Python dependencies
tautcony Oct 6, 2026
336958f
feat: align WASM UI functional parity
tautcony Oct 7, 2026
7e19c1b
fix(wasm): preserve frame accuracy colors in editable cells
tautcony Oct 7, 2026
019f61b
fix(wasm): handle expression input before JS module is ready
tautcony Oct 8, 2026
28e6f6b
test(wasm): update Linux layout screenshot baselines
tautcony Oct 8, 2026
7df1a32
test(wasm): correct Linux visual baselines
tautcony Oct 8, 2026
3892529
test(wasm): include remaining Linux layout baselines
tautcony Oct 8, 2026
f22821e
ci(wasm): generate Linux screenshot review artifact
tautcony Oct 8, 2026
5298bf2
test(wasm): refresh Linux layout screenshot baselines
tautcony Oct 8, 2026
63fcf22
ci: retry stalled Chromium runner
tautcony Oct 8, 2026
75dd863
fix: allow chapter starts beyond known duration
tautcony Oct 8, 2026
683301e
feat(avalonia): improve editing and preview workflows
tautcony Oct 9, 2026
e66408b
docs(openspec): archive completed changes and sync specs
tautcony Oct 9, 2026
9acc5c1
feat(core): add read-only history inspection
tautcony Oct 10, 2026
35f2db6
fix(core): reject chapter times beyond one day
tautcony Oct 10, 2026
864b460
feat(avalonia): inspect edit history details
tautcony Oct 10, 2026
52f678e
feat(wasm): inspect and restore history branches
tautcony Oct 10, 2026
5e6279a
feat(wasm): improve log detail actions
tautcony Oct 10, 2026
44a18e0
feat(wasm): preview expressions inline
tautcony Oct 10, 2026
1a65165
fix(wasm): detect stale expression previews
tautcony Oct 10, 2026
28cef13
fix(ui): keep frame rate controls responsive
tautcony Oct 10, 2026
72e4367
fix(avalonia): preview loaded template names
tautcony Oct 10, 2026
411709b
test(avalonia): compare caret brush values
tautcony Oct 10, 2026
967d76b
test(core): clarify export service naming
tautcony Oct 10, 2026
9280c2a
test(wasm): use fixture helper namespace
tautcony Oct 10, 2026
7d57c25
fix(avalonia): end session on window close
tautcony Oct 10, 2026
53d8f24
chore(infrastructure): tidy shell warning messages
tautcony Oct 10, 2026
6cebaed
test(avalonia): set expression draft after construction
tautcony Oct 10, 2026
7f36441
refactor(avalonia): streamline frame rate resolution logic
tautcony Oct 10, 2026
5b86670
refactor(avalonia): simplify usage of spread syntax and improve varia…
tautcony Oct 10, 2026
b481de3
refactor(avalonia): consolidate content options preview logic into a …
tautcony Oct 10, 2026
d6ba2ee
refactor(avalonia): implement history dialog with native tree view an…
tautcony Oct 10, 2026
aeebbef
Fix expression preview frame formatting
tautcony Oct 10, 2026
a66d7ce
refactor(avalonia): enhance history tool view layout and improve chan…
tautcony Oct 10, 2026
348832b
feat: add full-precision repeating frame display
tautcony Oct 10, 2026
9b1336d
Fix frame display preferences and preview layout
tautcony Oct 10, 2026
7b19030
Restructure CI gates and fix browser workflow regressions
tautcony Oct 10, 2026
5034449
Install media tools for isolated Avalonia tests
tautcony Oct 10, 2026
fd401f9
Align Web UI workflows with Avalonia
tautcony Oct 11, 2026
6f375cc
feat: preserve exact frame rate provenance from MPLS import through e…
tautcony Oct 11, 2026
9f0fd5e
fix: improve formatting for localization and accessibility requiremen…
tautcony Oct 11, 2026
f68d715
feat: preserve canonical frame rates across chapter workflows
tautcony Oct 11, 2026
5a605bc
fix: preserve public named constructor arguments
tautcony Oct 11, 2026
2d0c09b
fix: clean CI annotations and update setup-uv
tautcony Oct 11, 2026
762ddb8
refactor: reorganize script paths and update CI commands
tautcony Oct 12, 2026
bb19782
fix: correct script path for publish-desktop.ps1 in validate-publish.ps1
tautcony Oct 12, 2026
10595c1
feat: introduce FramePresentationView for improved frame display hand…
tautcony Oct 12, 2026
c55a3cf
fix: update Node.js engine version and upgrade devDependencies
tautcony Oct 12, 2026
7d147e8
refactor: reorganize code structure and improve cancellation token ha…
tautcony Oct 12, 2026
45c69c2
fix: avoid disposed expression preview token
tautcony Oct 12, 2026
888342d
test: merge overlapping ui command failure cases
tautcony Oct 12, 2026
203df70
Refactor frame rate handling across tests and services
tautcony Oct 12, 2026
732280c
feat(docs): add VitePress for documentation and API reference generation
tautcony Oct 12, 2026
548bfab
fix: align CI consumers with current APIs
tautcony Oct 13, 2026
9fbfdfb
fix(ci): address static analysis findings
tautcony Oct 13, 2026
cb67cfd
fix: clear CodeFactor maintainability findings
tautcony Oct 13, 2026
b014239
refactor: split complex workflow methods
tautcony Oct 13, 2026
0fbb5e7
refactor: reduce expression and API model complexity
tautcony Oct 13, 2026
187116e
refactor: decompose complex history and preview flows
tautcony Oct 13, 2026
020b5b7
refactor: split complex core operations
tautcony Oct 13, 2026
c0a7945
refactor: split complex view model flows
tautcony Oct 13, 2026
9c93829
refactor: decompose DVD title import flow
tautcony Oct 13, 2026
49d6636
refactor: simplify import and append validation
tautcony Oct 13, 2026
b5bebf8
refactor: simplify preview and log value flows
tautcony Oct 13, 2026
bc8484e
refactor: decompose history and content projections
tautcony Oct 13, 2026
6907325
refactor: simplify workspace and settings workflows
tautcony Oct 13, 2026
7a0c276
refactor: split auxiliary and append workflows
tautcony Oct 13, 2026
3ccfa40
refactor: split append result handling
tautcony Oct 13, 2026
c0dab6b
fix: normalize frame edits and delete operations
tautcony Oct 13, 2026
60aed6a
fix: update clip option identifier format to include index
tautcony Oct 13, 2026
b3855cd
refactor: remove unused using directives and simplify code structure
tautcony Oct 13, 2026
addbe51
fix: ensure preferred child ID updates correctly during history navig…
tautcony Oct 13, 2026
645a637
chore: upgrade package deps
tautcony Oct 13, 2026
01f8d8f
fix: standardize localization key formats and update UI resource audi…
tautcony Oct 14, 2026
53df7d1
fix(wasm): harden browser storage, busy state, dialog disposal, and e…
tautcony Oct 14, 2026
423239e
fix(contracts): keep a null shortcut gesture from failing the setting…
tautcony Oct 14, 2026
44d6b6d
fix(avalonia): resubscribe the static shortcut event when the main vi…
tautcony Oct 14, 2026
c99712f
fix(core): restore content-seeded Matroska export UIDs
tautcony Oct 14, 2026
2fd2588
fix(avalonia): correct history status text and notify HasSelection
tautcony Oct 14, 2026
3b4aca0
test(avalonia): lock the unchanged rounded frame cell commit behavior
tautcony Oct 14, 2026
5a48b9c
fix(core): treat an unknown duration as unknown instead of zero (NEW-02)
tautcony Oct 14, 2026
649e313
feat(core): enhance duration handling and metadata preservation acros…
tautcony Oct 14, 2026
a931e9d
fix: preserve export save failures and resolve Sonar findings
tautcony Oct 14, 2026
f82e161
fix: improve focus handling and add backspace input support in expres…
tautcony Oct 14, 2026
4d99566
feat: update CHANGELOG with new features, bug fixes, and compatibilit…
tautcony Oct 14, 2026
26d5c83
chore: update version to 23.31.0 in package.json, package-lock.json, …
tautcony Oct 14, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
5 changes: 5 additions & 0 deletions .codegraph/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# CodeGraph data files — local to each machine, not for committing.
# Ignore everything in .codegraph/ except this file itself, so transient
# files (the database, daemon.pid, sockets, logs) never show up in git.
*
!.gitignore
3 changes: 3 additions & 0 deletions .codex/config.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[mcp_servers.codegraph]
command = "codegraph"
args = ["serve", "--mcp"]
1 change: 1 addition & 0 deletions .codex/skills/.openspec-target
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
agents
42 changes: 35 additions & 7 deletions .codex/skills/openspec-apply-change/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@ compatibility: Requires openspec CLI.
metadata:
author: openspec
version: "1.0"
generatedBy: "1.6.0"
generatedBy: "1.11.0"
---

Implement tasks from an OpenSpec change.

**Store selection:** If the user names a store (a store is a standalone OpenSpec repo registered on this machine) or the work lives in one, run `openspec store list --json` to discover registered store ids, then pass `--store <id>` on the commands that read or write specs and changes (`new change`, `status`, `instructions`, `list`, `show`, `validate`, `archive`, `doctor`, `context`). Other commands do not take the flag. Hints printed by commands already carry the flag; keep it on follow-ups. Without a store, commands act on the nearest local `openspec/` root.
**Store selection:** If the user names a store (a store is a standalone OpenSpec repo registered on this machine) or the work lives in one, run `openspec store list --json` to discover registered store ids, then pass `--store <id>` on the commands that read or write specs and changes (`new change`, `status`, `instructions`, `list`, `show`, `validate`, `archive`, `doctor`, `context`, `schemas`, `view`). Once selected, treat `--store <id>` as sticky for the rest of the workflow. Every unscoped example of those commands below is shorthand: before running it, append the flag. For example, run `openspec status --change "<name>" --json --store "<id>"`, not the unscoped form shown below. Other commands do not take the flag. Hints printed by commands already carry the flag; keep it on follow-ups. Without a store, commands act on the nearest local `openspec/` root.

**Input**: Optionally specify a change name. If omitted, check if it can be inferred from conversation context. If vague or ambiguous you MUST prompt for available changes.
**Input**: Optionally specify a change name (e.g., `/openspec-apply-change add-auth`). If omitted, check if it can be inferred from conversation context. If vague or ambiguous you MUST prompt for available changes.

**Steps**

Expand All @@ -23,9 +23,9 @@ Implement tasks from an OpenSpec change.
If a name is provided, use it. Otherwise:
- Infer from conversation context if the user mentioned a change
- Auto-select if only one active change exists
- If ambiguous, run `openspec list --json` to get available changes and use the **AskUserQuestion tool** to let the user select
- If ambiguous, run `openspec list --json` to get available changes and ask the user to select one

Always announce: "Using change: <name>" and how to override (e.g., `/opsx:apply <other>`).
Always announce: "Using change: <name>" and how to override (e.g., `/openspec-apply-change <other>`).

2. **Check status to understand the schema**
```bash
Expand All @@ -47,19 +47,39 @@ Implement tasks from an OpenSpec change.
- Progress (total, complete, remaining)
- Task list with status
- Dynamic instruction based on current state
- Optional `context`: current required project instruction input from the selected root
- Optional `operationGuidance`: current advisory guidance for apply

**Handle states:**
- If `state: "blocked"` (missing artifacts): show message, suggest using openspec-continue-change
- If `state: "blocked"` (missing artifacts): show message, suggest using `/openspec-continue-change` (if it is not installed, run `openspec status --change "<name>" --json` to see the next artifact and `openspec instructions <artifact-id> --change "<name>" --json` for how to create it)
- If `state: "all_done"`: congratulate, suggest archive
- Otherwise: proceed to implementation

Treat `context` as a required prompt-level input. Read and consider it, and
apply relevant project facts, conventions, and constraints while implementing.
Treat `operationGuidance` as optional additive advice. Read and consider every
entry, and follow entries that are applicable and compatible with the built-in
workflow.

Keep both fields separate from CLI-returned state, missing artifacts, tasks,
progress, `contextFiles`, and the built-in `instruction`. They are not
evidence of task completion, do not replace the built-in instruction, and do
not permit bypassing a blocked state. If context conflicts with the built-in
instruction, an explicit user choice, or a CLI-controlled value, report the
conflict and preserve the controlling value. If guidance is inapplicable or
conflicts with those controlling inputs, do not follow it and explain why.
These are prompt-level behavior contracts, not enforceable checks.

4. **Read context files**

Read every file path listed under `contextFiles` from the apply instructions output.
The files depend on the schema being used:
- **spec-driven**: proposal, specs, design, tasks
- Other schemas: follow the contextFiles from CLI output

Do not copy `context` or `operationGuidance` verbatim into implementation
files or planning artifacts unless the user separately asks for that content.

5. **Show current progress**

Display:
Expand All @@ -80,6 +100,7 @@ Implement tasks from an OpenSpec change.
**Pause if:**
- Task is unclear → ask for clarification
- Implementation reveals a design issue → suggest updating artifacts
- A task needs work beyond what the spec and tasks describe, or you are tempted to drop, narrow, defer, or accept exceptions to specified behavior to make it fit → surface the added scope and ask; do not absorb it silently
- Error or blocker encountered → report and wait for guidance
- User interrupts

Expand Down Expand Up @@ -119,7 +140,7 @@ Working on task 4/7: <task description>
- [x] Task 2
...

All tasks complete! Ready to archive this change.
All tasks complete! You can archive this change with `/openspec-archive-change`.
```

**Output On Pause (Issue Encountered)**
Expand Down Expand Up @@ -150,7 +171,14 @@ What would you like to do?
- Keep code changes minimal and scoped to each task
- Update task checkbox immediately after completing each task
- Pause on errors, blockers, or unclear requirements - don't guess
- When a task needs work beyond what the spec describes, surface the added scope and pause - never silently narrow, defer, or simplify away specified behavior
- Only mark a task `- [x]` when its specified behavior is fully implemented, not when it is partially done or deferred
- Use contextFiles from CLI output, don't assume specific file names
- Do not use context or operation guidance as proof that a task is complete
- Apply relevant project context; report conflicts with controlling workflow inputs
- Consider every guidance entry; explain any inapplicable or conflicting advice
- Do not copy runtime context or operation guidance into implementation files or planning artifacts
- Preserve CLI-controlled blocked/ready/all-done behavior and completion criteria

**Fluid Workflow Integration**

Expand Down
106 changes: 85 additions & 21 deletions .codex/skills/openspec-archive-change/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,25 +7,57 @@ compatibility: Requires openspec CLI.
metadata:
author: openspec
version: "1.0"
generatedBy: "1.6.0"
generatedBy: "1.11.0"
---

Archive a completed change in the experimental workflow.

**Store selection:** If the user names a store (a store is a standalone OpenSpec repo registered on this machine) or the work lives in one, run `openspec store list --json` to discover registered store ids, then pass `--store <id>` on the commands that read or write specs and changes (`new change`, `status`, `instructions`, `list`, `show`, `validate`, `archive`, `doctor`, `context`). Other commands do not take the flag. Hints printed by commands already carry the flag; keep it on follow-ups. Without a store, commands act on the nearest local `openspec/` root.
**Store selection:** If the user names a store (a store is a standalone OpenSpec repo registered on this machine) or the work lives in one, run `openspec store list --json` to discover registered store ids, then pass `--store <id>` on the commands that read or write specs and changes (`new change`, `status`, `instructions`, `list`, `show`, `validate`, `archive`, `doctor`, `context`, `schemas`, `view`). Once selected, treat `--store <id>` as sticky for the rest of the workflow. Every unscoped example of those commands below is shorthand: before running it, append the flag. For example, run `openspec status --change "<name>" --json --store "<id>"`, not the unscoped form shown below. Other commands do not take the flag. Hints printed by commands already carry the flag; keep it on follow-ups. Without a store, commands act on the nearest local `openspec/` root.

`<capability-path>` is the spec directory relative to `specs/` (for example, `user-auth` or `identity/user-auth`). Preserve the full path from each delta spec when resolving its main spec.

**Input**: Optionally specify a change name. If omitted, check if it can be inferred from conversation context. If vague or ambiguous you MUST prompt for available changes.

**Steps**

1. **If no change name provided, prompt for selection**
1. **Select the change**

Run `openspec list --json` to get available changes. Use the **AskUserQuestion tool** to let the user select.
If a name is provided, use it. Otherwise:
- Infer from conversation context if the user mentioned a change
- Auto-select if only one active change exists
- If ambiguous, run `openspec list --json` to get available changes and ask the user to select one

Show only active changes (not already archived).
When prompting, show only active changes (not already archived).
Include the schema used for each change if available.

**IMPORTANT**: Do NOT guess or auto-select a change. Always let the user choose.
Always announce: "Using change: <name>" and how to override (e.g., `/openspec-archive-change <other>`).

**Load current archive inputs before the existing archive checks:**

After resolving the selected change and planning root, run:
```bash
openspec instructions archive --change "<name>" --json
```
Keep the same selected-root flags on this command. This lookup is advisory and
optional: it only supplies extra prompt inputs, so it must never block archiving.
If it exits non-zero or returns invalid JSON — for example on an older CLI that
does not support this command yet — continue the archive workflow with no
context and no operation guidance. Do not report an error and do not stop.

A successful response may omit both optional fields. Treat `context` as a
required prompt-level input: read and consider it, and apply relevant project
facts, conventions, and constraints. Treat `operationGuidance` as optional
additive advice: read and consider every entry, and follow entries that are
applicable and compatible with the built-in archive workflow.

Keep both fields separate from built-in steps, explicit user choices, resolved
paths, CLI checks, and command contracts. If context conflicts with one of those
controlling inputs, report the conflict and preserve the controlling value. If
guidance is inapplicable or conflicts with a controlling input, do not follow it
and explain why. Do not infer replacement paths, skipped prompts, or flags from
either field, and do not copy their text verbatim into specs, change artifacts,
or archive summaries unless the user separately asks for it. These are
prompt-level behavior contracts, not enforceable checks.

2. **Check artifact completion status**

Expand All @@ -34,11 +66,11 @@ Archive a completed change in the experimental workflow.
Parse the JSON to understand:
- `schemaName`: The workflow being used
- `planningHome`, `changeRoot`, `artifactPaths`, and `actionContext`: path and scope context
- `artifacts`: List of artifacts with their status (`done` or other)
- `artifacts`: List of artifacts with their status (`done`, `skipped`, or other)

**If any artifacts are not `done`:**
**If any artifacts are neither `done` nor `skipped`** (skipped artifacts satisfy the requirement - the change declares skip_specs):
- Display warning listing incomplete artifacts
- Use **AskUserQuestion tool** to confirm user wants to proceed
- Ask the user to confirm they want to proceed
- Proceed if user confirms

3. **Check task completion status**
Expand All @@ -49,25 +81,51 @@ Archive a completed change in the experimental workflow.

**If incomplete tasks found:**
- Display warning showing count of incomplete tasks
- Use **AskUserQuestion tool** to confirm user wants to proceed
- Ask the user to confirm they want to proceed
- Proceed if user confirms

**If no tasks file exists:** Proceed without task-related warning.

4. **Assess delta spec sync state**

Use `artifactPaths.specs.existingOutputPaths` from status JSON to check for delta specs. If none exist, proceed without sync prompt.
Use `artifactPaths.specs.existingOutputPaths` from status JSON as the only
delta-spec source. If the `specs` entry is missing or
`existingOutputPaths` is empty, proceed without a sync prompt and do not infer
delta specs from other artifacts.

**If delta specs exist:**
- Compare each delta spec with its corresponding main spec at `openspec/specs/<capability>/spec.md`
- Compare each delta spec with its corresponding main spec at `<planningHome.root>/openspec/specs/<capability-path>/spec.md` (use the store-aware `planningHome.root` from step 2, not a hardcoded repo path)
- Determine what changes would be applied (adds, modifications, removals, renames)
- Show a combined summary before prompting

**Prompt options:**
- If changes needed: "Sync now (recommended)", "Archive without syncing"
- If already synced: "Archive now", "Sync anyway", "Cancel"

If user chooses sync, use Task tool (subagent_type: "general-purpose", prompt: "Use Skill tool to invoke openspec-sync-specs for change '<name>'. Delta spec analysis: <include the analyzed delta spec summary>"). Proceed to archive regardless of choice.
Route on the answer:
- "Cancel" — stop, do not archive
- "Archive without syncing" or "Archive now" — proceed to archive
- "Sync now" or "Sync anyway" — sync, then verify (below)
- Anything else — ask again rather than archiving

Before a selected sync writes any main spec, run
`openspec instructions specs --change "<name>" --json` once with the same
selected-root flags. Require a zero exit status and valid artifact-instruction
JSON. If the lookup fails or returns invalid JSON, report the error and stop
before writing any main spec or moving the change. A valid response with omitted
`rules` is the no-rules case. Apply returned `rules` only to the content and
form of main specs produced by this merge; do not use them as archive guidance,
change CLI behavior, or copy the rule text into any output file.

Then run the `openspec-sync-specs` workflow inline (agent-driven intelligent merge) for change '<name>', passing the delta spec analysis and the fetched specs-rule snapshot from above, and wait for it to finish. The inline sync must reuse that snapshot without fetching `specs` instructions again. Do not delegate it to a background task — step 5 would move `changeRoot` out from under a sync that is still reading it, leaving the change archived and the main specs never updated. If your agent can only run it by delegation, delegate synchronously and wait for the result.

Then re-run the comparison from the top of this step against every capability that has a delta spec in `artifactPaths.specs.existingOutputPaths` — not only the ones the sync reports it touched. A successful sync leaves nothing left to apply, so each capability must now read as already synced:
- ADDED requirements present
- MODIFIED requirements carrying the scenario and description changes named in the delta, with their other scenarios intact
- REMOVED requirements gone — and where this sync retired a capability (removed its last requirement, leaving `## Requirements` empty), its main spec deleted rather than left empty; a spec the sync deliberately kept and reported is also a match
- RENAMED requirements present under the new name and absent under the old one

If the sync failed, or any capability does not match, report what differs and stop — do not archive. Nothing has moved and `changeRoot` is intact, so the user can fix the mismatch or re-run the sync and start the archive again.

5. **Perform the archive**

Expand All @@ -76,14 +134,14 @@ Archive a completed change in the experimental workflow.
mkdir -p "<planningHome.changesDir>/archive"
```

Generate target name using current date: `YYYY-MM-DD-<change-name>`
Generate the target name: use the change name as-is when it already starts with a `YYYY-MM-DD-` prefix; otherwise prepend the current date as `YYYY-MM-DD-<change-name>`. Never stack a second date (same rule as `openspec archive`).

**Check if target already exists:**
- If yes: Fail with error, suggest renaming existing archive or using different date
- If no: Move `changeRoot` to the archive directory

```bash
mv "<changeRoot>" "<planningHome.changesDir>/archive/YYYY-MM-DD-<name>"
mv "<changeRoot>" "<planningHome.changesDir>/archive/<target-name>"
```

6. **Display summary**
Expand All @@ -97,22 +155,28 @@ Archive a completed change in the experimental workflow.

**Output On Success**

```
```markdown
## Archive Complete

**Change:** <change-name>
**Schema:** <schema-name>
**Archived to:** the archive path derived from `planningHome.changesDir`/YYYY-MM-DD-<name>/
**Specs:** ✓ Synced to main specs (or "No delta specs" or "Sync skipped")
**Archived to:** the archive path derived from `planningHome.changesDir`/<target-name>/
**Specs:** <"✓ Synced to main specs" only if the step 4 verification passed; otherwise "No delta specs" or "Sync skipped">

All artifacts complete. All tasks complete.
<"All artifacts complete. All tasks complete." — or, if archived with warnings, list them instead (e.g. "Archived with 2 incomplete tasks")>
```

**Guardrails**
- Always prompt for change selection if not provided
- Announce the selected change; prompt for selection when it is ambiguous
- Use artifact graph (openspec status --json) for completion checking
- Don't block archive on warnings - just inform and confirm
- Preserve .openspec.yaml when moving to archive (it moves with the directory)
- Show clear summary of what happened
- If sync is requested, use openspec-sync-specs approach (agent-driven)
- If sync is requested, run the `openspec-sync-specs` workflow inline (agent-driven)
- Never archive while a spec sync is still in flight — run the sync inline and verify the main specs before moving `changeRoot`
- If delta specs exist, always run the sync assessment and show the combined summary before prompting
- Apply relevant runtime context and report conflicts; operation guidance remains advisory
- Consider every guidance entry and explain any inapplicable or conflicting advice
- Existing CLI checks, resolved paths, prompts, and command contracts are unchanged
- Artifact rules constrain only the specs being written and are never operation guidance
- Never copy runtime context, operation guidance, or artifact-rule text verbatim into output files
Loading
Loading