@clawplays/ospec-cli 0.3.8 → 0.3.9
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/README.md +9 -1
- package/SKILL.md +1 -1
- package/assets/git-hooks/post-merge +4 -2
- package/assets/git-hooks/pre-commit +4 -2
- package/dist/advanced/BatchOperations.d.ts +1 -2
- package/dist/advanced/BatchOperations.js +1 -2
- package/dist/advanced/CachingLayer.d.ts +1 -2
- package/dist/advanced/CachingLayer.js +1 -2
- package/dist/advanced/FeatureUpdater.d.ts +1 -2
- package/dist/advanced/FeatureUpdater.js +1 -2
- package/dist/advanced/PerformanceMonitor.d.ts +1 -2
- package/dist/advanced/PerformanceMonitor.js +1 -2
- package/dist/advanced/StatePersistence.d.ts +1 -2
- package/dist/advanced/StatePersistence.js +1 -2
- package/dist/advanced/index.d.ts +1 -2
- package/dist/advanced/index.js +1 -2
- package/dist/cli/commands/config.d.ts +1 -2
- package/dist/cli/commands/config.js +1 -2
- package/dist/cli/commands/feature.d.ts +1 -2
- package/dist/cli/commands/feature.js +1 -2
- package/dist/cli/commands/index.d.ts +1 -2
- package/dist/cli/commands/index.js +1 -2
- package/dist/cli/commands/project.d.ts +1 -2
- package/dist/cli/commands/project.js +1 -2
- package/dist/cli/commands/validate.d.ts +1 -2
- package/dist/cli/commands/validate.js +1 -2
- package/dist/cli/index.d.ts +1 -2
- package/dist/cli/index.js +1 -2
- package/dist/cli.d.ts +1 -2
- package/dist/cli.js +1 -2
- package/dist/commands/ArchiveCommand.d.ts +1 -2
- package/dist/commands/ArchiveCommand.js +0 -1
- package/dist/commands/BaseCommand.d.ts +1 -2
- package/dist/commands/BaseCommand.js +1 -2
- package/dist/commands/BatchCommand.d.ts +1 -2
- package/dist/commands/BatchCommand.js +1 -2
- package/dist/commands/ChangesCommand.js +0 -1
- package/dist/commands/DocsCommand.d.ts +1 -2
- package/dist/commands/DocsCommand.js +0 -1
- package/dist/commands/IndexCommand.d.ts +1 -2
- package/dist/commands/IndexCommand.js +1 -2
- package/dist/commands/InitCommand.d.ts +1 -2
- package/dist/commands/InitCommand.js +0 -1
- package/dist/commands/NewCommand.d.ts +0 -1
- package/dist/commands/NewCommand.js +0 -1
- package/dist/commands/PluginsCommand.d.ts +0 -1
- package/dist/commands/PluginsCommand.js +0 -1
- package/dist/commands/ProgressCommand.d.ts +1 -2
- package/dist/commands/ProgressCommand.js +1 -2
- package/dist/commands/QueueCommand.d.ts +0 -1
- package/dist/commands/QueueCommand.js +0 -1
- package/dist/commands/RunCommand.d.ts +0 -1
- package/dist/commands/RunCommand.js +0 -1
- package/dist/commands/SkillCommand.d.ts +0 -1
- package/dist/commands/SkillCommand.js +1 -2
- package/dist/commands/SkillsCommand.d.ts +1 -2
- package/dist/commands/SkillsCommand.js +1 -2
- package/dist/commands/StatusCommand.d.ts +1 -2
- package/dist/commands/StatusCommand.js +0 -1
- package/dist/commands/UpdateCommand.d.ts +0 -1
- package/dist/commands/UpdateCommand.js +37 -2
- package/dist/commands/VerifyCommand.d.ts +1 -2
- package/dist/commands/VerifyCommand.js +0 -1
- package/dist/commands/WorkflowCommand.d.ts +0 -1
- package/dist/commands/WorkflowCommand.js +0 -1
- package/dist/commands/index.d.ts +0 -1
- package/dist/commands/index.js +0 -1
- package/dist/core/constants.d.ts +1 -2
- package/dist/core/constants.js +1 -2
- package/dist/core/errors.d.ts +1 -2
- package/dist/core/errors.js +1 -2
- package/dist/core/index.d.ts +1 -2
- package/dist/core/index.js +1 -2
- package/dist/core/types.d.ts +0 -1
- package/dist/core/types.js +1 -2
- package/dist/index.d.ts +1 -2
- package/dist/index.js +1 -2
- package/dist/presets/ProjectPresets.d.ts +0 -1
- package/dist/presets/ProjectPresets.js +0 -1
- package/dist/scaffolds/ProjectScaffoldPresets.d.ts +1 -2
- package/dist/scaffolds/ProjectScaffoldPresets.js +1 -2
- package/dist/services/ConfigManager.d.ts +1 -2
- package/dist/services/ConfigManager.js +0 -1
- package/dist/services/FeatureManager.d.ts +1 -2
- package/dist/services/FeatureManager.js +1 -2
- package/dist/services/FileService.d.ts +1 -2
- package/dist/services/FileService.js +0 -1
- package/dist/services/IndexBuilder.d.ts +1 -2
- package/dist/services/IndexBuilder.js +1 -2
- package/dist/services/Logger.d.ts +1 -2
- package/dist/services/Logger.js +1 -2
- package/dist/services/ProjectAssetRegistry.d.ts +0 -1
- package/dist/services/ProjectAssetRegistry.js +1 -2
- package/dist/services/ProjectAssetService.d.ts +0 -1
- package/dist/services/ProjectAssetService.js +4 -2
- package/dist/services/ProjectScaffoldCommandService.d.ts +1 -2
- package/dist/services/ProjectScaffoldCommandService.js +0 -1
- package/dist/services/ProjectScaffoldService.d.ts +1 -2
- package/dist/services/ProjectScaffoldService.js +0 -1
- package/dist/services/ProjectService.d.ts +0 -1
- package/dist/services/ProjectService.js +10 -5
- package/dist/services/QueueService.d.ts +0 -1
- package/dist/services/QueueService.js +0 -1
- package/dist/services/RunService.d.ts +0 -1
- package/dist/services/RunService.js +0 -1
- package/dist/services/SkillParser.d.ts +1 -2
- package/dist/services/SkillParser.js +0 -1
- package/dist/services/StateManager.d.ts +0 -1
- package/dist/services/StateManager.js +0 -1
- package/dist/services/TemplateEngine.d.ts +1 -2
- package/dist/services/TemplateEngine.js +1 -2
- package/dist/services/TemplateGenerator.d.ts +1 -2
- package/dist/services/TemplateGenerator.js +0 -1
- package/dist/services/ValidationService.d.ts +1 -2
- package/dist/services/ValidationService.js +1 -2
- package/dist/services/Validator.d.ts +1 -2
- package/dist/services/Validator.js +1 -2
- package/dist/services/index.d.ts +0 -1
- package/dist/services/index.js +0 -1
- package/dist/services/templates/ExecutionTemplateBuilder.d.ts +1 -2
- package/dist/services/templates/ExecutionTemplateBuilder.js +0 -1
- package/dist/services/templates/ProjectTemplateBuilder.d.ts +1 -2
- package/dist/services/templates/ProjectTemplateBuilder.js +0 -1
- package/dist/services/templates/TemplateBuilderBase.d.ts +0 -1
- package/dist/services/templates/TemplateBuilderBase.js +0 -1
- package/dist/services/templates/TemplateInputFactory.d.ts +1 -2
- package/dist/services/templates/TemplateInputFactory.js +0 -1
- package/dist/services/templates/templateTypes.d.ts +0 -1
- package/dist/services/templates/templateTypes.js +1 -2
- package/dist/tools/build-index.js +1 -1
- package/dist/utils/DateUtils.d.ts +1 -2
- package/dist/utils/DateUtils.js +1 -2
- package/dist/utils/PathUtils.d.ts +0 -1
- package/dist/utils/PathUtils.js +0 -1
- package/dist/utils/StringUtils.d.ts +1 -2
- package/dist/utils/StringUtils.js +1 -2
- package/dist/utils/helpers.d.ts +0 -1
- package/dist/utils/helpers.js +0 -1
- package/dist/utils/index.d.ts +1 -2
- package/dist/utils/index.js +1 -2
- package/dist/utils/logger.d.ts +1 -2
- package/dist/utils/logger.js +1 -2
- package/dist/utils/path.d.ts +1 -2
- package/dist/utils/path.js +1 -2
- package/dist/utils/subcommandHelp.d.ts +0 -1
- package/dist/utils/subcommandHelp.js +0 -1
- package/dist/workflow/ArchiveGate.d.ts +1 -2
- package/dist/workflow/ArchiveGate.js +1 -2
- package/dist/workflow/ConfigurableWorkflow.d.ts +1 -2
- package/dist/workflow/ConfigurableWorkflow.js +1 -2
- package/dist/workflow/HookSystem.d.ts +1 -2
- package/dist/workflow/HookSystem.js +1 -2
- package/dist/workflow/IndexRegenerator.d.ts +1 -2
- package/dist/workflow/IndexRegenerator.js +1 -2
- package/dist/workflow/PluginWorkflowComposer.d.ts +0 -1
- package/dist/workflow/PluginWorkflowComposer.js +0 -1
- package/dist/workflow/SkillUpdateEngine.d.ts +1 -2
- package/dist/workflow/SkillUpdateEngine.js +1 -2
- package/dist/workflow/VerificationSystem.d.ts +1 -2
- package/dist/workflow/VerificationSystem.js +1 -2
- package/dist/workflow/WorkflowEngine.d.ts +1 -2
- package/dist/workflow/WorkflowEngine.js +1 -2
- package/dist/workflow/index.d.ts +0 -1
- package/dist/workflow/index.js +0 -1
- package/package.json +13 -8
- package/skill.yaml +2 -2
package/README.md
CHANGED
|
@@ -21,7 +21,9 @@
|
|
|
21
21
|
<a href="docs/README.ar.md">العربية</a>
|
|
22
22
|
</p>
|
|
23
23
|
|
|
24
|
-
OSpec is
|
|
24
|
+
The official OSpec CLI package is `@clawplays/ospec-cli`, and the official command is `ospec`. OSpec supports spec-driven development (SDD) and document-driven development for AI coding agents and CLI workflows.
|
|
25
|
+
|
|
26
|
+
OSpec.ai is the official project site. `OSpec`, `ospec`, `ospec.ai`, `ospec ai`, `ospecai`, and `ospec-ai` all point to the same official project and CLI.
|
|
25
27
|
|
|
26
28
|
<p align="center">
|
|
27
29
|
<a href="docs/prompt-guide.md">Prompt Guide</a> |
|
|
@@ -46,6 +48,10 @@ AI coding assistants are powerful, but requirements that live only in chat histo
|
|
|
46
48
|
npm install -g @clawplays/ospec-cli
|
|
47
49
|
```
|
|
48
50
|
|
|
51
|
+
Official package: `@clawplays/ospec-cli`
|
|
52
|
+
Command: `ospec`
|
|
53
|
+
Verify install: `ospec --help`
|
|
54
|
+
|
|
49
55
|
## Quick Start
|
|
50
56
|
|
|
51
57
|
OSpec only takes 3 steps:
|
|
@@ -160,6 +166,8 @@ For an existing OSpec project, after upgrading the CLI with npm, run this in the
|
|
|
160
166
|
ospec update
|
|
161
167
|
```
|
|
162
168
|
|
|
169
|
+
`ospec update` also migrates legacy root-level `build-index-auto.cjs` / `build-index-auto.js` tooling into `.ospec/tools/build-index-auto.cjs` and refreshes OSpec-managed hook entrypoints to use the new location.
|
|
170
|
+
|
|
163
171
|
## How The OSpec Workflow Works
|
|
164
172
|
|
|
165
173
|
```text
|
package/SKILL.md
CHANGED
|
@@ -53,7 +53,7 @@ Required checks after `ospec init`:
|
|
|
53
53
|
- `changes/archived/`
|
|
54
54
|
- `SKILL.md`
|
|
55
55
|
- `SKILL.index.json`
|
|
56
|
-
-
|
|
56
|
+
- `.ospec/tools/build-index-auto.cjs`
|
|
57
57
|
- `for-ai/ai-guide.md`
|
|
58
58
|
- `for-ai/execution-protocol.md`
|
|
59
59
|
- `for-ai/naming-conventions.md`
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
#!/bin/sh
|
|
2
2
|
|
|
3
|
-
if [ -f "build-index-auto.cjs" ]; then
|
|
3
|
+
if [ -f ".ospec/tools/build-index-auto.cjs" ]; then
|
|
4
|
+
OSPEC_BUILD_INDEX_SCRIPT=".ospec/tools/build-index-auto.cjs"
|
|
5
|
+
elif [ -f "build-index-auto.cjs" ]; then
|
|
4
6
|
OSPEC_BUILD_INDEX_SCRIPT="build-index-auto.cjs"
|
|
5
7
|
elif [ -f "build-index-auto.js" ]; then
|
|
6
8
|
OSPEC_BUILD_INDEX_SCRIPT="build-index-auto.js"
|
|
7
9
|
else
|
|
8
|
-
echo "[ospec] build-index-auto.cjs not found, skip hook check"
|
|
10
|
+
echo "[ospec] .ospec/tools/build-index-auto.cjs not found, skip hook check"
|
|
9
11
|
exit 0
|
|
10
12
|
fi
|
|
11
13
|
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
#!/bin/sh
|
|
2
2
|
|
|
3
|
-
if [ -f "build-index-auto.cjs" ]; then
|
|
3
|
+
if [ -f ".ospec/tools/build-index-auto.cjs" ]; then
|
|
4
|
+
OSPEC_BUILD_INDEX_SCRIPT=".ospec/tools/build-index-auto.cjs"
|
|
5
|
+
elif [ -f "build-index-auto.cjs" ]; then
|
|
4
6
|
OSPEC_BUILD_INDEX_SCRIPT="build-index-auto.cjs"
|
|
5
7
|
elif [ -f "build-index-auto.js" ]; then
|
|
6
8
|
OSPEC_BUILD_INDEX_SCRIPT="build-index-auto.js"
|
|
7
9
|
else
|
|
8
|
-
echo "[ospec] build-index-auto.cjs not found, skip hook check"
|
|
10
|
+
echo "[ospec] .ospec/tools/build-index-auto.cjs not found, skip hook check"
|
|
9
11
|
exit 0
|
|
10
12
|
fi
|
|
11
13
|
|
package/dist/advanced/index.d.ts
CHANGED
|
@@ -10,5 +10,4 @@ export type { BatchOperationResult, BatchQuery } from './BatchOperations';
|
|
|
10
10
|
export { PerformanceMonitor, performanceMonitor } from './PerformanceMonitor';
|
|
11
11
|
export type { PerformanceMetric, PerformanceSummary } from './PerformanceMonitor';
|
|
12
12
|
export { CachingLayer, cachingLayer } from './CachingLayer';
|
|
13
|
-
export type { CacheEntry } from './CachingLayer';
|
|
14
|
-
//# sourceMappingURL=index.d.ts.map
|
|
13
|
+
export type { CacheEntry } from './CachingLayer';
|
package/dist/advanced/index.js
CHANGED
|
@@ -18,5 +18,4 @@ Object.defineProperty(exports, "PerformanceMonitor", { enumerable: true, get: fu
|
|
|
18
18
|
Object.defineProperty(exports, "performanceMonitor", { enumerable: true, get: function () { return PerformanceMonitor_1.performanceMonitor; } });
|
|
19
19
|
var CachingLayer_1 = require("./CachingLayer");
|
|
20
20
|
Object.defineProperty(exports, "CachingLayer", { enumerable: true, get: function () { return CachingLayer_1.CachingLayer; } });
|
|
21
|
-
Object.defineProperty(exports, "cachingLayer", { enumerable: true, get: function () { return CachingLayer_1.cachingLayer; } });
|
|
22
|
-
//# sourceMappingURL=index.js.map
|
|
21
|
+
Object.defineProperty(exports, "cachingLayer", { enumerable: true, get: function () { return CachingLayer_1.cachingLayer; } });
|
package/dist/cli/index.d.ts
CHANGED
package/dist/cli/index.js
CHANGED
package/dist/cli.d.ts
CHANGED
package/dist/cli.js
CHANGED
|
@@ -224,7 +224,7 @@ const services_1 = require("./services");
|
|
|
224
224
|
|
|
225
225
|
|
|
226
226
|
|
|
227
|
-
const CLI_VERSION = '0.3.
|
|
227
|
+
const CLI_VERSION = '0.3.9';
|
|
228
228
|
|
|
229
229
|
function showInitUsage() {
|
|
230
230
|
console.log('Usage: ospec init [root-dir] [--summary "..."] [--tech-stack node,react] [--architecture "..."] [--document-language en-US|zh-CN|ja-JP|ar]');
|
|
@@ -1100,4 +1100,3 @@ main().catch(error => {
|
|
|
1100
1100
|
|
|
1101
1101
|
|
|
1102
1102
|
|
|
1103
|
-
//# sourceMappingURL=cli.js.map
|
|
@@ -50,7 +50,7 @@ Use this action when the user intent is initialization.
|
|
|
50
50
|
|
|
51
51
|
- use \`ospec init [path]\` so the repository ends in change-ready state
|
|
52
52
|
|
|
53
|
-
- verify \`.skillrc\`, \`.ospec/\`, \`changes/\`, \`SKILL.md\`, \`SKILL.index.json\`,
|
|
53
|
+
- verify \`.skillrc\`, \`.ospec/\`, \`changes/\`, \`SKILL.md\`, \`SKILL.index.json\`, \`.ospec/tools/build-index-auto.cjs\`, \`for-ai/\`, and \`docs/project/\` files on disk
|
|
54
54
|
|
|
55
55
|
- if project overview context is missing and AI can ask follow-up questions, ask for a brief summary or tech stack before initialization; if the user declines, fall back to placeholder docs
|
|
56
56
|
|
|
@@ -1237,4 +1237,3 @@ interface:
|
|
|
1237
1237
|
|
|
1238
1238
|
exports.SkillCommand = SkillCommand;
|
|
1239
1239
|
|
|
1240
|
-
//# sourceMappingURL=SkillCommand.js.map
|
|
@@ -36,6 +36,15 @@ class UpdateCommand extends BaseCommand_1.BaseCommand {
|
|
|
36
36
|
if (toolingResult.hookInstalledFiles.length > 0) {
|
|
37
37
|
this.info(` git hooks refreshed: ${toolingResult.hookInstalledFiles.join(', ')}`);
|
|
38
38
|
}
|
|
39
|
+
if (toolingResult.migratedFiles.length > 0) {
|
|
40
|
+
this.info(` tooling migrated: ${toolingResult.migratedFiles.join(', ')}`);
|
|
41
|
+
}
|
|
42
|
+
if (toolingResult.removedLegacyFiles.length > 0) {
|
|
43
|
+
this.info(` legacy tooling removed: ${toolingResult.removedLegacyFiles.join(', ')}`);
|
|
44
|
+
}
|
|
45
|
+
if (toolingResult.migratedFiles.length > 0 || toolingResult.removedLegacyFiles.length > 0) {
|
|
46
|
+
this.info(' note: update any custom repo references from root build-index-auto.* to "ospec index build" or "node .ospec/tools/build-index-auto.cjs"');
|
|
47
|
+
}
|
|
39
48
|
this.info(` codex skills: ${this.formatManagedSkills(skillResult.codex)}`);
|
|
40
49
|
if (skillResult.claude.length > 0) {
|
|
41
50
|
this.info(` claude skills: ${this.formatManagedSkills(skillResult.claude)}`);
|
|
@@ -56,8 +65,9 @@ class UpdateCommand extends BaseCommand_1.BaseCommand {
|
|
|
56
65
|
this.info(' note: it does not enable, disable, or migrate active or queued changes automatically');
|
|
57
66
|
}
|
|
58
67
|
async syncProjectTooling(rootDir, documentLanguage) {
|
|
68
|
+
const migrationResult = await this.migrateLegacyBuildIndexScript(rootDir);
|
|
59
69
|
const toolingPaths = [
|
|
60
|
-
'build-index-auto.cjs',
|
|
70
|
+
'.ospec/tools/build-index-auto.cjs',
|
|
61
71
|
'.ospec/templates/hooks/pre-commit',
|
|
62
72
|
'.ospec/templates/hooks/post-merge',
|
|
63
73
|
];
|
|
@@ -71,6 +81,32 @@ class UpdateCommand extends BaseCommand_1.BaseCommand {
|
|
|
71
81
|
refreshedFiles: [...directCopyResult.refreshed],
|
|
72
82
|
skippedFiles: [...directCopyResult.skipped],
|
|
73
83
|
hookInstalledFiles: [...hookInstallResult.installed],
|
|
84
|
+
migratedFiles: migrationResult.migratedFiles,
|
|
85
|
+
removedLegacyFiles: migrationResult.removedLegacyFiles,
|
|
86
|
+
};
|
|
87
|
+
}
|
|
88
|
+
async migrateLegacyBuildIndexScript(rootDir) {
|
|
89
|
+
const targetRelativePath = '.ospec/tools/build-index-auto.cjs';
|
|
90
|
+
const targetPath = (0, path_1.join)(rootDir, ...targetRelativePath.split('/'));
|
|
91
|
+
const legacyRelativePaths = ['build-index-auto.cjs', 'build-index-auto.js'];
|
|
92
|
+
const migratedFiles = [];
|
|
93
|
+
const removedLegacyFiles = [];
|
|
94
|
+
for (const legacyRelativePath of legacyRelativePaths) {
|
|
95
|
+
const legacyPath = (0, path_1.join)(rootDir, legacyRelativePath);
|
|
96
|
+
if (!(await services_1.services.fileService.exists(legacyPath))) {
|
|
97
|
+
continue;
|
|
98
|
+
}
|
|
99
|
+
if (!(await services_1.services.fileService.exists(targetPath))) {
|
|
100
|
+
await services_1.services.fileService.move(legacyPath, targetPath);
|
|
101
|
+
migratedFiles.push(`${legacyRelativePath} -> ${targetRelativePath}`);
|
|
102
|
+
continue;
|
|
103
|
+
}
|
|
104
|
+
await services_1.services.fileService.remove(legacyPath);
|
|
105
|
+
removedLegacyFiles.push(legacyRelativePath);
|
|
106
|
+
}
|
|
107
|
+
return {
|
|
108
|
+
migratedFiles,
|
|
109
|
+
removedLegacyFiles,
|
|
74
110
|
};
|
|
75
111
|
}
|
|
76
112
|
async syncEnabledPluginAssets(rootDir) {
|
|
@@ -368,4 +404,3 @@ class UpdateCommand extends BaseCommand_1.BaseCommand {
|
|
|
368
404
|
}
|
|
369
405
|
}
|
|
370
406
|
exports.UpdateCommand = UpdateCommand;
|
|
371
|
-
//# sourceMappingURL=UpdateCommand.js.map
|
package/dist/commands/index.d.ts
CHANGED
package/dist/commands/index.js
CHANGED
package/dist/core/constants.d.ts
CHANGED
|
@@ -37,5 +37,4 @@ export declare const NAMING_RULES: {
|
|
|
37
37
|
};
|
|
38
38
|
export declare const DATE_FORMAT = "YYYY-MM-DD";
|
|
39
39
|
export declare const DATETIME_FORMAT = "YYYY-MM-DDTHH:mm:ssZ";
|
|
40
|
-
export declare const WORKFLOW_STEPS: readonly ["proposal_complete", "tasks_complete", "implementation_complete", "skill_updated", "index_regenerated", "tests_passed", "verification_passed", "archived"];
|
|
41
|
-
//# sourceMappingURL=constants.d.ts.map
|
|
40
|
+
export declare const WORKFLOW_STEPS: readonly ["proposal_complete", "tasks_complete", "implementation_complete", "skill_updated", "index_regenerated", "tests_passed", "verification_passed", "archived"];
|