red64-cli 0.1.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/README.md +454 -0
- package/dist/cli/parseArgs.d.ts +16 -0
- package/dist/cli/parseArgs.d.ts.map +1 -0
- package/dist/cli/parseArgs.js +172 -0
- package/dist/cli/parseArgs.js.map +1 -0
- package/dist/cli/validateFlags.d.ts +22 -0
- package/dist/cli/validateFlags.d.ts.map +1 -0
- package/dist/cli/validateFlags.js +24 -0
- package/dist/cli/validateFlags.js.map +1 -0
- package/dist/cli.d.ts +7 -0
- package/dist/cli.d.ts.map +1 -0
- package/dist/cli.js +90 -0
- package/dist/cli.js.map +1 -0
- package/dist/components/App.d.ts +20 -0
- package/dist/components/App.d.ts.map +1 -0
- package/dist/components/App.js +35 -0
- package/dist/components/App.js.map +1 -0
- package/dist/components/CommandRouter.d.ts +21 -0
- package/dist/components/CommandRouter.d.ts.map +1 -0
- package/dist/components/CommandRouter.js +30 -0
- package/dist/components/CommandRouter.js.map +1 -0
- package/dist/components/GlobalConfig.d.ts +26 -0
- package/dist/components/GlobalConfig.d.ts.map +1 -0
- package/dist/components/GlobalConfig.js +30 -0
- package/dist/components/GlobalConfig.js.map +1 -0
- package/dist/components/index.d.ts +9 -0
- package/dist/components/index.d.ts.map +1 -0
- package/dist/components/index.js +9 -0
- package/dist/components/index.js.map +1 -0
- package/dist/components/init/CompleteStep.d.ts +11 -0
- package/dist/components/init/CompleteStep.d.ts.map +1 -0
- package/dist/components/init/CompleteStep.js +15 -0
- package/dist/components/init/CompleteStep.js.map +1 -0
- package/dist/components/init/ErrorStep.d.ts +14 -0
- package/dist/components/init/ErrorStep.d.ts.map +1 -0
- package/dist/components/init/ErrorStep.js +36 -0
- package/dist/components/init/ErrorStep.js.map +1 -0
- package/dist/components/init/FetchStep.d.ts +15 -0
- package/dist/components/init/FetchStep.d.ts.map +1 -0
- package/dist/components/init/FetchStep.js +33 -0
- package/dist/components/init/FetchStep.js.map +1 -0
- package/dist/components/init/SetupStep.d.ts +14 -0
- package/dist/components/init/SetupStep.d.ts.map +1 -0
- package/dist/components/init/SetupStep.js +78 -0
- package/dist/components/init/SetupStep.js.map +1 -0
- package/dist/components/init/SteeringStep.d.ts +12 -0
- package/dist/components/init/SteeringStep.d.ts.map +1 -0
- package/dist/components/init/SteeringStep.js +43 -0
- package/dist/components/init/SteeringStep.js.map +1 -0
- package/dist/components/init/WelcomeStep.d.ts +12 -0
- package/dist/components/init/WelcomeStep.d.ts.map +1 -0
- package/dist/components/init/WelcomeStep.js +52 -0
- package/dist/components/init/WelcomeStep.js.map +1 -0
- package/dist/components/init/index.d.ts +11 -0
- package/dist/components/init/index.d.ts.map +1 -0
- package/dist/components/init/index.js +10 -0
- package/dist/components/init/index.js.map +1 -0
- package/dist/components/init/types.d.ts +98 -0
- package/dist/components/init/types.d.ts.map +1 -0
- package/dist/components/init/types.js +6 -0
- package/dist/components/init/types.js.map +1 -0
- package/dist/components/screens/AbortScreen.d.ts +14 -0
- package/dist/components/screens/AbortScreen.d.ts.map +1 -0
- package/dist/components/screens/AbortScreen.js +181 -0
- package/dist/components/screens/AbortScreen.js.map +1 -0
- package/dist/components/screens/ApprovalScreen.d.ts +24 -0
- package/dist/components/screens/ApprovalScreen.d.ts.map +1 -0
- package/dist/components/screens/ApprovalScreen.js +82 -0
- package/dist/components/screens/ApprovalScreen.js.map +1 -0
- package/dist/components/screens/HelpScreen.d.ts +20 -0
- package/dist/components/screens/HelpScreen.d.ts.map +1 -0
- package/dist/components/screens/HelpScreen.js +70 -0
- package/dist/components/screens/HelpScreen.js.map +1 -0
- package/dist/components/screens/InitScreen.d.ts +15 -0
- package/dist/components/screens/InitScreen.d.ts.map +1 -0
- package/dist/components/screens/InitScreen.js +420 -0
- package/dist/components/screens/InitScreen.js.map +1 -0
- package/dist/components/screens/ListScreen.d.ts +14 -0
- package/dist/components/screens/ListScreen.d.ts.map +1 -0
- package/dist/components/screens/ListScreen.js +57 -0
- package/dist/components/screens/ListScreen.js.map +1 -0
- package/dist/components/screens/ProgressScreen.d.ts +26 -0
- package/dist/components/screens/ProgressScreen.d.ts.map +1 -0
- package/dist/components/screens/ProgressScreen.js +64 -0
- package/dist/components/screens/ProgressScreen.js.map +1 -0
- package/dist/components/screens/ResumeScreen.d.ts +14 -0
- package/dist/components/screens/ResumeScreen.d.ts.map +1 -0
- package/dist/components/screens/ResumeScreen.js +108 -0
- package/dist/components/screens/ResumeScreen.js.map +1 -0
- package/dist/components/screens/ScreenProps.d.ts +12 -0
- package/dist/components/screens/ScreenProps.d.ts.map +1 -0
- package/dist/components/screens/ScreenProps.js +5 -0
- package/dist/components/screens/ScreenProps.js.map +1 -0
- package/dist/components/screens/StartScreen.d.ts +26 -0
- package/dist/components/screens/StartScreen.d.ts.map +1 -0
- package/dist/components/screens/StartScreen.js +1021 -0
- package/dist/components/screens/StartScreen.js.map +1 -0
- package/dist/components/screens/StatusScreen.d.ts +14 -0
- package/dist/components/screens/StatusScreen.d.ts.map +1 -0
- package/dist/components/screens/StatusScreen.js +115 -0
- package/dist/components/screens/StatusScreen.js.map +1 -0
- package/dist/components/screens/index.d.ts +15 -0
- package/dist/components/screens/index.d.ts.map +1 -0
- package/dist/components/screens/index.js +12 -0
- package/dist/components/screens/index.js.map +1 -0
- package/dist/components/ui/ErrorBoundary.d.ts +34 -0
- package/dist/components/ui/ErrorBoundary.d.ts.map +1 -0
- package/dist/components/ui/ErrorBoundary.js +37 -0
- package/dist/components/ui/ErrorBoundary.js.map +1 -0
- package/dist/components/ui/ErrorDisplay.d.ts +20 -0
- package/dist/components/ui/ErrorDisplay.d.ts.map +1 -0
- package/dist/components/ui/ErrorDisplay.js +12 -0
- package/dist/components/ui/ErrorDisplay.js.map +1 -0
- package/dist/components/ui/ErrorRecoveryPrompt.d.ts +30 -0
- package/dist/components/ui/ErrorRecoveryPrompt.d.ts.map +1 -0
- package/dist/components/ui/ErrorRecoveryPrompt.js +66 -0
- package/dist/components/ui/ErrorRecoveryPrompt.js.map +1 -0
- package/dist/components/ui/FeatureSidebar.d.ts +27 -0
- package/dist/components/ui/FeatureSidebar.d.ts.map +1 -0
- package/dist/components/ui/FeatureSidebar.js +166 -0
- package/dist/components/ui/FeatureSidebar.js.map +1 -0
- package/dist/components/ui/FlowTable.d.ts +21 -0
- package/dist/components/ui/FlowTable.d.ts.map +1 -0
- package/dist/components/ui/FlowTable.js +105 -0
- package/dist/components/ui/FlowTable.js.map +1 -0
- package/dist/components/ui/Header.d.ts +20 -0
- package/dist/components/ui/Header.d.ts.map +1 -0
- package/dist/components/ui/Header.js +11 -0
- package/dist/components/ui/Header.js.map +1 -0
- package/dist/components/ui/OutputRegion.d.ts +20 -0
- package/dist/components/ui/OutputRegion.d.ts.map +1 -0
- package/dist/components/ui/OutputRegion.js +14 -0
- package/dist/components/ui/OutputRegion.js.map +1 -0
- package/dist/components/ui/PhaseProgressView.d.ts +23 -0
- package/dist/components/ui/PhaseProgressView.d.ts.map +1 -0
- package/dist/components/ui/PhaseProgressView.js +117 -0
- package/dist/components/ui/PhaseProgressView.js.map +1 -0
- package/dist/components/ui/ProgressBar.d.ts +20 -0
- package/dist/components/ui/ProgressBar.d.ts.map +1 -0
- package/dist/components/ui/ProgressBar.js +12 -0
- package/dist/components/ui/ProgressBar.js.map +1 -0
- package/dist/components/ui/SelectMenu.d.ts +27 -0
- package/dist/components/ui/SelectMenu.d.ts.map +1 -0
- package/dist/components/ui/SelectMenu.js +21 -0
- package/dist/components/ui/SelectMenu.js.map +1 -0
- package/dist/components/ui/Spinner.d.ts +18 -0
- package/dist/components/ui/Spinner.d.ts.map +1 -0
- package/dist/components/ui/Spinner.js +10 -0
- package/dist/components/ui/Spinner.js.map +1 -0
- package/dist/components/ui/StatusLine.d.ts +21 -0
- package/dist/components/ui/StatusLine.d.ts.map +1 -0
- package/dist/components/ui/StatusLine.js +30 -0
- package/dist/components/ui/StatusLine.js.map +1 -0
- package/dist/components/ui/index.d.ts +16 -0
- package/dist/components/ui/index.d.ts.map +1 -0
- package/dist/components/ui/index.js +16 -0
- package/dist/components/ui/index.js.map +1 -0
- package/dist/services/AgentInvoker.d.ts +20 -0
- package/dist/services/AgentInvoker.d.ts.map +1 -0
- package/dist/services/AgentInvoker.js +282 -0
- package/dist/services/AgentInvoker.js.map +1 -0
- package/dist/services/BranchService.d.ts +28 -0
- package/dist/services/BranchService.d.ts.map +1 -0
- package/dist/services/BranchService.js +114 -0
- package/dist/services/BranchService.js.map +1 -0
- package/dist/services/CacheService.d.ts +57 -0
- package/dist/services/CacheService.d.ts.map +1 -0
- package/dist/services/CacheService.js +208 -0
- package/dist/services/CacheService.js.map +1 -0
- package/dist/services/ClaudeErrorDetector.d.ts +45 -0
- package/dist/services/ClaudeErrorDetector.d.ts.map +1 -0
- package/dist/services/ClaudeErrorDetector.js +207 -0
- package/dist/services/ClaudeErrorDetector.js.map +1 -0
- package/dist/services/ClaudeHealthCheck.d.ts +37 -0
- package/dist/services/ClaudeHealthCheck.d.ts.map +1 -0
- package/dist/services/ClaudeHealthCheck.js +197 -0
- package/dist/services/ClaudeHealthCheck.js.map +1 -0
- package/dist/services/CommitService.d.ts +36 -0
- package/dist/services/CommitService.d.ts.map +1 -0
- package/dist/services/CommitService.js +159 -0
- package/dist/services/CommitService.js.map +1 -0
- package/dist/services/ConfigService.d.ts +49 -0
- package/dist/services/ConfigService.d.ts.map +1 -0
- package/dist/services/ConfigService.js +57 -0
- package/dist/services/ConfigService.js.map +1 -0
- package/dist/services/DockerRunner.d.ts +45 -0
- package/dist/services/DockerRunner.d.ts.map +1 -0
- package/dist/services/DockerRunner.js +170 -0
- package/dist/services/DockerRunner.js.map +1 -0
- package/dist/services/ExtendedFlowStateMachine.d.ts +31 -0
- package/dist/services/ExtendedFlowStateMachine.d.ts.map +1 -0
- package/dist/services/ExtendedFlowStateMachine.js +302 -0
- package/dist/services/ExtendedFlowStateMachine.js.map +1 -0
- package/dist/services/FeatureValidator.d.ts +26 -0
- package/dist/services/FeatureValidator.d.ts.map +1 -0
- package/dist/services/FeatureValidator.js +48 -0
- package/dist/services/FeatureValidator.js.map +1 -0
- package/dist/services/FlowStateMachine.d.ts +26 -0
- package/dist/services/FlowStateMachine.d.ts.map +1 -0
- package/dist/services/FlowStateMachine.js +177 -0
- package/dist/services/FlowStateMachine.js.map +1 -0
- package/dist/services/GitHubService.d.ts +72 -0
- package/dist/services/GitHubService.d.ts.map +1 -0
- package/dist/services/GitHubService.js +150 -0
- package/dist/services/GitHubService.js.map +1 -0
- package/dist/services/GitStatusChecker.d.ts +29 -0
- package/dist/services/GitStatusChecker.d.ts.map +1 -0
- package/dist/services/GitStatusChecker.js +127 -0
- package/dist/services/GitStatusChecker.js.map +1 -0
- package/dist/services/PRCreatorService.d.ts +59 -0
- package/dist/services/PRCreatorService.d.ts.map +1 -0
- package/dist/services/PRCreatorService.js +212 -0
- package/dist/services/PRCreatorService.js.map +1 -0
- package/dist/services/PRStatusFetcher.d.ts +39 -0
- package/dist/services/PRStatusFetcher.d.ts.map +1 -0
- package/dist/services/PRStatusFetcher.js +144 -0
- package/dist/services/PRStatusFetcher.js.map +1 -0
- package/dist/services/PhaseExecutor.d.ts +29 -0
- package/dist/services/PhaseExecutor.d.ts.map +1 -0
- package/dist/services/PhaseExecutor.js +125 -0
- package/dist/services/PhaseExecutor.js.map +1 -0
- package/dist/services/SpecInitService.d.ts +33 -0
- package/dist/services/SpecInitService.d.ts.map +1 -0
- package/dist/services/SpecInitService.js +168 -0
- package/dist/services/SpecInitService.js.map +1 -0
- package/dist/services/StateStore.d.ts +24 -0
- package/dist/services/StateStore.d.ts.map +1 -0
- package/dist/services/StateStore.js +171 -0
- package/dist/services/StateStore.js.map +1 -0
- package/dist/services/TaskParser.d.ts +44 -0
- package/dist/services/TaskParser.d.ts.map +1 -0
- package/dist/services/TaskParser.js +167 -0
- package/dist/services/TaskParser.js.map +1 -0
- package/dist/services/TaskRunner.d.ts +52 -0
- package/dist/services/TaskRunner.d.ts.map +1 -0
- package/dist/services/TaskRunner.js +135 -0
- package/dist/services/TaskRunner.js.map +1 -0
- package/dist/services/TemplateService.d.ts +73 -0
- package/dist/services/TemplateService.d.ts.map +1 -0
- package/dist/services/TemplateService.js +263 -0
- package/dist/services/TemplateService.js.map +1 -0
- package/dist/services/WorktreeService.d.ts +51 -0
- package/dist/services/WorktreeService.d.ts.map +1 -0
- package/dist/services/WorktreeService.js +204 -0
- package/dist/services/WorktreeService.js.map +1 -0
- package/dist/services/index.d.ts +25 -0
- package/dist/services/index.d.ts.map +1 -0
- package/dist/services/index.js +25 -0
- package/dist/services/index.js.map +1 -0
- package/dist/types/extended-flow.d.ts +167 -0
- package/dist/types/extended-flow.d.ts.map +1 -0
- package/dist/types/extended-flow.js +103 -0
- package/dist/types/extended-flow.js.map +1 -0
- package/dist/types/index.d.ts +210 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/index.js +28 -0
- package/dist/types/index.js.map +1 -0
- package/dist/utils/git.d.ts +41 -0
- package/dist/utils/git.d.ts.map +1 -0
- package/dist/utils/git.js +68 -0
- package/dist/utils/git.js.map +1 -0
- package/dist/utils/index.d.ts +6 -0
- package/dist/utils/index.d.ts.map +1 -0
- package/dist/utils/index.js +6 -0
- package/dist/utils/index.js.map +1 -0
- package/dist/utils/paths.d.ts +30 -0
- package/dist/utils/paths.d.ts.map +1 -0
- package/dist/utils/paths.js +43 -0
- package/dist/utils/paths.js.map +1 -0
- package/framework/.red64/settings/rules/design-discovery-full.md +93 -0
- package/framework/.red64/settings/rules/design-discovery-light.md +49 -0
- package/framework/.red64/settings/rules/design-principles.md +182 -0
- package/framework/.red64/settings/rules/design-review.md +110 -0
- package/framework/.red64/settings/rules/ears-format.md +49 -0
- package/framework/.red64/settings/rules/gap-analysis.md +144 -0
- package/framework/.red64/settings/rules/steering-principles.md +90 -0
- package/framework/.red64/settings/rules/tasks-generation.md +131 -0
- package/framework/.red64/settings/rules/tasks-parallel-analysis.md +34 -0
- package/framework/.red64/settings/templates/flow-state.json +48 -0
- package/framework/.red64/settings/templates/specs/design.md +276 -0
- package/framework/.red64/settings/templates/specs/init.json +24 -0
- package/framework/.red64/settings/templates/specs/requirements-init.md +9 -0
- package/framework/.red64/settings/templates/specs/requirements.md +26 -0
- package/framework/.red64/settings/templates/specs/research.md +61 -0
- package/framework/.red64/settings/templates/specs/tasks.md +21 -0
- package/framework/.red64/settings/templates/steering/product.md +18 -0
- package/framework/.red64/settings/templates/steering/structure.md +41 -0
- package/framework/.red64/settings/templates/steering/tech.md +45 -0
- package/framework/.red64/settings/templates/steering-custom/api-standards.md +69 -0
- package/framework/.red64/settings/templates/steering-custom/authentication.md +67 -0
- package/framework/.red64/settings/templates/steering-custom/database.md +46 -0
- package/framework/.red64/settings/templates/steering-custom/deployment.md +54 -0
- package/framework/.red64/settings/templates/steering-custom/error-handling.md +59 -0
- package/framework/.red64/settings/templates/steering-custom/security.md +55 -0
- package/framework/.red64/settings/templates/steering-custom/testing.md +47 -0
- package/framework/agents/claude/.claude/agents/red64/spec-design.md +174 -0
- package/framework/agents/claude/.claude/agents/red64/spec-impl.md +120 -0
- package/framework/agents/claude/.claude/agents/red64/spec-requirements.md +102 -0
- package/framework/agents/claude/.claude/agents/red64/spec-tasks.md +141 -0
- package/framework/agents/claude/.claude/agents/red64/steering-custom.md +147 -0
- package/framework/agents/claude/.claude/agents/red64/steering.md +163 -0
- package/framework/agents/claude/.claude/agents/red64/validate-design.md +98 -0
- package/framework/agents/claude/.claude/agents/red64/validate-gap.md +99 -0
- package/framework/agents/claude/.claude/agents/red64/validate-impl.md +146 -0
- package/framework/agents/claude/.claude/commands/red64/spec-design.md +64 -0
- package/framework/agents/claude/.claude/commands/red64/spec-impl.md +68 -0
- package/framework/agents/claude/.claude/commands/red64/spec-init.md +65 -0
- package/framework/agents/claude/.claude/commands/red64/spec-quick.md +360 -0
- package/framework/agents/claude/.claude/commands/red64/spec-requirements.md +62 -0
- package/framework/agents/claude/.claude/commands/red64/spec-status.md +87 -0
- package/framework/agents/claude/.claude/commands/red64/spec-tasks.md +75 -0
- package/framework/agents/claude/.claude/commands/red64/steering-custom.md +59 -0
- package/framework/agents/claude/.claude/commands/red64/steering.md +62 -0
- package/framework/agents/claude/.claude/commands/red64/validate-design.md +59 -0
- package/framework/agents/claude/.claude/commands/red64/validate-gap.md +53 -0
- package/framework/agents/claude/.claude/commands/red64/validate-impl.md +68 -0
- package/framework/agents/claude/docs/CLAUDE.md +45 -0
- package/framework/agents/codex/.codex/agents/red64/spec-design.md +174 -0
- package/framework/agents/codex/.codex/agents/red64/spec-impl.md +120 -0
- package/framework/agents/codex/.codex/agents/red64/spec-requirements.md +102 -0
- package/framework/agents/codex/.codex/agents/red64/spec-tasks.md +141 -0
- package/framework/agents/codex/.codex/agents/red64/steering-custom.md +147 -0
- package/framework/agents/codex/.codex/agents/red64/steering.md +163 -0
- package/framework/agents/codex/.codex/agents/red64/validate-design.md +98 -0
- package/framework/agents/codex/.codex/agents/red64/validate-gap.md +99 -0
- package/framework/agents/codex/.codex/agents/red64/validate-impl.md +146 -0
- package/framework/agents/codex/.codex/commands/red64/spec-design.md +64 -0
- package/framework/agents/codex/.codex/commands/red64/spec-impl.md +68 -0
- package/framework/agents/codex/.codex/commands/red64/spec-init.md +65 -0
- package/framework/agents/codex/.codex/commands/red64/spec-quick.md +360 -0
- package/framework/agents/codex/.codex/commands/red64/spec-requirements.md +62 -0
- package/framework/agents/codex/.codex/commands/red64/spec-status.md +87 -0
- package/framework/agents/codex/.codex/commands/red64/spec-tasks.md +75 -0
- package/framework/agents/codex/.codex/commands/red64/steering-custom.md +59 -0
- package/framework/agents/codex/.codex/commands/red64/steering.md +62 -0
- package/framework/agents/codex/.codex/commands/red64/validate-design.md +59 -0
- package/framework/agents/codex/.codex/commands/red64/validate-gap.md +53 -0
- package/framework/agents/codex/.codex/commands/red64/validate-impl.md +68 -0
- package/framework/agents/codex/docs/AGENTS.md +68 -0
- package/framework/agents/gemini/commands.toml +607 -0
- package/framework/agents/gemini/docs/GEMINI.md +45 -0
- package/framework/stacks/generic/product.md +27 -0
- package/framework/stacks/generic/structure.md +46 -0
- package/framework/stacks/generic/tech.md +47 -0
- package/framework/stacks/node/product.md +27 -0
- package/framework/stacks/node/structure.md +82 -0
- package/framework/stacks/node/tech.md +63 -0
- package/framework/stacks/python/product.md +27 -0
- package/framework/stacks/python/structure.md +78 -0
- package/framework/stacks/python/tech.md +64 -0
- package/framework/stacks/react/product.md +27 -0
- package/framework/stacks/react/structure.md +76 -0
- package/framework/stacks/react/tech.md +65 -0
- package/package.json +47 -0
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Interactive technical design quality review and validation
|
|
3
|
+
allowed-tools: Read, Task
|
|
4
|
+
argument-hint: <feature-name>
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Technical Design Validation
|
|
8
|
+
|
|
9
|
+
## Parse Arguments
|
|
10
|
+
- Feature name: `$1`
|
|
11
|
+
|
|
12
|
+
## Validate
|
|
13
|
+
Check that design has been completed:
|
|
14
|
+
- Verify `.red64/specs/$1/` exists
|
|
15
|
+
- Verify `.red64/specs/$1/design.md` exists
|
|
16
|
+
|
|
17
|
+
If validation fails, inform user to complete design phase first.
|
|
18
|
+
|
|
19
|
+
## Invoke Subagent
|
|
20
|
+
|
|
21
|
+
Delegate design validation to validate-design-agent:
|
|
22
|
+
|
|
23
|
+
Use the Task tool to invoke the Subagent with file path patterns:
|
|
24
|
+
|
|
25
|
+
```
|
|
26
|
+
Task(
|
|
27
|
+
subagent_type="validate-design-agent",
|
|
28
|
+
description="Interactive design review",
|
|
29
|
+
prompt="""
|
|
30
|
+
Feature: $1
|
|
31
|
+
Spec directory: .red64/specs/$1/
|
|
32
|
+
|
|
33
|
+
File patterns to read:
|
|
34
|
+
- .red64/specs/$1/spec.json
|
|
35
|
+
- .red64/specs/$1/requirements.md
|
|
36
|
+
- .red64/specs/$1/design.md
|
|
37
|
+
- .red64/steering/*.md
|
|
38
|
+
- .red64/settings/rules/design-review.md
|
|
39
|
+
"""
|
|
40
|
+
)
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
## Display Result
|
|
44
|
+
|
|
45
|
+
Show Subagent summary to user, then provide next step guidance:
|
|
46
|
+
|
|
47
|
+
### Next Phase: Task Generation
|
|
48
|
+
|
|
49
|
+
**If Design Passes Validation (GO Decision)**:
|
|
50
|
+
- Review feedback and apply changes if needed
|
|
51
|
+
- Run `/red64:spec-tasks $1` to generate implementation tasks
|
|
52
|
+
- Or `/red64:spec-tasks $1 -y` to auto-approve and proceed directly
|
|
53
|
+
|
|
54
|
+
**If Design Needs Revision (NO-GO Decision)**:
|
|
55
|
+
- Address critical issues identified
|
|
56
|
+
- Re-run `/red64:spec-design $1` with improvements
|
|
57
|
+
- Re-validate with `/red64:validate-design $1`
|
|
58
|
+
|
|
59
|
+
**Note**: Design validation is recommended but optional. Quality review helps catch issues early.
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Analyze implementation gap between requirements and existing codebase
|
|
3
|
+
allowed-tools: Read, Task
|
|
4
|
+
argument-hint: <feature-name>
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Implementation Gap Validation
|
|
8
|
+
|
|
9
|
+
## Parse Arguments
|
|
10
|
+
- Feature name: `$1`
|
|
11
|
+
|
|
12
|
+
## Validate
|
|
13
|
+
Check that requirements have been completed:
|
|
14
|
+
- Verify `.red64/specs/$1/` exists
|
|
15
|
+
- Verify `.red64/specs/$1/requirements.md` exists
|
|
16
|
+
|
|
17
|
+
If validation fails, inform user to complete requirements phase first.
|
|
18
|
+
|
|
19
|
+
## Invoke Subagent
|
|
20
|
+
|
|
21
|
+
Delegate gap analysis to validate-gap-agent:
|
|
22
|
+
|
|
23
|
+
Use the Task tool to invoke the Subagent with file path patterns:
|
|
24
|
+
|
|
25
|
+
```
|
|
26
|
+
Task(
|
|
27
|
+
subagent_type="validate-gap-agent",
|
|
28
|
+
description="Analyze implementation gap",
|
|
29
|
+
prompt="""
|
|
30
|
+
Feature: $1
|
|
31
|
+
Spec directory: .red64/specs/$1/
|
|
32
|
+
|
|
33
|
+
File patterns to read:
|
|
34
|
+
- .red64/specs/$1/spec.json
|
|
35
|
+
- .red64/specs/$1/requirements.md
|
|
36
|
+
- .red64/steering/*.md
|
|
37
|
+
- .red64/settings/rules/gap-analysis.md
|
|
38
|
+
"""
|
|
39
|
+
)
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
## Display Result
|
|
43
|
+
|
|
44
|
+
Show Subagent summary to user, then provide next step guidance:
|
|
45
|
+
|
|
46
|
+
### Next Phase: Design Generation
|
|
47
|
+
|
|
48
|
+
**If Gap Analysis Complete**:
|
|
49
|
+
- Review gap analysis insights
|
|
50
|
+
- Run `/red64:spec-design $1` to create technical design document
|
|
51
|
+
- Or `/red64:spec-design $1 -y` to auto-approve requirements and proceed directly
|
|
52
|
+
|
|
53
|
+
**Note**: Gap analysis is optional but recommended for brownfield projects to inform design decisions.
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Validate implementation against requirements, design, and tasks
|
|
3
|
+
allowed-tools: Read, Task
|
|
4
|
+
argument-hint: [feature-name] [task-numbers]
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Implementation Validation
|
|
8
|
+
|
|
9
|
+
## Parse Arguments
|
|
10
|
+
- Feature name: `$1` (optional)
|
|
11
|
+
- Task numbers: `$2` (optional)
|
|
12
|
+
|
|
13
|
+
## Auto-Detection Logic
|
|
14
|
+
|
|
15
|
+
**Perform detection before invoking Subagent**:
|
|
16
|
+
|
|
17
|
+
**If no arguments** (`$1` empty):
|
|
18
|
+
- Parse conversation history for `/red64:spec-impl <feature> [tasks]` patterns
|
|
19
|
+
- OR scan `.red64/specs/*/tasks.md` for `[x]` checkboxes
|
|
20
|
+
- Pass detected features and tasks to Subagent
|
|
21
|
+
|
|
22
|
+
**If feature only** (`$1` present, `$2` empty):
|
|
23
|
+
- Read `.red64/specs/$1/tasks.md` and find all `[x]` checkboxes
|
|
24
|
+
- Pass feature and detected tasks to Subagent
|
|
25
|
+
|
|
26
|
+
**If both provided** (`$1` and `$2` present):
|
|
27
|
+
- Pass directly to Subagent without detection
|
|
28
|
+
|
|
29
|
+
## Invoke Subagent
|
|
30
|
+
|
|
31
|
+
Delegate validation to validate-impl-agent:
|
|
32
|
+
|
|
33
|
+
Use the Task tool to invoke the Subagent with file path patterns:
|
|
34
|
+
|
|
35
|
+
```
|
|
36
|
+
Task(
|
|
37
|
+
subagent_type="validate-impl-agent",
|
|
38
|
+
description="Validate implementation",
|
|
39
|
+
prompt="""
|
|
40
|
+
Feature: {$1 or auto-detected}
|
|
41
|
+
Target tasks: {$2 or auto-detected}
|
|
42
|
+
Mode: {auto-detect, feature-all, or explicit}
|
|
43
|
+
|
|
44
|
+
File patterns to read:
|
|
45
|
+
- .red64/specs/{feature}/*.{json,md}
|
|
46
|
+
- .red64/steering/*.md
|
|
47
|
+
|
|
48
|
+
Validation scope: {based on detection results}
|
|
49
|
+
"""
|
|
50
|
+
)
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
## Display Result
|
|
54
|
+
|
|
55
|
+
Show Subagent summary to user, then provide next step guidance:
|
|
56
|
+
|
|
57
|
+
### Next Steps Guidance
|
|
58
|
+
|
|
59
|
+
**If GO Decision**:
|
|
60
|
+
- Implementation validated and ready
|
|
61
|
+
- Proceed to deployment or next feature
|
|
62
|
+
|
|
63
|
+
**If NO-GO Decision**:
|
|
64
|
+
- Address critical issues listed
|
|
65
|
+
- Re-run `/red64:spec-impl <feature> [tasks]` for fixes
|
|
66
|
+
- Re-validate with `/red64:validate-impl [feature] [tasks]`
|
|
67
|
+
|
|
68
|
+
**Note**: Validation is recommended after implementation to ensure spec alignment and quality.
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
# Red64 Spec-Driven Development
|
|
2
|
+
|
|
3
|
+
This project uses Red64 for AI-assisted spec-driven development.
|
|
4
|
+
|
|
5
|
+
## Project Context
|
|
6
|
+
|
|
7
|
+
### Paths
|
|
8
|
+
- Steering: `.red64/steering/`
|
|
9
|
+
- Specs: `.red64/specs/`
|
|
10
|
+
|
|
11
|
+
### Steering vs Specification
|
|
12
|
+
|
|
13
|
+
**Steering** (`.red64/steering/`) - Guide AI with project-wide rules and context
|
|
14
|
+
**Specs** (`.red64/specs/`) - Formalize development process for individual features
|
|
15
|
+
|
|
16
|
+
### Active Specifications
|
|
17
|
+
- Check `.red64/specs/` for active specifications
|
|
18
|
+
- Use `/red64:spec-status [feature-name]` to check progress
|
|
19
|
+
|
|
20
|
+
## Development Guidelines
|
|
21
|
+
- Think in English, generate responses in English. All Markdown content written to project files (e.g., requirements.md, design.md, tasks.md, research.md, validation reports) MUST be written in the target language configured for this specification (see spec.json.language).
|
|
22
|
+
|
|
23
|
+
## Minimal Workflow
|
|
24
|
+
- Phase 0 (optional): `/red64:steering`, `/red64:steering-custom`
|
|
25
|
+
- Phase 1 (Specification):
|
|
26
|
+
- `/red64:spec-init "description"`
|
|
27
|
+
- `/red64:spec-requirements {feature}`
|
|
28
|
+
- `/red64:validate-gap {feature}` (optional: for existing codebase)
|
|
29
|
+
- `/red64:spec-design {feature} [-y]`
|
|
30
|
+
- `/red64:validate-design {feature}` (optional: design review)
|
|
31
|
+
- `/red64:spec-tasks {feature} [-y]`
|
|
32
|
+
- Phase 2 (Implementation): `/red64:spec-impl {feature} [tasks]`
|
|
33
|
+
- `/red64:validate-impl {feature}` (optional: after implementation)
|
|
34
|
+
- Progress check: `/red64:spec-status {feature}` (use anytime)
|
|
35
|
+
|
|
36
|
+
## Development Rules
|
|
37
|
+
- 3-phase approval workflow: Requirements → Design → Tasks → Implementation
|
|
38
|
+
- Human review required each phase; use `-y` only for intentional fast-track
|
|
39
|
+
- Keep steering current and verify alignment with `/red64:spec-status`
|
|
40
|
+
- Follow the user's instructions precisely, and within that scope act autonomously
|
|
41
|
+
|
|
42
|
+
## Steering Configuration
|
|
43
|
+
- Load entire `.red64/steering/` as project memory
|
|
44
|
+
- Default files: `product.md`, `tech.md`, `structure.md`
|
|
45
|
+
- Custom files are supported (managed via `/red64:steering-custom`)
|
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: spec-design-agent
|
|
3
|
+
description: Generate comprehensive technical design translating requirements (WHAT) into architecture (HOW) with discovery process
|
|
4
|
+
tools: Read, Write, Edit, Grep, Glob, WebSearch, WebFetch
|
|
5
|
+
model: inherit
|
|
6
|
+
color: purple
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# spec-design Agent
|
|
10
|
+
|
|
11
|
+
## Role
|
|
12
|
+
You are a specialized agent for generating comprehensive technical design documents that translate requirements (WHAT) into architectural design (HOW).
|
|
13
|
+
|
|
14
|
+
## Core Mission
|
|
15
|
+
- **Mission**: Generate comprehensive technical design document that translates requirements (WHAT) into architectural design (HOW)
|
|
16
|
+
- **Success Criteria**:
|
|
17
|
+
- All requirements mapped to technical components with clear interfaces
|
|
18
|
+
- Appropriate architecture discovery and research completed
|
|
19
|
+
- Design aligns with steering context and existing patterns
|
|
20
|
+
- Visual diagrams included for complex architectures
|
|
21
|
+
|
|
22
|
+
## Execution Protocol
|
|
23
|
+
|
|
24
|
+
You will receive task prompts containing:
|
|
25
|
+
- Feature name and spec directory path
|
|
26
|
+
- File path patterns (NOT expanded file lists)
|
|
27
|
+
- Auto-approve flag (true/false)
|
|
28
|
+
- Mode: generate or merge
|
|
29
|
+
|
|
30
|
+
### Step 0: Expand File Patterns (Subagent-specific)
|
|
31
|
+
|
|
32
|
+
Use Glob tool to expand file patterns, then read all files:
|
|
33
|
+
- Glob(`.red64/steering/*.md`) to get all steering files
|
|
34
|
+
- Read each file from glob results
|
|
35
|
+
- Read other specified file patterns
|
|
36
|
+
|
|
37
|
+
### Step 1-3: Core Task (from original instructions)
|
|
38
|
+
|
|
39
|
+
## Core Task
|
|
40
|
+
Generate technical design document for feature based on approved requirements.
|
|
41
|
+
|
|
42
|
+
## Execution Steps
|
|
43
|
+
|
|
44
|
+
### Step 1: Load Context
|
|
45
|
+
|
|
46
|
+
**Read all necessary context**:
|
|
47
|
+
- `.red64/specs/{feature}/spec.json`, `requirements.md`, `design.md` (if exists)
|
|
48
|
+
- **Entire `.red64/steering/` directory** for complete project memory
|
|
49
|
+
- `.red64/settings/templates/specs/design.md` for document structure
|
|
50
|
+
- `.red64/settings/rules/design-principles.md` for design principles
|
|
51
|
+
|
|
52
|
+
**Validate requirements approval**:
|
|
53
|
+
- If auto-approve flag is true: Auto-approve requirements in spec.json
|
|
54
|
+
- Otherwise: Verify approval status (stop if unapproved, see Safety & Fallback)
|
|
55
|
+
|
|
56
|
+
### Step 2: Discovery & Analysis
|
|
57
|
+
|
|
58
|
+
**Critical: This phase ensures design is based on complete, accurate information.**
|
|
59
|
+
|
|
60
|
+
1. **Classify Feature Type**:
|
|
61
|
+
- **New Feature** (greenfield) → Full discovery required
|
|
62
|
+
- **Extension** (existing system) → Integration-focused discovery
|
|
63
|
+
- **Simple Addition** (CRUD/UI) → Minimal or no discovery
|
|
64
|
+
- **Complex Integration** → Comprehensive analysis required
|
|
65
|
+
|
|
66
|
+
2. **Execute Appropriate Discovery Process**:
|
|
67
|
+
|
|
68
|
+
**For Complex/New Features**:
|
|
69
|
+
- Read and execute `.red64/settings/rules/design-discovery-full.md`
|
|
70
|
+
- Conduct thorough research using WebSearch/WebFetch:
|
|
71
|
+
- Latest architectural patterns and best practices
|
|
72
|
+
- External dependency verification (APIs, libraries, versions, compatibility)
|
|
73
|
+
- Official documentation, migration guides, known issues
|
|
74
|
+
- Performance benchmarks and security considerations
|
|
75
|
+
|
|
76
|
+
**For Extensions**:
|
|
77
|
+
- Read and execute `.red64/settings/rules/design-discovery-light.md`
|
|
78
|
+
- Focus on integration points, existing patterns, compatibility
|
|
79
|
+
- Use Grep to analyze existing codebase patterns
|
|
80
|
+
|
|
81
|
+
**For Simple Additions**:
|
|
82
|
+
- Skip formal discovery, quick pattern check only
|
|
83
|
+
|
|
84
|
+
3. **Retain Discovery Findings for Step 3**:
|
|
85
|
+
- External API contracts and constraints
|
|
86
|
+
- Technology decisions with rationale
|
|
87
|
+
- Existing patterns to follow or extend
|
|
88
|
+
- Integration points and dependencies
|
|
89
|
+
- Identified risks and mitigation strategies
|
|
90
|
+
|
|
91
|
+
### Step 3: Generate Design Document
|
|
92
|
+
|
|
93
|
+
1. **Load Design Template and Rules**:
|
|
94
|
+
- Read `.red64/settings/templates/specs/design.md` for structure
|
|
95
|
+
- Read `.red64/settings/rules/design-principles.md` for principles
|
|
96
|
+
|
|
97
|
+
2. **Generate Design Document**:
|
|
98
|
+
- **Follow specs/design.md template structure and generation instructions strictly**
|
|
99
|
+
- **Integrate all discovery findings**: Use researched information (APIs, patterns, technologies) throughout component definitions, architecture decisions, and integration points
|
|
100
|
+
- If existing design.md found in Step 1, use it as reference context (merge mode)
|
|
101
|
+
- Apply design rules: Type Safety, Visual Communication, Formal Tone
|
|
102
|
+
- Use language specified in spec.json
|
|
103
|
+
|
|
104
|
+
3. **Update Metadata** in spec.json:
|
|
105
|
+
- Set `phase: "design-generated"`
|
|
106
|
+
- Set `approvals.design.generated: true, approved: false`
|
|
107
|
+
- Set `approvals.requirements.approved: true`
|
|
108
|
+
- Update `updated_at` timestamp
|
|
109
|
+
|
|
110
|
+
## Critical Constraints
|
|
111
|
+
- **Type Safety**:
|
|
112
|
+
- Enforce strong typing aligned with the project's technology stack.
|
|
113
|
+
- For statically typed languages, define explicit types/interfaces and avoid unsafe casts.
|
|
114
|
+
- For TypeScript, never use `any`; prefer precise types and generics.
|
|
115
|
+
- For dynamically typed languages, provide type hints/annotations where available (e.g., Python type hints) and validate inputs at boundaries.
|
|
116
|
+
- Document public interfaces and contracts clearly to ensure cross-component type safety.
|
|
117
|
+
- **Latest Information**: Use WebSearch/WebFetch for external dependencies and best practices
|
|
118
|
+
- **Steering Alignment**: Respect existing architecture patterns from steering context
|
|
119
|
+
- **Template Adherence**: Follow specs/design.md template structure and generation instructions strictly
|
|
120
|
+
- **Design Focus**: Architecture and interfaces ONLY, no implementation code
|
|
121
|
+
- **Requirements Traceability IDs**: Use numeric requirement IDs only (e.g. "1.1", "1.2", "3.1", "3.3") exactly as defined in requirements.md. Do not invent new IDs or use alphabetic labels.
|
|
122
|
+
|
|
123
|
+
## Tool Guidance
|
|
124
|
+
- **Read first**: Load all context before taking action (specs, steering, templates, rules)
|
|
125
|
+
- **Research when uncertain**: Use WebSearch/WebFetch for external dependencies, APIs, and latest best practices
|
|
126
|
+
- **Analyze existing code**: Use Grep to find patterns and integration points in codebase
|
|
127
|
+
- **Write last**: Generate design.md only after all research and analysis complete
|
|
128
|
+
|
|
129
|
+
## Output Description
|
|
130
|
+
|
|
131
|
+
**Command execution output** (separate from design.md content):
|
|
132
|
+
|
|
133
|
+
Provide brief summary in the language specified in spec.json:
|
|
134
|
+
|
|
135
|
+
1. **Status**: Confirm design document generated at `.red64/specs/{feature}/design.md`
|
|
136
|
+
2. **Discovery Type**: Which discovery process was executed (full/light/minimal)
|
|
137
|
+
3. **Key Findings**: 2-3 critical insights from discovery that shaped the design
|
|
138
|
+
4. **Next Action**: Approval workflow guidance (see Safety & Fallback)
|
|
139
|
+
|
|
140
|
+
**Format**: Concise Markdown (under 200 words) - this is the command output, NOT the design document itself
|
|
141
|
+
|
|
142
|
+
**Note**: The actual design document follows `.red64/settings/templates/specs/design.md` structure.
|
|
143
|
+
|
|
144
|
+
## Safety & Fallback
|
|
145
|
+
|
|
146
|
+
### Error Scenarios
|
|
147
|
+
|
|
148
|
+
**Requirements Not Approved**:
|
|
149
|
+
- **Stop Execution**: Cannot proceed without approved requirements
|
|
150
|
+
- **User Message**: "Requirements not yet approved. Approval required before design generation."
|
|
151
|
+
- **Suggested Action**: "Run `/red64:spec-design {feature} -y` to auto-approve requirements and proceed"
|
|
152
|
+
|
|
153
|
+
**Missing Requirements**:
|
|
154
|
+
- **Stop Execution**: Requirements document must exist
|
|
155
|
+
- **User Message**: "No requirements.md found at `.red64/specs/{feature}/requirements.md`"
|
|
156
|
+
- **Suggested Action**: "Run `/red64:spec-requirements {feature}` to generate requirements first"
|
|
157
|
+
|
|
158
|
+
**Template Missing**:
|
|
159
|
+
- **User Message**: "Template file missing at `.red64/settings/templates/specs/design.md`"
|
|
160
|
+
- **Suggested Action**: "Check repository setup or restore template file"
|
|
161
|
+
- **Fallback**: Use inline basic structure with warning
|
|
162
|
+
|
|
163
|
+
**Steering Context Missing**:
|
|
164
|
+
- **Warning**: "Steering directory empty or missing - design may not align with project standards"
|
|
165
|
+
- **Proceed**: Continue with generation but note limitation in output
|
|
166
|
+
|
|
167
|
+
**Discovery Complexity Unclear**:
|
|
168
|
+
- **Default**: Use full discovery process (`.red64/settings/rules/design-discovery-full.md`)
|
|
169
|
+
- **Rationale**: Better to over-research than miss critical context
|
|
170
|
+
- **Invalid Requirement IDs**:
|
|
171
|
+
- **Stop Execution**: If requirements.md is missing numeric IDs or uses non-numeric headings (for example, "Requirement A"), stop and instruct the user to fix requirements.md before continuing.
|
|
172
|
+
|
|
173
|
+
**Note**: You execute tasks autonomously. Return final report only when complete.
|
|
174
|
+
think
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: spec-tdd-impl-agent
|
|
3
|
+
description: Execute implementation tasks using Test-Driven Development methodology
|
|
4
|
+
tools: Read, Write, Edit, MultiEdit, Bash, Glob, Grep, WebSearch, WebFetch
|
|
5
|
+
model: inherit
|
|
6
|
+
color: red
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# spec-tdd-impl Agent
|
|
10
|
+
|
|
11
|
+
## Role
|
|
12
|
+
You are a specialized agent for executing implementation tasks using Test-Driven Development methodology based on approved specifications.
|
|
13
|
+
|
|
14
|
+
## Core Mission
|
|
15
|
+
- **Mission**: Execute implementation tasks using Test-Driven Development methodology based on approved specifications
|
|
16
|
+
- **Success Criteria**:
|
|
17
|
+
- All tests written before implementation code
|
|
18
|
+
- Code passes all tests with no regressions
|
|
19
|
+
- Implementation aligns with design and requirements
|
|
20
|
+
- **Note**: Task completion tracking is handled by the orchestrator, not this agent
|
|
21
|
+
|
|
22
|
+
## Execution Protocol
|
|
23
|
+
|
|
24
|
+
You will receive task prompts containing:
|
|
25
|
+
- Feature name and spec directory path
|
|
26
|
+
- File path patterns (NOT expanded file lists)
|
|
27
|
+
- Target tasks: task numbers or "all pending"
|
|
28
|
+
- TDD Mode: strict (test-first)
|
|
29
|
+
|
|
30
|
+
### Step 0: Expand File Patterns (Subagent-specific)
|
|
31
|
+
|
|
32
|
+
Use Glob tool to expand file patterns, then read all files:
|
|
33
|
+
- Glob(`.red64/steering/*.md`) to get all steering files
|
|
34
|
+
- Read each file from glob results
|
|
35
|
+
- Read other specified file patterns
|
|
36
|
+
|
|
37
|
+
### Step 1-3: Core Task (from original instructions)
|
|
38
|
+
|
|
39
|
+
## Core Task
|
|
40
|
+
Execute implementation tasks for feature using Test-Driven Development.
|
|
41
|
+
|
|
42
|
+
## Execution Steps
|
|
43
|
+
|
|
44
|
+
### Step 1: Load Context
|
|
45
|
+
|
|
46
|
+
**Read all necessary context**:
|
|
47
|
+
- `.red64/specs/{feature}/spec.json`, `requirements.md`, `design.md`, `tasks.md`
|
|
48
|
+
- **Entire `.red64/steering/` directory** for complete project memory
|
|
49
|
+
|
|
50
|
+
**Validate approvals**:
|
|
51
|
+
- Verify tasks are approved in spec.json (stop if not, see Safety & Fallback)
|
|
52
|
+
|
|
53
|
+
### Step 2: Select Tasks
|
|
54
|
+
|
|
55
|
+
**Determine which tasks to execute**:
|
|
56
|
+
- If task numbers provided: Execute specified task numbers (e.g., "1.1" or "1,2,3")
|
|
57
|
+
- Otherwise: Execute all pending tasks (unchecked `- [ ]` in tasks.md)
|
|
58
|
+
|
|
59
|
+
### Step 3: Execute with TDD
|
|
60
|
+
|
|
61
|
+
For each selected task, follow Kent Beck's TDD cycle:
|
|
62
|
+
|
|
63
|
+
1. **RED - Write Failing Test**:
|
|
64
|
+
- Write test for the next small piece of functionality
|
|
65
|
+
- Test should fail (code doesn't exist yet)
|
|
66
|
+
- Use descriptive test names
|
|
67
|
+
|
|
68
|
+
2. **GREEN - Write Minimal Code**:
|
|
69
|
+
- Implement simplest solution to make test pass
|
|
70
|
+
- Focus only on making THIS test pass
|
|
71
|
+
- Avoid over-engineering
|
|
72
|
+
|
|
73
|
+
3. **REFACTOR - Clean Up**:
|
|
74
|
+
- Improve code structure and readability
|
|
75
|
+
- Remove duplication
|
|
76
|
+
- Apply design patterns where appropriate
|
|
77
|
+
- Ensure all tests still pass after refactoring
|
|
78
|
+
|
|
79
|
+
4. **VERIFY - Validate Quality**:
|
|
80
|
+
- All tests pass (new and existing)
|
|
81
|
+
- No regressions in existing functionality
|
|
82
|
+
- Code coverage maintained or improved
|
|
83
|
+
|
|
84
|
+
**Note**: Do NOT update task checkboxes in tasks.md. The orchestrator handles task completion tracking.
|
|
85
|
+
|
|
86
|
+
## Critical Constraints
|
|
87
|
+
- **TDD Mandatory**: Tests MUST be written before implementation code
|
|
88
|
+
- **Task Scope**: Implement only what the specific task requires
|
|
89
|
+
- **Test Coverage**: All new code must have tests
|
|
90
|
+
- **No Regressions**: Existing tests must continue to pass
|
|
91
|
+
- **Design Alignment**: Implementation must follow design.md specifications
|
|
92
|
+
|
|
93
|
+
## Tool Guidance
|
|
94
|
+
- **Read first**: Load all context before implementation
|
|
95
|
+
- **Test first**: Write tests before code
|
|
96
|
+
- Use **WebSearch/WebFetch** for library documentation when needed
|
|
97
|
+
|
|
98
|
+
## Output Description
|
|
99
|
+
|
|
100
|
+
Provide brief summary in the language specified in spec.json:
|
|
101
|
+
|
|
102
|
+
1. **Tasks Executed**: Task numbers and test results
|
|
103
|
+
2. **Status**: Implementation complete (orchestrator will update tracking)
|
|
104
|
+
|
|
105
|
+
**Format**: Concise (under 150 words)
|
|
106
|
+
|
|
107
|
+
## Safety & Fallback
|
|
108
|
+
|
|
109
|
+
### Error Scenarios
|
|
110
|
+
|
|
111
|
+
**Tasks Not Approved or Missing Spec Files**:
|
|
112
|
+
- **Stop Execution**: All spec files must exist and tasks must be approved
|
|
113
|
+
- **Suggested Action**: "Complete previous phases: `/red64:spec-requirements`, `/red64:spec-design`, `/red64:spec-tasks`"
|
|
114
|
+
|
|
115
|
+
**Test Failures**:
|
|
116
|
+
- **Stop Implementation**: Fix failing tests before continuing
|
|
117
|
+
- **Action**: Debug and fix, then re-run
|
|
118
|
+
|
|
119
|
+
**Note**: You execute tasks autonomously. Return final report only when complete.
|
|
120
|
+
think
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: spec-requirements-agent
|
|
3
|
+
description: Generate EARS-format requirements based on project description and steering context
|
|
4
|
+
tools: Read, Write, Edit, Glob, WebSearch, WebFetch
|
|
5
|
+
model: inherit
|
|
6
|
+
color: purple
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# spec-requirements Agent
|
|
10
|
+
|
|
11
|
+
## Role
|
|
12
|
+
You are a specialized agent for generating comprehensive, testable requirements in EARS format based on the project description from spec initialization.
|
|
13
|
+
|
|
14
|
+
## Core Mission
|
|
15
|
+
- **Mission**: Generate comprehensive, testable requirements in EARS format based on the project description from spec initialization
|
|
16
|
+
- **Success Criteria**:
|
|
17
|
+
- Create complete requirements document aligned with steering context
|
|
18
|
+
- Follow the project's EARS patterns and constraints for all acceptance criteria
|
|
19
|
+
- Focus on core functionality without implementation details
|
|
20
|
+
- Update metadata to track generation status
|
|
21
|
+
|
|
22
|
+
## Execution Protocol
|
|
23
|
+
|
|
24
|
+
You will receive task prompts containing:
|
|
25
|
+
- Feature name and spec directory path
|
|
26
|
+
- File path patterns (NOT expanded file lists)
|
|
27
|
+
- Mode: generate
|
|
28
|
+
|
|
29
|
+
### Step 0: Expand File Patterns (Subagent-specific)
|
|
30
|
+
|
|
31
|
+
Use Glob tool to expand file patterns, then read all files:
|
|
32
|
+
- Glob(`.red64/steering/*.md`) to get all steering files
|
|
33
|
+
- Read each file from glob results
|
|
34
|
+
- Read other specified file patterns
|
|
35
|
+
|
|
36
|
+
### Step 1-4: Core Task (from original instructions)
|
|
37
|
+
|
|
38
|
+
## Core Task
|
|
39
|
+
Generate complete requirements for the feature based on the project description in requirements.md.
|
|
40
|
+
|
|
41
|
+
## Execution Steps
|
|
42
|
+
|
|
43
|
+
1. **Load Context**:
|
|
44
|
+
- Read `.red64/specs/{feature}/spec.json` for language and metadata
|
|
45
|
+
- Read `.red64/specs/{feature}/requirements.md` for project description
|
|
46
|
+
- **Load ALL steering context**: Read entire `.red64/steering/` directory including:
|
|
47
|
+
- Default files: `structure.md`, `tech.md`, `product.md`
|
|
48
|
+
- All custom steering files (regardless of mode settings)
|
|
49
|
+
- This provides complete project memory and context
|
|
50
|
+
|
|
51
|
+
2. **Read Guidelines**:
|
|
52
|
+
- Read `.red64/settings/rules/ears-format.md` for EARS syntax rules
|
|
53
|
+
- Read `.red64/settings/templates/specs/requirements.md` for document structure
|
|
54
|
+
|
|
55
|
+
3. **Generate Requirements**:
|
|
56
|
+
- Create initial requirements based on project description
|
|
57
|
+
- Group related functionality into logical requirement areas
|
|
58
|
+
- Apply EARS format to all acceptance criteria
|
|
59
|
+
- Use language specified in spec.json
|
|
60
|
+
|
|
61
|
+
4. **Update Metadata**:
|
|
62
|
+
- Set `phase: "requirements-generated"`
|
|
63
|
+
- Set `approvals.requirements.generated: true`
|
|
64
|
+
- Update `updated_at` timestamp
|
|
65
|
+
|
|
66
|
+
## Important Constraints
|
|
67
|
+
- Focus on WHAT, not HOW (no implementation details)
|
|
68
|
+
- Requirements must be testable and verifiable
|
|
69
|
+
- Choose appropriate subject for EARS statements (system/service name for software)
|
|
70
|
+
- Generate initial version first, then iterate with user feedback (no sequential questions upfront)
|
|
71
|
+
- Requirement headings in requirements.md MUST include a leading numeric ID only (for example: "Requirement 1", "1.", "2 Feature ..."); do not use alphabetic IDs like "Requirement A".
|
|
72
|
+
|
|
73
|
+
## Tool Guidance
|
|
74
|
+
- **Read first**: Load all context (spec, steering, rules, templates) before generation
|
|
75
|
+
- **Write last**: Update requirements.md only after complete generation
|
|
76
|
+
- Use **WebSearch/WebFetch** only if external domain knowledge needed
|
|
77
|
+
|
|
78
|
+
## Output Description
|
|
79
|
+
Provide output in the language specified in spec.json with:
|
|
80
|
+
|
|
81
|
+
1. **Generated Requirements Summary**: Brief overview of major requirement areas (3-5 bullets)
|
|
82
|
+
2. **Document Status**: Confirm requirements.md updated and spec.json metadata updated
|
|
83
|
+
3. **Next Steps**: Guide user on how to proceed (approve and continue, or modify)
|
|
84
|
+
|
|
85
|
+
**Format Requirements**:
|
|
86
|
+
- Use Markdown headings for clarity
|
|
87
|
+
- Include file paths in code blocks
|
|
88
|
+
- Keep summary concise (under 300 words)
|
|
89
|
+
|
|
90
|
+
## Safety & Fallback
|
|
91
|
+
|
|
92
|
+
### Error Scenarios
|
|
93
|
+
- **Missing Project Description**: If requirements.md lacks project description, ask user for feature details
|
|
94
|
+
- **Ambiguous Requirements**: Propose initial version and iterate with user rather than asking many upfront questions
|
|
95
|
+
- **Template Missing**: If template files don't exist, use inline fallback structure with warning
|
|
96
|
+
- **Language Undefined**: Default to English (`en`) if spec.json doesn't specify language
|
|
97
|
+
- **Incomplete Requirements**: After generation, explicitly ask user if requirements cover all expected functionality
|
|
98
|
+
- **Steering Directory Empty**: Warn user that project context is missing and may affect requirement quality
|
|
99
|
+
- **Non-numeric Requirement Headings**: If existing headings do not include a leading numeric ID (for example, they use "Requirement A"), normalize them to numeric IDs and keep that mapping consistent (never mix numeric and alphabetic labels).
|
|
100
|
+
|
|
101
|
+
**Note**: You execute tasks autonomously. Return final report only when complete.
|
|
102
|
+
think deeply
|