@synth-coder/memhub 0.2.4 → 0.2.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.eslintrc.cjs +45 -45
- package/.factory/commands/opsx-apply.md +150 -150
- package/.factory/commands/opsx-archive.md +155 -155
- package/.factory/commands/opsx-explore.md +171 -171
- package/.factory/commands/opsx-propose.md +104 -104
- package/.factory/skills/openspec-apply-change/SKILL.md +156 -156
- package/.factory/skills/openspec-archive-change/SKILL.md +114 -114
- package/.factory/skills/openspec-explore/SKILL.md +288 -288
- package/.factory/skills/openspec-propose/SKILL.md +110 -110
- package/.github/workflows/ci.yml +110 -110
- package/.github/workflows/release.yml +3 -0
- package/.iflow/commands/opsx-apply.md +152 -152
- package/.iflow/commands/opsx-archive.md +157 -157
- package/.iflow/commands/opsx-explore.md +173 -173
- package/.iflow/commands/opsx-propose.md +106 -106
- package/.iflow/skills/openspec-apply-change/SKILL.md +156 -156
- package/.iflow/skills/openspec-archive-change/SKILL.md +114 -114
- package/.iflow/skills/openspec-explore/SKILL.md +288 -288
- package/.iflow/skills/openspec-propose/SKILL.md +110 -110
- package/.prettierrc +11 -11
- package/AGENTS.md +167 -167
- package/README.md +17 -9
- package/README.zh-CN.md +246 -238
- package/dist/src/cli/agents/index.d.ts +0 -1
- package/dist/src/cli/agents/index.d.ts.map +1 -1
- package/dist/src/cli/agents/index.js +0 -3
- package/dist/src/cli/agents/index.js.map +1 -1
- package/dist/src/cli/index.js +0 -0
- package/dist/src/cli/init.d.ts.map +1 -1
- package/dist/src/cli/init.js +4 -24
- package/dist/src/cli/init.js.map +1 -1
- package/dist/src/cli/types.d.ts +2 -2
- package/dist/src/cli/types.d.ts.map +1 -1
- package/dist/src/cli/types.js +0 -11
- package/dist/src/cli/types.js.map +1 -1
- package/docs/user-guide.md +8 -6
- package/package.json +16 -16
- package/src/cli/agents/claude-code.ts +1 -1
- package/src/cli/agents/cline.ts +1 -1
- package/src/cli/agents/codex.ts +2 -2
- package/src/cli/agents/cursor.ts +1 -1
- package/src/cli/agents/factory-droid.ts +1 -1
- package/src/cli/agents/gemini-cli.ts +1 -1
- package/src/cli/agents/windsurf.ts +1 -1
- package/src/cli/init.ts +14 -14
- package/test/cli/init.test.ts +23 -1
- package/tsconfig.json +25 -25
- package/tsconfig.test.json +8 -8
- package/vitest.config.ts +29 -29
- package/dist/src/cli/agents/codex.d.ts +0 -5
- package/dist/src/cli/agents/codex.d.ts.map +0 -1
- package/dist/src/cli/agents/codex.js +0 -14
- package/dist/src/cli/agents/codex.js.map +0 -1
|
@@ -1,114 +1,114 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: openspec-archive-change
|
|
3
|
-
description: Archive a completed change in the experimental workflow. Use when the user wants to finalize and archive a change after implementation is complete.
|
|
4
|
-
license: MIT
|
|
5
|
-
compatibility: Requires openspec CLI.
|
|
6
|
-
metadata:
|
|
7
|
-
author: openspec
|
|
8
|
-
version: "1.0"
|
|
9
|
-
generatedBy: "1.2.0"
|
|
10
|
-
---
|
|
11
|
-
|
|
12
|
-
Archive a completed change in the experimental workflow.
|
|
13
|
-
|
|
14
|
-
**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.
|
|
15
|
-
|
|
16
|
-
**Steps**
|
|
17
|
-
|
|
18
|
-
1. **If no change name provided, prompt for selection**
|
|
19
|
-
|
|
20
|
-
Run `openspec list --json` to get available changes. Use the **AskUserQuestion tool** to let the user select.
|
|
21
|
-
|
|
22
|
-
Show only active changes (not already archived).
|
|
23
|
-
Include the schema used for each change if available.
|
|
24
|
-
|
|
25
|
-
**IMPORTANT**: Do NOT guess or auto-select a change. Always let the user choose.
|
|
26
|
-
|
|
27
|
-
2. **Check artifact completion status**
|
|
28
|
-
|
|
29
|
-
Run `openspec status --change "<name>" --json` to check artifact completion.
|
|
30
|
-
|
|
31
|
-
Parse the JSON to understand:
|
|
32
|
-
- `schemaName`: The workflow being used
|
|
33
|
-
- `artifacts`: List of artifacts with their status (`done` or other)
|
|
34
|
-
|
|
35
|
-
**If any artifacts are not `done`:**
|
|
36
|
-
- Display warning listing incomplete artifacts
|
|
37
|
-
- Use **AskUserQuestion tool** to confirm user wants to proceed
|
|
38
|
-
- Proceed if user confirms
|
|
39
|
-
|
|
40
|
-
3. **Check task completion status**
|
|
41
|
-
|
|
42
|
-
Read the tasks file (typically `tasks.md`) to check for incomplete tasks.
|
|
43
|
-
|
|
44
|
-
Count tasks marked with `- [ ]` (incomplete) vs `- [x]` (complete).
|
|
45
|
-
|
|
46
|
-
**If incomplete tasks found:**
|
|
47
|
-
- Display warning showing count of incomplete tasks
|
|
48
|
-
- Use **AskUserQuestion tool** to confirm user wants to proceed
|
|
49
|
-
- Proceed if user confirms
|
|
50
|
-
|
|
51
|
-
**If no tasks file exists:** Proceed without task-related warning.
|
|
52
|
-
|
|
53
|
-
4. **Assess delta spec sync state**
|
|
54
|
-
|
|
55
|
-
Check for delta specs at `openspec/changes/<name>/specs/`. If none exist, proceed without sync prompt.
|
|
56
|
-
|
|
57
|
-
**If delta specs exist:**
|
|
58
|
-
- Compare each delta spec with its corresponding main spec at `openspec/specs/<capability>/spec.md`
|
|
59
|
-
- Determine what changes would be applied (adds, modifications, removals, renames)
|
|
60
|
-
- Show a combined summary before prompting
|
|
61
|
-
|
|
62
|
-
**Prompt options:**
|
|
63
|
-
- If changes needed: "Sync now (recommended)", "Archive without syncing"
|
|
64
|
-
- If already synced: "Archive now", "Sync anyway", "Cancel"
|
|
65
|
-
|
|
66
|
-
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.
|
|
67
|
-
|
|
68
|
-
5. **Perform the archive**
|
|
69
|
-
|
|
70
|
-
Create the archive directory if it doesn't exist:
|
|
71
|
-
```bash
|
|
72
|
-
mkdir -p openspec/changes/archive
|
|
73
|
-
```
|
|
74
|
-
|
|
75
|
-
Generate target name using current date: `YYYY-MM-DD-<change-name>`
|
|
76
|
-
|
|
77
|
-
**Check if target already exists:**
|
|
78
|
-
- If yes: Fail with error, suggest renaming existing archive or using different date
|
|
79
|
-
- If no: Move the change directory to archive
|
|
80
|
-
|
|
81
|
-
```bash
|
|
82
|
-
mv openspec/changes/<name> openspec/changes/archive/YYYY-MM-DD-<name>
|
|
83
|
-
```
|
|
84
|
-
|
|
85
|
-
6. **Display summary**
|
|
86
|
-
|
|
87
|
-
Show archive completion summary including:
|
|
88
|
-
- Change name
|
|
89
|
-
- Schema that was used
|
|
90
|
-
- Archive location
|
|
91
|
-
- Whether specs were synced (if applicable)
|
|
92
|
-
- Note about any warnings (incomplete artifacts/tasks)
|
|
93
|
-
|
|
94
|
-
**Output On Success**
|
|
95
|
-
|
|
96
|
-
```
|
|
97
|
-
## Archive Complete
|
|
98
|
-
|
|
99
|
-
**Change:** <change-name>
|
|
100
|
-
**Schema:** <schema-name>
|
|
101
|
-
**Archived to:** openspec/changes/archive/YYYY-MM-DD-<name>/
|
|
102
|
-
**Specs:** ✓ Synced to main specs (or "No delta specs" or "Sync skipped")
|
|
103
|
-
|
|
104
|
-
All artifacts complete. All tasks complete.
|
|
105
|
-
```
|
|
106
|
-
|
|
107
|
-
**Guardrails**
|
|
108
|
-
- Always prompt for change selection if not provided
|
|
109
|
-
- Use artifact graph (openspec status --json) for completion checking
|
|
110
|
-
- Don't block archive on warnings - just inform and confirm
|
|
111
|
-
- Preserve .openspec.yaml when moving to archive (it moves with the directory)
|
|
112
|
-
- Show clear summary of what happened
|
|
113
|
-
- If sync is requested, use openspec-sync-specs approach (agent-driven)
|
|
114
|
-
- If delta specs exist, always run the sync assessment and show the combined summary before prompting
|
|
1
|
+
---
|
|
2
|
+
name: openspec-archive-change
|
|
3
|
+
description: Archive a completed change in the experimental workflow. Use when the user wants to finalize and archive a change after implementation is complete.
|
|
4
|
+
license: MIT
|
|
5
|
+
compatibility: Requires openspec CLI.
|
|
6
|
+
metadata:
|
|
7
|
+
author: openspec
|
|
8
|
+
version: "1.0"
|
|
9
|
+
generatedBy: "1.2.0"
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
Archive a completed change in the experimental workflow.
|
|
13
|
+
|
|
14
|
+
**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.
|
|
15
|
+
|
|
16
|
+
**Steps**
|
|
17
|
+
|
|
18
|
+
1. **If no change name provided, prompt for selection**
|
|
19
|
+
|
|
20
|
+
Run `openspec list --json` to get available changes. Use the **AskUserQuestion tool** to let the user select.
|
|
21
|
+
|
|
22
|
+
Show only active changes (not already archived).
|
|
23
|
+
Include the schema used for each change if available.
|
|
24
|
+
|
|
25
|
+
**IMPORTANT**: Do NOT guess or auto-select a change. Always let the user choose.
|
|
26
|
+
|
|
27
|
+
2. **Check artifact completion status**
|
|
28
|
+
|
|
29
|
+
Run `openspec status --change "<name>" --json` to check artifact completion.
|
|
30
|
+
|
|
31
|
+
Parse the JSON to understand:
|
|
32
|
+
- `schemaName`: The workflow being used
|
|
33
|
+
- `artifacts`: List of artifacts with their status (`done` or other)
|
|
34
|
+
|
|
35
|
+
**If any artifacts are not `done`:**
|
|
36
|
+
- Display warning listing incomplete artifacts
|
|
37
|
+
- Use **AskUserQuestion tool** to confirm user wants to proceed
|
|
38
|
+
- Proceed if user confirms
|
|
39
|
+
|
|
40
|
+
3. **Check task completion status**
|
|
41
|
+
|
|
42
|
+
Read the tasks file (typically `tasks.md`) to check for incomplete tasks.
|
|
43
|
+
|
|
44
|
+
Count tasks marked with `- [ ]` (incomplete) vs `- [x]` (complete).
|
|
45
|
+
|
|
46
|
+
**If incomplete tasks found:**
|
|
47
|
+
- Display warning showing count of incomplete tasks
|
|
48
|
+
- Use **AskUserQuestion tool** to confirm user wants to proceed
|
|
49
|
+
- Proceed if user confirms
|
|
50
|
+
|
|
51
|
+
**If no tasks file exists:** Proceed without task-related warning.
|
|
52
|
+
|
|
53
|
+
4. **Assess delta spec sync state**
|
|
54
|
+
|
|
55
|
+
Check for delta specs at `openspec/changes/<name>/specs/`. If none exist, proceed without sync prompt.
|
|
56
|
+
|
|
57
|
+
**If delta specs exist:**
|
|
58
|
+
- Compare each delta spec with its corresponding main spec at `openspec/specs/<capability>/spec.md`
|
|
59
|
+
- Determine what changes would be applied (adds, modifications, removals, renames)
|
|
60
|
+
- Show a combined summary before prompting
|
|
61
|
+
|
|
62
|
+
**Prompt options:**
|
|
63
|
+
- If changes needed: "Sync now (recommended)", "Archive without syncing"
|
|
64
|
+
- If already synced: "Archive now", "Sync anyway", "Cancel"
|
|
65
|
+
|
|
66
|
+
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.
|
|
67
|
+
|
|
68
|
+
5. **Perform the archive**
|
|
69
|
+
|
|
70
|
+
Create the archive directory if it doesn't exist:
|
|
71
|
+
```bash
|
|
72
|
+
mkdir -p openspec/changes/archive
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
Generate target name using current date: `YYYY-MM-DD-<change-name>`
|
|
76
|
+
|
|
77
|
+
**Check if target already exists:**
|
|
78
|
+
- If yes: Fail with error, suggest renaming existing archive or using different date
|
|
79
|
+
- If no: Move the change directory to archive
|
|
80
|
+
|
|
81
|
+
```bash
|
|
82
|
+
mv openspec/changes/<name> openspec/changes/archive/YYYY-MM-DD-<name>
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
6. **Display summary**
|
|
86
|
+
|
|
87
|
+
Show archive completion summary including:
|
|
88
|
+
- Change name
|
|
89
|
+
- Schema that was used
|
|
90
|
+
- Archive location
|
|
91
|
+
- Whether specs were synced (if applicable)
|
|
92
|
+
- Note about any warnings (incomplete artifacts/tasks)
|
|
93
|
+
|
|
94
|
+
**Output On Success**
|
|
95
|
+
|
|
96
|
+
```
|
|
97
|
+
## Archive Complete
|
|
98
|
+
|
|
99
|
+
**Change:** <change-name>
|
|
100
|
+
**Schema:** <schema-name>
|
|
101
|
+
**Archived to:** openspec/changes/archive/YYYY-MM-DD-<name>/
|
|
102
|
+
**Specs:** ✓ Synced to main specs (or "No delta specs" or "Sync skipped")
|
|
103
|
+
|
|
104
|
+
All artifacts complete. All tasks complete.
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
**Guardrails**
|
|
108
|
+
- Always prompt for change selection if not provided
|
|
109
|
+
- Use artifact graph (openspec status --json) for completion checking
|
|
110
|
+
- Don't block archive on warnings - just inform and confirm
|
|
111
|
+
- Preserve .openspec.yaml when moving to archive (it moves with the directory)
|
|
112
|
+
- Show clear summary of what happened
|
|
113
|
+
- If sync is requested, use openspec-sync-specs approach (agent-driven)
|
|
114
|
+
- If delta specs exist, always run the sync assessment and show the combined summary before prompting
|