claude-code-best/src/costrict/skills/tdd.ts
xixingde 75c510cb9d feat(agents): add visibleTo access control and orchestrator agents for TDD/Wiki workflows
- Add `visibleTo` field to `BaseAgentDefinition` to restrict agent visibility to specific parent agent types
- Filter agents with `visibleTo` restrictions from wildcard agent lists in prompt generation
- Add new `TDD_AGENT` and `WIKI_AGENT` orchestrator agents as entry points for TDD and Wiki workflows
- Register `WIKI_AGENT` in built-in agents list with workflow grouping comments
- Mark all TDD sub-agents (`TddRunAndFix`, `TddTestAndFix`, `TddTestDesign`, `TddTestPrepare`) as `visibleTo: ['TDD']`
- Mark all Wiki sub-agents (`WikiProjectAnalyze`, `WikiCatalogueDesign`, `WikiDocumentGenerate`, `WikiIndexGeneration`) as `visibleTo: ['WIKI']`
- Mark workflow-specific agents (`DesignAgent`, `QuickExplore`, `Requirement`, `SubCoding`, `TaskCheck`, `TaskPlan`, `StrictSpec`) with appropriate `visibleTo` restrictions
- Refactor `strict-project-wiki` and `strict-test` skills to delegate directly to orchestrator agents via `context: 'fork'`
- Remove stale package-level node_modules symlinks
2026-04-15 15:49:28 +08:00

31 lines
822 B
TypeScript

import { registerBundledSkill } from 'src/skills/bundledSkills.js'
export function registerTddSkill(): void {
registerBundledSkill({
name: 'strict-test',
description:
'execute comprehensive testing workflow: confirm requirements, generate test cases, and execute tests with automated fixes',
userInvocable: true,
disableModelInvocation: true,
context: 'fork',
agent: 'TDD',
async getPromptForCommand(args) {
const userRequest = args.trim()
if (!userRequest) {
return [
{
type: 'text',
text: '请提供需要规划的需求描述。用法: /strict-test <需求描述>',
},
]
}
return [
{
type: 'text',
text: `用户输入:${userRequest}`,
},
]
},
})
}