@fission-ai/openspec 0.23.0 → 1.0.1
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 +111 -382
- package/dist/cli/index.js +120 -6
- package/dist/commands/workflow/index.d.ts +17 -0
- package/dist/commands/workflow/index.js +12 -0
- package/dist/commands/workflow/instructions.d.ts +29 -0
- package/dist/commands/workflow/instructions.js +381 -0
- package/dist/commands/workflow/new-change.d.ts +11 -0
- package/dist/commands/workflow/new-change.js +44 -0
- package/dist/commands/workflow/schemas.d.ts +10 -0
- package/dist/commands/workflow/schemas.js +34 -0
- package/dist/commands/workflow/shared.d.ts +52 -0
- package/dist/commands/workflow/shared.js +111 -0
- package/dist/commands/workflow/status.d.ts +14 -0
- package/dist/commands/workflow/status.js +58 -0
- package/dist/commands/workflow/templates.d.ts +16 -0
- package/dist/commands/workflow/templates.js +68 -0
- package/dist/core/artifact-graph/instruction-loader.d.ts +5 -1
- package/dist/core/artifact-graph/instruction-loader.js +8 -19
- package/dist/core/command-generation/adapters/amazon-q.d.ts +13 -0
- package/dist/core/command-generation/adapters/amazon-q.js +26 -0
- package/dist/core/command-generation/adapters/antigravity.d.ts +13 -0
- package/dist/core/command-generation/adapters/antigravity.js +26 -0
- package/dist/core/command-generation/adapters/auggie.d.ts +13 -0
- package/dist/core/command-generation/adapters/auggie.js +27 -0
- package/dist/core/command-generation/adapters/claude.d.ts +13 -0
- package/dist/core/command-generation/adapters/claude.js +50 -0
- package/dist/core/command-generation/adapters/cline.d.ts +14 -0
- package/dist/core/command-generation/adapters/cline.js +27 -0
- package/dist/core/command-generation/adapters/codebuddy.d.ts +13 -0
- package/dist/core/command-generation/adapters/codebuddy.js +28 -0
- package/dist/core/command-generation/adapters/codex.d.ts +13 -0
- package/dist/core/command-generation/adapters/codex.js +27 -0
- package/dist/core/command-generation/adapters/continue.d.ts +13 -0
- package/dist/core/command-generation/adapters/continue.js +28 -0
- package/dist/core/command-generation/adapters/costrict.d.ts +13 -0
- package/dist/core/command-generation/adapters/costrict.js +27 -0
- package/dist/core/command-generation/adapters/crush.d.ts +13 -0
- package/dist/core/command-generation/adapters/crush.js +30 -0
- package/dist/core/command-generation/adapters/cursor.d.ts +14 -0
- package/dist/core/command-generation/adapters/cursor.js +44 -0
- package/dist/core/command-generation/adapters/factory.d.ts +13 -0
- package/dist/core/command-generation/adapters/factory.js +27 -0
- package/dist/core/command-generation/adapters/gemini.d.ts +13 -0
- package/dist/core/command-generation/adapters/gemini.js +26 -0
- package/dist/core/command-generation/adapters/github-copilot.d.ts +13 -0
- package/dist/core/command-generation/adapters/github-copilot.js +26 -0
- package/dist/core/command-generation/adapters/iflow.d.ts +13 -0
- package/dist/core/command-generation/adapters/iflow.js +29 -0
- package/dist/core/command-generation/adapters/index.d.ts +27 -0
- package/dist/core/command-generation/adapters/index.js +27 -0
- package/dist/core/command-generation/adapters/kilocode.d.ts +14 -0
- package/dist/core/command-generation/adapters/kilocode.js +23 -0
- package/dist/core/command-generation/adapters/opencode.d.ts +13 -0
- package/dist/core/command-generation/adapters/opencode.js +26 -0
- package/dist/core/command-generation/adapters/qoder.d.ts +13 -0
- package/dist/core/command-generation/adapters/qoder.js +30 -0
- package/dist/core/command-generation/adapters/qwen.d.ts +13 -0
- package/dist/core/command-generation/adapters/qwen.js +26 -0
- package/dist/core/command-generation/adapters/roocode.d.ts +14 -0
- package/dist/core/command-generation/adapters/roocode.js +27 -0
- package/dist/core/command-generation/adapters/windsurf.d.ts +14 -0
- package/dist/core/command-generation/adapters/windsurf.js +51 -0
- package/dist/core/command-generation/generator.d.ts +21 -0
- package/dist/core/command-generation/generator.js +27 -0
- package/dist/core/command-generation/index.d.ts +22 -0
- package/dist/core/command-generation/index.js +24 -0
- package/dist/core/command-generation/registry.d.ts +36 -0
- package/dist/core/command-generation/registry.js +88 -0
- package/dist/core/command-generation/types.d.ts +55 -0
- package/dist/core/command-generation/types.js +8 -0
- package/dist/core/config.d.ts +1 -0
- package/dist/core/config.js +21 -21
- package/dist/core/init.d.ts +16 -36
- package/dist/core/init.js +323 -534
- package/dist/core/legacy-cleanup.d.ts +162 -0
- package/dist/core/legacy-cleanup.js +501 -0
- package/dist/core/project-config.js +2 -2
- package/dist/core/shared/index.d.ts +8 -0
- package/dist/core/shared/index.js +8 -0
- package/dist/core/shared/skill-generation.d.ts +41 -0
- package/dist/core/shared/skill-generation.js +76 -0
- package/dist/core/shared/tool-detection.d.ts +66 -0
- package/dist/core/shared/tool-detection.js +140 -0
- package/dist/core/templates/index.d.ts +7 -16
- package/dist/core/templates/index.js +8 -36
- package/dist/core/templates/skill-templates.d.ts +13 -0
- package/dist/core/templates/skill-templates.js +634 -44
- package/dist/core/update.d.ts +38 -0
- package/dist/core/update.js +280 -62
- package/dist/prompts/searchable-multi-select.d.ts +27 -0
- package/dist/prompts/searchable-multi-select.js +149 -0
- package/dist/ui/ascii-patterns.d.ts +16 -0
- package/dist/ui/ascii-patterns.js +133 -0
- package/dist/ui/welcome-screen.d.ts +10 -0
- package/dist/ui/welcome-screen.js +146 -0
- package/dist/utils/change-utils.d.ts +3 -3
- package/dist/utils/change-utils.js +3 -3
- package/dist/utils/file-system.d.ts +11 -0
- package/dist/utils/file-system.js +65 -2
- package/dist/utils/index.d.ts +1 -0
- package/dist/utils/index.js +2 -0
- package/package.json +1 -1
- package/dist/commands/artifact-workflow.d.ts +0 -17
- package/dist/commands/artifact-workflow.js +0 -915
- package/dist/core/configurators/agents.d.ts +0 -8
- package/dist/core/configurators/agents.js +0 -15
- package/dist/core/configurators/base.d.ts +0 -7
- package/dist/core/configurators/base.js +0 -2
- package/dist/core/configurators/claude.d.ts +0 -8
- package/dist/core/configurators/claude.js +0 -15
- package/dist/core/configurators/cline.d.ts +0 -8
- package/dist/core/configurators/cline.js +0 -15
- package/dist/core/configurators/codebuddy.d.ts +0 -8
- package/dist/core/configurators/codebuddy.js +0 -15
- package/dist/core/configurators/costrict.d.ts +0 -8
- package/dist/core/configurators/costrict.js +0 -15
- package/dist/core/configurators/iflow.d.ts +0 -8
- package/dist/core/configurators/iflow.js +0 -15
- package/dist/core/configurators/qoder.d.ts +0 -30
- package/dist/core/configurators/qoder.js +0 -42
- package/dist/core/configurators/qwen.d.ts +0 -24
- package/dist/core/configurators/qwen.js +0 -37
- package/dist/core/configurators/registry.d.ts +0 -9
- package/dist/core/configurators/registry.js +0 -43
- package/dist/core/configurators/slash/amazon-q.d.ts +0 -9
- package/dist/core/configurators/slash/amazon-q.js +0 -46
- package/dist/core/configurators/slash/antigravity.d.ts +0 -9
- package/dist/core/configurators/slash/antigravity.js +0 -23
- package/dist/core/configurators/slash/auggie.d.ts +0 -9
- package/dist/core/configurators/slash/auggie.js +0 -31
- package/dist/core/configurators/slash/base.d.ts +0 -19
- package/dist/core/configurators/slash/base.js +0 -69
- package/dist/core/configurators/slash/claude.d.ts +0 -9
- package/dist/core/configurators/slash/claude.js +0 -37
- package/dist/core/configurators/slash/cline.d.ts +0 -9
- package/dist/core/configurators/slash/cline.js +0 -23
- package/dist/core/configurators/slash/codebuddy.d.ts +0 -9
- package/dist/core/configurators/slash/codebuddy.js +0 -34
- package/dist/core/configurators/slash/codex.d.ts +0 -14
- package/dist/core/configurators/slash/codex.js +0 -109
- package/dist/core/configurators/slash/continue.d.ts +0 -9
- package/dist/core/configurators/slash/continue.js +0 -46
- package/dist/core/configurators/slash/costrict.d.ts +0 -9
- package/dist/core/configurators/slash/costrict.js +0 -31
- package/dist/core/configurators/slash/crush.d.ts +0 -9
- package/dist/core/configurators/slash/crush.js +0 -37
- package/dist/core/configurators/slash/cursor.d.ts +0 -9
- package/dist/core/configurators/slash/cursor.js +0 -37
- package/dist/core/configurators/slash/factory.d.ts +0 -10
- package/dist/core/configurators/slash/factory.js +0 -35
- package/dist/core/configurators/slash/gemini.d.ts +0 -9
- package/dist/core/configurators/slash/gemini.js +0 -22
- package/dist/core/configurators/slash/github-copilot.d.ts +0 -9
- package/dist/core/configurators/slash/github-copilot.js +0 -34
- package/dist/core/configurators/slash/iflow.d.ts +0 -9
- package/dist/core/configurators/slash/iflow.js +0 -37
- package/dist/core/configurators/slash/kilocode.d.ts +0 -9
- package/dist/core/configurators/slash/kilocode.js +0 -17
- package/dist/core/configurators/slash/opencode.d.ts +0 -12
- package/dist/core/configurators/slash/opencode.js +0 -72
- package/dist/core/configurators/slash/qoder.d.ts +0 -35
- package/dist/core/configurators/slash/qoder.js +0 -76
- package/dist/core/configurators/slash/qwen.d.ts +0 -32
- package/dist/core/configurators/slash/qwen.js +0 -49
- package/dist/core/configurators/slash/registry.d.ts +0 -8
- package/dist/core/configurators/slash/registry.js +0 -78
- package/dist/core/configurators/slash/roocode.d.ts +0 -9
- package/dist/core/configurators/slash/roocode.js +0 -23
- package/dist/core/configurators/slash/toml-base.d.ts +0 -10
- package/dist/core/configurators/slash/toml-base.js +0 -53
- package/dist/core/configurators/slash/windsurf.d.ts +0 -9
- package/dist/core/configurators/slash/windsurf.js +0 -23
- package/dist/core/templates/agents-root-stub.d.ts +0 -2
- package/dist/core/templates/agents-root-stub.js +0 -17
- package/dist/core/templates/agents-template.d.ts +0 -2
- package/dist/core/templates/agents-template.js +0 -458
- package/dist/core/templates/claude-template.d.ts +0 -2
- package/dist/core/templates/claude-template.js +0 -2
- package/dist/core/templates/cline-template.d.ts +0 -2
- package/dist/core/templates/cline-template.js +0 -2
- package/dist/core/templates/costrict-template.d.ts +0 -2
- package/dist/core/templates/costrict-template.js +0 -2
- package/dist/core/templates/project-template.d.ts +0 -8
- package/dist/core/templates/project-template.js +0 -32
- package/dist/core/templates/slash-command-templates.d.ts +0 -4
- package/dist/core/templates/slash-command-templates.js +0 -49
- package/schemas/tdd/schema.yaml +0 -213
- package/schemas/tdd/templates/docs.md +0 -15
- package/schemas/tdd/templates/implementation.md +0 -11
- package/schemas/tdd/templates/spec.md +0 -11
- package/schemas/tdd/templates/test.md +0 -11
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
import { SlashCommandConfigurator } from "./base.js";
|
|
2
|
-
import { FileSystemUtils } from "../../../utils/file-system.js";
|
|
3
|
-
import { OPENSPEC_MARKERS } from "../../config.js";
|
|
4
|
-
const FILE_PATHS = {
|
|
5
|
-
proposal: ".opencode/command/openspec-proposal.md",
|
|
6
|
-
apply: ".opencode/command/openspec-apply.md",
|
|
7
|
-
archive: ".opencode/command/openspec-archive.md",
|
|
8
|
-
};
|
|
9
|
-
const FRONTMATTER = {
|
|
10
|
-
proposal: `---
|
|
11
|
-
description: Scaffold a new OpenSpec change and validate strictly.
|
|
12
|
-
---
|
|
13
|
-
The user has requested the following change proposal. Use the openspec instructions to create their change proposal.
|
|
14
|
-
<UserRequest>
|
|
15
|
-
$ARGUMENTS
|
|
16
|
-
</UserRequest>
|
|
17
|
-
`,
|
|
18
|
-
apply: `---
|
|
19
|
-
description: Implement an approved OpenSpec change and keep tasks in sync.
|
|
20
|
-
---
|
|
21
|
-
The user has requested to implement the following change proposal. Find the change proposal and follow the instructions below. If you're not sure or if ambiguous, ask for clarification from the user.
|
|
22
|
-
<UserRequest>
|
|
23
|
-
$ARGUMENTS
|
|
24
|
-
</UserRequest>
|
|
25
|
-
`,
|
|
26
|
-
archive: `---
|
|
27
|
-
description: Archive a deployed OpenSpec change and update specs.
|
|
28
|
-
---
|
|
29
|
-
<ChangeId>
|
|
30
|
-
$ARGUMENTS
|
|
31
|
-
</ChangeId>
|
|
32
|
-
`,
|
|
33
|
-
};
|
|
34
|
-
export class OpenCodeSlashCommandConfigurator extends SlashCommandConfigurator {
|
|
35
|
-
toolId = "opencode";
|
|
36
|
-
isAvailable = true;
|
|
37
|
-
getRelativePath(id) {
|
|
38
|
-
return FILE_PATHS[id];
|
|
39
|
-
}
|
|
40
|
-
getFrontmatter(id) {
|
|
41
|
-
return FRONTMATTER[id];
|
|
42
|
-
}
|
|
43
|
-
async generateAll(projectPath, _openspecDir) {
|
|
44
|
-
const createdOrUpdated = await super.generateAll(projectPath, _openspecDir);
|
|
45
|
-
await this.rewriteArchiveFile(projectPath);
|
|
46
|
-
return createdOrUpdated;
|
|
47
|
-
}
|
|
48
|
-
async updateExisting(projectPath, _openspecDir) {
|
|
49
|
-
const updated = await super.updateExisting(projectPath, _openspecDir);
|
|
50
|
-
const rewroteArchive = await this.rewriteArchiveFile(projectPath);
|
|
51
|
-
if (rewroteArchive && !updated.includes(FILE_PATHS.archive)) {
|
|
52
|
-
updated.push(FILE_PATHS.archive);
|
|
53
|
-
}
|
|
54
|
-
return updated;
|
|
55
|
-
}
|
|
56
|
-
async rewriteArchiveFile(projectPath) {
|
|
57
|
-
const archivePath = FileSystemUtils.joinPath(projectPath, FILE_PATHS.archive);
|
|
58
|
-
if (!await FileSystemUtils.fileExists(archivePath)) {
|
|
59
|
-
return false;
|
|
60
|
-
}
|
|
61
|
-
const body = this.getBody("archive");
|
|
62
|
-
const frontmatter = this.getFrontmatter("archive");
|
|
63
|
-
const sections = [];
|
|
64
|
-
if (frontmatter) {
|
|
65
|
-
sections.push(frontmatter.trim());
|
|
66
|
-
}
|
|
67
|
-
sections.push(`${OPENSPEC_MARKERS.start}\n${body}\n${OPENSPEC_MARKERS.end}`);
|
|
68
|
-
await FileSystemUtils.writeFile(archivePath, sections.join("\n") + "\n");
|
|
69
|
-
return true;
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
//# sourceMappingURL=opencode.js.map
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import { SlashCommandConfigurator } from './base.js';
|
|
2
|
-
import { SlashCommandId } from '../../templates/index.js';
|
|
3
|
-
/**
|
|
4
|
-
* Qoder Slash Command Configurator
|
|
5
|
-
*
|
|
6
|
-
* Manages OpenSpec slash commands for Qoder AI assistant.
|
|
7
|
-
* Creates three workflow commands: proposal, apply, and archive.
|
|
8
|
-
* Uses colon-separated command format (/openspec:proposal).
|
|
9
|
-
*
|
|
10
|
-
* @extends {SlashCommandConfigurator}
|
|
11
|
-
*/
|
|
12
|
-
export declare class QoderSlashCommandConfigurator extends SlashCommandConfigurator {
|
|
13
|
-
/** Unique identifier for Qoder tool */
|
|
14
|
-
readonly toolId = "qoder";
|
|
15
|
-
/** Indicates slash commands are available for this tool */
|
|
16
|
-
readonly isAvailable = true;
|
|
17
|
-
/**
|
|
18
|
-
* Get relative file path for a slash command
|
|
19
|
-
*
|
|
20
|
-
* @param {SlashCommandId} id - Command identifier (proposal, apply, or archive)
|
|
21
|
-
* @returns {string} Relative path from project root to command file
|
|
22
|
-
*/
|
|
23
|
-
protected getRelativePath(id: SlashCommandId): string;
|
|
24
|
-
/**
|
|
25
|
-
* Get YAML frontmatter for a slash command
|
|
26
|
-
*
|
|
27
|
-
* Frontmatter defines how the command appears in Qoder's UI,
|
|
28
|
-
* including display name, description, and categorization.
|
|
29
|
-
*
|
|
30
|
-
* @param {SlashCommandId} id - Command identifier (proposal, apply, or archive)
|
|
31
|
-
* @returns {string} YAML frontmatter block with command metadata
|
|
32
|
-
*/
|
|
33
|
-
protected getFrontmatter(id: SlashCommandId): string;
|
|
34
|
-
}
|
|
35
|
-
//# sourceMappingURL=qoder.d.ts.map
|
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
import { SlashCommandConfigurator } from './base.js';
|
|
2
|
-
/**
|
|
3
|
-
* File paths for Qoder slash commands
|
|
4
|
-
* Maps each OpenSpec workflow stage to its command file location
|
|
5
|
-
* Commands are stored in .qoder/commands/openspec/ directory
|
|
6
|
-
*/
|
|
7
|
-
const FILE_PATHS = {
|
|
8
|
-
// Create and validate new change proposals
|
|
9
|
-
proposal: '.qoder/commands/openspec/proposal.md',
|
|
10
|
-
// Implement approved changes with task tracking
|
|
11
|
-
apply: '.qoder/commands/openspec/apply.md',
|
|
12
|
-
// Archive completed changes and update specs
|
|
13
|
-
archive: '.qoder/commands/openspec/archive.md'
|
|
14
|
-
};
|
|
15
|
-
/**
|
|
16
|
-
* YAML frontmatter for Qoder slash commands
|
|
17
|
-
* Defines metadata displayed in Qoder's command palette
|
|
18
|
-
* Each command is categorized and tagged for easy discovery
|
|
19
|
-
*/
|
|
20
|
-
const FRONTMATTER = {
|
|
21
|
-
proposal: `---
|
|
22
|
-
name: OpenSpec: Proposal
|
|
23
|
-
description: Scaffold a new OpenSpec change and validate strictly.
|
|
24
|
-
category: OpenSpec
|
|
25
|
-
tags: [openspec, change]
|
|
26
|
-
---`,
|
|
27
|
-
apply: `---
|
|
28
|
-
name: OpenSpec: Apply
|
|
29
|
-
description: Implement an approved OpenSpec change and keep tasks in sync.
|
|
30
|
-
category: OpenSpec
|
|
31
|
-
tags: [openspec, apply]
|
|
32
|
-
---`,
|
|
33
|
-
archive: `---
|
|
34
|
-
name: OpenSpec: Archive
|
|
35
|
-
description: Archive a deployed OpenSpec change and update specs.
|
|
36
|
-
category: OpenSpec
|
|
37
|
-
tags: [openspec, archive]
|
|
38
|
-
---`
|
|
39
|
-
};
|
|
40
|
-
/**
|
|
41
|
-
* Qoder Slash Command Configurator
|
|
42
|
-
*
|
|
43
|
-
* Manages OpenSpec slash commands for Qoder AI assistant.
|
|
44
|
-
* Creates three workflow commands: proposal, apply, and archive.
|
|
45
|
-
* Uses colon-separated command format (/openspec:proposal).
|
|
46
|
-
*
|
|
47
|
-
* @extends {SlashCommandConfigurator}
|
|
48
|
-
*/
|
|
49
|
-
export class QoderSlashCommandConfigurator extends SlashCommandConfigurator {
|
|
50
|
-
/** Unique identifier for Qoder tool */
|
|
51
|
-
toolId = 'qoder';
|
|
52
|
-
/** Indicates slash commands are available for this tool */
|
|
53
|
-
isAvailable = true;
|
|
54
|
-
/**
|
|
55
|
-
* Get relative file path for a slash command
|
|
56
|
-
*
|
|
57
|
-
* @param {SlashCommandId} id - Command identifier (proposal, apply, or archive)
|
|
58
|
-
* @returns {string} Relative path from project root to command file
|
|
59
|
-
*/
|
|
60
|
-
getRelativePath(id) {
|
|
61
|
-
return FILE_PATHS[id];
|
|
62
|
-
}
|
|
63
|
-
/**
|
|
64
|
-
* Get YAML frontmatter for a slash command
|
|
65
|
-
*
|
|
66
|
-
* Frontmatter defines how the command appears in Qoder's UI,
|
|
67
|
-
* including display name, description, and categorization.
|
|
68
|
-
*
|
|
69
|
-
* @param {SlashCommandId} id - Command identifier (proposal, apply, or archive)
|
|
70
|
-
* @returns {string} YAML frontmatter block with command metadata
|
|
71
|
-
*/
|
|
72
|
-
getFrontmatter(id) {
|
|
73
|
-
return FRONTMATTER[id];
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
//# sourceMappingURL=qoder.js.map
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Qwen slash command configurator for OpenSpec integration.
|
|
3
|
-
* This class handles the generation of Qwen-specific slash command files
|
|
4
|
-
* in the .qwen/commands directory structure.
|
|
5
|
-
*
|
|
6
|
-
* @implements {SlashCommandConfigurator}
|
|
7
|
-
*/
|
|
8
|
-
import { TomlSlashCommandConfigurator } from './toml-base.js';
|
|
9
|
-
import { SlashCommandId } from '../../templates/index.js';
|
|
10
|
-
/**
|
|
11
|
-
* QwenSlashCommandConfigurator class provides integration with Qwen Code
|
|
12
|
-
* by creating the necessary slash command files in the .qwen/commands directory.
|
|
13
|
-
*
|
|
14
|
-
* The slash commands include:
|
|
15
|
-
* - /openspec-proposal: Create an OpenSpec change proposal
|
|
16
|
-
* - /openspec-apply: Apply an approved OpenSpec change
|
|
17
|
-
* - /openspec-archive: Archive a deployed OpenSpec change
|
|
18
|
-
*/
|
|
19
|
-
export declare class QwenSlashCommandConfigurator extends TomlSlashCommandConfigurator {
|
|
20
|
-
/** Unique identifier for the Qwen tool */
|
|
21
|
-
readonly toolId = "qwen";
|
|
22
|
-
/** Availability status for the Qwen tool */
|
|
23
|
-
readonly isAvailable = true;
|
|
24
|
-
/**
|
|
25
|
-
* Returns the relative file path for a given slash command ID.
|
|
26
|
-
* @param {SlashCommandId} id - The slash command identifier
|
|
27
|
-
* @returns {string} The relative path to the command file
|
|
28
|
-
*/
|
|
29
|
-
protected getRelativePath(id: SlashCommandId): string;
|
|
30
|
-
protected getDescription(id: SlashCommandId): string;
|
|
31
|
-
}
|
|
32
|
-
//# sourceMappingURL=qwen.d.ts.map
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Qwen slash command configurator for OpenSpec integration.
|
|
3
|
-
* This class handles the generation of Qwen-specific slash command files
|
|
4
|
-
* in the .qwen/commands directory structure.
|
|
5
|
-
*
|
|
6
|
-
* @implements {SlashCommandConfigurator}
|
|
7
|
-
*/
|
|
8
|
-
import { TomlSlashCommandConfigurator } from './toml-base.js';
|
|
9
|
-
/**
|
|
10
|
-
* Mapping of slash command IDs to their corresponding file paths in .qwen/commands directory.
|
|
11
|
-
* @type {Record<SlashCommandId, string>}
|
|
12
|
-
*/
|
|
13
|
-
const FILE_PATHS = {
|
|
14
|
-
proposal: '.qwen/commands/openspec-proposal.toml',
|
|
15
|
-
apply: '.qwen/commands/openspec-apply.toml',
|
|
16
|
-
archive: '.qwen/commands/openspec-archive.toml'
|
|
17
|
-
};
|
|
18
|
-
const DESCRIPTIONS = {
|
|
19
|
-
proposal: 'Scaffold a new OpenSpec change and validate strictly.',
|
|
20
|
-
apply: 'Implement an approved OpenSpec change and keep tasks in sync.',
|
|
21
|
-
archive: 'Archive a deployed OpenSpec change and update specs.'
|
|
22
|
-
};
|
|
23
|
-
/**
|
|
24
|
-
* QwenSlashCommandConfigurator class provides integration with Qwen Code
|
|
25
|
-
* by creating the necessary slash command files in the .qwen/commands directory.
|
|
26
|
-
*
|
|
27
|
-
* The slash commands include:
|
|
28
|
-
* - /openspec-proposal: Create an OpenSpec change proposal
|
|
29
|
-
* - /openspec-apply: Apply an approved OpenSpec change
|
|
30
|
-
* - /openspec-archive: Archive a deployed OpenSpec change
|
|
31
|
-
*/
|
|
32
|
-
export class QwenSlashCommandConfigurator extends TomlSlashCommandConfigurator {
|
|
33
|
-
/** Unique identifier for the Qwen tool */
|
|
34
|
-
toolId = 'qwen';
|
|
35
|
-
/** Availability status for the Qwen tool */
|
|
36
|
-
isAvailable = true;
|
|
37
|
-
/**
|
|
38
|
-
* Returns the relative file path for a given slash command ID.
|
|
39
|
-
* @param {SlashCommandId} id - The slash command identifier
|
|
40
|
-
* @returns {string} The relative path to the command file
|
|
41
|
-
*/
|
|
42
|
-
getRelativePath(id) {
|
|
43
|
-
return FILE_PATHS[id];
|
|
44
|
-
}
|
|
45
|
-
getDescription(id) {
|
|
46
|
-
return DESCRIPTIONS[id];
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
//# sourceMappingURL=qwen.js.map
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { SlashCommandConfigurator } from './base.js';
|
|
2
|
-
export declare class SlashCommandRegistry {
|
|
3
|
-
private static configurators;
|
|
4
|
-
static register(configurator: SlashCommandConfigurator): void;
|
|
5
|
-
static get(toolId: string): SlashCommandConfigurator | undefined;
|
|
6
|
-
static getAll(): SlashCommandConfigurator[];
|
|
7
|
-
}
|
|
8
|
-
//# sourceMappingURL=registry.d.ts.map
|
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
import { ClaudeSlashCommandConfigurator } from './claude.js';
|
|
2
|
-
import { CodeBuddySlashCommandConfigurator } from './codebuddy.js';
|
|
3
|
-
import { QoderSlashCommandConfigurator } from './qoder.js';
|
|
4
|
-
import { CursorSlashCommandConfigurator } from './cursor.js';
|
|
5
|
-
import { WindsurfSlashCommandConfigurator } from './windsurf.js';
|
|
6
|
-
import { KiloCodeSlashCommandConfigurator } from './kilocode.js';
|
|
7
|
-
import { OpenCodeSlashCommandConfigurator } from './opencode.js';
|
|
8
|
-
import { CodexSlashCommandConfigurator } from './codex.js';
|
|
9
|
-
import { GitHubCopilotSlashCommandConfigurator } from './github-copilot.js';
|
|
10
|
-
import { AmazonQSlashCommandConfigurator } from './amazon-q.js';
|
|
11
|
-
import { FactorySlashCommandConfigurator } from './factory.js';
|
|
12
|
-
import { GeminiSlashCommandConfigurator } from './gemini.js';
|
|
13
|
-
import { AuggieSlashCommandConfigurator } from './auggie.js';
|
|
14
|
-
import { ClineSlashCommandConfigurator } from './cline.js';
|
|
15
|
-
import { CrushSlashCommandConfigurator } from './crush.js';
|
|
16
|
-
import { CostrictSlashCommandConfigurator } from './costrict.js';
|
|
17
|
-
import { QwenSlashCommandConfigurator } from './qwen.js';
|
|
18
|
-
import { RooCodeSlashCommandConfigurator } from './roocode.js';
|
|
19
|
-
import { AntigravitySlashCommandConfigurator } from './antigravity.js';
|
|
20
|
-
import { IflowSlashCommandConfigurator } from './iflow.js';
|
|
21
|
-
import { ContinueSlashCommandConfigurator } from './continue.js';
|
|
22
|
-
export class SlashCommandRegistry {
|
|
23
|
-
static configurators = new Map();
|
|
24
|
-
static {
|
|
25
|
-
const claude = new ClaudeSlashCommandConfigurator();
|
|
26
|
-
const codeBuddy = new CodeBuddySlashCommandConfigurator();
|
|
27
|
-
const qoder = new QoderSlashCommandConfigurator();
|
|
28
|
-
const cursor = new CursorSlashCommandConfigurator();
|
|
29
|
-
const windsurf = new WindsurfSlashCommandConfigurator();
|
|
30
|
-
const kilocode = new KiloCodeSlashCommandConfigurator();
|
|
31
|
-
const opencode = new OpenCodeSlashCommandConfigurator();
|
|
32
|
-
const codex = new CodexSlashCommandConfigurator();
|
|
33
|
-
const githubCopilot = new GitHubCopilotSlashCommandConfigurator();
|
|
34
|
-
const amazonQ = new AmazonQSlashCommandConfigurator();
|
|
35
|
-
const factory = new FactorySlashCommandConfigurator();
|
|
36
|
-
const gemini = new GeminiSlashCommandConfigurator();
|
|
37
|
-
const auggie = new AuggieSlashCommandConfigurator();
|
|
38
|
-
const cline = new ClineSlashCommandConfigurator();
|
|
39
|
-
const crush = new CrushSlashCommandConfigurator();
|
|
40
|
-
const costrict = new CostrictSlashCommandConfigurator();
|
|
41
|
-
const qwen = new QwenSlashCommandConfigurator();
|
|
42
|
-
const roocode = new RooCodeSlashCommandConfigurator();
|
|
43
|
-
const antigravity = new AntigravitySlashCommandConfigurator();
|
|
44
|
-
const iflow = new IflowSlashCommandConfigurator();
|
|
45
|
-
const continueTool = new ContinueSlashCommandConfigurator();
|
|
46
|
-
this.configurators.set(claude.toolId, claude);
|
|
47
|
-
this.configurators.set(codeBuddy.toolId, codeBuddy);
|
|
48
|
-
this.configurators.set(qoder.toolId, qoder);
|
|
49
|
-
this.configurators.set(cursor.toolId, cursor);
|
|
50
|
-
this.configurators.set(windsurf.toolId, windsurf);
|
|
51
|
-
this.configurators.set(kilocode.toolId, kilocode);
|
|
52
|
-
this.configurators.set(opencode.toolId, opencode);
|
|
53
|
-
this.configurators.set(codex.toolId, codex);
|
|
54
|
-
this.configurators.set(githubCopilot.toolId, githubCopilot);
|
|
55
|
-
this.configurators.set(amazonQ.toolId, amazonQ);
|
|
56
|
-
this.configurators.set(factory.toolId, factory);
|
|
57
|
-
this.configurators.set(gemini.toolId, gemini);
|
|
58
|
-
this.configurators.set(auggie.toolId, auggie);
|
|
59
|
-
this.configurators.set(cline.toolId, cline);
|
|
60
|
-
this.configurators.set(crush.toolId, crush);
|
|
61
|
-
this.configurators.set(costrict.toolId, costrict);
|
|
62
|
-
this.configurators.set(qwen.toolId, qwen);
|
|
63
|
-
this.configurators.set(roocode.toolId, roocode);
|
|
64
|
-
this.configurators.set(antigravity.toolId, antigravity);
|
|
65
|
-
this.configurators.set(iflow.toolId, iflow);
|
|
66
|
-
this.configurators.set(continueTool.toolId, continueTool);
|
|
67
|
-
}
|
|
68
|
-
static register(configurator) {
|
|
69
|
-
this.configurators.set(configurator.toolId, configurator);
|
|
70
|
-
}
|
|
71
|
-
static get(toolId) {
|
|
72
|
-
return this.configurators.get(toolId);
|
|
73
|
-
}
|
|
74
|
-
static getAll() {
|
|
75
|
-
return Array.from(this.configurators.values());
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
//# sourceMappingURL=registry.js.map
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { SlashCommandConfigurator } from './base.js';
|
|
2
|
-
import { SlashCommandId } from '../../templates/index.js';
|
|
3
|
-
export declare class RooCodeSlashCommandConfigurator extends SlashCommandConfigurator {
|
|
4
|
-
readonly toolId = "roocode";
|
|
5
|
-
readonly isAvailable = true;
|
|
6
|
-
protected getRelativePath(id: SlashCommandId): string;
|
|
7
|
-
protected getFrontmatter(id: SlashCommandId): string | undefined;
|
|
8
|
-
}
|
|
9
|
-
//# sourceMappingURL=roocode.d.ts.map
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { SlashCommandConfigurator } from './base.js';
|
|
2
|
-
const NEW_FILE_PATHS = {
|
|
3
|
-
proposal: '.roo/commands/openspec-proposal.md',
|
|
4
|
-
apply: '.roo/commands/openspec-apply.md',
|
|
5
|
-
archive: '.roo/commands/openspec-archive.md'
|
|
6
|
-
};
|
|
7
|
-
export class RooCodeSlashCommandConfigurator extends SlashCommandConfigurator {
|
|
8
|
-
toolId = 'roocode';
|
|
9
|
-
isAvailable = true;
|
|
10
|
-
getRelativePath(id) {
|
|
11
|
-
return NEW_FILE_PATHS[id];
|
|
12
|
-
}
|
|
13
|
-
getFrontmatter(id) {
|
|
14
|
-
const descriptions = {
|
|
15
|
-
proposal: 'Scaffold a new OpenSpec change and validate strictly.',
|
|
16
|
-
apply: 'Implement an approved OpenSpec change and keep tasks in sync.',
|
|
17
|
-
archive: 'Archive a deployed OpenSpec change and update specs.'
|
|
18
|
-
};
|
|
19
|
-
const description = descriptions[id];
|
|
20
|
-
return `# OpenSpec: ${id.charAt(0).toUpperCase() + id.slice(1)}\n\n${description}`;
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
//# sourceMappingURL=roocode.js.map
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { SlashCommandConfigurator } from './base.js';
|
|
2
|
-
import { SlashCommandId } from '../../templates/index.js';
|
|
3
|
-
export declare abstract class TomlSlashCommandConfigurator extends SlashCommandConfigurator {
|
|
4
|
-
protected getFrontmatter(_id: SlashCommandId): string | undefined;
|
|
5
|
-
protected abstract getDescription(id: SlashCommandId): string;
|
|
6
|
-
generateAll(projectPath: string, _openspecDir: string): Promise<string[]>;
|
|
7
|
-
private generateTOML;
|
|
8
|
-
protected updateBody(filePath: string, body: string): Promise<void>;
|
|
9
|
-
}
|
|
10
|
-
//# sourceMappingURL=toml-base.d.ts.map
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
import { FileSystemUtils } from '../../../utils/file-system.js';
|
|
2
|
-
import { SlashCommandConfigurator } from './base.js';
|
|
3
|
-
import { OPENSPEC_MARKERS } from '../../config.js';
|
|
4
|
-
export class TomlSlashCommandConfigurator extends SlashCommandConfigurator {
|
|
5
|
-
getFrontmatter(_id) {
|
|
6
|
-
// TOML doesn't use separate frontmatter - it's all in one structure
|
|
7
|
-
return undefined;
|
|
8
|
-
}
|
|
9
|
-
// Override to generate TOML format with markers inside the prompt field
|
|
10
|
-
async generateAll(projectPath, _openspecDir) {
|
|
11
|
-
const createdOrUpdated = [];
|
|
12
|
-
for (const target of this.getTargets()) {
|
|
13
|
-
const body = this.getBody(target.id);
|
|
14
|
-
const filePath = FileSystemUtils.joinPath(projectPath, target.path);
|
|
15
|
-
if (await FileSystemUtils.fileExists(filePath)) {
|
|
16
|
-
await this.updateBody(filePath, body);
|
|
17
|
-
}
|
|
18
|
-
else {
|
|
19
|
-
const tomlContent = this.generateTOML(target.id, body);
|
|
20
|
-
await FileSystemUtils.writeFile(filePath, tomlContent);
|
|
21
|
-
}
|
|
22
|
-
createdOrUpdated.push(target.path);
|
|
23
|
-
}
|
|
24
|
-
return createdOrUpdated;
|
|
25
|
-
}
|
|
26
|
-
generateTOML(id, body) {
|
|
27
|
-
const description = this.getDescription(id);
|
|
28
|
-
// TOML format with triple-quoted string for multi-line prompt
|
|
29
|
-
// Markers are inside the prompt value
|
|
30
|
-
return `description = "${description}"
|
|
31
|
-
|
|
32
|
-
prompt = """
|
|
33
|
-
${OPENSPEC_MARKERS.start}
|
|
34
|
-
${body}
|
|
35
|
-
${OPENSPEC_MARKERS.end}
|
|
36
|
-
"""
|
|
37
|
-
`;
|
|
38
|
-
}
|
|
39
|
-
// Override updateBody to handle TOML format
|
|
40
|
-
async updateBody(filePath, body) {
|
|
41
|
-
const content = await FileSystemUtils.readFile(filePath);
|
|
42
|
-
const startIndex = content.indexOf(OPENSPEC_MARKERS.start);
|
|
43
|
-
const endIndex = content.indexOf(OPENSPEC_MARKERS.end);
|
|
44
|
-
if (startIndex === -1 || endIndex === -1 || endIndex <= startIndex) {
|
|
45
|
-
throw new Error(`Missing OpenSpec markers in ${filePath}`);
|
|
46
|
-
}
|
|
47
|
-
const before = content.slice(0, startIndex + OPENSPEC_MARKERS.start.length);
|
|
48
|
-
const after = content.slice(endIndex);
|
|
49
|
-
const updatedContent = `${before}\n${body}\n${after}`;
|
|
50
|
-
await FileSystemUtils.writeFile(filePath, updatedContent);
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
//# sourceMappingURL=toml-base.js.map
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { SlashCommandConfigurator } from './base.js';
|
|
2
|
-
import { SlashCommandId } from '../../templates/index.js';
|
|
3
|
-
export declare class WindsurfSlashCommandConfigurator extends SlashCommandConfigurator {
|
|
4
|
-
readonly toolId = "windsurf";
|
|
5
|
-
readonly isAvailable = true;
|
|
6
|
-
protected getRelativePath(id: SlashCommandId): string;
|
|
7
|
-
protected getFrontmatter(id: SlashCommandId): string | undefined;
|
|
8
|
-
}
|
|
9
|
-
//# sourceMappingURL=windsurf.d.ts.map
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { SlashCommandConfigurator } from './base.js';
|
|
2
|
-
const FILE_PATHS = {
|
|
3
|
-
proposal: '.windsurf/workflows/openspec-proposal.md',
|
|
4
|
-
apply: '.windsurf/workflows/openspec-apply.md',
|
|
5
|
-
archive: '.windsurf/workflows/openspec-archive.md'
|
|
6
|
-
};
|
|
7
|
-
export class WindsurfSlashCommandConfigurator extends SlashCommandConfigurator {
|
|
8
|
-
toolId = 'windsurf';
|
|
9
|
-
isAvailable = true;
|
|
10
|
-
getRelativePath(id) {
|
|
11
|
-
return FILE_PATHS[id];
|
|
12
|
-
}
|
|
13
|
-
getFrontmatter(id) {
|
|
14
|
-
const descriptions = {
|
|
15
|
-
proposal: 'Scaffold a new OpenSpec change and validate strictly.',
|
|
16
|
-
apply: 'Implement an approved OpenSpec change and keep tasks in sync.',
|
|
17
|
-
archive: 'Archive a deployed OpenSpec change and update specs.'
|
|
18
|
-
};
|
|
19
|
-
const description = descriptions[id];
|
|
20
|
-
return `---\ndescription: ${description}\nauto_execution_mode: 3\n---`;
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
//# sourceMappingURL=windsurf.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
export declare const agentsRootStubTemplate = "# OpenSpec Instructions\n\nThese instructions are for AI assistants working in this project.\n\nAlways open `@/openspec/AGENTS.md` when the request:\n- Mentions planning or proposals (words like proposal, spec, change, plan)\n- Introduces new capabilities, breaking changes, architecture shifts, or big performance/security work\n- Sounds ambiguous and you need the authoritative spec before coding\n\nUse `@/openspec/AGENTS.md` to learn:\n- How to create and apply change proposals\n- Spec format and conventions\n- Project structure and guidelines\n\nKeep this managed block so 'openspec update' can refresh the instructions.\n";
|
|
2
|
-
//# sourceMappingURL=agents-root-stub.d.ts.map
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
export const agentsRootStubTemplate = `# OpenSpec Instructions
|
|
2
|
-
|
|
3
|
-
These instructions are for AI assistants working in this project.
|
|
4
|
-
|
|
5
|
-
Always open \`@/openspec/AGENTS.md\` when the request:
|
|
6
|
-
- Mentions planning or proposals (words like proposal, spec, change, plan)
|
|
7
|
-
- Introduces new capabilities, breaking changes, architecture shifts, or big performance/security work
|
|
8
|
-
- Sounds ambiguous and you need the authoritative spec before coding
|
|
9
|
-
|
|
10
|
-
Use \`@/openspec/AGENTS.md\` to learn:
|
|
11
|
-
- How to create and apply change proposals
|
|
12
|
-
- Spec format and conventions
|
|
13
|
-
- Project structure and guidelines
|
|
14
|
-
|
|
15
|
-
Keep this managed block so 'openspec update' can refresh the instructions.
|
|
16
|
-
`;
|
|
17
|
-
//# sourceMappingURL=agents-root-stub.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
export declare const agentsTemplate = "# OpenSpec Instructions\n\nInstructions for AI coding assistants using OpenSpec for spec-driven development.\n\n## TL;DR Quick Checklist\n\n- Search existing work: `openspec spec list --long`, `openspec list` (use `rg` only for full-text search)\n- Decide scope: new capability vs modify existing capability\n- Pick a unique `change-id`: kebab-case, verb-led (`add-`, `update-`, `remove-`, `refactor-`)\n- Scaffold: `proposal.md`, `tasks.md`, `design.md` (only if needed), and delta specs per affected capability\n- Write deltas: use `## ADDED|MODIFIED|REMOVED|RENAMED Requirements`; include at least one `#### Scenario:` per requirement\n- Validate: `openspec validate [change-id] --strict --no-interactive` and fix issues\n- Request approval: Do not start implementation until proposal is approved\n\n## Three-Stage Workflow\n\n### Stage 1: Creating Changes\nCreate proposal when you need to:\n- Add features or functionality\n- Make breaking changes (API, schema)\n- Change architecture or patterns \n- Optimize performance (changes behavior)\n- Update security patterns\n\nTriggers (examples):\n- \"Help me create a change proposal\"\n- \"Help me plan a change\"\n- \"Help me create a proposal\"\n- \"I want to create a spec proposal\"\n- \"I want to create a spec\"\n\nLoose matching guidance:\n- Contains one of: `proposal`, `change`, `spec`\n- With one of: `create`, `plan`, `make`, `start`, `help`\n\nSkip proposal for:\n- Bug fixes (restore intended behavior)\n- Typos, formatting, comments\n- Dependency updates (non-breaking)\n- Configuration changes\n- Tests for existing behavior\n\n**Workflow**\n1. Review `openspec/project.md`, `openspec list`, and `openspec list --specs` to understand current context.\n2. Choose a unique verb-led `change-id` and scaffold `proposal.md`, `tasks.md`, optional `design.md`, and spec deltas under `openspec/changes/<id>/`.\n3. Draft spec deltas using `## ADDED|MODIFIED|REMOVED Requirements` with at least one `#### Scenario:` per requirement.\n4. Run `openspec validate <id> --strict --no-interactive` and resolve any issues before sharing the proposal.\n\n### Stage 2: Implementing Changes\nTrack these steps as TODOs and complete them one by one.\n1. **Read proposal.md** - Understand what's being built\n2. **Read design.md** (if exists) - Review technical decisions\n3. **Read tasks.md** - Get implementation checklist\n4. **Implement tasks sequentially** - Complete in order\n5. **Confirm completion** - Ensure every item in `tasks.md` is finished before updating statuses\n6. **Update checklist** - After all work is done, set every task to `- [x]` so the list reflects reality\n7. **Approval gate** - Do not start implementation until the proposal is reviewed and approved\n\n### Stage 3: Archiving Changes\nAfter deployment, create separate PR to:\n- Move `changes/[name]/` \u2192 `changes/archive/YYYY-MM-DD-[name]/`\n- Update `specs/` if capabilities changed\n- Use `openspec archive <change-id> --skip-specs --yes` for tooling-only changes (always pass the change ID explicitly)\n- Run `openspec validate --strict --no-interactive` to confirm the archived change passes checks\n\n## Before Any Task\n\n**Context Checklist:**\n- [ ] Read relevant specs in `specs/[capability]/spec.md`\n- [ ] Check pending changes in `changes/` for conflicts\n- [ ] Read `openspec/project.md` for conventions\n- [ ] Run `openspec list` to see active changes\n- [ ] Run `openspec list --specs` to see existing capabilities\n\n**Before Creating Specs:**\n- Always check if capability already exists\n- Prefer modifying existing specs over creating duplicates\n- Use `openspec show [spec]` to review current state\n- If request is ambiguous, ask 1\u20132 clarifying questions before scaffolding\n\n### Search Guidance\n- Enumerate specs: `openspec spec list --long` (or `--json` for scripts)\n- Enumerate changes: `openspec list` (or `openspec change list --json` - deprecated but available)\n- Show details:\n - Spec: `openspec show <spec-id> --type spec` (use `--json` for filters)\n - Change: `openspec show <change-id> --json --deltas-only`\n- Full-text search (use ripgrep): `rg -n \"Requirement:|Scenario:\" openspec/specs`\n\n## Quick Start\n\n### CLI Commands\n\n```bash\n# Essential commands\nopenspec list # List active changes\nopenspec list --specs # List specifications\nopenspec show [item] # Display change or spec\nopenspec validate [item] # Validate changes or specs\nopenspec archive <change-id> [--yes|-y] # Archive after deployment (add --yes for non-interactive runs)\n\n# Project management\nopenspec init [path] # Initialize OpenSpec\nopenspec update [path] # Update instruction files\n\n# Interactive mode\nopenspec show # Prompts for selection\nopenspec validate # Bulk validation mode\n\n# Debugging\nopenspec show [change] --json --deltas-only\nopenspec validate [change] --strict --no-interactive\n```\n\n### Command Flags\n\n- `--json` - Machine-readable output\n- `--type change|spec` - Disambiguate items\n- `--strict` - Comprehensive validation\n- `--no-interactive` - Disable prompts\n- `--skip-specs` - Archive without spec updates\n- `--yes`/`-y` - Skip confirmation prompts (non-interactive archive)\n\n## Directory Structure\n\n```\nopenspec/\n\u251C\u2500\u2500 project.md # Project conventions\n\u251C\u2500\u2500 specs/ # Current truth - what IS built\n\u2502 \u2514\u2500\u2500 [capability]/ # Single focused capability\n\u2502 \u251C\u2500\u2500 spec.md # Requirements and scenarios\n\u2502 \u2514\u2500\u2500 design.md # Technical patterns\n\u251C\u2500\u2500 changes/ # Proposals - what SHOULD change\n\u2502 \u251C\u2500\u2500 [change-name]/\n\u2502 \u2502 \u251C\u2500\u2500 proposal.md # Why, what, impact\n\u2502 \u2502 \u251C\u2500\u2500 tasks.md # Implementation checklist\n\u2502 \u2502 \u251C\u2500\u2500 design.md # Technical decisions (optional; see criteria)\n\u2502 \u2502 \u2514\u2500\u2500 specs/ # Delta changes\n\u2502 \u2502 \u2514\u2500\u2500 [capability]/\n\u2502 \u2502 \u2514\u2500\u2500 spec.md # ADDED/MODIFIED/REMOVED\n\u2502 \u2514\u2500\u2500 archive/ # Completed changes\n```\n\n## Creating Change Proposals\n\n### Decision Tree\n\n```\nNew request?\n\u251C\u2500 Bug fix restoring spec behavior? \u2192 Fix directly\n\u251C\u2500 Typo/format/comment? \u2192 Fix directly \n\u251C\u2500 New feature/capability? \u2192 Create proposal\n\u251C\u2500 Breaking change? \u2192 Create proposal\n\u251C\u2500 Architecture change? \u2192 Create proposal\n\u2514\u2500 Unclear? \u2192 Create proposal (safer)\n```\n\n### Proposal Structure\n\n1. **Create directory:** `changes/[change-id]/` (kebab-case, verb-led, unique)\n\n2. **Write proposal.md:**\n```markdown\n# Change: [Brief description of change]\n\n## Why\n[1-2 sentences on problem/opportunity]\n\n## What Changes\n- [Bullet list of changes]\n- [Mark breaking changes with **BREAKING**]\n\n## Impact\n- Affected specs: [list capabilities]\n- Affected code: [key files/systems]\n```\n\n3. **Create spec deltas:** `specs/[capability]/spec.md`\n```markdown\n## ADDED Requirements\n### Requirement: New Feature\nThe system SHALL provide...\n\n#### Scenario: Success case\n- **WHEN** user performs action\n- **THEN** expected result\n\n## MODIFIED Requirements\n### Requirement: Existing Feature\n[Complete modified requirement]\n\n## REMOVED Requirements\n### Requirement: Old Feature\n**Reason**: [Why removing]\n**Migration**: [How to handle]\n```\nIf multiple capabilities are affected, create multiple delta files under `changes/[change-id]/specs/<capability>/spec.md`\u2014one per capability.\n\n4. **Create tasks.md:**\n```markdown\n## 1. Implementation\n- [ ] 1.1 Create database schema\n- [ ] 1.2 Implement API endpoint\n- [ ] 1.3 Add frontend component\n- [ ] 1.4 Write tests\n```\n\n5. **Create design.md when needed:**\nCreate `design.md` if any of the following apply; otherwise omit it:\n- Cross-cutting change (multiple services/modules) or a new architectural pattern\n- New external dependency or significant data model changes\n- Security, performance, or migration complexity\n- Ambiguity that benefits from technical decisions before coding\n\nMinimal `design.md` skeleton:\n```markdown\n## Context\n[Background, constraints, stakeholders]\n\n## Goals / Non-Goals\n- Goals: [...]\n- Non-Goals: [...]\n\n## Decisions\n- Decision: [What and why]\n- Alternatives considered: [Options + rationale]\n\n## Risks / Trade-offs\n- [Risk] \u2192 Mitigation\n\n## Migration Plan\n[Steps, rollback]\n\n## Open Questions\n- [...]\n```\n\n## Spec File Format\n\n### Critical: Scenario Formatting\n\n**CORRECT** (use #### headers):\n```markdown\n#### Scenario: User login success\n- **WHEN** valid credentials provided\n- **THEN** return JWT token\n```\n\n**WRONG** (don't use bullets or bold):\n```markdown\n- **Scenario: User login** \u274C\n**Scenario**: User login \u274C\n### Scenario: User login \u274C\n```\n\nEvery requirement MUST have at least one scenario.\n\n### Requirement Wording\n- Use SHALL/MUST for normative requirements (avoid should/may unless intentionally non-normative)\n\n### Delta Operations\n\n- `## ADDED Requirements` - New capabilities\n- `## MODIFIED Requirements` - Changed behavior\n- `## REMOVED Requirements` - Deprecated features\n- `## RENAMED Requirements` - Name changes\n\nHeaders matched with `trim(header)` - whitespace ignored.\n\n#### When to use ADDED vs MODIFIED\n- ADDED: Introduces a new capability or sub-capability that can stand alone as a requirement. Prefer ADDED when the change is orthogonal (e.g., adding \"Slash Command Configuration\") rather than altering the semantics of an existing requirement.\n- MODIFIED: Changes the behavior, scope, or acceptance criteria of an existing requirement. Always paste the full, updated requirement content (header + all scenarios). The archiver will replace the entire requirement with what you provide here; partial deltas will drop previous details.\n- RENAMED: Use when only the name changes. If you also change behavior, use RENAMED (name) plus MODIFIED (content) referencing the new name.\n\nCommon pitfall: Using MODIFIED to add a new concern without including the previous text. This causes loss of detail at archive time. If you aren\u2019t explicitly changing the existing requirement, add a new requirement under ADDED instead.\n\nAuthoring a MODIFIED requirement correctly:\n1) Locate the existing requirement in `openspec/specs/<capability>/spec.md`.\n2) Copy the entire requirement block (from `### Requirement: ...` through its scenarios).\n3) Paste it under `## MODIFIED Requirements` and edit to reflect the new behavior.\n4) Ensure the header text matches exactly (whitespace-insensitive) and keep at least one `#### Scenario:`.\n\nExample for RENAMED:\n```markdown\n## RENAMED Requirements\n- FROM: `### Requirement: Login`\n- TO: `### Requirement: User Authentication`\n```\n\n## Troubleshooting\n\n### Common Errors\n\n**\"Change must have at least one delta\"**\n- Check `changes/[name]/specs/` exists with .md files\n- Verify files have operation prefixes (## ADDED Requirements)\n\n**\"Requirement must have at least one scenario\"**\n- Check scenarios use `#### Scenario:` format (4 hashtags)\n- Don't use bullet points or bold for scenario headers\n\n**Silent scenario parsing failures**\n- Exact format required: `#### Scenario: Name`\n- Debug with: `openspec show [change] --json --deltas-only`\n\n### Validation Tips\n\n```bash\n# Always use strict mode for comprehensive checks\nopenspec validate [change] --strict --no-interactive\n\n# Debug delta parsing\nopenspec show [change] --json | jq '.deltas'\n\n# Check specific requirement\nopenspec show [spec] --json -r 1\n```\n\n## Happy Path Script\n\n```bash\n# 1) Explore current state\nopenspec spec list --long\nopenspec list\n# Optional full-text search:\n# rg -n \"Requirement:|Scenario:\" openspec/specs\n# rg -n \"^#|Requirement:\" openspec/changes\n\n# 2) Choose change id and scaffold\nCHANGE=add-two-factor-auth\nmkdir -p openspec/changes/$CHANGE/{specs/auth}\nprintf \"## Why\\n...\\n\\n## What Changes\\n- ...\\n\\n## Impact\\n- ...\\n\" > openspec/changes/$CHANGE/proposal.md\nprintf \"## 1. Implementation\\n- [ ] 1.1 ...\\n\" > openspec/changes/$CHANGE/tasks.md\n\n# 3) Add deltas (example)\ncat > openspec/changes/$CHANGE/specs/auth/spec.md << 'EOF'\n## ADDED Requirements\n### Requirement: Two-Factor Authentication\nUsers MUST provide a second factor during login.\n\n#### Scenario: OTP required\n- **WHEN** valid credentials are provided\n- **THEN** an OTP challenge is required\nEOF\n\n# 4) Validate\nopenspec validate $CHANGE --strict --no-interactive\n```\n\n## Multi-Capability Example\n\n```\nopenspec/changes/add-2fa-notify/\n\u251C\u2500\u2500 proposal.md\n\u251C\u2500\u2500 tasks.md\n\u2514\u2500\u2500 specs/\n \u251C\u2500\u2500 auth/\n \u2502 \u2514\u2500\u2500 spec.md # ADDED: Two-Factor Authentication\n \u2514\u2500\u2500 notifications/\n \u2514\u2500\u2500 spec.md # ADDED: OTP email notification\n```\n\nauth/spec.md\n```markdown\n## ADDED Requirements\n### Requirement: Two-Factor Authentication\n...\n```\n\nnotifications/spec.md\n```markdown\n## ADDED Requirements\n### Requirement: OTP Email Notification\n...\n```\n\n## Best Practices\n\n### Simplicity First\n- Default to <100 lines of new code\n- Single-file implementations until proven insufficient\n- Avoid frameworks without clear justification\n- Choose boring, proven patterns\n\n### Complexity Triggers\nOnly add complexity with:\n- Performance data showing current solution too slow\n- Concrete scale requirements (>1000 users, >100MB data)\n- Multiple proven use cases requiring abstraction\n\n### Clear References\n- Use `file.ts:42` format for code locations\n- Reference specs as `specs/auth/spec.md`\n- Link related changes and PRs\n\n### Capability Naming\n- Use verb-noun: `user-auth`, `payment-capture`\n- Single purpose per capability\n- 10-minute understandability rule\n- Split if description needs \"AND\"\n\n### Change ID Naming\n- Use kebab-case, short and descriptive: `add-two-factor-auth`\n- Prefer verb-led prefixes: `add-`, `update-`, `remove-`, `refactor-`\n- Ensure uniqueness; if taken, append `-2`, `-3`, etc.\n\n## Tool Selection Guide\n\n| Task | Tool | Why |\n|------|------|-----|\n| Find files by pattern | Glob | Fast pattern matching |\n| Search code content | Grep | Optimized regex search |\n| Read specific files | Read | Direct file access |\n| Explore unknown scope | Task | Multi-step investigation |\n\n## Error Recovery\n\n### Change Conflicts\n1. Run `openspec list` to see active changes\n2. Check for overlapping specs\n3. Coordinate with change owners\n4. Consider combining proposals\n\n### Validation Failures\n1. Run with `--strict` flag\n2. Check JSON output for details\n3. Verify spec file format\n4. Ensure scenarios properly formatted\n\n### Missing Context\n1. Read project.md first\n2. Check related specs\n3. Review recent archives\n4. Ask for clarification\n\n## Quick Reference\n\n### Stage Indicators\n- `changes/` - Proposed, not yet built\n- `specs/` - Built and deployed\n- `archive/` - Completed changes\n\n### File Purposes\n- `proposal.md` - Why and what\n- `tasks.md` - Implementation steps\n- `design.md` - Technical decisions\n- `spec.md` - Requirements and behavior\n\n### CLI Essentials\n```bash\nopenspec list # What's in progress?\nopenspec show [item] # View details\nopenspec validate --strict --no-interactive # Is it correct?\nopenspec archive <change-id> [--yes|-y] # Mark complete (add --yes for automation)\n```\n\nRemember: Specs are truth. Changes are proposals. Keep them in sync.\n";
|
|
2
|
-
//# sourceMappingURL=agents-template.d.ts.map
|