feat(costrict): add strict-spec skill and rename skill/ to skills/
This commit is contained in:
parent
e577962516
commit
70dda49946
|
|
@ -15,7 +15,7 @@ const __filename = fileURLToPath(import.meta.url)
|
|||
const __dirname = path.dirname(__filename)
|
||||
|
||||
const bundledSkillsDir = path.resolve(__dirname, '../.tmp/skills')
|
||||
const builtinTsFile = path.resolve(__dirname, '../src/costrict/skill/builtin.ts')
|
||||
const builtinTsFile = path.resolve(__dirname, '../src/costrict/skills/builtin.ts')
|
||||
|
||||
const BUILTIN_SKILLS = {
|
||||
'security-review': {
|
||||
|
|
|
|||
|
|
@ -84,6 +84,7 @@ export const STRICT_SPEC_AGENT: BuiltInAgentDefinition = {
|
|||
source: 'built-in',
|
||||
baseDir: 'built-in',
|
||||
model: 'inherit',
|
||||
omitClaudeMd: true,
|
||||
omitClaudeMd: false,
|
||||
isMainThread: true,
|
||||
getSystemPrompt: () => getStrictSpecSystemPrompt(),
|
||||
}
|
||||
|
|
|
|||
33
src/costrict/skills/strictSpec.ts
Normal file
33
src/costrict/skills/strictSpec.ts
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
import { registerBundledSkill } from '../../skills/bundledSkills.js'
|
||||
|
||||
export function registerStrictSpecSkill(): void {
|
||||
registerBundledSkill({
|
||||
name: 'strict-spec',
|
||||
description:
|
||||
'将用户需求按照标准阶段分配到对应工作流Agent执行。Use this when you need to orchestrate user requirements through the standard workflow stages: requirements clarification → architecture design → task planning → execution. This agent coordinates the Spec workflow with four rigorous stages to ensure high-quality delivery.',
|
||||
whenToUse:
|
||||
'将用户需求按照标准阶段分配到对应工作流Agent执行。Use this when you need to orchestrate user requirements through the standard workflow stages: requirements clarification → architecture design → task planning → execution. This agent coordinates the Spec workflow with four rigorous stages to ensure high-quality delivery.',
|
||||
userInvocable: true,
|
||||
// 关键:在子 Agent 中运行
|
||||
context: 'fork',
|
||||
// 关键:使用 StrictSpec Agent
|
||||
agent: 'StrictSpec',
|
||||
async getPromptForCommand(args) {
|
||||
const userRequest = args.trim()
|
||||
if (!userRequest) {
|
||||
return [
|
||||
{
|
||||
type: 'text',
|
||||
text: '请提供需要规划的需求描述。用法: /strict-spec <需求描述>',
|
||||
},
|
||||
]
|
||||
}
|
||||
return [
|
||||
{
|
||||
type: 'text',
|
||||
text: `用户需求:${userRequest}`,
|
||||
},
|
||||
]
|
||||
},
|
||||
})
|
||||
}
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
import { feature } from 'bun:bundle'
|
||||
import { shouldAutoEnableClaudeInChrome } from 'src/utils/claudeInChrome/setup.js'
|
||||
import { registerCodeReviewSecuritySkill } from 'src/costrict/skill/codeReviewSecurity.js'
|
||||
import { registerCodeReviewSecuritySkill } from 'src/costrict/skills/codeReviewSecurity.js'
|
||||
import { registerBatchSkill } from './batch.js'
|
||||
import { registerClaudeInChromeSkill } from './claudeInChrome.js'
|
||||
import { registerDebugSkill } from './debug.js'
|
||||
|
|
@ -15,9 +15,10 @@ import { registerLoopSkill } from './loop.js'
|
|||
import { registerDreamSkill } from './dream.js'
|
||||
import { registerUpdateConfigSkill } from './updateConfig.js'
|
||||
import { registerVerifySkill } from './verify.js'
|
||||
import { registerStrictPlanSkill } from '../../costrict/skill/strictPlan.js'
|
||||
import { registerProjectWikiSkill } from 'src/costrict/skill/projectWiki.js'
|
||||
import { registerTddSkill } from 'src/costrict/skill/tdd.js'
|
||||
import { registerStrictPlanSkill } from '../../costrict/skills/strictPlan.js'
|
||||
import { registerStrictSpecSkill } from '../../costrict/skills/strictSpec.js'
|
||||
import { registerProjectWikiSkill } from 'src/costrict/skills/projectWiki.js'
|
||||
import { registerTddSkill } from 'src/costrict/skills/tdd.js'
|
||||
|
||||
/**
|
||||
* Initialize all bundled skills.
|
||||
|
|
@ -34,6 +35,7 @@ export function initBundledSkills(): void {
|
|||
registerProjectWikiSkill()
|
||||
registerTddSkill()
|
||||
registerStrictPlanSkill()
|
||||
registerStrictSpecSkill()
|
||||
registerKeybindingsSkill()
|
||||
registerVerifySkill()
|
||||
registerDebugSkill()
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user