@zhuan-ai/zhuanspec 1.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +22 -0
- package/README.md +461 -0
- package/README.zh.md +434 -0
- package/bin/zhuanspec.js +3 -0
- package/dist/cli/index.d.ts +2 -0
- package/dist/cli/index.js +356 -0
- package/dist/commands/artifact-workflow.d.ts +13 -0
- package/dist/commands/artifact-workflow.js +916 -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 +221 -0
- package/dist/commands/config.d.ts +8 -0
- package/dist/commands/config.js +198 -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 +30 -0
- package/dist/core/archive.js +438 -0
- package/dist/core/artifact-graph/graph.d.ts +56 -0
- package/dist/core/artifact-graph/graph.js +141 -0
- package/dist/core/artifact-graph/index.d.ts +7 -0
- package/dist/core/artifact-graph/index.js +13 -0
- package/dist/core/artifact-graph/instruction-loader.d.ts +134 -0
- package/dist/core/artifact-graph/instruction-loader.js +180 -0
- package/dist/core/artifact-graph/resolver.d.ts +61 -0
- package/dist/core/artifact-graph/resolver.js +187 -0
- package/dist/core/artifact-graph/schema.d.ts +13 -0
- package/dist/core/artifact-graph/schema.js +108 -0
- package/dist/core/artifact-graph/state.d.ts +12 -0
- package/dist/core/artifact-graph/state.js +54 -0
- package/dist/core/artifact-graph/types.d.ts +45 -0
- package/dist/core/artifact-graph/types.js +43 -0
- package/dist/core/completions/command-registry.d.ts +7 -0
- package/dist/core/completions/command-registry.js +362 -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 +51 -0
- package/dist/core/completions/factory.js +57 -0
- package/dist/core/completions/generators/zsh-generator.d.ts +58 -0
- package/dist/core/completions/generators/zsh-generator.js +319 -0
- package/dist/core/completions/installers/zsh-installer.d.ts +136 -0
- package/dist/core/completions/installers/zsh-installer.js +449 -0
- package/dist/core/completions/types.d.ts +78 -0
- package/dist/core/completions/types.js +2 -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 +29 -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 +37 -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/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 +75 -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 +60 -0
- package/dist/core/init.js +861 -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 +34 -0
- package/dist/core/project-config.js +79 -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/skill-discovery.d.ts +24 -0
- package/dist/core/skill-discovery.js +153 -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 +706 -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/skill-templates.d.ts +103 -0
- package/dist/core/templates/skill-templates.js +2131 -0
- package/dist/core/templates/slash-command-templates.d.ts +4 -0
- package/dist/core/templates/slash-command-templates.js +81 -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/utils/change-metadata.d.ts +47 -0
- package/dist/utils/change-metadata.js +130 -0
- package/dist/utils/change-utils.d.ts +51 -0
- package/dist/utils/change-utils.js +100 -0
- package/dist/utils/file-system.d.ts +19 -0
- package/dist/utils/file-system.js +177 -0
- package/dist/utils/index.d.ts +4 -0
- package/dist/utils/index.js +5 -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 +81 -0
- package/schemas/spec-driven/schema.yaml +205 -0
- package/schemas/spec-driven/templates/design.md +19 -0
- package/schemas/spec-driven/templates/proposal.md +43 -0
- package/schemas/spec-driven/templates/spec.md +8 -0
- package/schemas/spec-driven/templates/tasks.md +25 -0
- package/schemas/tdd/schema.yaml +213 -0
- package/schemas/tdd/templates/docs.md +0 -0
- package/schemas/tdd/templates/implementation.md +11 -0
- package/schemas/tdd/templates/spec.md +11 -0
- package/schemas/tdd/templates/test.md +11 -0
- package/scripts/postinstall.js +147 -0
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { ProjectContext } from './project-template.js';
|
|
2
|
+
import { SlashCommandId } from './slash-command-templates.js';
|
|
3
|
+
export interface Template {
|
|
4
|
+
path: string;
|
|
5
|
+
content: string | ((context: ProjectContext) => string);
|
|
6
|
+
}
|
|
7
|
+
export declare class TemplateManager {
|
|
8
|
+
static getTemplates(context?: ProjectContext): Template[];
|
|
9
|
+
static getClaudeTemplate(): string;
|
|
10
|
+
static getClineTemplate(): string;
|
|
11
|
+
static getCostrictTemplate(): string;
|
|
12
|
+
static getAgentsStandardTemplate(): string;
|
|
13
|
+
static getSlashCommandBody(id: SlashCommandId): string;
|
|
14
|
+
}
|
|
15
|
+
export { ProjectContext } from './project-template.js';
|
|
16
|
+
export type { SlashCommandId } from './slash-command-templates.js';
|
|
17
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { agentsTemplate } from './agents-template.js';
|
|
2
|
+
import { projectTemplate } from './project-template.js';
|
|
3
|
+
import { claudeTemplate } from './claude-template.js';
|
|
4
|
+
import { clineTemplate } from './cline-template.js';
|
|
5
|
+
import { costrictTemplate } from './costrict-template.js';
|
|
6
|
+
import { agentsRootStubTemplate } from './agents-root-stub.js';
|
|
7
|
+
import { getSlashCommandBody } from './slash-command-templates.js';
|
|
8
|
+
export class TemplateManager {
|
|
9
|
+
static getTemplates(context = {}) {
|
|
10
|
+
return [
|
|
11
|
+
{
|
|
12
|
+
path: 'AGENTS.md',
|
|
13
|
+
content: agentsTemplate
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
path: 'project.md',
|
|
17
|
+
content: projectTemplate(context)
|
|
18
|
+
}
|
|
19
|
+
];
|
|
20
|
+
}
|
|
21
|
+
static getClaudeTemplate() {
|
|
22
|
+
return claudeTemplate;
|
|
23
|
+
}
|
|
24
|
+
static getClineTemplate() {
|
|
25
|
+
return clineTemplate;
|
|
26
|
+
}
|
|
27
|
+
static getCostrictTemplate() {
|
|
28
|
+
return costrictTemplate;
|
|
29
|
+
}
|
|
30
|
+
static getAgentsStandardTemplate() {
|
|
31
|
+
return agentsRootStubTemplate;
|
|
32
|
+
}
|
|
33
|
+
static getSlashCommandBody(id) {
|
|
34
|
+
return getSlashCommandBody(id);
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
export const projectTemplate = (context = {}) => `# ${context.projectName || 'Project'} Context
|
|
2
|
+
|
|
3
|
+
## Purpose
|
|
4
|
+
${context.description || '[Describe your project\'s purpose and goals]'}
|
|
5
|
+
|
|
6
|
+
## Tech Stack
|
|
7
|
+
${context.techStack?.length ? context.techStack.map(tech => `- ${tech}`).join('\n') : '- [List your primary technologies]\n- [e.g., TypeScript, React, Node.js]'}
|
|
8
|
+
|
|
9
|
+
## Project Conventions
|
|
10
|
+
|
|
11
|
+
### Code Style
|
|
12
|
+
[Describe your code style preferences, formatting rules, and naming conventions]
|
|
13
|
+
|
|
14
|
+
### Architecture Patterns
|
|
15
|
+
[Document your architectural decisions and patterns]
|
|
16
|
+
|
|
17
|
+
### Testing Strategy
|
|
18
|
+
[Explain your testing approach and requirements]
|
|
19
|
+
|
|
20
|
+
### Git Workflow
|
|
21
|
+
[Describe your branching strategy and commit conventions]
|
|
22
|
+
|
|
23
|
+
## Domain Context
|
|
24
|
+
[Add domain-specific knowledge that AI assistants need to understand]
|
|
25
|
+
|
|
26
|
+
## Important Constraints
|
|
27
|
+
[List any technical, business, or regulatory constraints]
|
|
28
|
+
|
|
29
|
+
## External Dependencies
|
|
30
|
+
[Document key external services, APIs, or systems]
|
|
31
|
+
`;
|
|
32
|
+
//# sourceMappingURL=project-template.js.map
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Agent Skill Templates
|
|
3
|
+
*
|
|
4
|
+
* Templates for generating Agent Skills compatible with:
|
|
5
|
+
* - Claude Code
|
|
6
|
+
* - Cursor (Settings → Rules → Import Settings)
|
|
7
|
+
* - Windsurf
|
|
8
|
+
* - Other Agent Skills-compatible editors
|
|
9
|
+
*/
|
|
10
|
+
export interface SkillTemplate {
|
|
11
|
+
name: string;
|
|
12
|
+
description: string;
|
|
13
|
+
instructions: string;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Template for zhuanspec-new-change skill
|
|
17
|
+
* Based on /opsx:new command
|
|
18
|
+
*/
|
|
19
|
+
export declare function getNewChangeSkillTemplate(): SkillTemplate;
|
|
20
|
+
/**
|
|
21
|
+
* Template for zhuanspec-continue-change skill
|
|
22
|
+
* Based on /opsx:continue command
|
|
23
|
+
*/
|
|
24
|
+
export declare function getContinueChangeSkillTemplate(): SkillTemplate;
|
|
25
|
+
/**
|
|
26
|
+
* Template for zhuanspec-apply-change skill
|
|
27
|
+
* For implementing tasks from a completed (or in-progress) change
|
|
28
|
+
*/
|
|
29
|
+
export declare function getApplyChangeSkillTemplate(): SkillTemplate;
|
|
30
|
+
/**
|
|
31
|
+
* Template for zhuanspec-ff-change skill
|
|
32
|
+
* Fast-forward through artifact creation
|
|
33
|
+
*/
|
|
34
|
+
export declare function getFfChangeSkillTemplate(): SkillTemplate;
|
|
35
|
+
/**
|
|
36
|
+
* Template for zhuanspec-sync-specs skill
|
|
37
|
+
* For syncing delta specs from a change to main specs (agent-driven)
|
|
38
|
+
*/
|
|
39
|
+
export declare function getSyncSpecsSkillTemplate(): SkillTemplate;
|
|
40
|
+
/**
|
|
41
|
+
* Template for zhuanspec-propose-change skill
|
|
42
|
+
* One-step workflow: create change + generate all planning artifacts
|
|
43
|
+
*/
|
|
44
|
+
export declare function getProposeChangeSkillTemplate(): SkillTemplate;
|
|
45
|
+
/**
|
|
46
|
+
* Template for zhuanspec-explore skill
|
|
47
|
+
* For exploration before committing to a change
|
|
48
|
+
*/
|
|
49
|
+
export declare function getExploreSkillTemplate(): SkillTemplate;
|
|
50
|
+
/**
|
|
51
|
+
* Template for zhuanspec-verify skill
|
|
52
|
+
* For verifying implementation matches artifacts
|
|
53
|
+
*/
|
|
54
|
+
export declare function getVerifySkillTemplate(): SkillTemplate;
|
|
55
|
+
/**
|
|
56
|
+
* Template for /opsx:propose slash command
|
|
57
|
+
*/
|
|
58
|
+
export declare function getOpsxProposeCommandTemplate(): CommandTemplate;
|
|
59
|
+
/**
|
|
60
|
+
* Template for /opsx:explore slash command
|
|
61
|
+
*/
|
|
62
|
+
export declare function getOpsxExploreCommandTemplate(): CommandTemplate;
|
|
63
|
+
/**
|
|
64
|
+
* Template for /opsx:verify slash command
|
|
65
|
+
*/
|
|
66
|
+
export declare function getOpsxVerifyCommandTemplate(): CommandTemplate;
|
|
67
|
+
export interface CommandTemplate {
|
|
68
|
+
name: string;
|
|
69
|
+
description: string;
|
|
70
|
+
category: string;
|
|
71
|
+
tags: string[];
|
|
72
|
+
content: string;
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* Template for /opsx:new slash command
|
|
76
|
+
*/
|
|
77
|
+
export declare function getOpsxNewCommandTemplate(): CommandTemplate;
|
|
78
|
+
/**
|
|
79
|
+
* Template for /opsx:continue slash command
|
|
80
|
+
*/
|
|
81
|
+
export declare function getOpsxContinueCommandTemplate(): CommandTemplate;
|
|
82
|
+
/**
|
|
83
|
+
* Template for /opsx:apply slash command
|
|
84
|
+
*/
|
|
85
|
+
export declare function getOpsxApplyCommandTemplate(): CommandTemplate;
|
|
86
|
+
/**
|
|
87
|
+
* Template for /opsx:ff slash command
|
|
88
|
+
*/
|
|
89
|
+
export declare function getOpsxFfCommandTemplate(): CommandTemplate;
|
|
90
|
+
/**
|
|
91
|
+
* Template for zhuanspec-archive-change skill
|
|
92
|
+
* For archiving completed changes in the experimental workflow
|
|
93
|
+
*/
|
|
94
|
+
export declare function getArchiveChangeSkillTemplate(): SkillTemplate;
|
|
95
|
+
/**
|
|
96
|
+
* Template for /opsx:sync slash command
|
|
97
|
+
*/
|
|
98
|
+
export declare function getOpsxSyncCommandTemplate(): CommandTemplate;
|
|
99
|
+
/**
|
|
100
|
+
* Template for /opsx:archive slash command
|
|
101
|
+
*/
|
|
102
|
+
export declare function getOpsxArchiveCommandTemplate(): CommandTemplate;
|
|
103
|
+
//# sourceMappingURL=skill-templates.d.ts.map
|