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,182 @@
|
|
|
1
|
+
# Technical Design Rules and Principles
|
|
2
|
+
|
|
3
|
+
## Core Design Principles
|
|
4
|
+
|
|
5
|
+
### 1. Type Safety is Mandatory
|
|
6
|
+
- **NEVER** use `any` type in TypeScript interfaces
|
|
7
|
+
- Define explicit types for all parameters and returns
|
|
8
|
+
- Use discriminated unions for error handling
|
|
9
|
+
- Specify generic constraints clearly
|
|
10
|
+
|
|
11
|
+
### 2. Design vs Implementation
|
|
12
|
+
- **Focus on WHAT, not HOW**
|
|
13
|
+
- Define interfaces and contracts, not code
|
|
14
|
+
- Specify behavior through pre/post conditions
|
|
15
|
+
- Document architectural decisions, not algorithms
|
|
16
|
+
|
|
17
|
+
### 3. Visual Communication
|
|
18
|
+
- **Simple features**: Basic component diagram or none
|
|
19
|
+
- **Medium complexity**: Architecture + data flow
|
|
20
|
+
- **High complexity**: Multiple diagrams (architecture, sequence, state)
|
|
21
|
+
- **Always pure Mermaid**: No styling, just structure
|
|
22
|
+
|
|
23
|
+
### 4. Component Design Rules
|
|
24
|
+
- **Single Responsibility**: One clear purpose per component
|
|
25
|
+
- **Clear Boundaries**: Explicit domain ownership
|
|
26
|
+
- **Dependency Direction**: Follow architectural layers
|
|
27
|
+
- **Interface Segregation**: Minimal, focused interfaces
|
|
28
|
+
- **Team-safe Interfaces**: Design boundaries that allow parallel implementation without merge conflicts
|
|
29
|
+
- **Research Traceability**: Record boundary decisions and rationale in `research.md`
|
|
30
|
+
|
|
31
|
+
### 5. Data Modeling Standards
|
|
32
|
+
- **Domain First**: Start with business concepts
|
|
33
|
+
- **Consistency Boundaries**: Clear aggregate roots
|
|
34
|
+
- **Normalization**: Balance between performance and integrity
|
|
35
|
+
- **Evolution**: Plan for schema changes
|
|
36
|
+
|
|
37
|
+
### 6. Error Handling Philosophy
|
|
38
|
+
- **Fail Fast**: Validate early and clearly
|
|
39
|
+
- **Graceful Degradation**: Partial functionality over complete failure
|
|
40
|
+
- **User Context**: Actionable error messages
|
|
41
|
+
- **Observability**: Comprehensive logging and monitoring
|
|
42
|
+
|
|
43
|
+
### 7. Integration Patterns
|
|
44
|
+
- **Loose Coupling**: Minimize dependencies
|
|
45
|
+
- **Contract First**: Define interfaces before implementation
|
|
46
|
+
- **Versioning**: Plan for API evolution
|
|
47
|
+
- **Idempotency**: Design for retry safety
|
|
48
|
+
- **Contract Visibility**: Surface API and event contracts in design.md while linking extended details from `research.md`
|
|
49
|
+
|
|
50
|
+
## Documentation Standards
|
|
51
|
+
|
|
52
|
+
### Language and Tone
|
|
53
|
+
- **Declarative**: "The system authenticates users" not "The system should authenticate"
|
|
54
|
+
- **Precise**: Specific technical terms over vague descriptions
|
|
55
|
+
- **Concise**: Essential information only
|
|
56
|
+
- **Formal**: Professional technical writing
|
|
57
|
+
|
|
58
|
+
### Structure Requirements
|
|
59
|
+
- **Hierarchical**: Clear section organization
|
|
60
|
+
- **Traceable**: Requirements to components mapping
|
|
61
|
+
- **Complete**: All aspects covered for implementation
|
|
62
|
+
- **Consistent**: Uniform terminology throughout
|
|
63
|
+
- **Focused**: Keep design.md centered on architecture and contracts; move investigation logs and lengthy comparisons to `research.md`
|
|
64
|
+
|
|
65
|
+
## Section Authoring Guidance
|
|
66
|
+
|
|
67
|
+
### Global Ordering
|
|
68
|
+
- Default flow: Overview → Goals/Non-Goals → Requirements Traceability → Architecture → Technology Stack → System Flows → Components & Interfaces → Data Models → Optional sections.
|
|
69
|
+
- Teams may swap Traceability earlier or place Data Models nearer Architecture when it improves clarity, but keep section headings intact.
|
|
70
|
+
- Within each section, follow **Summary → Scope → Decisions → Impacts/Risks** so reviewers can scan consistently.
|
|
71
|
+
|
|
72
|
+
### Requirement IDs
|
|
73
|
+
- Reference requirements as `2.1, 2.3` without prefixes (no “Requirement 2.1”).
|
|
74
|
+
- All requirements MUST have numeric IDs. If a requirement lacks a numeric ID, stop and fix `requirements.md` before continuing.
|
|
75
|
+
- Use `N.M`-style numeric IDs where `N` is the top-level requirement number from requirements.md (for example, Requirement 1 → 1.1, 1.2; Requirement 2 → 2.1, 2.2).
|
|
76
|
+
- Every component, task, and traceability row must reference the same canonical numeric ID.
|
|
77
|
+
|
|
78
|
+
### Technology Stack
|
|
79
|
+
- Include ONLY layers impacted by this feature (frontend, backend, data, messaging, infra).
|
|
80
|
+
- For each layer specify tool/library + version + the role it plays; push extended rationale, comparisons, or benchmarks to `research.md`.
|
|
81
|
+
- When extending an existing system, highlight deviations from the current stack and list new dependencies.
|
|
82
|
+
|
|
83
|
+
### System Flows
|
|
84
|
+
- Add diagrams only when they clarify behavior:
|
|
85
|
+
- **Sequence** for multi-step interactions
|
|
86
|
+
- **Process/State** for branching rules or lifecycle
|
|
87
|
+
- **Data/Event** for pipelines or async patterns
|
|
88
|
+
- Always use pure Mermaid. If no complex flow exists, omit the entire section.
|
|
89
|
+
|
|
90
|
+
### Requirements Traceability
|
|
91
|
+
- Use the standard table (`Requirement | Summary | Components | Interfaces | Flows`) to prove coverage.
|
|
92
|
+
- Collapse to bullet form only when a single requirement maps 1:1 to a component.
|
|
93
|
+
- Prefer the component summary table for simple mappings; reserve the full traceability table for complex or compliance-sensitive requirements.
|
|
94
|
+
- Re-run this mapping whenever requirements or components change to avoid drift.
|
|
95
|
+
|
|
96
|
+
### Components & Interfaces Authoring
|
|
97
|
+
- Group components by domain/layer and provide one block per component.
|
|
98
|
+
- Begin with a summary table listing Component, Domain, Intent, Requirement coverage, key dependencies, and selected contracts.
|
|
99
|
+
- Table fields: Intent (one line), Requirements (`2.1, 2.3`), Owner/Reviewers (optional).
|
|
100
|
+
- Dependencies table must mark each entry as Inbound/Outbound/External and assign Criticality (`P0` blocking, `P1` high-risk, `P2` informational).
|
|
101
|
+
- Summaries of external dependency research stay here; detailed investigation (API signatures, rate limits, migration notes) belongs in `research.md`.
|
|
102
|
+
- design.md must remain a self-contained reviewer artifact. Reference `research.md` only for background, and restate any conclusions or decisions here.
|
|
103
|
+
- Contracts: tick only the relevant types (Service/API/Event/Batch/State). Unchecked types should not appear later in the component section.
|
|
104
|
+
- Service interfaces must declare method signatures, inputs/outputs, and error envelopes. API/Event/Batch contracts require schema tables or bullet lists covering trigger, payload, delivery, idempotency.
|
|
105
|
+
- Use **Integration & Migration Notes**, **Validation Hooks**, and **Open Questions / Risks** to document rollout strategy, observability, and unresolved decisions.
|
|
106
|
+
- Detail density rules:
|
|
107
|
+
- **Full block**: components introducing new boundaries (logic hooks, shared services, external integrations, data layers).
|
|
108
|
+
- **Summary-only**: presentational/UI components with no new boundaries (plus a short Implementation Note if needed).
|
|
109
|
+
- Implementation Notes must combine Integration / Validation / Risks into a single bulleted subsection to reduce repetition.
|
|
110
|
+
- Prefer lists or inline descriptors for short data (dependencies, contract selections). Use tables only when comparing multiple items.
|
|
111
|
+
|
|
112
|
+
### Shared Interfaces & Props
|
|
113
|
+
- Define a base interface (e.g., `BaseUIPanelProps`) for recurring UI components and extend it per component to capture only the deltas.
|
|
114
|
+
- Hooks, utilities, and integration adapters that introduce new contracts should still include full TypeScript signatures.
|
|
115
|
+
- When reusing a base contract, reference it explicitly (e.g., “Extends `BaseUIPanelProps` with `onSubmitAnswer` callback”) instead of duplicating the code block.
|
|
116
|
+
|
|
117
|
+
### Data Models
|
|
118
|
+
- Domain Model covers aggregates, entities, value objects, domain events, and invariants. Add Mermaid diagrams only when relationships are non-trivial.
|
|
119
|
+
- Logical Data Model should articulate structure, indexing, sharding, and storage-specific considerations (event store, KV/wide-column) relevant to the change.
|
|
120
|
+
- Data Contracts & Integration section documents API payloads, event schemas, and cross-service synchronization patterns when the feature crosses boundaries.
|
|
121
|
+
- Lengthy type definitions or vendor-specific option objects should be placed in the Supporting References section within design.md, linked from the relevant section. Investigation notes stay in `research.md`.
|
|
122
|
+
- Supporting References usage is optional; only create it when keeping the content in the main body would reduce readability. All decisions must still appear in the main sections so design.md stands alone.
|
|
123
|
+
|
|
124
|
+
### Error/Testing/Security/Performance Sections
|
|
125
|
+
- Record only feature-specific decisions or deviations. Link or reference organization-wide standards (steering) for baseline practices instead of restating them.
|
|
126
|
+
|
|
127
|
+
### Diagram & Text Deduplication
|
|
128
|
+
- Do not restate diagram content verbatim in prose. Use the text to highlight key decisions, trade-offs, or impacts that are not obvious from the visual.
|
|
129
|
+
- When a decision is fully captured in the diagram annotations, a short “Key Decisions” bullet is sufficient.
|
|
130
|
+
|
|
131
|
+
### General Deduplication
|
|
132
|
+
- Avoid repeating the same information across Overview, Architecture, and Components. Reference earlier sections when context is identical.
|
|
133
|
+
- If a requirement/component relationship is captured in the summary table, do not rewrite it elsewhere unless extra nuance is added.
|
|
134
|
+
|
|
135
|
+
## Diagram Guidelines
|
|
136
|
+
|
|
137
|
+
### When to include a diagram
|
|
138
|
+
- **Architecture**: Use a structural diagram when 3+ components or external systems interact.
|
|
139
|
+
- **Sequence**: Draw a sequence diagram when calls/handshakes span multiple steps.
|
|
140
|
+
- **State / Flow**: Capture complex state machines or business flows in a dedicated diagram.
|
|
141
|
+
- **ER**: Provide an entity-relationship diagram for non-trivial data models.
|
|
142
|
+
- **Skip**: Minor one-component changes generally do not need diagrams.
|
|
143
|
+
|
|
144
|
+
### Mermaid requirements
|
|
145
|
+
```mermaid
|
|
146
|
+
graph TB
|
|
147
|
+
Client --> ApiGateway
|
|
148
|
+
ApiGateway --> ServiceA
|
|
149
|
+
ApiGateway --> ServiceB
|
|
150
|
+
ServiceA --> Database
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
- **Plain Mermaid only** – avoid custom styling or unsupported syntax.
|
|
154
|
+
- **Node IDs** – alphanumeric plus underscores only (e.g., `Client`, `ServiceA`). Do not use `@`, `/`, or leading `-`.
|
|
155
|
+
- **Labels** – simple words. Do not embed parentheses `()`, square brackets `[]`, quotes `"`, or slashes `/`.
|
|
156
|
+
- ❌ `DnD[@dnd-kit/core]` → invalid ID (`@`).
|
|
157
|
+
- ❌ `UI[KanbanBoard(React)]` → invalid label (`()`).
|
|
158
|
+
- ✅ `DndKit[dnd-kit core]` → use plain text in labels, keep technology details in the accompanying description.
|
|
159
|
+
- ℹ️ Mermaid strict-mode will otherwise fail with errors like `Expecting 'SQE' ... got 'PS'`; remove punctuation from labels before rendering.
|
|
160
|
+
- **Edges** – show data or control flow direction.
|
|
161
|
+
- **Groups** – using Mermaid subgraphs to cluster related components is allowed; use it sparingly for clarity.
|
|
162
|
+
|
|
163
|
+
## Quality Metrics
|
|
164
|
+
### Design Completeness Checklist
|
|
165
|
+
- All requirements addressed
|
|
166
|
+
- No implementation details leaked
|
|
167
|
+
- Clear component boundaries
|
|
168
|
+
- Explicit error handling
|
|
169
|
+
- Comprehensive test strategy
|
|
170
|
+
- Security considered
|
|
171
|
+
- Performance targets defined
|
|
172
|
+
- Migration path clear (if applicable)
|
|
173
|
+
|
|
174
|
+
### Common Anti-patterns to Avoid
|
|
175
|
+
❌ Mixing design with implementation
|
|
176
|
+
❌ Vague interface definitions
|
|
177
|
+
❌ Missing error scenarios
|
|
178
|
+
❌ Ignored non-functional requirements
|
|
179
|
+
❌ Overcomplicated architectures
|
|
180
|
+
❌ Tight coupling between components
|
|
181
|
+
❌ Missing data consistency strategy
|
|
182
|
+
❌ Incomplete dependency analysis
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
# Design Review Process
|
|
2
|
+
|
|
3
|
+
## Objective
|
|
4
|
+
Conduct interactive quality review of technical design documents to ensure they are solid enough to proceed to implementation with acceptable risk.
|
|
5
|
+
|
|
6
|
+
## Review Philosophy
|
|
7
|
+
- **Quality assurance, not perfection seeking**
|
|
8
|
+
- **Critical focus**: Limit to 3 most important concerns
|
|
9
|
+
- **Interactive dialogue**: Engage with designer, not one-way evaluation
|
|
10
|
+
- **Balanced assessment**: Recognize strengths and weaknesses
|
|
11
|
+
- **Clear decision**: Definitive GO/NO-GO with rationale
|
|
12
|
+
|
|
13
|
+
## Scope & Non-Goals
|
|
14
|
+
|
|
15
|
+
- Scope: Evaluate the quality of the design document against project context and standards to decide GO/NO-GO.
|
|
16
|
+
- Non-Goals: Do not perform implementation-level design, deep technology research, or finalize technology choices. Defer such items to the design phase iteration.
|
|
17
|
+
|
|
18
|
+
## Core Review Criteria
|
|
19
|
+
|
|
20
|
+
### 1. Existing Architecture Alignment (Critical)
|
|
21
|
+
- Integration with existing system boundaries and layers
|
|
22
|
+
- Consistency with established architectural patterns
|
|
23
|
+
- Proper dependency direction and coupling management
|
|
24
|
+
- Alignment with current module organization
|
|
25
|
+
|
|
26
|
+
### 2. Design Consistency & Standards
|
|
27
|
+
- Adherence to project naming conventions and code standards
|
|
28
|
+
- Consistent error handling and logging strategies
|
|
29
|
+
- Uniform configuration and dependency management
|
|
30
|
+
- Alignment with established data modeling patterns
|
|
31
|
+
|
|
32
|
+
### 3. Extensibility & Maintainability
|
|
33
|
+
- Design flexibility for future requirements
|
|
34
|
+
- Clear separation of concerns and single responsibility
|
|
35
|
+
- Testability and debugging considerations
|
|
36
|
+
- Appropriate complexity for requirements
|
|
37
|
+
|
|
38
|
+
### 4. Type Safety & Interface Design
|
|
39
|
+
- Proper type definitions and interface contracts
|
|
40
|
+
- Avoidance of unsafe patterns (e.g., `any` in TypeScript)
|
|
41
|
+
- Clear API boundaries and data structures
|
|
42
|
+
- Input validation and error handling coverage
|
|
43
|
+
|
|
44
|
+
## Review Process
|
|
45
|
+
|
|
46
|
+
### Step 1: Analyze
|
|
47
|
+
Analyze design against all review criteria, focusing on critical issues impacting integration, maintainability, complexity, and requirements fulfillment.
|
|
48
|
+
|
|
49
|
+
### Step 2: Identify Critical Issues (≤3)
|
|
50
|
+
For each issue:
|
|
51
|
+
```
|
|
52
|
+
🔴 **Critical Issue [1-3]**: [Brief title]
|
|
53
|
+
**Concern**: [Specific problem]
|
|
54
|
+
**Impact**: [Why it matters]
|
|
55
|
+
**Suggestion**: [Concrete improvement]
|
|
56
|
+
**Traceability**: [Requirement ID/section from requirements.md]
|
|
57
|
+
**Evidence**: [Design doc section/heading]
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
### Step 3: Recognize Strengths
|
|
61
|
+
Acknowledge 1-2 strong aspects to maintain balanced feedback.
|
|
62
|
+
|
|
63
|
+
### Step 4: Decide GO/NO-GO
|
|
64
|
+
- **GO**: No critical architectural misalignment, requirements addressed, clear implementation path, acceptable risks
|
|
65
|
+
- **NO-GO**: Fundamental conflicts, critical gaps, high failure risk, disproportionate complexity
|
|
66
|
+
|
|
67
|
+
## Traceability & Evidence
|
|
68
|
+
|
|
69
|
+
- Link each critical issue to the relevant requirement(s) from `requirements.md` (ID or section).
|
|
70
|
+
- Cite evidence locations in the design document (section/heading, diagram, or artifact) to support the assessment.
|
|
71
|
+
- When applicable, reference constraints from steering context to justify the issue.
|
|
72
|
+
|
|
73
|
+
## Output Format
|
|
74
|
+
|
|
75
|
+
### Design Review Summary
|
|
76
|
+
2-3 sentences on overall quality and readiness.
|
|
77
|
+
|
|
78
|
+
### Critical Issues (≤3)
|
|
79
|
+
For each: Issue, Impact, Recommendation, Traceability (e.g., 1.1, 1.2), Evidence (design.md section).
|
|
80
|
+
|
|
81
|
+
### Design Strengths
|
|
82
|
+
1-2 positive aspects.
|
|
83
|
+
|
|
84
|
+
### Final Assessment
|
|
85
|
+
Decision (GO/NO-GO), Rationale (1-2 sentences), Next Steps.
|
|
86
|
+
|
|
87
|
+
### Interactive Discussion
|
|
88
|
+
Engage on designer's perspective, alternatives, clarifications, and necessary changes.
|
|
89
|
+
|
|
90
|
+
## Length & Focus
|
|
91
|
+
|
|
92
|
+
- Summary: 2–3 sentences
|
|
93
|
+
- Each critical issue: 5–7 lines total (including Issue/Impact/Recommendation/Traceability/Evidence)
|
|
94
|
+
- Overall review: keep concise (~400 words guideline)
|
|
95
|
+
|
|
96
|
+
## Review Guidelines
|
|
97
|
+
|
|
98
|
+
1. **Critical Focus**: Only flag issues that significantly impact success
|
|
99
|
+
2. **Constructive Tone**: Provide solutions, not just criticism
|
|
100
|
+
3. **Interactive Approach**: Engage in dialogue rather than one-way evaluation
|
|
101
|
+
4. **Balanced Assessment**: Recognize both strengths and weaknesses
|
|
102
|
+
5. **Clear Decision**: Make definitive GO/NO-GO recommendation
|
|
103
|
+
6. **Actionable Feedback**: Ensure all suggestions are implementable
|
|
104
|
+
|
|
105
|
+
## Final Checklist
|
|
106
|
+
|
|
107
|
+
- **Critical Issues ≤ 3** and each includes Impact and Recommendation
|
|
108
|
+
- **Traceability**: Each issue references requirement ID/section
|
|
109
|
+
- **Evidence**: Each issue cites design doc location
|
|
110
|
+
- **Decision**: GO/NO-GO with clear rationale and next steps
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
# EARS Format Guidelines
|
|
2
|
+
|
|
3
|
+
## Overview
|
|
4
|
+
EARS (Easy Approach to Requirements Syntax) is the standard format for acceptance criteria in spec-driven development.
|
|
5
|
+
|
|
6
|
+
EARS patterns describe the logical structure of a requirement (condition + subject + response) and are not tied to any particular natural language.
|
|
7
|
+
All acceptance criteria should be written in the target language configured for the specification (for example, `spec.json.language` / `en`).
|
|
8
|
+
Keep EARS trigger keywords and fixed phrases in English (`When`, `If`, `While`, `Where`, `The system shall`, `The [system] shall`) and localize only the variable parts (`[event]`, `[precondition]`, `[trigger]`, `[feature is included]`, `[response/action]`) into the target language. Do not interleave target-language text inside the trigger or fixed English phrases themselves.
|
|
9
|
+
|
|
10
|
+
## Primary EARS Patterns
|
|
11
|
+
|
|
12
|
+
### 1. Event-Driven Requirements
|
|
13
|
+
- **Pattern**: When [event], the [system] shall [response/action]
|
|
14
|
+
- **Use Case**: Responses to specific events or triggers
|
|
15
|
+
- **Example**: When user clicks checkout button, the Checkout Service shall validate cart contents
|
|
16
|
+
|
|
17
|
+
### 2. State-Driven Requirements
|
|
18
|
+
- **Pattern**: While [precondition], the [system] shall [response/action]
|
|
19
|
+
- **Use Case**: Behavior dependent on system state or preconditions
|
|
20
|
+
- **Example**: While payment is processing, the Checkout Service shall display loading indicator
|
|
21
|
+
|
|
22
|
+
### 3. Unwanted Behavior Requirements
|
|
23
|
+
- **Pattern**: If [trigger], the [system] shall [response/action]
|
|
24
|
+
- **Use Case**: System response to errors, failures, or undesired situations
|
|
25
|
+
- **Example**: If invalid credit card number is entered, then the website shall display error message
|
|
26
|
+
|
|
27
|
+
### 4. Optional Feature Requirements
|
|
28
|
+
- **Pattern**: Where [feature is included], the [system] shall [response/action]
|
|
29
|
+
- **Use Case**: Requirements for optional or conditional features
|
|
30
|
+
- **Example**: Where the car has a sunroof, the car shall have a sunroof control panel
|
|
31
|
+
|
|
32
|
+
### 5. Ubiquitous Requirements
|
|
33
|
+
- **Pattern**: The [system] shall [response/action]
|
|
34
|
+
- **Use Case**: Always-active requirements and fundamental system properties
|
|
35
|
+
- **Example**: The mobile phone shall have a mass of less than 100 grams
|
|
36
|
+
|
|
37
|
+
## Combined Patterns
|
|
38
|
+
- While [precondition], when [event], the [system] shall [response/action]
|
|
39
|
+
- When [event] and [additional condition], the [system] shall [response/action]
|
|
40
|
+
|
|
41
|
+
## Subject Selection Guidelines
|
|
42
|
+
- **Software Projects**: Use concrete system/service name (e.g., "Checkout Service", "User Auth Module")
|
|
43
|
+
- **Process/Workflow**: Use responsible team/role (e.g., "Support Team", "Review Process")
|
|
44
|
+
- **Non-Software**: Use appropriate subject (e.g., "Marketing Campaign", "Documentation")
|
|
45
|
+
|
|
46
|
+
## Quality Criteria
|
|
47
|
+
- Requirements must be testable, verifiable, and describe a single behavior.
|
|
48
|
+
- Use objective language: "shall" for mandatory behavior, "should" for recommendations; avoid ambiguous terms.
|
|
49
|
+
- Follow EARS syntax: [condition], the [system] shall [response/action].
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
# Gap Analysis Process
|
|
2
|
+
|
|
3
|
+
## Objective
|
|
4
|
+
Analyze the gap between requirements and existing codebase to inform implementation strategy decisions.
|
|
5
|
+
|
|
6
|
+
## Analysis Framework
|
|
7
|
+
|
|
8
|
+
### 1. Current State Investigation
|
|
9
|
+
|
|
10
|
+
- Scan for domain-related assets:
|
|
11
|
+
- Key files/modules and directory layout
|
|
12
|
+
- Reusable components/services/utilities
|
|
13
|
+
- Dominant architecture patterns and constraints
|
|
14
|
+
|
|
15
|
+
- Extract conventions:
|
|
16
|
+
- Naming, layering, dependency direction
|
|
17
|
+
- Import/export patterns and dependency hotspots
|
|
18
|
+
- Testing placement and approach
|
|
19
|
+
|
|
20
|
+
- Note integration surfaces:
|
|
21
|
+
- Data models/schemas, API clients, auth mechanisms
|
|
22
|
+
|
|
23
|
+
### 2. Requirements Feasibility Analysis
|
|
24
|
+
|
|
25
|
+
- From EARS requirements, list technical needs:
|
|
26
|
+
- Data models, APIs/services, UI/components
|
|
27
|
+
- Business rules/validation
|
|
28
|
+
- Non-functionals: security, performance, scalability, reliability
|
|
29
|
+
|
|
30
|
+
- Identify gaps and constraints:
|
|
31
|
+
- Missing capabilities in current codebase
|
|
32
|
+
- Unknowns to be researched later (mark as "Research Needed")
|
|
33
|
+
- Constraints from existing architecture and patterns
|
|
34
|
+
|
|
35
|
+
- Note complexity signals:
|
|
36
|
+
- Simple CRUD / algorithmic logic / workflows / external integrations
|
|
37
|
+
|
|
38
|
+
### 3. Implementation Approach Options
|
|
39
|
+
|
|
40
|
+
#### Option A: Extend Existing Components
|
|
41
|
+
**When to consider**: Feature fits naturally into existing structure
|
|
42
|
+
|
|
43
|
+
- **Which files/modules to extend**:
|
|
44
|
+
- Identify specific files requiring changes
|
|
45
|
+
- Assess impact on existing functionality
|
|
46
|
+
- Evaluate backward compatibility concerns
|
|
47
|
+
|
|
48
|
+
- **Compatibility assessment**:
|
|
49
|
+
- Check if extension respects existing interfaces
|
|
50
|
+
- Verify no breaking changes to consumers
|
|
51
|
+
- Assess test coverage impact
|
|
52
|
+
|
|
53
|
+
- **Complexity and maintainability**:
|
|
54
|
+
- Evaluate cognitive load of additional functionality
|
|
55
|
+
- Check if single responsibility principle is maintained
|
|
56
|
+
- Assess if file size remains manageable
|
|
57
|
+
|
|
58
|
+
**Trade-offs**:
|
|
59
|
+
- ✅ Minimal new files, faster initial development
|
|
60
|
+
- ✅ Leverages existing patterns and infrastructure
|
|
61
|
+
- ❌ Risk of bloating existing components
|
|
62
|
+
- ❌ May complicate existing logic
|
|
63
|
+
|
|
64
|
+
#### Option B: Create New Components
|
|
65
|
+
**When to consider**: Feature has distinct responsibility or existing components are already complex
|
|
66
|
+
|
|
67
|
+
- **Rationale for new creation**:
|
|
68
|
+
- Clear separation of concerns justifies new file
|
|
69
|
+
- Existing components are already complex
|
|
70
|
+
- Feature has distinct lifecycle or dependencies
|
|
71
|
+
|
|
72
|
+
- **Integration points**:
|
|
73
|
+
- How new components connect to existing system
|
|
74
|
+
- APIs or interfaces exposed
|
|
75
|
+
- Dependencies on existing components
|
|
76
|
+
|
|
77
|
+
- **Responsibility boundaries**:
|
|
78
|
+
- Clear definition of what new component owns
|
|
79
|
+
- Interfaces with existing components
|
|
80
|
+
- Data flow and control flow
|
|
81
|
+
|
|
82
|
+
**Trade-offs**:
|
|
83
|
+
- ✅ Clean separation of concerns
|
|
84
|
+
- ✅ Easier to test in isolation
|
|
85
|
+
- ✅ Reduces complexity in existing components
|
|
86
|
+
- ❌ More files to navigate
|
|
87
|
+
- ❌ Requires careful interface design
|
|
88
|
+
|
|
89
|
+
#### Option C: Hybrid Approach
|
|
90
|
+
**When to consider**: Complex features requiring both extension and new creation
|
|
91
|
+
|
|
92
|
+
- **Combination strategy**:
|
|
93
|
+
- Which parts extend existing components
|
|
94
|
+
- Which parts warrant new components
|
|
95
|
+
- How they interact
|
|
96
|
+
|
|
97
|
+
- **Phased implementation**:
|
|
98
|
+
- Initial phase: minimal viable changes
|
|
99
|
+
- Subsequent phases: refactoring or new components
|
|
100
|
+
- Migration strategy if needed
|
|
101
|
+
|
|
102
|
+
- **Risk mitigation**:
|
|
103
|
+
- Incremental rollout approach
|
|
104
|
+
- Feature flags or configuration
|
|
105
|
+
- Rollback strategy
|
|
106
|
+
|
|
107
|
+
**Trade-offs**:
|
|
108
|
+
- ✅ Balanced approach for complex features
|
|
109
|
+
- ✅ Allows iterative refinement
|
|
110
|
+
- ❌ More complex planning required
|
|
111
|
+
- ❌ Potential for inconsistency if not well-coordinated
|
|
112
|
+
### 4. Out-of-Scope for Gap Analysis
|
|
113
|
+
|
|
114
|
+
- Defer deep research activities to the design phase.
|
|
115
|
+
- Record unknowns as concise "Research Needed" items only.
|
|
116
|
+
|
|
117
|
+
### 5. Implementation Complexity & Risk
|
|
118
|
+
|
|
119
|
+
- Effort:
|
|
120
|
+
- S (1–3 days): existing patterns, minimal deps, straightforward integration
|
|
121
|
+
- M (3–7 days): some new patterns/integrations, moderate complexity
|
|
122
|
+
- L (1–2 weeks): significant functionality, multiple integrations or workflows
|
|
123
|
+
- XL (2+ weeks): architectural changes, unfamiliar tech, broad impact
|
|
124
|
+
- Risk:
|
|
125
|
+
- High: unknown tech, complex integrations, architectural shifts, unclear perf/security path
|
|
126
|
+
- Medium: new patterns with guidance, manageable integrations, known perf solutions
|
|
127
|
+
- Low: extend established patterns, familiar tech, clear scope, minimal integration
|
|
128
|
+
|
|
129
|
+
### Output Checklist
|
|
130
|
+
|
|
131
|
+
- Requirement-to-Asset Map with gaps tagged (Missing / Unknown / Constraint)
|
|
132
|
+
- Options A/B/C with short rationale and trade-offs
|
|
133
|
+
- Effort (S/M/L/XL) and Risk (High/Medium/Low) with one-line justification each
|
|
134
|
+
- Recommendations for design phase:
|
|
135
|
+
- Preferred approach and key decisions
|
|
136
|
+
- Research items to carry forward
|
|
137
|
+
|
|
138
|
+
## Principles
|
|
139
|
+
|
|
140
|
+
- **Information over decisions**: Provide analysis and options, not final choices
|
|
141
|
+
- **Multiple viable options**: Offer credible alternatives when applicable
|
|
142
|
+
- **Explicit gaps and assumptions**: Flag unknowns and constraints clearly
|
|
143
|
+
- **Context-aware**: Align with existing patterns and architecture limits
|
|
144
|
+
- **Transparent effort and risk**: Justify labels succinctly
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
# Steering Principles
|
|
2
|
+
|
|
3
|
+
Steering files are **project memory**, not exhaustive specifications.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Content Granularity
|
|
8
|
+
|
|
9
|
+
### Golden Rule
|
|
10
|
+
> "If new code follows existing patterns, steering shouldn't need updating."
|
|
11
|
+
|
|
12
|
+
### ✅ Document
|
|
13
|
+
- Organizational patterns (feature-first, layered)
|
|
14
|
+
- Naming conventions (PascalCase rules)
|
|
15
|
+
- Import strategies (absolute vs relative)
|
|
16
|
+
- Architectural decisions (state management)
|
|
17
|
+
- Technology standards (key frameworks)
|
|
18
|
+
|
|
19
|
+
### ❌ Avoid
|
|
20
|
+
- Complete file listings
|
|
21
|
+
- Every component description
|
|
22
|
+
- All dependencies
|
|
23
|
+
- Implementation details
|
|
24
|
+
- Agent-specific tooling directories (e.g. `.cursor/`, `.gemini/`, `.claude/`)
|
|
25
|
+
- Detailed documentation of `.red64/` metadata directories (settings, automation)
|
|
26
|
+
|
|
27
|
+
### Example Comparison
|
|
28
|
+
|
|
29
|
+
**Bad** (Specification-like):
|
|
30
|
+
```markdown
|
|
31
|
+
- /components/Button.tsx - Primary button with variants
|
|
32
|
+
- /components/Input.tsx - Text input with validation
|
|
33
|
+
- /components/Modal.tsx - Modal dialog
|
|
34
|
+
... (50+ files)
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
**Good** (Project Memory):
|
|
38
|
+
```markdown
|
|
39
|
+
## UI Components (`/components/ui/`)
|
|
40
|
+
Reusable, design-system aligned primitives
|
|
41
|
+
- Named by function (Button, Input, Modal)
|
|
42
|
+
- Export component + TypeScript interface
|
|
43
|
+
- No business logic
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
---
|
|
47
|
+
|
|
48
|
+
## Security
|
|
49
|
+
|
|
50
|
+
Never include:
|
|
51
|
+
- API keys, passwords, credentials
|
|
52
|
+
- Database URLs, internal IPs
|
|
53
|
+
- Secrets or sensitive data
|
|
54
|
+
|
|
55
|
+
---
|
|
56
|
+
|
|
57
|
+
## Quality Standards
|
|
58
|
+
|
|
59
|
+
- **Single domain**: One topic per file
|
|
60
|
+
- **Concrete examples**: Show patterns with code
|
|
61
|
+
- **Explain rationale**: Why decisions were made
|
|
62
|
+
- **Maintainable size**: 100-200 lines typical
|
|
63
|
+
|
|
64
|
+
---
|
|
65
|
+
|
|
66
|
+
## Preservation (when updating)
|
|
67
|
+
|
|
68
|
+
- Preserve user sections and custom examples
|
|
69
|
+
- Additive by default (add, don't replace)
|
|
70
|
+
- Add `updated_at` timestamp
|
|
71
|
+
- Note why changes were made
|
|
72
|
+
|
|
73
|
+
---
|
|
74
|
+
|
|
75
|
+
## Notes
|
|
76
|
+
|
|
77
|
+
- Templates are starting points, customize as needed
|
|
78
|
+
- Follow same granularity principles as core steering
|
|
79
|
+
- All steering files loaded as project memory
|
|
80
|
+
- Light references to `.red64/specs/` and `.red64/steering/` are acceptable; avoid other `.red64/` directories
|
|
81
|
+
- Custom files equally important as core files
|
|
82
|
+
|
|
83
|
+
---
|
|
84
|
+
|
|
85
|
+
## File-Specific Focus
|
|
86
|
+
|
|
87
|
+
- **product.md**: Purpose, value, business context (not exhaustive features)
|
|
88
|
+
- **tech.md**: Key frameworks, standards, conventions (not all dependencies)
|
|
89
|
+
- **structure.md**: Organization patterns, naming rules (not directory trees)
|
|
90
|
+
- **Custom files**: Specialized patterns (API, testing, security, etc.)
|