@fission-ai/openspec 1.9.0 → 1.11.0
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/dist/cli/index.d.ts +17 -0
- package/dist/cli/index.js +60 -9
- package/dist/commands/change.d.ts +24 -0
- package/dist/commands/change.js +223 -0
- package/dist/commands/config.js +14 -3
- package/dist/commands/feedback.js +28 -7
- package/dist/commands/schema.d.ts +5 -0
- package/dist/commands/schema.js +201 -35
- package/dist/commands/show.js +1 -1
- package/dist/commands/workflow/index.d.ts +1 -1
- package/dist/commands/workflow/index.js +1 -1
- package/dist/commands/workflow/status.d.ts +2 -0
- package/dist/commands/workflow/status.js +76 -12
- package/dist/core/archive.js +64 -7
- package/dist/core/artifact-graph/instruction-loader.js +2 -7
- package/dist/core/artifact-graph/outputs.d.ts +4 -0
- package/dist/core/artifact-graph/outputs.js +7 -0
- package/dist/core/artifact-graph/resolver.js +15 -9
- package/dist/core/available-tools.js +16 -1
- package/dist/core/command-generation/adapters/antigravity.d.ts +1 -1
- package/dist/core/command-generation/adapters/antigravity.js +2 -2
- package/dist/core/command-generation/adapters/opencode.d.ts +2 -1
- package/dist/core/command-generation/adapters/opencode.js +13 -2
- package/dist/core/completion-tip.d.ts +15 -0
- package/dist/core/completion-tip.js +133 -0
- package/dist/core/completions/command-registry.js +20 -0
- package/dist/core/completions/factory.d.ts +11 -0
- package/dist/core/completions/generators/fish-generator.d.ts +12 -0
- package/dist/core/completions/generators/fish-generator.js +79 -47
- package/dist/core/completions/installers/bash-installer.d.ts +7 -0
- package/dist/core/completions/installers/bash-installer.js +15 -0
- package/dist/core/completions/installers/fish-installer.d.ts +7 -0
- package/dist/core/completions/installers/fish-installer.js +15 -0
- package/dist/core/completions/installers/powershell-installer.d.ts +7 -0
- package/dist/core/completions/installers/powershell-installer.js +15 -0
- package/dist/core/completions/templates/fish-templates.d.ts +1 -1
- package/dist/core/completions/templates/fish-templates.js +107 -10
- package/dist/core/completions/types.d.ts +4 -0
- package/dist/core/config-prompts.js +19 -10
- package/dist/core/config-schema.d.ts +1 -0
- package/dist/core/config-schema.js +2 -0
- package/dist/core/config.js +7 -1
- package/dist/core/global-config.d.ts +2 -0
- package/dist/core/init.d.ts +5 -0
- package/dist/core/init.js +117 -14
- package/dist/core/legacy-cleanup.js +6 -0
- package/dist/core/migration.js +42 -12
- package/dist/core/parsers/requirement-blocks.d.ts +1 -0
- package/dist/core/parsers/requirement-blocks.js +2 -0
- package/dist/core/profiles.d.ts +1 -1
- package/dist/core/profiles.js +11 -2
- package/dist/core/shared/tool-detection.js +9 -3
- package/dist/core/shared-skill-target.d.ts +13 -0
- package/dist/core/shared-skill-target.js +43 -1
- package/dist/core/specs-apply.js +16 -8
- package/dist/core/templates/workflows/explore.js +79 -73
- package/dist/core/templates/workflows/feedback.js +1 -0
- package/dist/core/templates/workflows/onboard.js +4 -4
- package/dist/core/update.js +39 -26
- package/dist/core/validation/constants.d.ts +3 -0
- package/dist/core/validation/constants.js +12 -0
- package/dist/core/validation/purpose-placeholder.d.ts +45 -0
- package/dist/core/validation/purpose-placeholder.js +117 -0
- package/dist/core/validation/validator.js +16 -1
- package/dist/telemetry/index.js +3 -2
- package/dist/utils/change-metadata.js +17 -13
- package/dist/utils/change-utils.js +5 -0
- package/dist/utils/requirement-diff.d.ts +42 -0
- package/dist/utils/requirement-diff.js +61 -0
- package/package.json +4 -6
- package/schemas/spec-driven/schema.yaml +17 -7
- package/scripts/postinstall.js +0 -83
|
@@ -91,10 +91,16 @@ artifacts:
|
|
|
91
91
|
by hand. Do NOT add `## Purpose` to a delta for an existing capability -
|
|
92
92
|
that spec already has one and the delta's is ignored. To change an
|
|
93
93
|
existing capability's Purpose - including a leftover `TBD` placeholder -
|
|
94
|
-
edit
|
|
94
|
+
edit `<planningHome.root>/openspec/specs/<capability-path>/spec.md`
|
|
95
|
+
directly. `planningHome.root` comes from the `openspec instructions ...
|
|
96
|
+
--json` response. Always use it rather than a repo-relative path: it
|
|
97
|
+
resolves to the store whenever the change lives in one - whether that
|
|
98
|
+
came from `--store`, a project `store:` pointer, or a global default
|
|
99
|
+
store - and to the current repository otherwise. Do not try to work out
|
|
100
|
+
which case applies; the field already has.
|
|
95
101
|
|
|
96
102
|
MODIFIED requirements workflow:
|
|
97
|
-
1. Locate the existing requirement in openspec/specs/<capability-path>/spec.md
|
|
103
|
+
1. Locate the existing requirement in `<planningHome.root>/openspec/specs/<capability-path>/spec.md` (the same store-aware root as above)
|
|
98
104
|
2. Copy the ENTIRE requirement block (from `### Requirement:` through all scenarios)
|
|
99
105
|
3. Paste under `## MODIFIED Requirements` and edit to reflect new behavior
|
|
100
106
|
4. Ensure header text matches exactly (whitespace-insensitive)
|
|
@@ -182,22 +188,26 @@ artifacts:
|
|
|
182
188
|
- Each task MUST be a checkbox: `- [ ] X.Y Task description`
|
|
183
189
|
- Tasks should be small enough to complete in one session
|
|
184
190
|
- Order tasks by dependency (what must be done first?)
|
|
191
|
+
- Each task MUST state how to verify completion (a test, command,
|
|
192
|
+
observable behavior, or delivered artifact). Put the verification in
|
|
193
|
+
that task's checkbox description. Use a separate verification task only
|
|
194
|
+
when it checks broader integration or system behavior that spans
|
|
195
|
+
multiple implementation tasks.
|
|
185
196
|
|
|
186
197
|
Example:
|
|
187
198
|
```
|
|
188
199
|
## 1. Setup
|
|
189
200
|
|
|
190
|
-
- [ ] 1.1 Create new module structure
|
|
191
|
-
- [ ] 1.2 Add dependencies to package.json
|
|
201
|
+
- [ ] 1.1 Create new module structure and verify expected files are present
|
|
202
|
+
- [ ] 1.2 Add dependencies to package.json and verify package installation succeeds
|
|
192
203
|
|
|
193
204
|
## 2. Core Implementation
|
|
194
205
|
|
|
195
|
-
- [ ] 2.1 Implement data export function
|
|
196
|
-
- [ ] 2.2 Add CSV formatting utilities
|
|
206
|
+
- [ ] 2.1 Implement data export function and verify the export test passes
|
|
207
|
+
- [ ] 2.2 Add CSV formatting utilities and verify unit tests cover quoting and delimiters
|
|
197
208
|
```
|
|
198
209
|
|
|
199
210
|
Reference specs for what needs to be built, design for how to build it.
|
|
200
|
-
Each task should be verifiable - you know when it's done.
|
|
201
211
|
requires:
|
|
202
212
|
- specs
|
|
203
213
|
- design
|
package/scripts/postinstall.js
DELETED
|
@@ -1,83 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Postinstall script that hints about shell completions
|
|
5
|
-
*
|
|
6
|
-
* Completion installation is opt-in: the user must run
|
|
7
|
-
* `openspec completion install` explicitly. This script only
|
|
8
|
-
* prints a one-line tip after npm install.
|
|
9
|
-
*
|
|
10
|
-
* The tip is suppressed when:
|
|
11
|
-
* - CI=true environment variable is set
|
|
12
|
-
* - OPENSPEC_NO_COMPLETIONS=1 environment variable is set
|
|
13
|
-
* - dist/ directory doesn't exist (dev setup scenario)
|
|
14
|
-
*
|
|
15
|
-
* The script never fails npm install - all errors are caught and handled gracefully.
|
|
16
|
-
*/
|
|
17
|
-
|
|
18
|
-
import { promises as fs } from 'fs';
|
|
19
|
-
import path from 'path';
|
|
20
|
-
import { fileURLToPath } from 'url';
|
|
21
|
-
|
|
22
|
-
const __filename = fileURLToPath(import.meta.url);
|
|
23
|
-
const __dirname = path.dirname(__filename);
|
|
24
|
-
|
|
25
|
-
/**
|
|
26
|
-
* Check if we should skip installation
|
|
27
|
-
*/
|
|
28
|
-
function shouldSkipInstallation() {
|
|
29
|
-
// Skip in CI environments
|
|
30
|
-
if (process.env.CI === 'true' || process.env.CI === '1') {
|
|
31
|
-
return { skip: true, reason: 'CI environment detected' };
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
// Skip if user opted out
|
|
35
|
-
if (process.env.OPENSPEC_NO_COMPLETIONS === '1') {
|
|
36
|
-
return { skip: true, reason: 'OPENSPEC_NO_COMPLETIONS=1 set' };
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
return { skip: false };
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
/**
|
|
43
|
-
* Check if dist/ directory exists
|
|
44
|
-
*/
|
|
45
|
-
async function distExists() {
|
|
46
|
-
const distPath = path.join(__dirname, '..', 'dist');
|
|
47
|
-
try {
|
|
48
|
-
const stat = await fs.stat(distPath);
|
|
49
|
-
return stat.isDirectory();
|
|
50
|
-
} catch {
|
|
51
|
-
return false;
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
/**
|
|
56
|
-
* Main function
|
|
57
|
-
*/
|
|
58
|
-
async function main() {
|
|
59
|
-
try {
|
|
60
|
-
// Check if we should skip
|
|
61
|
-
const skipCheck = shouldSkipInstallation();
|
|
62
|
-
if (skipCheck.skip) {
|
|
63
|
-
// Silent skip - no output
|
|
64
|
-
return;
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
// Check if dist/ exists (skip silently if not - expected during dev setup)
|
|
68
|
-
if (!(await distExists())) {
|
|
69
|
-
return;
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
// Completions are opt-in — just print a hint
|
|
73
|
-
console.log(`\nTip: Run 'openspec completion install' for shell completions`);
|
|
74
|
-
} catch (error) {
|
|
75
|
-
// Fail gracefully - never break npm install
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
// Run main and handle any unhandled errors
|
|
80
|
-
main().catch(() => {
|
|
81
|
-
// Silent failure - never break npm install
|
|
82
|
-
process.exit(0);
|
|
83
|
-
});
|