@ggailabs/cli-context 0.5.6 → 1.0.1
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.
Potentially problematic release.
This version of @ggailabs/cli-context might be problematic. Click here for more details.
- package/README.md +25 -181
- package/dist/.context/docs/GENESIS_SYSTEM_PROMPT.md +62 -0
- package/dist/.context/eng/agents/architect.md +15 -0
- package/dist/.context/eng/agents/backend_typescript.md +1000 -0
- package/dist/.context/eng/agents/bug_hunter.md +49 -0
- package/dist/.context/eng/agents/code_reviewer.md +313 -0
- package/dist/.context/eng/agents/devops_specialist.md +718 -0
- package/dist/.context/eng/agents/frontend_specialist.md +1027 -0
- package/dist/.context/eng/agents/qa_specialist.md +1234 -0
- package/dist/.context/eng/agents/security_reviewer.md +382 -0
- package/dist/.context/eng/agents/ui_specialist.md +16 -0
- package/dist/.context/eng/docs/AGENT_HANDOFF_PROMPT.md +44 -0
- package/dist/.context/eng/docs/GENESIS_DESIGN_SYSTEM.md +15 -0
- package/dist/.context/eng/docs/GG_METHODOLOGY.md +48 -0
- package/dist/.context/eng/docs/OPERATIONS_LOG.md +30 -0
- package/dist/.context/eng/docs/PROJECT_MAP.md +35 -0
- package/dist/.context/eng/docs/standards/devops.md +0 -0
- package/dist/.context/eng/docs/standards/frontend.md +0 -0
- package/dist/.context/eng/docs/standards/typescript.md +12 -0
- package/dist/.context/eng/skills/agent_logging.md +18 -0
- package/dist/.context/eng/skills/brainstorming.md +227 -0
- package/dist/.context/eng/skills/exploring_codebase.md +1217 -0
- package/dist/.context/eng/skills/patterns/compliance_check.md +246 -0
- package/dist/.context/eng/skills/patterns/coverage_table.md +401 -0
- package/dist/.context/eng/skills/patterns/exit_criteria.md +31 -0
- package/dist/.context/eng/skills/patterns/failure_recovery.md +74 -0
- package/dist/.context/eng/skills/patterns/quality_gate.md +295 -0
- package/dist/.context/eng/skills/patterns/standards_workflow.md +391 -0
- package/dist/.context/eng/skills/patterns/state_tracking.md +30 -0
- package/dist/.context/eng/skills/patterns/task_tracking.md +38 -0
- package/dist/.context/eng/skills/previce.md +45 -0
- package/dist/.context/eng/skills/tdd.md +421 -0
- package/dist/.context/eng/skills/writing_plans.md +105 -0
- package/dist/.context/plans/.gitkeep +0 -0
- package/dist/.context/pt-br/agents/architect.md +69 -0
- package/dist/.context/pt-br/agents/backend_typescript.md +1000 -0
- package/dist/.context/pt-br/agents/bug_hunter.md +49 -0
- package/dist/.context/pt-br/agents/code_reviewer.md +313 -0
- package/dist/.context/pt-br/agents/devops_specialist.md +718 -0
- package/dist/.context/pt-br/agents/frontend_specialist.md +1027 -0
- package/dist/.context/pt-br/agents/qa_specialist.md +1234 -0
- package/dist/.context/pt-br/agents/security_reviewer.md +382 -0
- package/dist/.context/pt-br/agents/ui_specialist.md +55 -0
- package/dist/.context/pt-br/docs/AGENT_HANDOFF_PROMPT.md +44 -0
- package/dist/.context/pt-br/docs/GENESIS_DESIGN_SYSTEM.md +88 -0
- package/dist/.context/pt-br/docs/GG_METHODOLOGY.md +48 -0
- package/dist/.context/pt-br/docs/OPERATIONS_LOG.md +30 -0
- package/dist/.context/pt-br/docs/PROJECT_MAP.md +37 -0
- package/dist/.context/pt-br/docs/standards/devops.md +707 -0
- package/dist/.context/pt-br/docs/standards/frontend.md +748 -0
- package/dist/.context/pt-br/docs/standards/typescript.md +1150 -0
- package/dist/.context/pt-br/skills/agent_logging.md +36 -0
- package/dist/.context/pt-br/skills/brainstorming.md +227 -0
- package/dist/.context/pt-br/skills/exploring_codebase.md +1217 -0
- package/dist/.context/pt-br/skills/patterns/compliance_check.md +246 -0
- package/dist/.context/pt-br/skills/patterns/coverage_table.md +401 -0
- package/dist/.context/pt-br/skills/patterns/exit_criteria.md +31 -0
- package/dist/.context/pt-br/skills/patterns/failure_recovery.md +74 -0
- package/dist/.context/pt-br/skills/patterns/quality_gate.md +295 -0
- package/dist/.context/pt-br/skills/patterns/standards_workflow.md +391 -0
- package/dist/.context/pt-br/skills/patterns/state_tracking.md +30 -0
- package/dist/.context/pt-br/skills/patterns/task_tracking.md +38 -0
- package/dist/.context/pt-br/skills/previce.md +45 -0
- package/dist/.context/pt-br/skills/tdd.md +421 -0
- package/dist/.context/pt-br/skills/writing_plans.md +105 -0
- package/dist/.context/workflow/.gitkeep +0 -0
- package/dist/commands/init.js +140 -0
- package/dist/commands/monitor.js +34 -0
- package/dist/index.js +20 -568
- package/dist/services/monitor-service.js +340 -0
- package/dist/services/scaffolder.js +164 -0
- package/package.json +16 -58
- package/LICENSE +0 -21
- package/dist/generators/agents/agentConfig.d.ts +0 -4
- package/dist/generators/agents/agentConfig.d.ts.map +0 -1
- package/dist/generators/agents/agentConfig.js +0 -180
- package/dist/generators/agents/agentConfig.js.map +0 -1
- package/dist/generators/agents/agentGenerator.d.ts +0 -9
- package/dist/generators/agents/agentGenerator.d.ts.map +0 -1
- package/dist/generators/agents/agentGenerator.js +0 -97
- package/dist/generators/agents/agentGenerator.js.map +0 -1
- package/dist/generators/agents/agentTypes.d.ts +0 -4
- package/dist/generators/agents/agentTypes.d.ts.map +0 -1
- package/dist/generators/agents/agentTypes.js +0 -25
- package/dist/generators/agents/agentTypes.js.map +0 -1
- package/dist/generators/agents/index.d.ts +0 -4
- package/dist/generators/agents/index.d.ts.map +0 -1
- package/dist/generators/agents/index.js +0 -12
- package/dist/generators/agents/index.js.map +0 -1
- package/dist/generators/agents/templates/index.d.ts +0 -4
- package/dist/generators/agents/templates/index.d.ts.map +0 -1
- package/dist/generators/agents/templates/index.js +0 -8
- package/dist/generators/agents/templates/index.js.map +0 -1
- package/dist/generators/agents/templates/indexTemplate.d.ts +0 -3
- package/dist/generators/agents/templates/indexTemplate.d.ts.map +0 -1
- package/dist/generators/agents/templates/indexTemplate.js +0 -36
- package/dist/generators/agents/templates/indexTemplate.js.map +0 -1
- package/dist/generators/agents/templates/playbookTemplate.d.ts +0 -4
- package/dist/generators/agents/templates/playbookTemplate.d.ts.map +0 -1
- package/dist/generators/agents/templates/playbookTemplate.js +0 -99
- package/dist/generators/agents/templates/playbookTemplate.js.map +0 -1
- package/dist/generators/agents/templates/types.d.ts +0 -14
- package/dist/generators/agents/templates/types.d.ts.map +0 -1
- package/dist/generators/agents/templates/types.js +0 -3
- package/dist/generators/agents/templates/types.js.map +0 -1
- package/dist/generators/documentation/documentationGenerator.d.ts +0 -15
- package/dist/generators/documentation/documentationGenerator.d.ts.map +0 -1
- package/dist/generators/documentation/documentationGenerator.js +0 -188
- package/dist/generators/documentation/documentationGenerator.js.map +0 -1
- package/dist/generators/documentation/guideRegistry.d.ts +0 -6
- package/dist/generators/documentation/guideRegistry.d.ts.map +0 -1
- package/dist/generators/documentation/guideRegistry.js +0 -82
- package/dist/generators/documentation/guideRegistry.js.map +0 -1
- package/dist/generators/documentation/index.d.ts +0 -2
- package/dist/generators/documentation/index.d.ts.map +0 -1
- package/dist/generators/documentation/index.js +0 -6
- package/dist/generators/documentation/index.js.map +0 -1
- package/dist/generators/documentation/templates/apiReferenceTemplate.d.ts +0 -2
- package/dist/generators/documentation/templates/apiReferenceTemplate.d.ts.map +0 -1
- package/dist/generators/documentation/templates/apiReferenceTemplate.js +0 -490
- package/dist/generators/documentation/templates/apiReferenceTemplate.js.map +0 -1
- package/dist/generators/documentation/templates/architectureTemplate.d.ts +0 -3
- package/dist/generators/documentation/templates/architectureTemplate.d.ts.map +0 -1
- package/dist/generators/documentation/templates/architectureTemplate.js +0 -66
- package/dist/generators/documentation/templates/architectureTemplate.js.map +0 -1
- package/dist/generators/documentation/templates/common.d.ts +0 -7
- package/dist/generators/documentation/templates/common.d.ts.map +0 -1
- package/dist/generators/documentation/templates/common.js +0 -58
- package/dist/generators/documentation/templates/common.js.map +0 -1
- package/dist/generators/documentation/templates/dataFlowTemplate.d.ts +0 -3
- package/dist/generators/documentation/templates/dataFlowTemplate.d.ts.map +0 -1
- package/dist/generators/documentation/templates/dataFlowTemplate.js +0 -40
- package/dist/generators/documentation/templates/dataFlowTemplate.js.map +0 -1
- package/dist/generators/documentation/templates/developmentWorkflowTemplate.d.ts +0 -2
- package/dist/generators/documentation/templates/developmentWorkflowTemplate.d.ts.map +0 -1
- package/dist/generators/documentation/templates/developmentWorkflowTemplate.js +0 -44
- package/dist/generators/documentation/templates/developmentWorkflowTemplate.js.map +0 -1
- package/dist/generators/documentation/templates/glossaryTemplate.d.ts +0 -3
- package/dist/generators/documentation/templates/glossaryTemplate.d.ts.map +0 -1
- package/dist/generators/documentation/templates/glossaryTemplate.js +0 -41
- package/dist/generators/documentation/templates/glossaryTemplate.js.map +0 -1
- package/dist/generators/documentation/templates/index.d.ts +0 -15
- package/dist/generators/documentation/templates/index.d.ts.map +0 -1
- package/dist/generators/documentation/templates/index.js +0 -30
- package/dist/generators/documentation/templates/index.js.map +0 -1
- package/dist/generators/documentation/templates/indexTemplate.d.ts +0 -3
- package/dist/generators/documentation/templates/indexTemplate.d.ts.map +0 -1
- package/dist/generators/documentation/templates/indexTemplate.js +0 -42
- package/dist/generators/documentation/templates/indexTemplate.js.map +0 -1
- package/dist/generators/documentation/templates/migrationTemplate.d.ts +0 -2
- package/dist/generators/documentation/templates/migrationTemplate.d.ts.map +0 -1
- package/dist/generators/documentation/templates/migrationTemplate.js +0 -422
- package/dist/generators/documentation/templates/migrationTemplate.js.map +0 -1
- package/dist/generators/documentation/templates/onboardingTemplate.d.ts +0 -2
- package/dist/generators/documentation/templates/onboardingTemplate.d.ts.map +0 -1
- package/dist/generators/documentation/templates/onboardingTemplate.js +0 -431
- package/dist/generators/documentation/templates/onboardingTemplate.js.map +0 -1
- package/dist/generators/documentation/templates/projectOverviewTemplate.d.ts +0 -3
- package/dist/generators/documentation/templates/projectOverviewTemplate.d.ts.map +0 -1
- package/dist/generators/documentation/templates/projectOverviewTemplate.js +0 -65
- package/dist/generators/documentation/templates/projectOverviewTemplate.js.map +0 -1
- package/dist/generators/documentation/templates/securityTemplate.d.ts +0 -2
- package/dist/generators/documentation/templates/securityTemplate.d.ts.map +0 -1
- package/dist/generators/documentation/templates/securityTemplate.js +0 -39
- package/dist/generators/documentation/templates/securityTemplate.js.map +0 -1
- package/dist/generators/documentation/templates/testingTemplate.d.ts +0 -2
- package/dist/generators/documentation/templates/testingTemplate.d.ts.map +0 -1
- package/dist/generators/documentation/templates/testingTemplate.js +0 -45
- package/dist/generators/documentation/templates/testingTemplate.js.map +0 -1
- package/dist/generators/documentation/templates/toolingTemplate.d.ts +0 -2
- package/dist/generators/documentation/templates/toolingTemplate.d.ts.map +0 -1
- package/dist/generators/documentation/templates/toolingTemplate.js +0 -42
- package/dist/generators/documentation/templates/toolingTemplate.js.map +0 -1
- package/dist/generators/documentation/templates/troubleshootingTemplate.d.ts +0 -2
- package/dist/generators/documentation/templates/troubleshootingTemplate.d.ts.map +0 -1
- package/dist/generators/documentation/templates/troubleshootingTemplate.js +0 -292
- package/dist/generators/documentation/templates/troubleshootingTemplate.js.map +0 -1
- package/dist/generators/documentation/templates/types.d.ts +0 -23
- package/dist/generators/documentation/templates/types.d.ts.map +0 -1
- package/dist/generators/documentation/templates/types.js +0 -3
- package/dist/generators/documentation/templates/types.js.map +0 -1
- package/dist/generators/plans/index.d.ts +0 -2
- package/dist/generators/plans/index.d.ts.map +0 -1
- package/dist/generators/plans/index.js +0 -6
- package/dist/generators/plans/index.js.map +0 -1
- package/dist/generators/plans/planGenerator.d.ts +0 -22
- package/dist/generators/plans/planGenerator.d.ts.map +0 -1
- package/dist/generators/plans/planGenerator.js +0 -109
- package/dist/generators/plans/planGenerator.js.map +0 -1
- package/dist/generators/plans/templates/indexTemplate.d.ts +0 -3
- package/dist/generators/plans/templates/indexTemplate.d.ts.map +0 -1
- package/dist/generators/plans/templates/indexTemplate.js +0 -37
- package/dist/generators/plans/templates/indexTemplate.js.map +0 -1
- package/dist/generators/plans/templates/planTemplate.d.ts +0 -3
- package/dist/generators/plans/templates/planTemplate.d.ts.map +0 -1
- package/dist/generators/plans/templates/planTemplate.js +0 -166
- package/dist/generators/plans/templates/planTemplate.js.map +0 -1
- package/dist/generators/plans/templates/types.d.ts +0 -19
- package/dist/generators/plans/templates/types.d.ts.map +0 -1
- package/dist/generators/plans/templates/types.js +0 -3
- package/dist/generators/plans/templates/types.js.map +0 -1
- package/dist/generators/shared/contextGenerator.d.ts +0 -7
- package/dist/generators/shared/contextGenerator.d.ts.map +0 -1
- package/dist/generators/shared/contextGenerator.js +0 -13
- package/dist/generators/shared/contextGenerator.js.map +0 -1
- package/dist/generators/shared/directoryTemplateHelpers.d.ts +0 -2
- package/dist/generators/shared/directoryTemplateHelpers.d.ts.map +0 -1
- package/dist/generators/shared/directoryTemplateHelpers.js +0 -12
- package/dist/generators/shared/directoryTemplateHelpers.js.map +0 -1
- package/dist/generators/shared/generatorUtils.d.ts +0 -16
- package/dist/generators/shared/generatorUtils.d.ts.map +0 -1
- package/dist/generators/shared/generatorUtils.js +0 -119
- package/dist/generators/shared/generatorUtils.js.map +0 -1
- package/dist/generators/shared/index.d.ts +0 -4
- package/dist/generators/shared/index.d.ts.map +0 -1
- package/dist/generators/shared/index.js +0 -10
- package/dist/generators/shared/index.js.map +0 -1
- package/dist/index.d.ts +0 -9
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/prompts/defaults.d.ts +0 -3
- package/dist/prompts/defaults.d.ts.map +0 -1
- package/dist/prompts/defaults.js +0 -95
- package/dist/prompts/defaults.js.map +0 -1
- package/dist/services/baseLLMClient.d.ts +0 -12
- package/dist/services/baseLLMClient.d.ts.map +0 -1
- package/dist/services/baseLLMClient.js +0 -80
- package/dist/services/baseLLMClient.js.map +0 -1
- package/dist/services/fill/fillService.d.ts +0 -46
- package/dist/services/fill/fillService.d.ts.map +0 -1
- package/dist/services/fill/fillService.js +0 -254
- package/dist/services/fill/fillService.js.map +0 -1
- package/dist/services/init/initService.d.ts +0 -37
- package/dist/services/init/initService.d.ts.map +0 -1
- package/dist/services/init/initService.js +0 -167
- package/dist/services/init/initService.js.map +0 -1
- package/dist/services/llmClientFactory.d.ts +0 -8
- package/dist/services/llmClientFactory.d.ts.map +0 -1
- package/dist/services/llmClientFactory.js +0 -23
- package/dist/services/llmClientFactory.js.map +0 -1
- package/dist/services/openRouterClient.d.ts +0 -9
- package/dist/services/openRouterClient.d.ts.map +0 -1
- package/dist/services/openRouterClient.js +0 -49
- package/dist/services/openRouterClient.js.map +0 -1
- package/dist/services/plan/planService.d.ts +0 -57
- package/dist/services/plan/planService.d.ts.map +0 -1
- package/dist/services/plan/planService.js +0 -334
- package/dist/services/plan/planService.js.map +0 -1
- package/dist/services/shared/llmConfig.d.ts +0 -22
- package/dist/services/shared/llmConfig.d.ts.map +0 -1
- package/dist/services/shared/llmConfig.js +0 -38
- package/dist/services/shared/llmConfig.js.map +0 -1
- package/dist/types.d.ts +0 -65
- package/dist/types.d.ts.map +0 -1
- package/dist/types.js +0 -3
- package/dist/types.js.map +0 -1
- package/dist/utils/cliUI.d.ts +0 -27
- package/dist/utils/cliUI.d.ts.map +0 -1
- package/dist/utils/cliUI.js +0 -252
- package/dist/utils/cliUI.js.map +0 -1
- package/dist/utils/fileMapper.d.ts +0 -11
- package/dist/utils/fileMapper.d.ts.map +0 -1
- package/dist/utils/fileMapper.js +0 -146
- package/dist/utils/fileMapper.js.map +0 -1
- package/dist/utils/gitService.d.ts +0 -50
- package/dist/utils/gitService.d.ts.map +0 -1
- package/dist/utils/gitService.js +0 -470
- package/dist/utils/gitService.js.map +0 -1
- package/dist/utils/i18n.d.ts +0 -171
- package/dist/utils/i18n.d.ts.map +0 -1
- package/dist/utils/i18n.js +0 -381
- package/dist/utils/i18n.js.map +0 -1
- package/dist/utils/promptLoader.d.ts +0 -12
- package/dist/utils/promptLoader.d.ts.map +0 -1
- package/dist/utils/promptLoader.js +0 -81
- package/dist/utils/promptLoader.js.map +0 -1
- package/dist/utils/versionChecker.d.ts +0 -15
- package/dist/utils/versionChecker.d.ts.map +0 -1
- package/dist/utils/versionChecker.js +0 -49
- package/dist/utils/versionChecker.js.map +0 -1
- package/prompts/update_plan_prompt.md +0 -41
- package/prompts/update_scaffold_prompt.md +0 -47
|
@@ -0,0 +1,421 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: ring:test-driven-development
|
|
3
|
+
description: |
|
|
4
|
+
RED-GREEN-REFACTOR implementation methodology - write failing test first,
|
|
5
|
+
minimal implementation to pass, then refactor. Ensures tests verify behavior.
|
|
6
|
+
|
|
7
|
+
trigger: |
|
|
8
|
+
- Starting implementation of new feature
|
|
9
|
+
- Starting implementation of bugfix
|
|
10
|
+
- Writing new production code
|
|
11
|
+
|
|
12
|
+
skip_when: |
|
|
13
|
+
- Reviewing/modifying existing tests → use testing-anti-patterns
|
|
14
|
+
- Code already exists without tests → add tests first, then TDD for new code
|
|
15
|
+
- Exploratory/spike work → consider brainstorming first
|
|
16
|
+
|
|
17
|
+
related:
|
|
18
|
+
complementary: [testing-anti-patterns, verification-before-completion]
|
|
19
|
+
|
|
20
|
+
compliance_rules:
|
|
21
|
+
- id: "test_file_exists"
|
|
22
|
+
description: "Test file must exist before implementation file"
|
|
23
|
+
check_type: "file_exists"
|
|
24
|
+
pattern: "**/*.test.{ts,js,go,py}"
|
|
25
|
+
severity: "blocking"
|
|
26
|
+
failure_message: "No test file found. Write test first (RED phase)."
|
|
27
|
+
|
|
28
|
+
- id: "test_must_fail_first"
|
|
29
|
+
description: "Test must produce failure output before implementation"
|
|
30
|
+
check_type: "command_output_contains"
|
|
31
|
+
command: "npm test 2>&1 || pytest 2>&1 || go test ./... 2>&1"
|
|
32
|
+
pattern: "FAIL|Error|failed"
|
|
33
|
+
severity: "blocking"
|
|
34
|
+
failure_message: "Test does not fail. Write a failing test first (RED phase)."
|
|
35
|
+
prerequisites:
|
|
36
|
+
- name: "test_framework_installed"
|
|
37
|
+
check: "npm list jest 2>/dev/null || npm list vitest 2>/dev/null || which pytest 2>/dev/null || go list ./... 2>&1 | grep -q testing"
|
|
38
|
+
failure_message: "No test framework found. Install jest/vitest (JS), pytest (Python), or use Go's built-in testing."
|
|
39
|
+
severity: "blocking"
|
|
40
|
+
|
|
41
|
+
- name: "can_run_tests"
|
|
42
|
+
check: "npm test -- --version 2>/dev/null || pytest --version 2>/dev/null || go test -v 2>&1 | grep -q 'testing:'"
|
|
43
|
+
failure_message: "Cannot run tests. Fix test configuration."
|
|
44
|
+
severity: "warning"
|
|
45
|
+
composition:
|
|
46
|
+
works_well_with:
|
|
47
|
+
- skill: "ring:systematic-debugging"
|
|
48
|
+
when: "test reveals unexpected behavior or bug"
|
|
49
|
+
transition: "Pause TDD at current phase, use systematic-debugging to find root cause, return to TDD after fix"
|
|
50
|
+
|
|
51
|
+
- skill: "ring:verification-before-completion"
|
|
52
|
+
when: "before marking test suite or feature complete"
|
|
53
|
+
transition: "Run verification to ensure all tests pass, return to TDD if issues found"
|
|
54
|
+
|
|
55
|
+
- skill: "ring:requesting-code-review"
|
|
56
|
+
when: "after completing RED-GREEN-REFACTOR cycle for feature"
|
|
57
|
+
transition: "Request review before merging, address feedback, mark complete"
|
|
58
|
+
|
|
59
|
+
conflicts_with: []
|
|
60
|
+
|
|
61
|
+
typical_workflow: |
|
|
62
|
+
1. Write failing test (RED)
|
|
63
|
+
2. If test reveals unexpected behavior → switch to systematic-debugging
|
|
64
|
+
3. Fix root cause
|
|
65
|
+
4. Return to TDD: minimal implementation (GREEN)
|
|
66
|
+
5. Refactor (REFACTOR)
|
|
67
|
+
6. Run verification-before-completion
|
|
68
|
+
7. Request code review
|
|
69
|
+
---
|
|
70
|
+
|
|
71
|
+
# Test-Driven Development (TDD)
|
|
72
|
+
|
|
73
|
+
## Overview
|
|
74
|
+
|
|
75
|
+
Write the test first. Watch it fail. Write minimal code to pass.
|
|
76
|
+
|
|
77
|
+
**Core principle:** If you didn't watch the test fail, you don't know if it tests the right thing.
|
|
78
|
+
|
|
79
|
+
**Violating the letter of the rules is violating the spirit of the rules.**
|
|
80
|
+
|
|
81
|
+
## When to Use
|
|
82
|
+
|
|
83
|
+
**Always:**
|
|
84
|
+
- New features
|
|
85
|
+
- Bug fixes
|
|
86
|
+
- Refactoring
|
|
87
|
+
- Behavior changes
|
|
88
|
+
|
|
89
|
+
**Exceptions (ask your human partner):**
|
|
90
|
+
- Throwaway prototypes
|
|
91
|
+
- Generated code
|
|
92
|
+
- Configuration files
|
|
93
|
+
|
|
94
|
+
Thinking "skip TDD just this once"? Stop. That's rationalization.
|
|
95
|
+
|
|
96
|
+
## The Iron Law
|
|
97
|
+
|
|
98
|
+
```
|
|
99
|
+
NO PRODUCTION CODE WITHOUT A FAILING TEST FIRST
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
Write code before the test? You have ONLY two options:
|
|
103
|
+
|
|
104
|
+
## Violation Handling (Mandatory)
|
|
105
|
+
|
|
106
|
+
**If you wrote code before test:**
|
|
107
|
+
|
|
108
|
+
### DELETE IT. IMMEDIATELY.
|
|
109
|
+
|
|
110
|
+
```bash
|
|
111
|
+
rm [files] # or git reset --hard
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
**Not tomorrow. Not after asking. NOW.**
|
|
115
|
+
|
|
116
|
+
**Delete means DELETE:**
|
|
117
|
+
- `rm -rf the_file.py` ✓
|
|
118
|
+
- `git reset --hard` ✓
|
|
119
|
+
- Physically delete ✓
|
|
120
|
+
|
|
121
|
+
**These are NOT deleting (violations):**
|
|
122
|
+
- `git stash` - That's hiding, not deleting
|
|
123
|
+
- `mv file.py file.py.bak` - That's keeping
|
|
124
|
+
- Copy to clipboard - That's keeping
|
|
125
|
+
- Comment out - That's keeping
|
|
126
|
+
- "Mental note" - That's keeping
|
|
127
|
+
- Asking permission - That's delaying
|
|
128
|
+
|
|
129
|
+
Delete means gone forever. No recovery possible.
|
|
130
|
+
|
|
131
|
+
Then start over with TDD.
|
|
132
|
+
|
|
133
|
+
### NO ASKING. NO PERMISSION. NO EXCEPTIONS.
|
|
134
|
+
|
|
135
|
+
**You CANNOT:**
|
|
136
|
+
- ❌ Ask "should I delete this?"
|
|
137
|
+
- ❌ Ask "may I proceed with tests-after?"
|
|
138
|
+
- ❌ Request permission due to [any reason]
|
|
139
|
+
- ❌ Explain why deleting is hard
|
|
140
|
+
- ❌ Decide "I'll be pragmatic and test after"
|
|
141
|
+
- ❌ Claim "spirit not letter"
|
|
142
|
+
- ❌ Rationalize "damage already done"
|
|
143
|
+
- ❌ Argue "skill is guide not suicide pact"
|
|
144
|
+
- ❌ Create "pragmatic compliance" category
|
|
145
|
+
- ❌ Mention sunk cost, time pressure, personal plans
|
|
146
|
+
- ❌ Commit anything
|
|
147
|
+
|
|
148
|
+
**If you think you have a legitimate reason to skip deletion:**
|
|
149
|
+
- You don't.
|
|
150
|
+
- Delete it.
|
|
151
|
+
- Every excuse is rationalization.
|
|
152
|
+
- Anniversary? Delete code, go to dinner, start fresh tomorrow.
|
|
153
|
+
- Deadline? Delete code, communicate delay, do it right.
|
|
154
|
+
- 4 hours of work? Sunk cost fallacy. Delete it.
|
|
155
|
+
- Manager pressure? Delete it, explain TDD prevents bugs.
|
|
156
|
+
- "But this is different because..." No. Delete it.
|
|
157
|
+
|
|
158
|
+
**The rule has ZERO exceptions. ZERO.**
|
|
159
|
+
|
|
160
|
+
### Consequences of NOT Deleting
|
|
161
|
+
|
|
162
|
+
Untested code WILL cause production incidents. These are CERTAINTIES:
|
|
163
|
+
|
|
164
|
+
- **Trust:** Partner loses confidence permanently. PRs rejected. Assigned bug duty.
|
|
165
|
+
- **Production:** Incident within 30 days. Worst timing (holiday, 3am). Postmortem responsibility.
|
|
166
|
+
- **Career:** Reputation as "cuts corners" follows you. Promotion blocked.
|
|
167
|
+
- **Personal:** Anniversary debugging. Technical debt haunts for years.
|
|
168
|
+
|
|
169
|
+
❌ "This time is different" → Every developer who thought this experienced these consequences.
|
|
170
|
+
|
|
171
|
+
### The ONLY Acceptable Action
|
|
172
|
+
|
|
173
|
+
**DELETE THE CODE. NOW.**
|
|
174
|
+
|
|
175
|
+
```bash
|
|
176
|
+
rm /tmp/auth-feature/src/auth.ts
|
|
177
|
+
rm /tmp/auth-feature/src/middleware.ts
|
|
178
|
+
rm /tmp/auth-feature/src/utils.ts
|
|
179
|
+
# or: git reset --hard
|
|
180
|
+
```
|
|
181
|
+
|
|
182
|
+
**Then:**
|
|
183
|
+
- Go to anniversary dinner
|
|
184
|
+
- Sleep well
|
|
185
|
+
- Tomorrow morning: Start fresh with TDD
|
|
186
|
+
- Implement in 2-3 hours with tests (faster second time)
|
|
187
|
+
- Code review passes
|
|
188
|
+
- No production incidents
|
|
189
|
+
- Career intact
|
|
190
|
+
|
|
191
|
+
**ZERO exceptions. Anniversary, deadline, manager pressure, sunk cost - NONE of these override deletion.**
|
|
192
|
+
|
|
193
|
+
### Prohibited Rationalizations
|
|
194
|
+
|
|
195
|
+
**You CANNOT create alternatives:**
|
|
196
|
+
- ❌ "Commit with WIP message" - NO. Delete.
|
|
197
|
+
- ❌ "Commit with 'NO TESTS' warning" - NO. Delete.
|
|
198
|
+
- ❌ "Mark as technical debt" - NO. Delete.
|
|
199
|
+
- ❌ "Email team about violation" - NO. Delete first, communicate after.
|
|
200
|
+
- ❌ "Come early tomorrow to decide" - NO. Delete now, decide nothing.
|
|
201
|
+
- ❌ "Let team decide" - NO. You decide: Delete.
|
|
202
|
+
- ❌ "Write tests tonight after dinner" - NO. Delete, start fresh tomorrow with TDD.
|
|
203
|
+
- ❌ "Commit honestly labeled code" - NO. Honesty is deleting it.
|
|
204
|
+
- ❌ "Present options to partner" - NO. Only one option: Delete.
|
|
205
|
+
|
|
206
|
+
**The skill doesn't offer choices. It commands: DELETE.**
|
|
207
|
+
|
|
208
|
+
**If you create ANY alternative to deletion, you violated the skill.**
|
|
209
|
+
|
|
210
|
+
**DELETE IT. NOW. NO ALTERNATIVES.**
|
|
211
|
+
|
|
212
|
+
## Red-Green-Refactor
|
|
213
|
+
|
|
214
|
+
**Cycle:** RED (write failing test) → verify fails → GREEN (minimal code) → verify passes → REFACTOR (clean up) → verify still green → repeat
|
|
215
|
+
|
|
216
|
+
### RED - Write Failing Test
|
|
217
|
+
|
|
218
|
+
Write one minimal test showing what should happen.
|
|
219
|
+
|
|
220
|
+
**GOOD:** `test('retries failed operations 3 times', ...)` - clear name, tests real behavior, one thing.
|
|
221
|
+
|
|
222
|
+
**BAD:** `test('retry works', ...)` with mocks - vague name, tests mock not code.
|
|
223
|
+
|
|
224
|
+
**Time limit:** <5 minutes. Complex mocks → testing wrong thing. Lots of setup → design too complex. Multiple assertions → split tests.
|
|
225
|
+
|
|
226
|
+
**Requirements:**
|
|
227
|
+
- One behavior
|
|
228
|
+
- Clear name
|
|
229
|
+
- Real code (no mocks unless unavoidable)
|
|
230
|
+
|
|
231
|
+
### Verify RED - Watch It Fail
|
|
232
|
+
|
|
233
|
+
**MANDATORY. Never skip.**
|
|
234
|
+
|
|
235
|
+
```bash
|
|
236
|
+
npm test path/to/test.test.ts
|
|
237
|
+
```
|
|
238
|
+
|
|
239
|
+
**Paste the ACTUAL failure output in your response:**
|
|
240
|
+
```
|
|
241
|
+
[PASTE EXACT OUTPUT HERE]
|
|
242
|
+
[NO OUTPUT = VIOLATION]
|
|
243
|
+
```
|
|
244
|
+
|
|
245
|
+
If you can't paste output, you didn't run the test.
|
|
246
|
+
|
|
247
|
+
### Required Failure Patterns
|
|
248
|
+
|
|
249
|
+
| Test Type | Must See This Failure | Wrong Failure = Wrong Test |
|
|
250
|
+
|-----------|----------------------|---------------------------|
|
|
251
|
+
| New feature | `NameError: function not defined` or `AttributeError` | Test passing = testing existing behavior |
|
|
252
|
+
| Bug fix | Actual wrong output/behavior | Test passing = not testing the bug |
|
|
253
|
+
| Refactor | Tests pass before and after | Tests fail after = broke something |
|
|
254
|
+
|
|
255
|
+
**No failure output = didn't run = violation**
|
|
256
|
+
|
|
257
|
+
Confirm:
|
|
258
|
+
- Test fails (not errors)
|
|
259
|
+
- Failure message is expected
|
|
260
|
+
- Fails because feature missing (not typos)
|
|
261
|
+
|
|
262
|
+
**Test passes?** You're testing existing behavior. Fix test.
|
|
263
|
+
|
|
264
|
+
**Test errors?** Fix error, re-run until it fails correctly.
|
|
265
|
+
|
|
266
|
+
### GREEN - Minimal Code
|
|
267
|
+
|
|
268
|
+
Write simplest code to pass the test.
|
|
269
|
+
|
|
270
|
+
**GOOD:** Simple loop with try/catch, just enough to pass. **BAD:** Adding options, backoff, callbacks (YAGNI).
|
|
271
|
+
|
|
272
|
+
Don't add features, refactor other code, or "improve" beyond the test.
|
|
273
|
+
|
|
274
|
+
### Verify GREEN - Watch It Pass
|
|
275
|
+
|
|
276
|
+
**MANDATORY.**
|
|
277
|
+
|
|
278
|
+
```bash
|
|
279
|
+
npm test path/to/test.test.ts
|
|
280
|
+
```
|
|
281
|
+
|
|
282
|
+
Confirm:
|
|
283
|
+
- Test passes
|
|
284
|
+
- Other tests still pass
|
|
285
|
+
- Output pristine (no errors, warnings)
|
|
286
|
+
|
|
287
|
+
**Test fails?** Fix code, not test.
|
|
288
|
+
|
|
289
|
+
**Other tests fail?** Fix now.
|
|
290
|
+
|
|
291
|
+
### REFACTOR - Clean Up
|
|
292
|
+
|
|
293
|
+
After green only:
|
|
294
|
+
- Remove duplication
|
|
295
|
+
- Improve names
|
|
296
|
+
- Extract helpers
|
|
297
|
+
|
|
298
|
+
Keep tests green. Don't add behavior.
|
|
299
|
+
|
|
300
|
+
### Repeat
|
|
301
|
+
|
|
302
|
+
Next failing test for next feature.
|
|
303
|
+
|
|
304
|
+
## Good Tests
|
|
305
|
+
|
|
306
|
+
| Quality | Good | Bad |
|
|
307
|
+
|---------|------|-----|
|
|
308
|
+
| **Minimal** | One thing. "and" in name? Split it. | `test('validates email and domain and whitespace')` |
|
|
309
|
+
| **Clear** | Name describes behavior | `test('test1')` |
|
|
310
|
+
| **Shows intent** | Demonstrates desired API | Obscures what code should do |
|
|
311
|
+
|
|
312
|
+
## Why Order Matters
|
|
313
|
+
|
|
314
|
+
| Argument | Reality |
|
|
315
|
+
|----------|---------|
|
|
316
|
+
| "Tests after verify it works" | Tests-after pass immediately → proves nothing. Test-first forces failure → proves test works. |
|
|
317
|
+
| "Already manually tested" | Ad-hoc ≠ systematic. No record, can't re-run, easy to forget under pressure. |
|
|
318
|
+
| "Deleting X hours is wasteful" | Sunk cost fallacy. Keeping unverified code = tech debt. Delete → rewrite with confidence. |
|
|
319
|
+
| "TDD is dogmatic" | TDD IS pragmatic: catches bugs pre-commit, prevents regressions, documents behavior, enables refactoring. |
|
|
320
|
+
| "Spirit not ritual" | Tests-after = "what does this do?" Tests-first = "what should this do?" Different questions. |
|
|
321
|
+
|
|
322
|
+
## Common Rationalizations
|
|
323
|
+
|
|
324
|
+
| Excuse | Reality |
|
|
325
|
+
|--------|---------|
|
|
326
|
+
| "Too simple to test" | Simple code breaks. Test takes 30 seconds. |
|
|
327
|
+
| "I'll test after" | Tests passing immediately prove nothing. |
|
|
328
|
+
| "Tests after achieve same goals" | Tests-after = "what does this do?" Tests-first = "what should this do?" |
|
|
329
|
+
| "Already manually tested" | Ad-hoc ≠ systematic. No record, can't re-run. |
|
|
330
|
+
| "Deleting X hours is wasteful" | Sunk cost fallacy. Keeping unverified code is technical debt. |
|
|
331
|
+
| "Keep as reference, write tests first" | You'll adapt it. That's testing after. Delete means delete. |
|
|
332
|
+
| "Need to explore first" | Fine. Throw away exploration, start with TDD. |
|
|
333
|
+
| "Test hard = design unclear" | Listen to test. Hard to test = hard to use. |
|
|
334
|
+
| "TDD will slow me down" | TDD faster than debugging. Pragmatic = test-first. |
|
|
335
|
+
| "Manual test faster" | Manual doesn't prove edge cases. You'll re-test every change. |
|
|
336
|
+
| "Existing code has no tests" | You're improving it. Add tests for existing code. |
|
|
337
|
+
|
|
338
|
+
## Red Flags - STOP and Start Over
|
|
339
|
+
|
|
340
|
+
- Code before test
|
|
341
|
+
- Test after implementation
|
|
342
|
+
- Test passes immediately
|
|
343
|
+
- Can't explain why test failed
|
|
344
|
+
- Tests added "later"
|
|
345
|
+
- Rationalizing "just this once"
|
|
346
|
+
- "I already manually tested it"
|
|
347
|
+
- "Tests after achieve the same purpose"
|
|
348
|
+
- "It's about spirit not ritual"
|
|
349
|
+
- "Keep as reference" or "adapt existing code"
|
|
350
|
+
- "Already spent X hours, deleting is wasteful"
|
|
351
|
+
- "TDD is dogmatic, I'm being pragmatic"
|
|
352
|
+
- "This is different because..."
|
|
353
|
+
|
|
354
|
+
**All of these mean: Delete code. Start over with TDD.**
|
|
355
|
+
|
|
356
|
+
## Example: Bug Fix
|
|
357
|
+
|
|
358
|
+
**Bug:** Empty email accepted → **RED:** `test('rejects empty email', ...)` → **Verify RED:** `FAIL: expected 'Email required', got undefined` → **GREEN:** Add `if (!data.email?.trim()) return { error: 'Email required' }` → **Verify GREEN:** `PASS` → **REFACTOR:** Extract validation if needed.
|
|
359
|
+
|
|
360
|
+
## Verification Checklist
|
|
361
|
+
|
|
362
|
+
Before marking work complete:
|
|
363
|
+
|
|
364
|
+
- [ ] Every new function/method has a test
|
|
365
|
+
- [ ] Watched each test fail before implementing
|
|
366
|
+
- [ ] Each test failed for expected reason (feature missing, not typo)
|
|
367
|
+
- [ ] Wrote minimal code to pass each test
|
|
368
|
+
- [ ] All tests pass
|
|
369
|
+
- [ ] Output pristine (no errors, warnings)
|
|
370
|
+
- [ ] Tests use real code (mocks only if unavoidable)
|
|
371
|
+
- [ ] Edge cases and errors covered
|
|
372
|
+
|
|
373
|
+
Can't check all boxes? You skipped TDD. Start over.
|
|
374
|
+
|
|
375
|
+
## When Stuck
|
|
376
|
+
|
|
377
|
+
| Problem | Solution |
|
|
378
|
+
|---------|----------|
|
|
379
|
+
| Don't know how to test | Write wished-for API. Write assertion first. Ask your human partner. |
|
|
380
|
+
| Test too complicated | Design too complicated. Simplify interface. |
|
|
381
|
+
| Must mock everything | Code too coupled. Use dependency injection. |
|
|
382
|
+
| Test setup huge | Extract helpers. Still complex? Simplify design. |
|
|
383
|
+
|
|
384
|
+
## Debugging Integration
|
|
385
|
+
|
|
386
|
+
Bug found? Write failing test reproducing it. Follow TDD cycle. Test proves fix and prevents regression.
|
|
387
|
+
|
|
388
|
+
Never fix bugs without a test.
|
|
389
|
+
|
|
390
|
+
## Required Patterns
|
|
391
|
+
|
|
392
|
+
This skill uses these universal patterns:
|
|
393
|
+
- **State Tracking:** See `skills/shared-patterns/state-tracking.md`
|
|
394
|
+
- **Failure Recovery:** See `skills/shared-patterns/failure-recovery.md`
|
|
395
|
+
- **Exit Criteria:** See `skills/shared-patterns/exit-criteria.md`
|
|
396
|
+
- **TodoWrite:** See `skills/shared-patterns/todowrite-integration.md`
|
|
397
|
+
|
|
398
|
+
Apply ALL patterns when using this skill.
|
|
399
|
+
|
|
400
|
+
---
|
|
401
|
+
|
|
402
|
+
## Violation Recovery Quick Reference
|
|
403
|
+
|
|
404
|
+
| Violation | Detection | Recovery |
|
|
405
|
+
|-----------|-----------|----------|
|
|
406
|
+
| **Code before test** | Implementation exists, no test file | DELETE code (`rm`), write test, verify RED, reimplement |
|
|
407
|
+
| **FALSE GREEN** | Test passes immediately, no implementation | Test is broken - make stricter until it fails correctly |
|
|
408
|
+
| **Kept "reference"** | Stash/backup/clipboard exists | Delete permanently (`git stash drop`, `rm`), start fresh |
|
|
409
|
+
|
|
410
|
+
**Why recovery matters:** Test must fail first to prove it tests something. Keeping code means you'll adapt it instead of implementing from tests.
|
|
411
|
+
|
|
412
|
+
---
|
|
413
|
+
|
|
414
|
+
## Final Rule
|
|
415
|
+
|
|
416
|
+
```
|
|
417
|
+
Production code → test exists and failed first
|
|
418
|
+
Otherwise → not TDD
|
|
419
|
+
```
|
|
420
|
+
|
|
421
|
+
No exceptions without your human partner's permission.
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: ring:writing-plans
|
|
3
|
+
description: |
|
|
4
|
+
Creates comprehensive implementation plans with exact file paths, complete code
|
|
5
|
+
examples, and verification steps for engineers with zero codebase context.
|
|
6
|
+
|
|
7
|
+
trigger: |
|
|
8
|
+
- Design phase complete (brainstorming/PRD/TRD validated)
|
|
9
|
+
- Need to create executable task breakdown
|
|
10
|
+
- Creating work for other engineers or AI agents
|
|
11
|
+
|
|
12
|
+
skip_when: |
|
|
13
|
+
- Design not validated → use brainstorming first
|
|
14
|
+
- Requirements still unclear → use ring:pre-dev-prd-creation first
|
|
15
|
+
- Already have a plan → use ring:executing-plans
|
|
16
|
+
|
|
17
|
+
sequence:
|
|
18
|
+
after: [brainstorming, ring:pre-dev-trd-creation]
|
|
19
|
+
before: [ring:executing-plans, ring:subagent-driven-development]
|
|
20
|
+
|
|
21
|
+
related:
|
|
22
|
+
similar: [brainstorming]
|
|
23
|
+
---
|
|
24
|
+
|
|
25
|
+
# Writing Plans
|
|
26
|
+
|
|
27
|
+
## Overview
|
|
28
|
+
|
|
29
|
+
This skill dispatches a specialized agent to write comprehensive implementation plans for engineers with zero codebase context.
|
|
30
|
+
|
|
31
|
+
**Announce at start:** "I'm using the ring:writing-plans skill to create the implementation plan."
|
|
32
|
+
|
|
33
|
+
**Context:** This should be run in a dedicated worktree (created by ring:brainstorming skill).
|
|
34
|
+
|
|
35
|
+
## The Process
|
|
36
|
+
|
|
37
|
+
**Step 1: Dispatch Write-Plan Agent**
|
|
38
|
+
|
|
39
|
+
Dispatch via `Task(subagent_type: "ring:write-plan", model: "opus")` with:
|
|
40
|
+
- Instructions to create bite-sized tasks (2-5 min each)
|
|
41
|
+
- Include exact file paths, complete code, verification steps
|
|
42
|
+
- Save to `docs/plans/YYYY-MM-DD-<feature-name>.md`
|
|
43
|
+
|
|
44
|
+
**Step 2: Validate Plan**
|
|
45
|
+
|
|
46
|
+
After the plan is saved, validate it:
|
|
47
|
+
|
|
48
|
+
```bash
|
|
49
|
+
python3 default/lib/validate-plan-precedent.py docs/plans/YYYY-MM-DD-<feature>.md
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
**Interpretation:**
|
|
53
|
+
- `PASS` → Plan is safe to execute
|
|
54
|
+
- `WARNING` → Plan has issues to address
|
|
55
|
+
- Review the warnings in the output
|
|
56
|
+
- Update plan to address the issues
|
|
57
|
+
- Re-run validation until PASS
|
|
58
|
+
|
|
59
|
+
**Step 3: Ask User About Execution**
|
|
60
|
+
|
|
61
|
+
Ask via `AskUserQuestion`: "Execute now?" Options:
|
|
62
|
+
1. Execute now → `ring:subagent-driven-development`
|
|
63
|
+
2. Parallel session → user opens new session with `ring:executing-plans`
|
|
64
|
+
3. Save for later → report location and end
|
|
65
|
+
|
|
66
|
+
## Why Use an Agent?
|
|
67
|
+
|
|
68
|
+
**Context preservation** (reading many files keeps supervisor clean) | **Model power** (Opus for comprehensive planning) | **Separation of concerns** (supervisor orchestrates, agent plans)
|
|
69
|
+
|
|
70
|
+
## What the Agent Does
|
|
71
|
+
|
|
72
|
+
Explore codebase → identify files → break into bite-sized tasks (2-5 min) → write complete code → include exact commands → add review checkpoints → verify Zero-Context Test → save to `docs/plans/YYYY-MM-DD-<feature>.md` → report back
|
|
73
|
+
|
|
74
|
+
## Requirements for Plans
|
|
75
|
+
|
|
76
|
+
Every plan: Header (goal, architecture, tech stack) | Verification commands with expected output | Exact file paths (never "somewhere in src") | Complete code (never "add validation here") | Bite-sized steps with verification | Failure recovery | Review checkpoints | Zero-Context Test | **Recommended agents per task**
|
|
77
|
+
|
|
78
|
+
## Agent Selection
|
|
79
|
+
|
|
80
|
+
| Task Type | Agent |
|
|
81
|
+
|-----------|-------|
|
|
82
|
+
| Backend API/services | `backend-engineer-{golang,typescript}` |
|
|
83
|
+
| Frontend/BFF | `frontend-bff-engineer-typescript` |
|
|
84
|
+
| Infra/CI/CD | `ring:devops-engineer` |
|
|
85
|
+
| Testing | `ring:qa-analyst` |
|
|
86
|
+
| Reliability | `ring:sre` |
|
|
87
|
+
| Fallback | `general-purpose` (built-in, no prefix) |
|
|
88
|
+
|
|
89
|
+
## Execution Options Reference
|
|
90
|
+
|
|
91
|
+
| Option | Description |
|
|
92
|
+
|--------|-------------|
|
|
93
|
+
| **Execute now** | Fresh subagent per task, code review between tasks → `ring:subagent-driven-development` |
|
|
94
|
+
| **Parallel session** | User opens new session, batch execution with human review → `ring:executing-plans` |
|
|
95
|
+
| **Save for later** | Plan at `docs/plans/YYYY-MM-DD-<feature>.md`, manual review before execution |
|
|
96
|
+
|
|
97
|
+
## Required Patterns
|
|
98
|
+
|
|
99
|
+
This skill uses these universal patterns:
|
|
100
|
+
- **State Tracking:** See `skills/shared-patterns/state-tracking.md`
|
|
101
|
+
- **Failure Recovery:** See `skills/shared-patterns/failure-recovery.md`
|
|
102
|
+
- **Exit Criteria:** See `skills/shared-patterns/exit-criteria.md`
|
|
103
|
+
- **TodoWrite:** See `skills/shared-patterns/todowrite-integration.md`
|
|
104
|
+
|
|
105
|
+
Apply ALL patterns when using this skill.
|
|
File without changes
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: genesis:architect
|
|
3
|
+
version: 1.0.0
|
|
4
|
+
description: Lead Framework Architect for Genesis Grid AI Labs. Responsible for high-level architecture, modular monolith enforcement, and AI-readiness.
|
|
5
|
+
type: architect
|
|
6
|
+
model: opus
|
|
7
|
+
last_updated: 2026-01-23
|
|
8
|
+
author: Guilherme Giorgi (GG)
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
# 💎 Genesis Grid Lead Architect
|
|
12
|
+
|
|
13
|
+
Você é o Arquiteto Líder da **Genesis Grid AI Labs**. Sua missão é projetar e manter sistemas que seguem o **GG-Framework**, garantindo que toda base de código seja modular, resiliente e otimizada para colaboração com IA de alta performance.
|
|
14
|
+
|
|
15
|
+
## Perfil e Tom
|
|
16
|
+
- **Tom:** Técnico, Preciso, Autoritário e Minimalista. Sem gírias ou enrolação.
|
|
17
|
+
- **Lealdade:** Fiel aos princípios de Guilherme Giorgi (GG) e à marca Genesis Grid.
|
|
18
|
+
|
|
19
|
+
## Responsabilidades Centrais
|
|
20
|
+
|
|
21
|
+
1. **Arquitetura Modular Sovereignty:** Garantir Monólitos Modulares com "Acoplamento Horizontal Zero". Módulos devem se comunicar apenas via `bridge.ts`.
|
|
22
|
+
2. **Gestão Dinâmica de Contexto (Smart Zone):** Manter a janela de contexto rigorosamente abaixo de **40%**. Utilizar Progressive Disclosure e carregar arquivos sob demanda.
|
|
23
|
+
3. **Aesthetics Enforcement:** Garantir que o Genesis Design System Master (v5.1) seja aplicado com rigor cirúrgico (Modo **FULL**) ou adaptado conforme o contrato de interface do projeto (Modo **MIX/CORE**).
|
|
24
|
+
4. **Metodologia PREVICE:** Orquestrar o ciclo completo (Planejamento, Revisão, Execução, Validação, Confirmação).
|
|
25
|
+
5. **Tech Stack Authority:** Garantir o uso mandatório de React 19, Vite, Tailwind CSS e TypeScript (Strict Mode).
|
|
26
|
+
6. **Operational Transparency:** Manter e auditar o [OPERATIONS_LOG.md](file:///home/guilherme/Documentos/GG.AI/PLATAFORMAS/ggai-context/.context/docs/OPERATIONS_LOG.md) para controle de tempo e FinOps.
|
|
27
|
+
|
|
28
|
+
## 🏆 Mandato Técnico (Global Engineering Standards)
|
|
29
|
+
- **Framework:** React 19 + TypeScript (strict).
|
|
30
|
+
- **Bundler:** Vite.
|
|
31
|
+
- **Styling:** Tailwind CSS (Merge via `cn()`).
|
|
32
|
+
- **Icons:** Uso exclusivo de `@/components/ui/icon`.
|
|
33
|
+
- **Identity:** Founder: Guilherme Giorgi (GG). Marca: Genesis Grid AI Labs.
|
|
34
|
+
|
|
35
|
+
## Regras Inegociáveis (HARD GATES)
|
|
36
|
+
|
|
37
|
+
| Regra | Descrição | Consequência |
|
|
38
|
+
| :--- | :--- | :--- |
|
|
39
|
+
| **Boundaries** | Nenhuma importação direta entre módulos. Uso mandatório de `bridge.ts`. | **REJEITADO** |
|
|
40
|
+
| **Estado Isolado** | Cada módulo gerencia suas próprias tabelas. Sem queries cross-module. | **REJEITADO** |
|
|
41
|
+
| **Smart Zone** | Contextos acima de 40% devem ser limpos ou resumidos em Memória de Longo Prazo. | **REJEITADO** |
|
|
42
|
+
| **Discovery Protocol** | Proibido iniciar plano sem auditar e atomizar o Design Doc/Input. | **REJEITADO** |
|
|
43
|
+
|
|
44
|
+
## Fluxo Operacional: Protocolo PREVICE (v5.2)
|
|
45
|
+
|
|
46
|
+
1. **Fase Zero: Discovery & Audit:** Analisar o Input/Design Doc. Identificar lacunas. Atomizar em fases técnicas.
|
|
47
|
+
2. **P - Planejamento (Architect Mode):** Selecionar Agente e Modelo High-IQ. Gerar plano em `.context/plans/`. Garantir que o plano inclua comandos de verificação explícitos.
|
|
48
|
+
3. **R - Revisão:** Aguardar validação do Arquiteto Líder (GG).
|
|
49
|
+
4. **E - Execução (Builder Mode):** Delegar para um **agente limpo** usando **Modelos High-Speed** para implementação atômica.
|
|
50
|
+
5. **V - Validação:** Executar TDD e verificar evidências.
|
|
51
|
+
6. **C - Confirmação:** Registrar entrega e deploy.
|
|
52
|
+
|
|
53
|
+
## Standards Verification (MANDATORY FIRST SECTION)
|
|
54
|
+
|
|
55
|
+
Toda resposta sua deve começar com esta seção para provar que você leu o contexto atual:
|
|
56
|
+
|
|
57
|
+
```markdown
|
|
58
|
+
## Standards Verification
|
|
59
|
+
|
|
60
|
+
| Check | Status | Details |
|
|
61
|
+
|-------|--------|---------|
|
|
62
|
+
| .context/docs/GENESIS_DESIGN_SYSTEM.md | Loaded | v5.1 Active |
|
|
63
|
+
| Smart Zone (<40%) | Verified | Token density optimized |
|
|
64
|
+
| Discovery Audit | Verified | Input atomized |
|
|
65
|
+
| Modular Boundaries | Verified | Bridge pattern checked |
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
---
|
|
69
|
+
*Genesis Grid AI Labs - Engineering Excellence.*
|