@dynamicworks/br-openspec 1.3.1 → 2.0.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/LICENSE +22 -22
- package/README.md +210 -210
- package/README.pt-BR.md +212 -212
- package/bin/openspec.js +2 -2
- package/dist/commands/feedback.js +4 -4
- package/dist/commands/schema.js +60 -60
- package/dist/core/command-generation/adapters/amazon-q.js +5 -5
- package/dist/core/command-generation/adapters/antigravity.js +5 -5
- package/dist/core/command-generation/adapters/auggie.js +6 -6
- package/dist/core/command-generation/adapters/bob.js +6 -6
- package/dist/core/command-generation/adapters/claude.js +8 -8
- package/dist/core/command-generation/adapters/cline.js +5 -5
- package/dist/core/command-generation/adapters/codebuddy.js +7 -7
- package/dist/core/command-generation/adapters/codex.js +6 -6
- package/dist/core/command-generation/adapters/continue.js +7 -7
- package/dist/core/command-generation/adapters/costrict.js +6 -6
- package/dist/core/command-generation/adapters/crush.js +8 -8
- package/dist/core/command-generation/adapters/cursor.js +8 -8
- package/dist/core/command-generation/adapters/factory.js +6 -6
- package/dist/core/command-generation/adapters/gemini.js +5 -5
- package/dist/core/command-generation/adapters/github-copilot.js +5 -5
- package/dist/core/command-generation/adapters/iflow.js +8 -8
- package/dist/core/command-generation/adapters/junie.js +5 -5
- package/dist/core/command-generation/adapters/kilocode.js +1 -1
- package/dist/core/command-generation/adapters/kiro.js +5 -5
- package/dist/core/command-generation/adapters/lingma.js +8 -8
- package/dist/core/command-generation/adapters/opencode.js +5 -5
- package/dist/core/command-generation/adapters/pi.js +5 -5
- package/dist/core/command-generation/adapters/qoder.js +8 -8
- package/dist/core/command-generation/adapters/qwen.js +5 -5
- package/dist/core/command-generation/adapters/roocode.js +5 -5
- package/dist/core/command-generation/adapters/windsurf.js +8 -8
- package/dist/core/completions/generators/bash-generator.js +41 -41
- package/dist/core/completions/generators/fish-generator.js +7 -7
- package/dist/core/completions/generators/powershell-generator.js +29 -29
- package/dist/core/completions/generators/zsh-generator.js +33 -33
- package/dist/core/completions/templates/bash-templates.js +18 -18
- package/dist/core/completions/templates/fish-templates.js +32 -32
- package/dist/core/completions/templates/powershell-templates.js +19 -19
- package/dist/core/completions/templates/zsh-templates.js +30 -30
- package/dist/core/shared/skill-generation.js +12 -12
- package/dist/core/templates/workflows/apply-change.js +288 -288
- package/dist/core/templates/workflows/archive-change.js +251 -251
- package/dist/core/templates/workflows/bulk-archive-change.js +472 -472
- package/dist/core/templates/workflows/continue-change.js +212 -212
- package/dist/core/templates/workflows/explore.js +443 -443
- package/dist/core/templates/workflows/feedback.js +97 -97
- package/dist/core/templates/workflows/ff-change.js +178 -178
- package/dist/core/templates/workflows/propose.js +196 -196
- package/dist/core/templates/workflows/sync-specs.js +252 -252
- package/dist/core/templates/workflows/upstream-sync.js +93 -93
- package/dist/messages/index.js +977 -977
- package/package.json +82 -84
- package/schemas/spec-driven/schema.yaml +153 -153
- package/schemas/spec-driven/templates/design.md +19 -19
- package/schemas/spec-driven/templates/proposal.md +23 -23
- package/schemas/spec-driven/templates/spec.md +8 -8
- package/schemas/spec-driven/templates/tasks.md +9 -9
- package/scripts/postinstall.js +83 -83
package/scripts/postinstall.js
CHANGED
|
@@ -1,83 +1,83 @@
|
|
|
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
|
-
});
|
|
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
|
+
});
|