lightspec 0.1.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/LICENSE +22 -0
- package/README.md +435 -0
- package/bin/lightspec.js +3 -0
- package/dist/cli/index.d.ts +2 -0
- package/dist/cli/index.js +361 -0
- package/dist/commands/change.d.ts +35 -0
- package/dist/commands/change.js +277 -0
- package/dist/commands/completion.d.ts +72 -0
- package/dist/commands/completion.js +257 -0
- package/dist/commands/config.d.ts +8 -0
- package/dist/commands/config.js +198 -0
- package/dist/commands/feedback.d.ts +9 -0
- package/dist/commands/feedback.js +183 -0
- package/dist/commands/show.d.ts +14 -0
- package/dist/commands/show.js +132 -0
- package/dist/commands/spec.d.ts +15 -0
- package/dist/commands/spec.js +225 -0
- package/dist/commands/validate.d.ts +24 -0
- package/dist/commands/validate.js +294 -0
- package/dist/core/archive.d.ts +11 -0
- package/dist/core/archive.js +280 -0
- package/dist/core/completions/command-registry.d.ts +7 -0
- package/dist/core/completions/command-registry.js +456 -0
- package/dist/core/completions/completion-provider.d.ts +60 -0
- package/dist/core/completions/completion-provider.js +102 -0
- package/dist/core/completions/factory.d.ts +64 -0
- package/dist/core/completions/factory.js +75 -0
- package/dist/core/completions/generators/bash-generator.d.ts +32 -0
- package/dist/core/completions/generators/bash-generator.js +174 -0
- package/dist/core/completions/generators/fish-generator.d.ts +32 -0
- package/dist/core/completions/generators/fish-generator.js +157 -0
- package/dist/core/completions/generators/powershell-generator.d.ts +33 -0
- package/dist/core/completions/generators/powershell-generator.js +207 -0
- package/dist/core/completions/generators/zsh-generator.d.ts +44 -0
- package/dist/core/completions/generators/zsh-generator.js +250 -0
- package/dist/core/completions/installers/bash-installer.d.ts +87 -0
- package/dist/core/completions/installers/bash-installer.js +318 -0
- package/dist/core/completions/installers/fish-installer.d.ts +43 -0
- package/dist/core/completions/installers/fish-installer.js +143 -0
- package/dist/core/completions/installers/powershell-installer.d.ts +88 -0
- package/dist/core/completions/installers/powershell-installer.js +327 -0
- package/dist/core/completions/installers/zsh-installer.d.ts +125 -0
- package/dist/core/completions/installers/zsh-installer.js +449 -0
- package/dist/core/completions/templates/bash-templates.d.ts +6 -0
- package/dist/core/completions/templates/bash-templates.js +24 -0
- package/dist/core/completions/templates/fish-templates.d.ts +7 -0
- package/dist/core/completions/templates/fish-templates.js +39 -0
- package/dist/core/completions/templates/powershell-templates.d.ts +6 -0
- package/dist/core/completions/templates/powershell-templates.js +25 -0
- package/dist/core/completions/templates/zsh-templates.d.ts +6 -0
- package/dist/core/completions/templates/zsh-templates.js +36 -0
- package/dist/core/completions/types.d.ts +79 -0
- package/dist/core/completions/types.js +2 -0
- package/dist/core/config-prompts.d.ts +9 -0
- package/dist/core/config-prompts.js +34 -0
- package/dist/core/config-schema.d.ts +76 -0
- package/dist/core/config-schema.js +200 -0
- package/dist/core/config.d.ts +16 -0
- package/dist/core/config.js +30 -0
- package/dist/core/configurators/agents.d.ts +8 -0
- package/dist/core/configurators/agents.js +15 -0
- package/dist/core/configurators/base.d.ts +7 -0
- package/dist/core/configurators/base.js +2 -0
- package/dist/core/configurators/claude.d.ts +8 -0
- package/dist/core/configurators/claude.js +15 -0
- package/dist/core/configurators/cline.d.ts +8 -0
- package/dist/core/configurators/cline.js +15 -0
- package/dist/core/configurators/codebuddy.d.ts +8 -0
- package/dist/core/configurators/codebuddy.js +15 -0
- package/dist/core/configurators/costrict.d.ts +8 -0
- package/dist/core/configurators/costrict.js +15 -0
- package/dist/core/configurators/iflow.d.ts +8 -0
- package/dist/core/configurators/iflow.js +15 -0
- package/dist/core/configurators/qoder.d.ts +30 -0
- package/dist/core/configurators/qoder.js +42 -0
- package/dist/core/configurators/qwen.d.ts +24 -0
- package/dist/core/configurators/qwen.js +37 -0
- package/dist/core/configurators/registry.d.ts +9 -0
- package/dist/core/configurators/registry.js +43 -0
- package/dist/core/configurators/slash/amazon-q.d.ts +9 -0
- package/dist/core/configurators/slash/amazon-q.js +46 -0
- package/dist/core/configurators/slash/antigravity.d.ts +9 -0
- package/dist/core/configurators/slash/antigravity.js +23 -0
- package/dist/core/configurators/slash/auggie.d.ts +9 -0
- package/dist/core/configurators/slash/auggie.js +31 -0
- package/dist/core/configurators/slash/base.d.ts +19 -0
- package/dist/core/configurators/slash/base.js +69 -0
- package/dist/core/configurators/slash/claude.d.ts +9 -0
- package/dist/core/configurators/slash/claude.js +37 -0
- package/dist/core/configurators/slash/cline.d.ts +9 -0
- package/dist/core/configurators/slash/cline.js +23 -0
- package/dist/core/configurators/slash/codebuddy.d.ts +9 -0
- package/dist/core/configurators/slash/codebuddy.js +34 -0
- package/dist/core/configurators/slash/codex.d.ts +14 -0
- package/dist/core/configurators/slash/codex.js +109 -0
- package/dist/core/configurators/slash/continue.d.ts +9 -0
- package/dist/core/configurators/slash/continue.js +46 -0
- package/dist/core/configurators/slash/costrict.d.ts +9 -0
- package/dist/core/configurators/slash/costrict.js +31 -0
- package/dist/core/configurators/slash/crush.d.ts +9 -0
- package/dist/core/configurators/slash/crush.js +37 -0
- package/dist/core/configurators/slash/cursor.d.ts +9 -0
- package/dist/core/configurators/slash/cursor.js +37 -0
- package/dist/core/configurators/slash/factory.d.ts +10 -0
- package/dist/core/configurators/slash/factory.js +35 -0
- package/dist/core/configurators/slash/gemini.d.ts +9 -0
- package/dist/core/configurators/slash/gemini.js +22 -0
- package/dist/core/configurators/slash/github-copilot.d.ts +9 -0
- package/dist/core/configurators/slash/github-copilot.js +34 -0
- package/dist/core/configurators/slash/iflow.d.ts +9 -0
- package/dist/core/configurators/slash/iflow.js +37 -0
- package/dist/core/configurators/slash/kilocode.d.ts +9 -0
- package/dist/core/configurators/slash/kilocode.js +17 -0
- package/dist/core/configurators/slash/opencode.d.ts +12 -0
- package/dist/core/configurators/slash/opencode.js +72 -0
- package/dist/core/configurators/slash/qoder.d.ts +35 -0
- package/dist/core/configurators/slash/qoder.js +76 -0
- package/dist/core/configurators/slash/qwen.d.ts +32 -0
- package/dist/core/configurators/slash/qwen.js +49 -0
- package/dist/core/configurators/slash/registry.d.ts +8 -0
- package/dist/core/configurators/slash/registry.js +78 -0
- package/dist/core/configurators/slash/roocode.d.ts +9 -0
- package/dist/core/configurators/slash/roocode.js +23 -0
- package/dist/core/configurators/slash/toml-base.d.ts +10 -0
- package/dist/core/configurators/slash/toml-base.js +53 -0
- package/dist/core/configurators/slash/windsurf.d.ts +9 -0
- package/dist/core/configurators/slash/windsurf.js +23 -0
- package/dist/core/converters/json-converter.d.ts +6 -0
- package/dist/core/converters/json-converter.js +51 -0
- package/dist/core/global-config.d.ts +39 -0
- package/dist/core/global-config.js +115 -0
- package/dist/core/index.d.ts +2 -0
- package/dist/core/index.js +3 -0
- package/dist/core/init.d.ts +52 -0
- package/dist/core/init.js +644 -0
- package/dist/core/list.d.ts +9 -0
- package/dist/core/list.js +171 -0
- package/dist/core/parsers/change-parser.d.ts +13 -0
- package/dist/core/parsers/change-parser.js +193 -0
- package/dist/core/parsers/markdown-parser.d.ts +22 -0
- package/dist/core/parsers/markdown-parser.js +187 -0
- package/dist/core/parsers/requirement-blocks.d.ts +37 -0
- package/dist/core/parsers/requirement-blocks.js +201 -0
- package/dist/core/project-config.d.ts +64 -0
- package/dist/core/project-config.js +223 -0
- package/dist/core/schemas/base.schema.d.ts +13 -0
- package/dist/core/schemas/base.schema.js +13 -0
- package/dist/core/schemas/change.schema.d.ts +73 -0
- package/dist/core/schemas/change.schema.js +31 -0
- package/dist/core/schemas/index.d.ts +4 -0
- package/dist/core/schemas/index.js +4 -0
- package/dist/core/schemas/spec.schema.d.ts +18 -0
- package/dist/core/schemas/spec.schema.js +15 -0
- package/dist/core/specs-apply.d.ts +73 -0
- package/dist/core/specs-apply.js +384 -0
- package/dist/core/styles/palette.d.ts +7 -0
- package/dist/core/styles/palette.js +8 -0
- package/dist/core/templates/agents-root-stub.d.ts +2 -0
- package/dist/core/templates/agents-root-stub.js +17 -0
- package/dist/core/templates/agents-template.d.ts +2 -0
- package/dist/core/templates/agents-template.js +458 -0
- package/dist/core/templates/claude-template.d.ts +2 -0
- package/dist/core/templates/claude-template.js +2 -0
- package/dist/core/templates/cline-template.d.ts +2 -0
- package/dist/core/templates/cline-template.js +2 -0
- package/dist/core/templates/costrict-template.d.ts +2 -0
- package/dist/core/templates/costrict-template.js +2 -0
- package/dist/core/templates/index.d.ts +17 -0
- package/dist/core/templates/index.js +37 -0
- package/dist/core/templates/project-template.d.ts +8 -0
- package/dist/core/templates/project-template.js +32 -0
- package/dist/core/templates/slash-command-templates.d.ts +4 -0
- package/dist/core/templates/slash-command-templates.js +49 -0
- package/dist/core/update.d.ts +4 -0
- package/dist/core/update.js +88 -0
- package/dist/core/validation/constants.d.ts +34 -0
- package/dist/core/validation/constants.js +40 -0
- package/dist/core/validation/types.d.ts +18 -0
- package/dist/core/validation/types.js +2 -0
- package/dist/core/validation/validator.d.ts +33 -0
- package/dist/core/validation/validator.js +409 -0
- package/dist/core/view.d.ts +8 -0
- package/dist/core/view.js +168 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +3 -0
- package/dist/telemetry/config.d.ts +32 -0
- package/dist/telemetry/config.js +68 -0
- package/dist/telemetry/index.d.ts +31 -0
- package/dist/telemetry/index.js +103 -0
- package/dist/utils/file-system.d.ts +25 -0
- package/dist/utils/file-system.js +218 -0
- package/dist/utils/interactive.d.ts +18 -0
- package/dist/utils/interactive.js +21 -0
- package/dist/utils/item-discovery.d.ts +4 -0
- package/dist/utils/item-discovery.js +72 -0
- package/dist/utils/match.d.ts +3 -0
- package/dist/utils/match.js +22 -0
- package/dist/utils/shell-detection.d.ts +20 -0
- package/dist/utils/shell-detection.js +41 -0
- package/dist/utils/task-progress.d.ts +8 -0
- package/dist/utils/task-progress.js +36 -0
- package/package.json +82 -0
- package/scripts/postinstall.js +147 -0
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { SlashCommandConfigurator } from './base.js';
|
|
2
|
+
const FILE_PATHS = {
|
|
3
|
+
proposal: '.cospec/lightspec/commands/lightspec-proposal.md',
|
|
4
|
+
apply: '.cospec/lightspec/commands/lightspec-apply.md',
|
|
5
|
+
archive: '.cospec/lightspec/commands/lightspec-archive.md',
|
|
6
|
+
};
|
|
7
|
+
const FRONTMATTER = {
|
|
8
|
+
proposal: `---
|
|
9
|
+
description: "Scaffold a new LightSpec change and validate strictly."
|
|
10
|
+
argument-hint: feature description or request
|
|
11
|
+
---`,
|
|
12
|
+
apply: `---
|
|
13
|
+
description: "Implement an approved LightSpec change and keep tasks in sync."
|
|
14
|
+
argument-hint: change-id
|
|
15
|
+
---`,
|
|
16
|
+
archive: `---
|
|
17
|
+
description: "Archive a deployed LightSpec change and update specs."
|
|
18
|
+
argument-hint: change-id
|
|
19
|
+
---`
|
|
20
|
+
};
|
|
21
|
+
export class CostrictSlashCommandConfigurator extends SlashCommandConfigurator {
|
|
22
|
+
toolId = 'costrict';
|
|
23
|
+
isAvailable = true;
|
|
24
|
+
getRelativePath(id) {
|
|
25
|
+
return FILE_PATHS[id];
|
|
26
|
+
}
|
|
27
|
+
getFrontmatter(id) {
|
|
28
|
+
return FRONTMATTER[id];
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
//# sourceMappingURL=costrict.js.map
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { SlashCommandConfigurator } from './base.js';
|
|
2
|
+
import { SlashCommandId } from '../../templates/index.js';
|
|
3
|
+
export declare class CrushSlashCommandConfigurator extends SlashCommandConfigurator {
|
|
4
|
+
readonly toolId = "crush";
|
|
5
|
+
readonly isAvailable = true;
|
|
6
|
+
protected getRelativePath(id: SlashCommandId): string;
|
|
7
|
+
protected getFrontmatter(id: SlashCommandId): string;
|
|
8
|
+
}
|
|
9
|
+
//# sourceMappingURL=crush.d.ts.map
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { SlashCommandConfigurator } from './base.js';
|
|
2
|
+
const FILE_PATHS = {
|
|
3
|
+
proposal: '.crush/commands/lightspec/proposal.md',
|
|
4
|
+
apply: '.crush/commands/lightspec/apply.md',
|
|
5
|
+
archive: '.crush/commands/lightspec/archive.md'
|
|
6
|
+
};
|
|
7
|
+
const FRONTMATTER = {
|
|
8
|
+
proposal: `---
|
|
9
|
+
name: LightSpec: Proposal
|
|
10
|
+
description: Scaffold a new LightSpec change and validate strictly.
|
|
11
|
+
category: LightSpec
|
|
12
|
+
tags: [lightspec, change]
|
|
13
|
+
---`,
|
|
14
|
+
apply: `---
|
|
15
|
+
name: LightSpec: Apply
|
|
16
|
+
description: Implement an approved LightSpec change and keep tasks in sync.
|
|
17
|
+
category: LightSpec
|
|
18
|
+
tags: [lightspec, apply]
|
|
19
|
+
---`,
|
|
20
|
+
archive: `---
|
|
21
|
+
name: LightSpec: Archive
|
|
22
|
+
description: Archive a deployed LightSpec change and update specs.
|
|
23
|
+
category: LightSpec
|
|
24
|
+
tags: [lightspec, archive]
|
|
25
|
+
---`
|
|
26
|
+
};
|
|
27
|
+
export class CrushSlashCommandConfigurator extends SlashCommandConfigurator {
|
|
28
|
+
toolId = 'crush';
|
|
29
|
+
isAvailable = true;
|
|
30
|
+
getRelativePath(id) {
|
|
31
|
+
return FILE_PATHS[id];
|
|
32
|
+
}
|
|
33
|
+
getFrontmatter(id) {
|
|
34
|
+
return FRONTMATTER[id];
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
//# sourceMappingURL=crush.js.map
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { SlashCommandConfigurator } from './base.js';
|
|
2
|
+
import { SlashCommandId } from '../../templates/index.js';
|
|
3
|
+
export declare class CursorSlashCommandConfigurator extends SlashCommandConfigurator {
|
|
4
|
+
readonly toolId = "cursor";
|
|
5
|
+
readonly isAvailable = true;
|
|
6
|
+
protected getRelativePath(id: SlashCommandId): string;
|
|
7
|
+
protected getFrontmatter(id: SlashCommandId): string;
|
|
8
|
+
}
|
|
9
|
+
//# sourceMappingURL=cursor.d.ts.map
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { SlashCommandConfigurator } from './base.js';
|
|
2
|
+
const FILE_PATHS = {
|
|
3
|
+
proposal: '.cursor/commands/lightspec-proposal.md',
|
|
4
|
+
apply: '.cursor/commands/lightspec-apply.md',
|
|
5
|
+
archive: '.cursor/commands/lightspec-archive.md'
|
|
6
|
+
};
|
|
7
|
+
const FRONTMATTER = {
|
|
8
|
+
proposal: `---
|
|
9
|
+
name: /lightspec-proposal
|
|
10
|
+
id: lightspec-proposal
|
|
11
|
+
category: LightSpec
|
|
12
|
+
description: Scaffold a new LightSpec change and validate strictly.
|
|
13
|
+
---`,
|
|
14
|
+
apply: `---
|
|
15
|
+
name: /lightspec-apply
|
|
16
|
+
id: lightspec-apply
|
|
17
|
+
category: LightSpec
|
|
18
|
+
description: Implement an approved LightSpec change and keep tasks in sync.
|
|
19
|
+
---`,
|
|
20
|
+
archive: `---
|
|
21
|
+
name: /lightspec-archive
|
|
22
|
+
id: lightspec-archive
|
|
23
|
+
category: LightSpec
|
|
24
|
+
description: Archive a deployed LightSpec change and update specs.
|
|
25
|
+
---`
|
|
26
|
+
};
|
|
27
|
+
export class CursorSlashCommandConfigurator extends SlashCommandConfigurator {
|
|
28
|
+
toolId = 'cursor';
|
|
29
|
+
isAvailable = true;
|
|
30
|
+
getRelativePath(id) {
|
|
31
|
+
return FILE_PATHS[id];
|
|
32
|
+
}
|
|
33
|
+
getFrontmatter(id) {
|
|
34
|
+
return FRONTMATTER[id];
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
//# sourceMappingURL=cursor.js.map
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { SlashCommandConfigurator } from './base.js';
|
|
2
|
+
import { SlashCommandId } from '../../templates/index.js';
|
|
3
|
+
export declare class FactorySlashCommandConfigurator extends SlashCommandConfigurator {
|
|
4
|
+
readonly toolId = "factory";
|
|
5
|
+
readonly isAvailable = true;
|
|
6
|
+
protected getRelativePath(id: SlashCommandId): string;
|
|
7
|
+
protected getFrontmatter(id: SlashCommandId): string;
|
|
8
|
+
protected getBody(id: SlashCommandId): string;
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=factory.d.ts.map
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { SlashCommandConfigurator } from './base.js';
|
|
2
|
+
const FILE_PATHS = {
|
|
3
|
+
proposal: '.factory/commands/lightspec-proposal.md',
|
|
4
|
+
apply: '.factory/commands/lightspec-apply.md',
|
|
5
|
+
archive: '.factory/commands/lightspec-archive.md'
|
|
6
|
+
};
|
|
7
|
+
const FRONTMATTER = {
|
|
8
|
+
proposal: `---
|
|
9
|
+
description: Scaffold a new LightSpec change and validate strictly.
|
|
10
|
+
argument-hint: request or feature description
|
|
11
|
+
---`,
|
|
12
|
+
apply: `---
|
|
13
|
+
description: Implement an approved LightSpec change and keep tasks in sync.
|
|
14
|
+
argument-hint: change-id
|
|
15
|
+
---`,
|
|
16
|
+
archive: `---
|
|
17
|
+
description: Archive a deployed LightSpec change and update specs.
|
|
18
|
+
argument-hint: change-id
|
|
19
|
+
---`
|
|
20
|
+
};
|
|
21
|
+
export class FactorySlashCommandConfigurator extends SlashCommandConfigurator {
|
|
22
|
+
toolId = 'factory';
|
|
23
|
+
isAvailable = true;
|
|
24
|
+
getRelativePath(id) {
|
|
25
|
+
return FILE_PATHS[id];
|
|
26
|
+
}
|
|
27
|
+
getFrontmatter(id) {
|
|
28
|
+
return FRONTMATTER[id];
|
|
29
|
+
}
|
|
30
|
+
getBody(id) {
|
|
31
|
+
const baseBody = super.getBody(id);
|
|
32
|
+
return `${baseBody}\n\n$ARGUMENTS`;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
//# sourceMappingURL=factory.js.map
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { TomlSlashCommandConfigurator } from './toml-base.js';
|
|
2
|
+
import { SlashCommandId } from '../../templates/index.js';
|
|
3
|
+
export declare class GeminiSlashCommandConfigurator extends TomlSlashCommandConfigurator {
|
|
4
|
+
readonly toolId = "gemini";
|
|
5
|
+
readonly isAvailable = true;
|
|
6
|
+
protected getRelativePath(id: SlashCommandId): string;
|
|
7
|
+
protected getDescription(id: SlashCommandId): string;
|
|
8
|
+
}
|
|
9
|
+
//# sourceMappingURL=gemini.d.ts.map
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { TomlSlashCommandConfigurator } from './toml-base.js';
|
|
2
|
+
const FILE_PATHS = {
|
|
3
|
+
proposal: '.gemini/commands/lightspec/proposal.toml',
|
|
4
|
+
apply: '.gemini/commands/lightspec/apply.toml',
|
|
5
|
+
archive: '.gemini/commands/lightspec/archive.toml'
|
|
6
|
+
};
|
|
7
|
+
const DESCRIPTIONS = {
|
|
8
|
+
proposal: 'Scaffold a new LightSpec change and validate strictly.',
|
|
9
|
+
apply: 'Implement an approved LightSpec change and keep tasks in sync.',
|
|
10
|
+
archive: 'Archive a deployed LightSpec change and update specs.'
|
|
11
|
+
};
|
|
12
|
+
export class GeminiSlashCommandConfigurator extends TomlSlashCommandConfigurator {
|
|
13
|
+
toolId = 'gemini';
|
|
14
|
+
isAvailable = true;
|
|
15
|
+
getRelativePath(id) {
|
|
16
|
+
return FILE_PATHS[id];
|
|
17
|
+
}
|
|
18
|
+
getDescription(id) {
|
|
19
|
+
return DESCRIPTIONS[id];
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
//# sourceMappingURL=gemini.js.map
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { SlashCommandConfigurator } from './base.js';
|
|
2
|
+
import { SlashCommandId } from '../../templates/index.js';
|
|
3
|
+
export declare class GitHubCopilotSlashCommandConfigurator extends SlashCommandConfigurator {
|
|
4
|
+
readonly toolId = "github-copilot";
|
|
5
|
+
readonly isAvailable = true;
|
|
6
|
+
protected getRelativePath(id: SlashCommandId): string;
|
|
7
|
+
protected getFrontmatter(id: SlashCommandId): string;
|
|
8
|
+
}
|
|
9
|
+
//# sourceMappingURL=github-copilot.d.ts.map
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { SlashCommandConfigurator } from './base.js';
|
|
2
|
+
const FILE_PATHS = {
|
|
3
|
+
proposal: '.github/prompts/lightspec-proposal.prompt.md',
|
|
4
|
+
apply: '.github/prompts/lightspec-apply.prompt.md',
|
|
5
|
+
archive: '.github/prompts/lightspec-archive.prompt.md'
|
|
6
|
+
};
|
|
7
|
+
const FRONTMATTER = {
|
|
8
|
+
proposal: `---
|
|
9
|
+
description: Scaffold a new LightSpec change and validate strictly.
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
$ARGUMENTS`,
|
|
13
|
+
apply: `---
|
|
14
|
+
description: Implement an approved LightSpec change and keep tasks in sync.
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
$ARGUMENTS`,
|
|
18
|
+
archive: `---
|
|
19
|
+
description: Archive a deployed LightSpec change and update specs.
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
$ARGUMENTS`
|
|
23
|
+
};
|
|
24
|
+
export class GitHubCopilotSlashCommandConfigurator extends SlashCommandConfigurator {
|
|
25
|
+
toolId = 'github-copilot';
|
|
26
|
+
isAvailable = true;
|
|
27
|
+
getRelativePath(id) {
|
|
28
|
+
return FILE_PATHS[id];
|
|
29
|
+
}
|
|
30
|
+
getFrontmatter(id) {
|
|
31
|
+
return FRONTMATTER[id];
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
//# sourceMappingURL=github-copilot.js.map
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { SlashCommandConfigurator } from './base.js';
|
|
2
|
+
import { SlashCommandId } from '../../templates/index.js';
|
|
3
|
+
export declare class IflowSlashCommandConfigurator extends SlashCommandConfigurator {
|
|
4
|
+
readonly toolId = "iflow";
|
|
5
|
+
readonly isAvailable = true;
|
|
6
|
+
protected getRelativePath(id: SlashCommandId): string;
|
|
7
|
+
protected getFrontmatter(id: SlashCommandId): string;
|
|
8
|
+
}
|
|
9
|
+
//# sourceMappingURL=iflow.d.ts.map
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { SlashCommandConfigurator } from './base.js';
|
|
2
|
+
const FILE_PATHS = {
|
|
3
|
+
proposal: '.iflow/commands/lightspec-proposal.md',
|
|
4
|
+
apply: '.iflow/commands/lightspec-apply.md',
|
|
5
|
+
archive: '.iflow/commands/lightspec-archive.md'
|
|
6
|
+
};
|
|
7
|
+
const FRONTMATTER = {
|
|
8
|
+
proposal: `---
|
|
9
|
+
name: /lightspec-proposal
|
|
10
|
+
id: lightspec-proposal
|
|
11
|
+
category: LightSpec
|
|
12
|
+
description: Scaffold a new LightSpec change and validate strictly.
|
|
13
|
+
---`,
|
|
14
|
+
apply: `---
|
|
15
|
+
name: /lightspec-apply
|
|
16
|
+
id: lightspec-apply
|
|
17
|
+
category: LightSpec
|
|
18
|
+
description: Implement an approved LightSpec change and keep tasks in sync.
|
|
19
|
+
---`,
|
|
20
|
+
archive: `---
|
|
21
|
+
name: /lightspec-archive
|
|
22
|
+
id: lightspec-archive
|
|
23
|
+
category: LightSpec
|
|
24
|
+
description: Archive a deployed LightSpec change and update specs.
|
|
25
|
+
---`
|
|
26
|
+
};
|
|
27
|
+
export class IflowSlashCommandConfigurator extends SlashCommandConfigurator {
|
|
28
|
+
toolId = 'iflow';
|
|
29
|
+
isAvailable = true;
|
|
30
|
+
getRelativePath(id) {
|
|
31
|
+
return FILE_PATHS[id];
|
|
32
|
+
}
|
|
33
|
+
getFrontmatter(id) {
|
|
34
|
+
return FRONTMATTER[id];
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
//# sourceMappingURL=iflow.js.map
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { SlashCommandConfigurator } from "./base.js";
|
|
2
|
+
import { SlashCommandId } from "../../templates/index.js";
|
|
3
|
+
export declare class KiloCodeSlashCommandConfigurator extends SlashCommandConfigurator {
|
|
4
|
+
readonly toolId = "kilocode";
|
|
5
|
+
readonly isAvailable = true;
|
|
6
|
+
protected getRelativePath(id: SlashCommandId): string;
|
|
7
|
+
protected getFrontmatter(_id: SlashCommandId): string | undefined;
|
|
8
|
+
}
|
|
9
|
+
//# sourceMappingURL=kilocode.d.ts.map
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { SlashCommandConfigurator } from "./base.js";
|
|
2
|
+
const FILE_PATHS = {
|
|
3
|
+
proposal: ".kilocode/workflows/lightspec-proposal.md",
|
|
4
|
+
apply: ".kilocode/workflows/lightspec-apply.md",
|
|
5
|
+
archive: ".kilocode/workflows/lightspec-archive.md"
|
|
6
|
+
};
|
|
7
|
+
export class KiloCodeSlashCommandConfigurator extends SlashCommandConfigurator {
|
|
8
|
+
toolId = "kilocode";
|
|
9
|
+
isAvailable = true;
|
|
10
|
+
getRelativePath(id) {
|
|
11
|
+
return FILE_PATHS[id];
|
|
12
|
+
}
|
|
13
|
+
getFrontmatter(_id) {
|
|
14
|
+
return undefined;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
//# sourceMappingURL=kilocode.js.map
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { SlashCommandConfigurator } from "./base.js";
|
|
2
|
+
import { SlashCommandId } from "../../templates/index.js";
|
|
3
|
+
export declare class OpenCodeSlashCommandConfigurator extends SlashCommandConfigurator {
|
|
4
|
+
readonly toolId = "opencode";
|
|
5
|
+
readonly isAvailable = true;
|
|
6
|
+
protected getRelativePath(id: SlashCommandId): string;
|
|
7
|
+
protected getFrontmatter(id: SlashCommandId): string | undefined;
|
|
8
|
+
generateAll(projectPath: string, _lightspecDir: string): Promise<string[]>;
|
|
9
|
+
updateExisting(projectPath: string, _lightspecDir: string): Promise<string[]>;
|
|
10
|
+
private rewriteArchiveFile;
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=opencode.d.ts.map
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { SlashCommandConfigurator } from "./base.js";
|
|
2
|
+
import { FileSystemUtils } from "../../../utils/file-system.js";
|
|
3
|
+
import { LIGHTSPEC_MARKERS } from "../../config.js";
|
|
4
|
+
const FILE_PATHS = {
|
|
5
|
+
proposal: ".opencode/command/lightspec-proposal.md",
|
|
6
|
+
apply: ".opencode/command/lightspec-apply.md",
|
|
7
|
+
archive: ".opencode/command/lightspec-archive.md",
|
|
8
|
+
};
|
|
9
|
+
const FRONTMATTER = {
|
|
10
|
+
proposal: `---
|
|
11
|
+
description: Scaffold a new LightSpec change and validate strictly.
|
|
12
|
+
---
|
|
13
|
+
The user has requested the following change proposal. Use the lightspec instructions to create their change proposal.
|
|
14
|
+
<UserRequest>
|
|
15
|
+
$ARGUMENTS
|
|
16
|
+
</UserRequest>
|
|
17
|
+
`,
|
|
18
|
+
apply: `---
|
|
19
|
+
description: Implement an approved LightSpec 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 LightSpec 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, _lightspecDir) {
|
|
44
|
+
const createdOrUpdated = await super.generateAll(projectPath, _lightspecDir);
|
|
45
|
+
await this.rewriteArchiveFile(projectPath);
|
|
46
|
+
return createdOrUpdated;
|
|
47
|
+
}
|
|
48
|
+
async updateExisting(projectPath, _lightspecDir) {
|
|
49
|
+
const updated = await super.updateExisting(projectPath, _lightspecDir);
|
|
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(`${LIGHTSPEC_MARKERS.start}\n${body}\n${LIGHTSPEC_MARKERS.end}`);
|
|
68
|
+
await FileSystemUtils.writeFile(archivePath, sections.join("\n") + "\n");
|
|
69
|
+
return true;
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
//# sourceMappingURL=opencode.js.map
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { SlashCommandConfigurator } from './base.js';
|
|
2
|
+
import { SlashCommandId } from '../../templates/index.js';
|
|
3
|
+
/**
|
|
4
|
+
* Qoder Slash Command Configurator
|
|
5
|
+
*
|
|
6
|
+
* Manages LightSpec slash commands for Qoder AI assistant.
|
|
7
|
+
* Creates three workflow commands: proposal, apply, and archive.
|
|
8
|
+
* Uses colon-separated command format (/lightspec: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
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import { SlashCommandConfigurator } from './base.js';
|
|
2
|
+
/**
|
|
3
|
+
* File paths for Qoder slash commands
|
|
4
|
+
* Maps each LightSpec workflow stage to its command file location
|
|
5
|
+
* Commands are stored in .qoder/commands/lightspec/ directory
|
|
6
|
+
*/
|
|
7
|
+
const FILE_PATHS = {
|
|
8
|
+
// Create and validate new change proposals
|
|
9
|
+
proposal: '.qoder/commands/lightspec/proposal.md',
|
|
10
|
+
// Implement approved changes with task tracking
|
|
11
|
+
apply: '.qoder/commands/lightspec/apply.md',
|
|
12
|
+
// Archive completed changes and update specs
|
|
13
|
+
archive: '.qoder/commands/lightspec/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: LightSpec: Proposal
|
|
23
|
+
description: Scaffold a new LightSpec change and validate strictly.
|
|
24
|
+
category: LightSpec
|
|
25
|
+
tags: [lightspec, change]
|
|
26
|
+
---`,
|
|
27
|
+
apply: `---
|
|
28
|
+
name: LightSpec: Apply
|
|
29
|
+
description: Implement an approved LightSpec change and keep tasks in sync.
|
|
30
|
+
category: LightSpec
|
|
31
|
+
tags: [lightspec, apply]
|
|
32
|
+
---`,
|
|
33
|
+
archive: `---
|
|
34
|
+
name: LightSpec: Archive
|
|
35
|
+
description: Archive a deployed LightSpec change and update specs.
|
|
36
|
+
category: LightSpec
|
|
37
|
+
tags: [lightspec, archive]
|
|
38
|
+
---`
|
|
39
|
+
};
|
|
40
|
+
/**
|
|
41
|
+
* Qoder Slash Command Configurator
|
|
42
|
+
*
|
|
43
|
+
* Manages LightSpec slash commands for Qoder AI assistant.
|
|
44
|
+
* Creates three workflow commands: proposal, apply, and archive.
|
|
45
|
+
* Uses colon-separated command format (/lightspec: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
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Qwen slash command configurator for LightSpec 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
|
+
* - /lightspec-proposal: Create an LightSpec change proposal
|
|
16
|
+
* - /lightspec-apply: Apply an approved LightSpec change
|
|
17
|
+
* - /lightspec-archive: Archive a deployed LightSpec 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
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Qwen slash command configurator for LightSpec 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/lightspec-proposal.toml',
|
|
15
|
+
apply: '.qwen/commands/lightspec-apply.toml',
|
|
16
|
+
archive: '.qwen/commands/lightspec-archive.toml'
|
|
17
|
+
};
|
|
18
|
+
const DESCRIPTIONS = {
|
|
19
|
+
proposal: 'Scaffold a new LightSpec change and validate strictly.',
|
|
20
|
+
apply: 'Implement an approved LightSpec change and keep tasks in sync.',
|
|
21
|
+
archive: 'Archive a deployed LightSpec 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
|
+
* - /lightspec-proposal: Create an LightSpec change proposal
|
|
29
|
+
* - /lightspec-apply: Apply an approved LightSpec change
|
|
30
|
+
* - /lightspec-archive: Archive a deployed LightSpec 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
|
|
@@ -0,0 +1,8 @@
|
|
|
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
|