codex-genesis-harness 0.1.0 → 0.1.4
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/.codebase/API_CONTRACTS.md +12 -0
- package/.codebase/ARCHITECTURE.md +6 -0
- package/.codebase/ARCHITECTURE_REVIEW_COMPLETE.md +216 -0
- package/.codebase/CURRENT_STATE.md +8 -0
- package/.codebase/DEPENDENCY_GRAPH.md +14 -0
- package/.codebase/DOMAIN_MODELS.md +10 -0
- package/.codebase/EVOLUTION_PLAN.md +35 -0
- package/.codebase/FILE_NAMING_CLARIFICATION.md +161 -0
- package/.codebase/HARNESS_COMPLETENESS_AUDIT.md +613 -0
- package/.codebase/IMPLEMENTATION_COMPLETE.md +429 -0
- package/.codebase/IMPLEMENTATION_HANDOFF.md +351 -0
- package/.codebase/IMPROVEMENTS_SUMMARY.md +419 -0
- package/.codebase/KNOWN_PROBLEMS.md +6 -0
- package/.codebase/MODULE_INDEX.md +13 -0
- package/.codebase/PHASE3_SKILLS_NAMING_COMPLETE.md +292 -0
- package/.codebase/PHASE_DEPENDENCY_MAP.md +486 -0
- package/.codebase/PIPELINE_FLOW.md +14 -0
- package/.codebase/QUICK_START_SPEC_IMPACT.md +456 -0
- package/.codebase/README.md +139 -0
- package/.codebase/RECOVERY_POINTS.md +438 -0
- package/.codebase/TEST_MATRIX.md +11 -0
- package/.codebase/UI_ROUTES.md +4 -0
- package/.codebase/context/backend-summary.md +4 -0
- package/.codebase/context/frontend-summary.md +4 -0
- package/.codebase/context/pipeline-summary.md +4 -0
- package/.codebase/context/providers-summary.md +4 -0
- package/.codebase/context/render-summary.md +4 -0
- package/.codebase/context/tests-summary.md +4 -0
- package/.codex/skills/genesis-ai-provider/SKILL.md +46 -0
- package/.codex/skills/genesis-ai-provider/agents/openai.yaml +7 -0
- package/.codex/skills/genesis-ai-provider/checklists/checklist.md +9 -0
- package/.codex/skills/genesis-ai-provider/examples/example.md +4 -0
- package/.codex/skills/genesis-ai-provider/templates/provider-contract-template.md +9 -0
- package/.codex/skills/genesis-api-contract/SKILL.md +46 -0
- package/.codex/skills/genesis-api-contract/agents/openai.yaml +7 -0
- package/.codex/skills/genesis-api-contract/checklists/checklist.md +8 -0
- package/.codex/skills/genesis-api-contract/examples/example.md +4 -0
- package/.codex/skills/genesis-api-contract/templates/api-contract-template.md +4 -0
- package/.codex/skills/genesis-api-sync/SKILL.md +354 -0
- package/.codex/skills/genesis-api-sync/agents/openai.yaml +7 -0
- package/.codex/skills/genesis-api-sync/checklists/api-sync-checklist.md +101 -0
- package/.codex/skills/genesis-api-sync/examples/example.md +68 -0
- package/.codex/skills/genesis-api-sync/templates/api-change-template.md +257 -0
- package/.codex/skills/genesis-architecture/SKILL.md +46 -0
- package/.codex/skills/genesis-architecture/agents/openai.yaml +7 -0
- package/.codex/skills/genesis-architecture/checklists/checklist.md +8 -0
- package/.codex/skills/genesis-architecture/examples/example.md +4 -0
- package/.codex/skills/genesis-architecture/templates/architecture-decision-template.md +14 -0
- package/.codex/skills/genesis-codebase-map/SKILL.md +46 -0
- package/.codex/skills/genesis-codebase-map/agents/openai.yaml +7 -0
- package/.codex/skills/genesis-codebase-map/checklists/checklist.md +7 -0
- package/.codex/skills/genesis-codebase-map/examples/example.md +4 -0
- package/.codex/skills/genesis-codebase-map/templates/map-update-template.md +8 -0
- package/.codex/skills/genesis-debug-guide/SKILL.md +479 -0
- package/.codex/skills/genesis-debug-guide/agents/openai.yaml +7 -0
- package/.codex/skills/genesis-debug-guide/checklists/flaky-test-investigation.md +339 -0
- package/.codex/skills/genesis-debug-guide/checklists/production-bug-debug.md +210 -0
- package/.codex/skills/genesis-debug-guide/checklists/test-failure-debug.md +158 -0
- package/.codex/skills/genesis-debug-guide/examples/example.md +48 -0
- package/.codex/skills/genesis-debug-guide/observability/debug-commands.md +365 -0
- package/.codex/skills/genesis-debug-guide/playbooks/unit-test-failures.md +289 -0
- package/.codex/skills/genesis-debug-guide/templates/debug-investigation-log.md +288 -0
- package/.codex/skills/genesis-design-spec/SKILL.md +46 -0
- package/.codex/skills/genesis-design-spec/agents/openai.yaml +7 -0
- package/.codex/skills/genesis-design-spec/checklists/checklist.md +7 -0
- package/.codex/skills/genesis-design-spec/examples/example.md +4 -0
- package/.codex/skills/genesis-design-spec/templates/design-spec-template.md +9 -0
- package/.codex/skills/genesis-docs/SKILL.md +46 -0
- package/.codex/skills/genesis-docs/agents/openai.yaml +7 -0
- package/.codex/skills/genesis-docs/checklists/checklist.md +7 -0
- package/.codex/skills/genesis-docs/examples/example.md +4 -0
- package/.codex/skills/genesis-docs/templates/docs-update-template.md +8 -0
- package/.codex/skills/genesis-docs-automation/SKILL.md +1003 -0
- package/.codex/skills/genesis-docs-automation/agents/openai.yaml +7 -0
- package/.codex/skills/genesis-docs-automation/checklists/docs-validation.md +359 -0
- package/.codex/skills/genesis-docs-automation/checklists/spec-alignment.md +312 -0
- package/.codex/skills/genesis-docs-automation/examples/example.md +59 -0
- package/.codex/skills/genesis-docs-automation/observability/docs-tracking.md +382 -0
- package/.codex/skills/genesis-docs-automation/playbooks/auto-update-flow.md +851 -0
- package/.codex/skills/genesis-docs-automation/playbooks/changelog-generation.md +491 -0
- package/.codex/skills/genesis-docs-automation/templates/changelog-entry-template.md +187 -0
- package/.codex/skills/genesis-docs-automation/templates/handoff-template.md +297 -0
- package/.codex/skills/genesis-harness/SKILL.md +1418 -0
- package/.codex/skills/genesis-harness/agents/openai.yaml +9 -0
- package/.codex/skills/genesis-harness/checklists/bug-fix-qa.md +169 -0
- package/.codex/skills/genesis-harness/checklists/checklist.md +10 -0
- package/.codex/skills/genesis-harness/checklists/new-feature-qa.md +157 -0
- package/.codex/skills/genesis-harness/checklists/refactor-qa.md +216 -0
- package/.codex/skills/genesis-harness/checklists/requirements-validation.md +211 -0
- package/.codex/skills/genesis-harness/examples/example.md +4 -0
- package/.codex/skills/genesis-harness/resources/change-impact-matrix-template.md +204 -0
- package/.codex/skills/genesis-harness/resources/foundation-phase-template.md +131 -0
- package/.codex/skills/genesis-harness/resources/phase-00-foundation-template.md +76 -0
- package/.codex/skills/genesis-harness/resources/post-implementation-guide.md +347 -0
- package/.codex/skills/{project-genesis-harness → genesis-harness}/scripts/check-architecture-boundaries.sh +23 -23
- package/.codex/skills/{project-genesis-harness → genesis-harness}/scripts/check-docs-sync.sh +24 -24
- package/.codex/skills/{project-genesis-harness → genesis-harness}/scripts/check-no-debug-logs.sh +21 -21
- package/.codex/skills/{project-genesis-harness → genesis-harness}/scripts/check-required-planning-files.sh +46 -46
- package/.codex/skills/{project-genesis-harness → genesis-harness}/scripts/check-spec-changelog.sh +24 -24
- package/.codex/skills/{project-genesis-harness → genesis-harness}/scripts/check-task-tracking.sh +25 -25
- package/.codex/skills/genesis-harness/scripts/compact-context.sh +54 -0
- package/.codex/skills/{project-genesis-harness → genesis-harness}/scripts/create-adr.sh +74 -74
- package/.codex/skills/{project-genesis-harness → genesis-harness}/scripts/create-bug.sh +160 -160
- package/.codex/skills/{project-genesis-harness → genesis-harness}/scripts/create-feature.sh +217 -217
- package/.codex/skills/{project-genesis-harness → genesis-harness}/scripts/detect-stack.sh +26 -26
- package/.codex/skills/{project-genesis-harness → genesis-harness}/scripts/init-planning.sh +750 -719
- package/.codex/skills/{project-genesis-harness → genesis-harness}/scripts/list-changed-files.sh +12 -12
- package/.codex/skills/genesis-harness/scripts/offload-log.sh +72 -0
- package/.codex/skills/{project-genesis-harness → genesis-harness}/scripts/run-verification.sh +47 -47
- package/.codex/skills/genesis-harness/scripts/run-verify-loop.sh +75 -0
- package/.codex/skills/{project-genesis-harness → genesis-harness}/scripts/update-state.sh +33 -33
- package/.codex/skills/genesis-harness/templates/harness-workflow-template.md +10 -0
- package/.codex/skills/genesis-harness-engineering/SKILL.md +159 -0
- package/.codex/skills/genesis-harness-engineering/agents/openai.yaml +7 -0
- package/.codex/skills/genesis-harness-engineering/checklists/checklist.md +48 -0
- package/.codex/skills/genesis-harness-engineering/examples/example.md +57 -0
- package/.codex/skills/genesis-harness-engineering/playbooks/harness-evolution.md +99 -0
- package/.codex/skills/genesis-harness-engineering/templates/harness-change-template.md +37 -0
- package/.codex/skills/genesis-new-design/SKILL.md +95 -0
- package/.codex/skills/genesis-new-design/agents/openai.yaml +4 -0
- package/.codex/skills/genesis-new-design/checklists/checklist.md +8 -0
- package/.codex/skills/genesis-new-design/examples/example.md +4 -0
- package/.codex/skills/genesis-new-design/templates/new-design-template.md +9 -0
- package/.codex/skills/genesis-observability-automation/SKILL.md +382 -0
- package/.codex/skills/genesis-observability-automation/agents/openai.yaml +7 -0
- package/.codex/skills/genesis-observability-automation/examples/example.md +86 -0
- package/.codex/skills/genesis-performance-profiling/SKILL.md +510 -0
- package/.codex/skills/genesis-performance-profiling/agents/openai.yaml +6 -0
- package/.codex/skills/genesis-performance-profiling/checklists/optimization-verification.md +199 -0
- package/.codex/skills/genesis-performance-profiling/checklists/performance-baseline.md +183 -0
- package/.codex/skills/genesis-performance-profiling/examples/example.md +234 -0
- package/.codex/skills/genesis-performance-profiling/observability/performance-tracking.md +202 -0
- package/.codex/skills/genesis-performance-profiling/playbooks/load-testing-orchestration.md +593 -0
- package/.codex/skills/genesis-performance-profiling/playbooks/profiling-playbook.md +601 -0
- package/.codex/skills/genesis-performance-profiling/templates/load-test-config-template.md +428 -0
- package/.codex/skills/genesis-performance-profiling/templates/performance-report-template.md +238 -0
- package/.codex/skills/genesis-pipeline-orchestration/SKILL.md +46 -0
- package/.codex/skills/genesis-pipeline-orchestration/agents/openai.yaml +7 -0
- package/.codex/skills/genesis-pipeline-orchestration/checklists/checklist.md +12 -0
- package/.codex/skills/genesis-pipeline-orchestration/examples/example.md +4 -0
- package/.codex/skills/genesis-pipeline-orchestration/templates/orchestration-template.md +12 -0
- package/.codex/skills/genesis-planning/SKILL.md +46 -0
- package/.codex/skills/genesis-planning/agents/openai.yaml +7 -0
- package/.codex/skills/genesis-planning/checklists/checklist.md +8 -0
- package/.codex/skills/genesis-planning/examples/example.md +4 -0
- package/.codex/skills/genesis-planning/templates/plan-template.md +11 -0
- package/.codex/skills/genesis-release/SKILL.md +46 -0
- package/.codex/skills/genesis-release/agents/openai.yaml +7 -0
- package/.codex/skills/genesis-release/checklists/checklist.md +8 -0
- package/.codex/skills/genesis-release/examples/example.md +4 -0
- package/.codex/skills/genesis-release/templates/release-checklist-template.md +9 -0
- package/.codex/skills/genesis-release-orchestration/SKILL.md +653 -0
- package/.codex/skills/genesis-release-orchestration/agents/openai.yaml +7 -0
- package/.codex/skills/genesis-release-orchestration/checklists/post-deployment-verification.md +274 -0
- package/.codex/skills/genesis-release-orchestration/checklists/pre-release-validation.md +220 -0
- package/.codex/skills/genesis-release-orchestration/examples/example.md +78 -0
- package/.codex/skills/genesis-release-orchestration/observability/release-tracking.md +253 -0
- package/.codex/skills/genesis-release-orchestration/playbooks/canary-deployment-orchestration.md +472 -0
- package/.codex/skills/genesis-release-orchestration/playbooks/semantic-versioning-automation.md +494 -0
- package/.codex/skills/genesis-release-orchestration/templates/deployment-strategy-template.md +303 -0
- package/.codex/skills/genesis-release-orchestration/templates/release-runbook-template.md +420 -0
- package/.codex/skills/genesis-research/SKILL.md +46 -0
- package/.codex/skills/genesis-research/agents/openai.yaml +7 -0
- package/.codex/skills/genesis-research/checklists/checklist.md +7 -0
- package/.codex/skills/genesis-research/examples/example.md +4 -0
- package/.codex/skills/genesis-research/templates/research-note-template.md +9 -0
- package/.codex/skills/genesis-research-first/SKILL.md +237 -0
- package/.codex/skills/genesis-research-first/agents/openai.yaml +7 -0
- package/.codex/skills/genesis-research-first/examples/example.md +85 -0
- package/.codex/skills/genesis-spec-propagation/SKILL.md +534 -0
- package/.codex/skills/genesis-spec-propagation/agents/openai.yaml +7 -0
- package/.codex/skills/genesis-spec-propagation/checklists/phase-update-verification.md +384 -0
- package/.codex/skills/genesis-spec-propagation/checklists/spec-change-detection.md +257 -0
- package/.codex/skills/genesis-spec-propagation/examples/example.md +63 -0
- package/.codex/skills/genesis-spec-propagation/observability/propagation-tracking.md +373 -0
- package/.codex/skills/genesis-spec-propagation/playbooks/breaking-change-propagation.md +692 -0
- package/.codex/skills/genesis-spec-propagation/playbooks/feature-change-propagation.md +434 -0
- package/.codex/skills/genesis-spec-propagation/templates/migration-guide-template.md +407 -0
- package/.codex/skills/genesis-upgrade-design/SKILL.md +97 -0
- package/.codex/skills/genesis-upgrade-design/agents/openai.yaml +4 -0
- package/.codex/skills/genesis-upgrade-design/checklists/checklist.md +8 -0
- package/.codex/skills/genesis-upgrade-design/examples/example.md +4 -0
- package/.codex/skills/genesis-upgrade-design/templates/upgrade-design-template.md +9 -0
- package/.codex/skills/spec-impact-engine/SKILL.md +504 -0
- package/.codex/skills/spec-impact-engine/agents/openai.yaml +7 -0
- package/.codex/skills/spec-impact-engine/detect-spec-changes.sh +262 -0
- package/.codex/skills/spec-impact-engine/examples/example.md +98 -0
- package/.codex/skills/spec-impact-engine/templates/impact-report.md +248 -0
- package/.codex/skills/spec-impact-engine/templates/migration-guide.md +223 -0
- package/.codex/skills/ui-ux-test-skill/SKILL.md +46 -0
- package/.codex/skills/ui-ux-test-skill/agents/openai.yaml +7 -0
- package/.codex/skills/ui-ux-test-skill/checklists/checklist.md +8 -0
- package/.codex/skills/ui-ux-test-skill/examples/example.md +4 -0
- package/.codex/skills/ui-ux-test-skill/templates/playwright-test-template.md +4 -0
- package/.codex-plugin/plugin.json +13 -11
- package/README.EN.md +719 -0
- package/README.VI.md +712 -0
- package/README.md +318 -181
- package/VERSION +1 -1
- package/bin/genesis-harness.js +133 -79
- package/contracts/agents/CharacterBibleAgent/error.json +1 -0
- package/contracts/agents/CharacterBibleAgent/example.json +1 -0
- package/contracts/agents/CharacterBibleAgent/request.json +1 -0
- package/contracts/agents/CharacterBibleAgent/response.json +1 -0
- package/contracts/agents/CharacterBibleAgent/schema.json +1 -0
- package/contracts/agents/ImageGenerationAgent/error.json +1 -0
- package/contracts/agents/ImageGenerationAgent/example.json +1 -0
- package/contracts/agents/ImageGenerationAgent/request.json +1 -0
- package/contracts/agents/ImageGenerationAgent/response.json +1 -0
- package/contracts/agents/ImageGenerationAgent/schema.json +1 -0
- package/contracts/agents/PipelineOrchestrator/error.json +1 -0
- package/contracts/agents/PipelineOrchestrator/example.json +1 -0
- package/contracts/agents/PipelineOrchestrator/request.json +1 -0
- package/contracts/agents/PipelineOrchestrator/response.json +1 -0
- package/contracts/agents/PipelineOrchestrator/schema.json +1 -0
- package/contracts/agents/PromptGenerationAgent/error.json +1 -0
- package/contracts/agents/PromptGenerationAgent/example.json +1 -0
- package/contracts/agents/PromptGenerationAgent/request.json +1 -0
- package/contracts/agents/PromptGenerationAgent/response.json +1 -0
- package/contracts/agents/PromptGenerationAgent/schema.json +1 -0
- package/contracts/agents/RenderAgent/error.json +1 -0
- package/contracts/agents/RenderAgent/example.json +1 -0
- package/contracts/agents/RenderAgent/request.json +1 -0
- package/contracts/agents/RenderAgent/response.json +1 -0
- package/contracts/agents/RenderAgent/schema.json +1 -0
- package/contracts/agents/ScenePlanningAgent/error.json +1 -0
- package/contracts/agents/ScenePlanningAgent/example.json +1 -0
- package/contracts/agents/ScenePlanningAgent/request.json +1 -0
- package/contracts/agents/ScenePlanningAgent/response.json +1 -0
- package/contracts/agents/ScenePlanningAgent/schema.json +1 -0
- package/contracts/agents/ScreenplayAgent/error.json +1 -0
- package/contracts/agents/ScreenplayAgent/example.json +1 -0
- package/contracts/agents/ScreenplayAgent/request.json +1 -0
- package/contracts/agents/ScreenplayAgent/response.json +1 -0
- package/contracts/agents/ScreenplayAgent/schema.json +1 -0
- package/contracts/agents/StoryAnalysisAgent/error.json +1 -0
- package/contracts/agents/StoryAnalysisAgent/example.json +1 -0
- package/contracts/agents/StoryAnalysisAgent/request.json +1 -0
- package/contracts/agents/StoryAnalysisAgent/response.json +1 -0
- package/contracts/agents/StoryAnalysisAgent/schema.json +1 -0
- package/contracts/agents/SubtitleGenerationAgent/error.json +1 -0
- package/contracts/agents/SubtitleGenerationAgent/example.json +1 -0
- package/contracts/agents/SubtitleGenerationAgent/request.json +1 -0
- package/contracts/agents/SubtitleGenerationAgent/response.json +1 -0
- package/contracts/agents/SubtitleGenerationAgent/schema.json +1 -0
- package/contracts/agents/VoiceGenerationAgent/error.json +1 -0
- package/contracts/agents/VoiceGenerationAgent/example.json +1 -0
- package/contracts/agents/VoiceGenerationAgent/request.json +1 -0
- package/contracts/agents/VoiceGenerationAgent/response.json +1 -0
- package/contracts/agents/VoiceGenerationAgent/schema.json +1 -0
- package/contracts/api/README.md +4 -0
- package/contracts/api/endpoint-template/error.json +7 -0
- package/contracts/api/endpoint-template/example.json +11 -0
- package/contracts/api/endpoint-template/request.json +7 -0
- package/contracts/api/endpoint-template/response.json +6 -0
- package/contracts/api/endpoint-template/schema.json +9 -0
- package/contracts/events/README.md +4 -0
- package/contracts/events/event-template/error.json +4 -0
- package/contracts/events/event-template/example.json +6 -0
- package/contracts/events/event-template/request.json +6 -0
- package/contracts/events/event-template/response.json +3 -0
- package/contracts/events/event-template/schema.json +8 -0
- package/contracts/ui/README.md +4 -0
- package/contracts/ui/screen-template/error.json +4 -0
- package/contracts/ui/screen-template/example.json +7 -0
- package/contracts/ui/screen-template/request.json +4 -0
- package/contracts/ui/screen-template/response.json +4 -0
- package/contracts/ui/screen-template/schema.json +8 -0
- package/fixtures/agents/agent-fixture-template.md +14 -0
- package/fixtures/api/api-fixture-template.md +14 -0
- package/fixtures/images/image-fixture-template.md +14 -0
- package/fixtures/pipeline/pipeline-fixture-template.md +14 -0
- package/fixtures/render/render-fixture-template.md +14 -0
- package/fixtures/tts/tts-fixture-template.md +14 -0
- package/fixtures/videos/video-fixture-template.md +14 -0
- package/observability/agent-runs/agent-run-template.md +22 -0
- package/observability/decision-logs/decision-log-template.md +18 -0
- package/observability/failures/failure-template.md +18 -0
- package/package.json +8 -2
- package/playwright/e2e/e2e-template.md +4 -0
- package/playwright/fixtures/ui-fixture-template.md +4 -0
- package/playwright/smoke/smoke-template.md +4 -0
- package/playwright/visual/visual-regression-template.md +4 -0
- package/scripts/README.md +342 -0
- package/scripts/compact-context.sh +54 -0
- package/scripts/detect-changes.sh +152 -0
- package/scripts/install.sh +103 -69
- package/scripts/offload-log.sh +72 -0
- package/scripts/run-evals.sh +118 -52
- package/scripts/run-verify-loop.sh +75 -0
- package/scripts/uninstall.sh +81 -52
- package/scripts/verify.sh +380 -109
- package/tests/contracts/contract-template.test.md +10 -0
- package/tests/fixtures/fixture-index.md +4 -0
- package/tests/integration/integration-template.test.md +4 -0
- package/tests/unit/unit-template.test.md +4 -0
- package/.codex/skills/project-genesis-harness/SKILL.md +0 -727
- package/.codex/skills/project-genesis-harness/agents/openai.yaml +0 -9
- /package/.codex/skills/{project-genesis-harness → genesis-harness}/references/planning-schema.md +0 -0
- /package/.codex/skills/{project-genesis-harness → genesis-harness}/references/quality-rubric.md +0 -0
- /package/.codex/skills/{project-genesis-harness → genesis-harness}/references/research-rubric.md +0 -0
- /package/.codex/skills/{project-genesis-harness → genesis-harness}/references/workflows.md +0 -0
- /package/.codex/skills/{project-genesis-harness → genesis-harness}/resources/agents-template.md +0 -0
- /package/.codex/skills/{project-genesis-harness → genesis-harness}/resources/api-docs-template.md +0 -0
- /package/.codex/skills/{project-genesis-harness → genesis-harness}/resources/architecture-template.md +0 -0
- /package/.codex/skills/{project-genesis-harness → genesis-harness}/resources/audit-template.md +0 -0
- /package/.codex/skills/{project-genesis-harness → genesis-harness}/resources/bug-template.md +0 -0
- /package/.codex/skills/{project-genesis-harness → genesis-harness}/resources/check-template.md +0 -0
- /package/.codex/skills/{project-genesis-harness → genesis-harness}/resources/conventions-template.md +0 -0
- /package/.codex/skills/{project-genesis-harness → genesis-harness}/resources/decision-template.md +0 -0
- /package/.codex/skills/{project-genesis-harness → genesis-harness}/resources/design-template.md +0 -0
- /package/.codex/skills/{project-genesis-harness → genesis-harness}/resources/escalation-template.md +0 -0
- /package/.codex/skills/{project-genesis-harness → genesis-harness}/resources/feature-template.md +0 -0
- /package/.codex/skills/{project-genesis-harness → genesis-harness}/resources/integrations-template.md +0 -0
- /package/.codex/skills/{project-genesis-harness → genesis-harness}/resources/journeys-template.md +0 -0
- /package/.codex/skills/{project-genesis-harness → genesis-harness}/resources/lessons-learned-template.md +0 -0
- /package/.codex/skills/{project-genesis-harness → genesis-harness}/resources/observability-template.md +0 -0
- /package/.codex/skills/{project-genesis-harness → genesis-harness}/resources/phase-template.md +0 -0
- /package/.codex/skills/{project-genesis-harness → genesis-harness}/resources/pitfalls-template.md +0 -0
- /package/.codex/skills/{project-genesis-harness → genesis-harness}/resources/planning-tree-template.md +0 -0
- /package/.codex/skills/{project-genesis-harness → genesis-harness}/resources/project-template.md +0 -0
- /package/.codex/skills/{project-genesis-harness → genesis-harness}/resources/quality-score-template.md +0 -0
- /package/.codex/skills/{project-genesis-harness → genesis-harness}/resources/requirements-template.md +0 -0
- /package/.codex/skills/{project-genesis-harness → genesis-harness}/resources/research-template.md +0 -0
- /package/.codex/skills/{project-genesis-harness → genesis-harness}/resources/review-template.md +0 -0
- /package/.codex/skills/{project-genesis-harness → genesis-harness}/resources/spec-changelog-template.md +0 -0
- /package/.codex/skills/{project-genesis-harness → genesis-harness}/resources/stack-template.md +0 -0
- /package/.codex/skills/{project-genesis-harness → genesis-harness}/resources/verification-template.md +0 -0
|
@@ -0,0 +1,1003 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: genesis-docs-automation
|
|
3
|
+
description: "Automatically synchronize documentation with code changes across all project phases. Detects file changes, categorizes update types, auto-generates API docs, changelog entries, implementation handoffs, and validates cross-reference integrity. Use after any phase implementation."
|
|
4
|
+
---
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Genesis Docs Automation Skill
|
|
8
|
+
|
|
9
|
+
## Purpose
|
|
10
|
+
|
|
11
|
+
Automatically synchronize documentation with code changes across all project phases. Detects changed files, categorizes update types, auto-generates API reference docs, changelog entries, implementation handoffs, and validates cross-phase reference integrity. Eliminates 30-60 min manual doc sync per phase.
|
|
12
|
+
|
|
13
|
+
## When to use
|
|
14
|
+
|
|
15
|
+
- After any phase implementation (backend, SDK, tests, contracts)
|
|
16
|
+
- When API contracts change and docs need updating
|
|
17
|
+
- After `/spec-change` or `/contract-update` completes
|
|
18
|
+
- When running `/update-docs` or `/validate-alignment` manually
|
|
19
|
+
- Before release to verify documentation is current
|
|
20
|
+
|
|
21
|
+
## When NOT to use
|
|
22
|
+
|
|
23
|
+
- For documentation-only changes with no code impact
|
|
24
|
+
- For formatting/typo fixes that don't affect technical content
|
|
25
|
+
- When no implementation files changed in the last commit
|
|
26
|
+
|
|
27
|
+
## Inputs required
|
|
28
|
+
|
|
29
|
+
- List of changed files (from git diff or test run output)
|
|
30
|
+
- Current API contract files (`contracts/api/*/`)
|
|
31
|
+
- Current `.codebase/` memory files
|
|
32
|
+
- Phase context (which phase just completed)
|
|
33
|
+
|
|
34
|
+
## Outputs required
|
|
35
|
+
|
|
36
|
+
- Updated `.docs/API_REFERENCE.md` (if API contracts changed)
|
|
37
|
+
- Updated `SPEC_CHANGELOG.md` entry for all changes
|
|
38
|
+
- Updated `IMPLEMENTATION_HANDOFF.md` for phase handoffs
|
|
39
|
+
- `DOCS_UPDATE_LOG.md` entry with timestamp and change summary
|
|
40
|
+
- Validation report (cross-reference checks, completeness gates)
|
|
41
|
+
|
|
42
|
+
## Required tests
|
|
43
|
+
|
|
44
|
+
- Contract validation tests confirming docs match implementation
|
|
45
|
+
- Cross-reference link validation (no broken links)
|
|
46
|
+
- Changelog completeness check (all changes have entries)
|
|
47
|
+
- Migration guide presence check (for all breaking changes)
|
|
48
|
+
|
|
49
|
+
## Required fixtures
|
|
50
|
+
|
|
51
|
+
- Sample `DOCS_UPDATE_LOG.md` entry showing format
|
|
52
|
+
- Sample `SPEC_CHANGELOG.md` entry showing breaking change format
|
|
53
|
+
- `fixtures/docs/` directory with doc update expected outputs
|
|
54
|
+
|
|
55
|
+
## Required contract updates
|
|
56
|
+
|
|
57
|
+
- Update `contracts/api/*/` when API docs regenerated
|
|
58
|
+
- Update `.codebase/API_CONTRACTS.md` with new/changed endpoints
|
|
59
|
+
- Update `.codebase/CURRENT_STATE.md` docs sync status
|
|
60
|
+
|
|
61
|
+
## Required codebase map updates
|
|
62
|
+
|
|
63
|
+
- `.codebase/CURRENT_STATE.md`: Note docs sync completion
|
|
64
|
+
- `.codebase/KNOWN_PROBLEMS.md`: Document any doc drift found
|
|
65
|
+
- `.codebase/EVOLUTION_PLAN.md`: Update docs automation roadmap
|
|
66
|
+
|
|
67
|
+
## Token saving rules
|
|
68
|
+
|
|
69
|
+
- Read `.codebase/` summaries before opening full skill files
|
|
70
|
+
- Report only changed sections, not full document content
|
|
71
|
+
- Link to existing docs instead of duplicating content
|
|
72
|
+
- Cache phase dependency map across operations in same session
|
|
73
|
+
- Use before/after diffs when showing doc changes
|
|
74
|
+
|
|
75
|
+
## Acceptance criteria
|
|
76
|
+
|
|
77
|
+
- All changed API endpoints documented with schemas and examples
|
|
78
|
+
- All breaking changes have migration guides
|
|
79
|
+
- No broken cross-references in any doc file
|
|
80
|
+
- SPEC_CHANGELOG.md has entry for every change
|
|
81
|
+
- DOCS_UPDATE_LOG.md records what was updated and when
|
|
82
|
+
- Validation gate passes (no TODO markers, no stale links)
|
|
83
|
+
|
|
84
|
+
## Common mistakes
|
|
85
|
+
|
|
86
|
+
- Updating docs without running cross-reference validation
|
|
87
|
+
- Skipping migration guides for breaking changes
|
|
88
|
+
- Leaving emoji headers (`## 🎯`) instead of standard `## Section` format
|
|
89
|
+
- Auto-updating circular references (creates inconsistency)
|
|
90
|
+
- Forgetting to update `.codebase/API_CONTRACTS.md` after API changes
|
|
91
|
+
|
|
92
|
+
## Recovery workflow
|
|
93
|
+
|
|
94
|
+
If docs automation fails or produces incorrect output:
|
|
95
|
+
1. Check DOCS_UPDATE_LOG.md for the last successful update
|
|
96
|
+
2. Identify which files were incorrectly updated
|
|
97
|
+
3. Revert only the doc files (not implementation): `git checkout -- docs/`
|
|
98
|
+
4. Re-run `/validate-alignment` to identify remaining gaps
|
|
99
|
+
5. Manually fix specific files the automation could not handle
|
|
100
|
+
6. Add edge case to observability/docs-tracking.md for future automation
|
|
101
|
+
|
|
102
|
+
---
|
|
103
|
+
|
|
104
|
+
## 🎯 Skill Overview
|
|
105
|
+
|
|
106
|
+
The **genesis-docs-automation** skill automatically synchronizes documentation with code changes, preventing documentation drift and maintaining single source of truth across API specs, implementation guides, and architectural records.
|
|
107
|
+
|
|
108
|
+
### Problem Statement
|
|
109
|
+
|
|
110
|
+
In multi-phase development (phases 1-5), documentation becomes outdated quickly:
|
|
111
|
+
- API changes in Phase 3 not reflected in Phase 4/5 docs (3-5 hours discovery lag)
|
|
112
|
+
- SPEC_CHANGELOG.md entries forgotten or inconsistent (30-60 min per change)
|
|
113
|
+
- IMPLEMENTATION_HANDOFF.md incomplete or missing context (2-3 hours per handoff)
|
|
114
|
+
- Architecture docs diverge from actual implementation (discovered at Phase 5 integration)
|
|
115
|
+
- Cross-reference links broken after major refactoring (1-2 hours debugging)
|
|
116
|
+
|
|
117
|
+
**Impact**: Teams waste 30-60 minutes per phase on manual doc sync, docs become unreliable, and onboarding new team members is delayed by outdated guides.
|
|
118
|
+
|
|
119
|
+
### Solution
|
|
120
|
+
|
|
121
|
+
Automatically:
|
|
122
|
+
1. **Detect** which files changed during test phase
|
|
123
|
+
2. **Analyze** file types to identify doc updates needed
|
|
124
|
+
3. **Generate** updated API docs, changelog entries, implementation handoffs
|
|
125
|
+
4. **Validate** cross-references, formatting, completeness
|
|
126
|
+
5. **Gate** pre-commit until docs are valid
|
|
127
|
+
|
|
128
|
+
**Time Savings**: 30-60 min per phase → 5 min (auto-detection + validation)
|
|
129
|
+
|
|
130
|
+
---
|
|
131
|
+
|
|
132
|
+
## 📋 Workflow Overview
|
|
133
|
+
|
|
134
|
+
```
|
|
135
|
+
Phase 1: Change Detection (5 min)
|
|
136
|
+
├── Find all changed files from test run
|
|
137
|
+
├── Categorize by type (API contract, backend handler, SDK, E2E test, config)
|
|
138
|
+
└── Map to doc update types
|
|
139
|
+
|
|
140
|
+
Phase 2: Doc Type Analysis (10 min)
|
|
141
|
+
├── For API contract changes:
|
|
142
|
+
│ ├── Extract endpoint changes, parameter changes, response changes
|
|
143
|
+
│ └── Mark for API docs update
|
|
144
|
+
├── For backend handler changes:
|
|
145
|
+
│ ├── Extract implementation details, error handling, side effects
|
|
146
|
+
│ └── Mark for architecture docs + changelog update
|
|
147
|
+
├── For SDK changes:
|
|
148
|
+
│ ├── Extract new methods, type changes, deprecations
|
|
149
|
+
│ └── Mark for client SDK docs + migration guide
|
|
150
|
+
└── For all changes:
|
|
151
|
+
├── Compile change summary
|
|
152
|
+
└── Mark for SPEC_CHANGELOG.md + IMPLEMENTATION_HANDOFF.md
|
|
153
|
+
|
|
154
|
+
Phase 3: Auto-Update Documents (15-20 min)
|
|
155
|
+
├── API Documentation:
|
|
156
|
+
│ ├── Extract from Phase 1 API contract
|
|
157
|
+
│ ├── Generate endpoint documentation
|
|
158
|
+
│ ├── Generate parameter/response documentation
|
|
159
|
+
│ └── Update .docs/API_REFERENCE.md
|
|
160
|
+
├── Architecture Documentation:
|
|
161
|
+
│ ├── Extract from Phase 3 backend code
|
|
162
|
+
│ ├── Update system design docs with flow changes
|
|
163
|
+
│ └── Update .docs/ARCHITECTURE.md
|
|
164
|
+
├── Implementation Guide:
|
|
165
|
+
│ ├── Extract code comments and docstrings
|
|
166
|
+
│ ├── Generate implementation walkthrough
|
|
167
|
+
│ └── Update .docs/IMPLEMENTATION.md
|
|
168
|
+
├── Specification Changelog:
|
|
169
|
+
│ ├── Determine change type (BREAKING, FEATURE, BUG_FIX, DOCS)
|
|
170
|
+
│ ├── Generate changelog entry with migration guide
|
|
171
|
+
│ ├── Link to relevant code/tests
|
|
172
|
+
│ └── Append to SPEC_CHANGELOG.md
|
|
173
|
+
└── Implementation Handoff:
|
|
174
|
+
├── Extract phase completion status
|
|
175
|
+
├── Compile known issues, next steps, risks
|
|
176
|
+
├── Generate developer notes
|
|
177
|
+
└── Create/update IMPLEMENTATION_HANDOFF.md
|
|
178
|
+
|
|
179
|
+
Phase 4: Validation (5 min)
|
|
180
|
+
├── Syntax Validation:
|
|
181
|
+
│ ├── Check markdown formatting
|
|
182
|
+
│ ├── Verify code block syntax
|
|
183
|
+
│ └── Validate frontmatter (if used)
|
|
184
|
+
├── Reference Validation:
|
|
185
|
+
│ ├── Check all internal links exist
|
|
186
|
+
│ ├── Verify all type references resolve
|
|
187
|
+
│ └── Validate all code examples compile/type-check
|
|
188
|
+
├── Completeness Check:
|
|
189
|
+
│ ├── Ensure all changed endpoints documented
|
|
190
|
+
│ ├── Ensure all deprecations have migration guide
|
|
191
|
+
│ ├── Ensure no TODO markers remain
|
|
192
|
+
│ └── Verify change severity matches changelog
|
|
193
|
+
├── Consistency Check:
|
|
194
|
+
│ ├── API contracts match implementation
|
|
195
|
+
│ ├── Type definitions consistent across phases
|
|
196
|
+
│ ├── Error codes documented
|
|
197
|
+
│ └── Security implications noted
|
|
198
|
+
└── Cross-Phase Alignment:
|
|
199
|
+
├── Phase 1 API contract ⊂ Phase 3 backend ⊂ Phase 4 SDK
|
|
200
|
+
├── Phase 2 test data ⊂ Phase 4 SDK validation
|
|
201
|
+
└── Phase 5 E2E scenarios ⊂ Phase 1 API contract
|
|
202
|
+
|
|
203
|
+
Phase 5: Completion (2 min)
|
|
204
|
+
├── Create DOCS_UPDATE_LOG.md entry
|
|
205
|
+
├── Gate breaking changes for manual review
|
|
206
|
+
├── Flag incomplete docs for manual follow-up
|
|
207
|
+
├── Update CURRENT_STATE.md with docs status
|
|
208
|
+
└── Return ready-for-commit status or manual review request
|
|
209
|
+
```
|
|
210
|
+
|
|
211
|
+
---
|
|
212
|
+
|
|
213
|
+
## 🚀 Auto-Trigger Rules
|
|
214
|
+
|
|
215
|
+
**Activated When**: Tests pass successfully (PostToolUse Hook #6)
|
|
216
|
+
|
|
217
|
+
**Triggers For**:
|
|
218
|
+
- Any change to files in Phase 1-5 (contract, backend, SDK, tests)
|
|
219
|
+
- Manual `/update-docs` command
|
|
220
|
+
- Manual `/validate-alignment` command
|
|
221
|
+
|
|
222
|
+
**NOT Triggered For**:
|
|
223
|
+
- Test files only (unless tests reveal new scenarios)
|
|
224
|
+
- Minor formatting changes (unless docs also affected)
|
|
225
|
+
- Comments-only changes (unless docs reference those comments)
|
|
226
|
+
|
|
227
|
+
**Safety Gates**:
|
|
228
|
+
- Breaking changes require manual review gate
|
|
229
|
+
- Missing docs flag for manual follow-up (non-blocking)
|
|
230
|
+
- Cross-phase misalignment blocks pre-commit validation
|
|
231
|
+
|
|
232
|
+
---
|
|
233
|
+
|
|
234
|
+
## 📝 Change Detection Logic
|
|
235
|
+
|
|
236
|
+
### File Type Classification
|
|
237
|
+
|
|
238
|
+
```
|
|
239
|
+
CONTRACT FILES (Phase 1):
|
|
240
|
+
├── contracts/api/*/request.json
|
|
241
|
+
│ └── Trigger: API docs update + parameter docs
|
|
242
|
+
├── contracts/api/*/response.json
|
|
243
|
+
│ └── Trigger: API docs update + response schema docs
|
|
244
|
+
├── contracts/api/*/error.json
|
|
245
|
+
│ └── Trigger: Error handling docs + changelog
|
|
246
|
+
└── contracts/agents/*/schema.json
|
|
247
|
+
└── Trigger: Agent docs + capability docs
|
|
248
|
+
|
|
249
|
+
BACKEND FILES (Phase 3):
|
|
250
|
+
├── src/api/handlers/*.ts
|
|
251
|
+
│ └── Trigger: API docs update + implementation guide
|
|
252
|
+
├── src/database/schema.ts
|
|
253
|
+
│ └── Trigger: Database docs + migration guide
|
|
254
|
+
├── src/services/*.ts
|
|
255
|
+
│ └── Trigger: Service docs + architecture update
|
|
256
|
+
└── src/errors/ErrorCatalog.ts
|
|
257
|
+
└── Trigger: Error handling docs
|
|
258
|
+
|
|
259
|
+
SDK FILES (Phase 4):
|
|
260
|
+
├── src/client/*.ts
|
|
261
|
+
│ └── Trigger: SDK docs + API reference + client guide
|
|
262
|
+
├── src/types/*.ts
|
|
263
|
+
│ └── Trigger: Type reference docs
|
|
264
|
+
└── src/serialization/*.ts
|
|
265
|
+
└── Trigger: Type conversion docs + migration guide
|
|
266
|
+
|
|
267
|
+
TEST FILES (Phase 2, 5):
|
|
268
|
+
├── tests/unit/*.test.ts
|
|
269
|
+
│ └── Trigger: CHANGELOG.md (test coverage section)
|
|
270
|
+
├── tests/integration/*.test.ts
|
|
271
|
+
│ └── Trigger: Integration examples docs
|
|
272
|
+
└── playwright/e2e/*.spec.ts
|
|
273
|
+
└── Trigger: User flow docs + examples
|
|
274
|
+
|
|
275
|
+
CONFIG FILES:
|
|
276
|
+
├── .env.example
|
|
277
|
+
│ └── Trigger: Setup docs + environment variable reference
|
|
278
|
+
├── package.json
|
|
279
|
+
│ └── Trigger: Dependencies docs (if version changes)
|
|
280
|
+
└── tsconfig.json
|
|
281
|
+
└── Trigger: Development setup docs
|
|
282
|
+
```
|
|
283
|
+
|
|
284
|
+
### Change Severity Classification
|
|
285
|
+
|
|
286
|
+
```
|
|
287
|
+
BREAKING (High Impact):
|
|
288
|
+
├── Removed API endpoint
|
|
289
|
+
├── Changed parameter type (e.g., string → number)
|
|
290
|
+
├── Changed response structure
|
|
291
|
+
├── Removed database field
|
|
292
|
+
├── Removed export/public method
|
|
293
|
+
└── Changed error code behavior
|
|
294
|
+
|
|
295
|
+
FEATURE (Medium Impact):
|
|
296
|
+
├── New optional parameter
|
|
297
|
+
├── New optional response field
|
|
298
|
+
├── New endpoint
|
|
299
|
+
├── New method
|
|
300
|
+
├── New database field (optional)
|
|
301
|
+
└── New error code
|
|
302
|
+
|
|
303
|
+
BUG_FIX (Low Impact):
|
|
304
|
+
├── Fixed response structure (matches contract)
|
|
305
|
+
├── Fixed error handling (still backward compatible)
|
|
306
|
+
├── Fixed validation logic
|
|
307
|
+
├── Fixed performance issue
|
|
308
|
+
└── Updated error message (not error code)
|
|
309
|
+
|
|
310
|
+
DOCS (Documentation Only):
|
|
311
|
+
├── Updated comments/docstrings
|
|
312
|
+
├── Updated examples
|
|
313
|
+
├── Updated type hints
|
|
314
|
+
├── Improved error messages
|
|
315
|
+
└── Clarified behavior
|
|
316
|
+
|
|
317
|
+
INTERNAL (No Impact):
|
|
318
|
+
├── Refactored implementation (no behavior change)
|
|
319
|
+
├── Updated tests without API change
|
|
320
|
+
├── Updated dependencies (patch/minor)
|
|
321
|
+
└── Formatting/style changes
|
|
322
|
+
```
|
|
323
|
+
|
|
324
|
+
---
|
|
325
|
+
|
|
326
|
+
## 🔄 Auto-Update Phase Handlers
|
|
327
|
+
|
|
328
|
+
### 1. API Documentation Handler
|
|
329
|
+
|
|
330
|
+
**Input**: Changes to Phase 1 API contracts
|
|
331
|
+
**Output**: Updated `.docs/API_REFERENCE.md`
|
|
332
|
+
|
|
333
|
+
```markdown
|
|
334
|
+
## AUTOMATICALLY GENERATED SECTION
|
|
335
|
+
|
|
336
|
+
For each changed endpoint:
|
|
337
|
+
|
|
338
|
+
### POST /api/users/register (NEW)
|
|
339
|
+
|
|
340
|
+
**Description**: Register a new user account
|
|
341
|
+
|
|
342
|
+
**Parameters**:
|
|
343
|
+
- `email` (string, required): User email address
|
|
344
|
+
- `password` (string, required): User password (8+ chars)
|
|
345
|
+
- `name` (string, optional): Display name
|
|
346
|
+
|
|
347
|
+
**Response** (200):
|
|
348
|
+
```json
|
|
349
|
+
{
|
|
350
|
+
"id": "uuid",
|
|
351
|
+
"email": "user@example.com",
|
|
352
|
+
"name": "User Name",
|
|
353
|
+
"createdAt": "2026-05-31T00:00:00Z"
|
|
354
|
+
}
|
|
355
|
+
```
|
|
356
|
+
|
|
357
|
+
**Errors**:
|
|
358
|
+
- `409`: Email already registered
|
|
359
|
+
- `400`: Invalid email format
|
|
360
|
+
- `422`: Password too weak
|
|
361
|
+
|
|
362
|
+
**Example**:
|
|
363
|
+
```bash
|
|
364
|
+
curl -X POST http://localhost:3000/api/users/register \
|
|
365
|
+
-H "Content-Type: application/json" \
|
|
366
|
+
-d '{
|
|
367
|
+
"email": "user@example.com",
|
|
368
|
+
"password": "SecurePassword123",
|
|
369
|
+
"name": "John Doe"
|
|
370
|
+
}'
|
|
371
|
+
```
|
|
372
|
+
|
|
373
|
+
---
|
|
374
|
+
|
|
375
|
+
## Note
|
|
376
|
+
|
|
377
|
+
Auto-generated on: [timestamp]
|
|
378
|
+
Last change: [commit hash]
|
|
379
|
+
```
|
|
380
|
+
|
|
381
|
+
### 2. Architecture Documentation Handler
|
|
382
|
+
|
|
383
|
+
**Input**: Changes to Phase 3 backend code
|
|
384
|
+
**Output**: Updated `.docs/ARCHITECTURE.md`
|
|
385
|
+
|
|
386
|
+
```markdown
|
|
387
|
+
## System Flow Changes
|
|
388
|
+
|
|
389
|
+
For each significant backend change:
|
|
390
|
+
|
|
391
|
+
### User Registration Flow (UPDATED)
|
|
392
|
+
|
|
393
|
+
**Previous**: User → API → Database → Return
|
|
394
|
+
**Current**: User → API → Validation → Database → Cache invalidation → Return
|
|
395
|
+
|
|
396
|
+
**Why Changed**: Added cache invalidation to prevent stale user data
|
|
397
|
+
|
|
398
|
+
**Files Affected**:
|
|
399
|
+
- `src/api/handlers/registerHandler.ts`
|
|
400
|
+
- `src/services/UserService.ts`
|
|
401
|
+
- `src/cache/invalidation.ts`
|
|
402
|
+
|
|
403
|
+
**Testing**: See `tests/integration/auth.test.ts`
|
|
404
|
+
```
|
|
405
|
+
|
|
406
|
+
### 3. Implementation Guide Handler
|
|
407
|
+
|
|
408
|
+
**Input**: Changes to Phase 3 code + Phase 2 tests
|
|
409
|
+
**Output**: Updated `.docs/IMPLEMENTATION.md`
|
|
410
|
+
|
|
411
|
+
```markdown
|
|
412
|
+
## User Registration Implementation
|
|
413
|
+
|
|
414
|
+
### Overview
|
|
415
|
+
|
|
416
|
+
User registration is handled in two phases:
|
|
417
|
+
1. Input validation (email, password strength)
|
|
418
|
+
2. Database insertion + cache setup
|
|
419
|
+
|
|
420
|
+
### Key Code Points
|
|
421
|
+
|
|
422
|
+
**Handler**: `src/api/handlers/registerHandler.ts`
|
|
423
|
+
- Lines 12-34: Email validation
|
|
424
|
+
- Lines 35-50: Password hashing
|
|
425
|
+
- Lines 51-68: Database insertion
|
|
426
|
+
|
|
427
|
+
**Service**: `src/services/UserService.ts`
|
|
428
|
+
- Method `createUser()`: Orchestrates registration
|
|
429
|
+
- Handles transactional safety
|
|
430
|
+
- Triggers cache invalidation
|
|
431
|
+
|
|
432
|
+
**Tests**: `tests/integration/auth.test.ts`
|
|
433
|
+
- Test case: "should register new user"
|
|
434
|
+
- Covers: Valid input, email collision, weak password
|
|
435
|
+
|
|
436
|
+
### Error Handling
|
|
437
|
+
|
|
438
|
+
| Error | Cause | Recovery |
|
|
439
|
+
|-------|-------|----------|
|
|
440
|
+
| 409 Conflict | Email exists | Suggest password reset |
|
|
441
|
+
| 422 Unprocessable | Weak password | Validate: 8+ chars, mixed case, number |
|
|
442
|
+
| 500 Server Error | Database down | Retry with exponential backoff |
|
|
443
|
+
|
|
444
|
+
### Performance Notes
|
|
445
|
+
|
|
446
|
+
- Email validation: O(1) cache lookup
|
|
447
|
+
- Password hashing: ~100ms (bcrypt cost factor 10)
|
|
448
|
+
- Database insert: ~10ms avg (indexed on email)
|
|
449
|
+
- **Total P95**: ~150ms
|
|
450
|
+
|
|
451
|
+
### Security Notes
|
|
452
|
+
|
|
453
|
+
- Passwords hashed with bcrypt (never stored plaintext)
|
|
454
|
+
- Email validated format (RFC 5322)
|
|
455
|
+
- Rate limiting: 5 attempts per hour per IP
|
|
456
|
+
- Logged: Email + timestamp (no password)
|
|
457
|
+
```
|
|
458
|
+
|
|
459
|
+
### 4. Specification Changelog Handler
|
|
460
|
+
|
|
461
|
+
**Input**: All phase changes
|
|
462
|
+
**Output**: Updated `SPEC_CHANGELOG.md`
|
|
463
|
+
|
|
464
|
+
```markdown
|
|
465
|
+
## [UNRELEASED] - 2026-05-31
|
|
466
|
+
|
|
467
|
+
### Added
|
|
468
|
+
- POST /api/users/register endpoint (v2.0)
|
|
469
|
+
- Email validation + password hashing
|
|
470
|
+
- Returns user ID + created timestamp
|
|
471
|
+
- See: [API Reference](API_REFERENCE.md#post-apiusersregister)
|
|
472
|
+
- Tests: tests/integration/auth.test.ts
|
|
473
|
+
|
|
474
|
+
### Changed
|
|
475
|
+
- GET /api/users/{id} now includes `avatarUrl` field (optional)
|
|
476
|
+
- Backward compatible (new field optional)
|
|
477
|
+
- Migration: Update queries to include avatar URL retrieval
|
|
478
|
+
- See: [Migration Guide](#migration-avatarurl)
|
|
479
|
+
|
|
480
|
+
### Fixed
|
|
481
|
+
- User deletion now properly invalidates cache
|
|
482
|
+
- Prevents stale data in subsequent queries
|
|
483
|
+
- Tests: tests/integration/users.test.ts
|
|
484
|
+
|
|
485
|
+
### Deprecated
|
|
486
|
+
- POST /api/auth/register (use /api/users/register instead)
|
|
487
|
+
- Removal planned for v2.2 (6 months)
|
|
488
|
+
- See: [Migration Guide](#migration-auth-endpoint)
|
|
489
|
+
|
|
490
|
+
---
|
|
491
|
+
|
|
492
|
+
## Migration Guides
|
|
493
|
+
|
|
494
|
+
### Migration: New User Registration Endpoint
|
|
495
|
+
|
|
496
|
+
**When**: v2.0 (now)
|
|
497
|
+
**Deadline**: Immediate
|
|
498
|
+
**Breaking**: No
|
|
499
|
+
|
|
500
|
+
**What Changed**:
|
|
501
|
+
- Old endpoint: `POST /api/auth/register` (deprecated)
|
|
502
|
+
- New endpoint: `POST /api/users/register` (recommended)
|
|
503
|
+
- Both work identically now, old endpoint removed in v2.2
|
|
504
|
+
|
|
505
|
+
**How to Migrate**:
|
|
506
|
+
1. Find all calls to `POST /api/auth/register`
|
|
507
|
+
2. Change to `POST /api/users/register`
|
|
508
|
+
3. No parameter or response changes
|
|
509
|
+
4. Deploy at your convenience before v2.2
|
|
510
|
+
|
|
511
|
+
**Code Example**:
|
|
512
|
+
```javascript
|
|
513
|
+
// Before
|
|
514
|
+
const response = await fetch('/api/auth/register', { ... })
|
|
515
|
+
|
|
516
|
+
// After
|
|
517
|
+
const response = await fetch('/api/users/register', { ... })
|
|
518
|
+
```
|
|
519
|
+
|
|
520
|
+
---
|
|
521
|
+
|
|
522
|
+
## Release Notes
|
|
523
|
+
|
|
524
|
+
**v2.0 - May 31, 2026**
|
|
525
|
+
- New user registration endpoint
|
|
526
|
+
- Cache invalidation on user delete
|
|
527
|
+
- 5 new test cases, 12 new integration tests
|
|
528
|
+
- Documentation updated
|
|
529
|
+
|
|
530
|
+
**Known Issues**:
|
|
531
|
+
- Avatar URL upload not yet implemented (coming in v2.1)
|
|
532
|
+
- Email verification pending (alpha)
|
|
533
|
+
|
|
534
|
+
**Dependencies Updated**:
|
|
535
|
+
- bcrypt: 5.0.0 → 5.1.0 (security patch)
|
|
536
|
+
```
|
|
537
|
+
|
|
538
|
+
### 5. Implementation Handoff Handler
|
|
539
|
+
|
|
540
|
+
**Input**: Phase completion metrics + test results
|
|
541
|
+
**Output**: Updated `IMPLEMENTATION_HANDOFF.md`
|
|
542
|
+
|
|
543
|
+
```markdown
|
|
544
|
+
# Implementation Handoff - User Registration Feature
|
|
545
|
+
|
|
546
|
+
**Date**: May 31, 2026
|
|
547
|
+
**From Phase**: 3 (Backend) → 4 (SDK/Client)
|
|
548
|
+
**Status**: ✅ Ready for handoff
|
|
549
|
+
|
|
550
|
+
---
|
|
551
|
+
|
|
552
|
+
## What Was Implemented
|
|
553
|
+
|
|
554
|
+
### Phase 1: API Contract
|
|
555
|
+
- ✅ Defined endpoints: POST /api/users/register, GET /api/users/{id}
|
|
556
|
+
- ✅ Request/response schemas validated
|
|
557
|
+
- ✅ Error codes documented
|
|
558
|
+
- **Files**: contracts/api/UserRegistration/*
|
|
559
|
+
|
|
560
|
+
### Phase 2: Tests
|
|
561
|
+
- ✅ 12 integration tests written
|
|
562
|
+
- ✅ 100% endpoint coverage
|
|
563
|
+
- ✅ Error cases covered (email collision, weak password)
|
|
564
|
+
- ✅ Performance tests passing (P95 < 150ms)
|
|
565
|
+
- **Files**: tests/integration/auth.test.ts
|
|
566
|
+
- **Coverage**: 94%
|
|
567
|
+
|
|
568
|
+
### Phase 3: Backend Implementation
|
|
569
|
+
- ✅ Handlers implemented: registerHandler.ts, userHandler.ts
|
|
570
|
+
- ✅ Service layer: UserService.ts (business logic)
|
|
571
|
+
- ✅ Database schema: users table with email index
|
|
572
|
+
- ✅ Error handling: All 5 error types mapped
|
|
573
|
+
- ✅ Security: Password hashing, rate limiting, input validation
|
|
574
|
+
- **Files**: src/api/handlers/*, src/services/UserService.ts
|
|
575
|
+
- **Tests Passing**: 12/12
|
|
576
|
+
|
|
577
|
+
---
|
|
578
|
+
|
|
579
|
+
## Key Decisions & Rationale
|
|
580
|
+
|
|
581
|
+
### 1. Password Hashing Strategy
|
|
582
|
+
- **Decision**: bcrypt with cost factor 10
|
|
583
|
+
- **Why**: Industry standard, resistant to GPU attacks
|
|
584
|
+
- **Trade-off**: ~100ms per registration (acceptable for auth)
|
|
585
|
+
|
|
586
|
+
### 2. Email Validation
|
|
587
|
+
- **Decision**: Format validation only (no confirmation email)
|
|
588
|
+
- **Why**: Reduces friction for alpha, can add confirmation later
|
|
589
|
+
- **Risk**: Invalid email addresses possible, mitigated by recovery email flow
|
|
590
|
+
|
|
591
|
+
### 3. Cache Invalidation
|
|
592
|
+
- **Decision**: Immediate invalidation on user creation/update
|
|
593
|
+
- **Why**: Prevents serving stale user data
|
|
594
|
+
- **Performance**: ~5ms additional latency (negligible)
|
|
595
|
+
|
|
596
|
+
---
|
|
597
|
+
|
|
598
|
+
## Known Issues & Limitations
|
|
599
|
+
|
|
600
|
+
### 🟡 Medium Priority
|
|
601
|
+
1. **Avatar URL placeholder**: Currently hardcoded, needs real image upload (Phase 4 task)
|
|
602
|
+
2. **Email verification**: Not implemented, planned for v2.1
|
|
603
|
+
3. **Password reset**: Skeleton only, not functional
|
|
604
|
+
|
|
605
|
+
### 🟢 Low Priority
|
|
606
|
+
1. **Rate limiting**: Uses in-memory counter (fine for single server, needs Redis for distributed)
|
|
607
|
+
2. **Audit logging**: Minimal, could be enhanced with structured logging
|
|
608
|
+
|
|
609
|
+
---
|
|
610
|
+
|
|
611
|
+
## What Phase 4 (SDK/Client) Needs to Know
|
|
612
|
+
|
|
613
|
+
### Type Definitions
|
|
614
|
+
```typescript
|
|
615
|
+
interface User {
|
|
616
|
+
id: string;
|
|
617
|
+
email: string;
|
|
618
|
+
name?: string;
|
|
619
|
+
avatarUrl?: string; // Not populated yet
|
|
620
|
+
createdAt: Date;
|
|
621
|
+
}
|
|
622
|
+
|
|
623
|
+
interface RegisterRequest {
|
|
624
|
+
email: string; // Required
|
|
625
|
+
password: string; // Required, 8+ chars
|
|
626
|
+
name?: string; // Optional
|
|
627
|
+
}
|
|
628
|
+
|
|
629
|
+
interface RegisterResponse {
|
|
630
|
+
id: string;
|
|
631
|
+
email: string;
|
|
632
|
+
name?: string;
|
|
633
|
+
createdAt: Date;
|
|
634
|
+
}
|
|
635
|
+
```
|
|
636
|
+
|
|
637
|
+
### API Behavior Notes
|
|
638
|
+
- Registration is idempotent only if error: same email always returns 409
|
|
639
|
+
- Password strength: 8+ chars required (enforced server-side, client should validate)
|
|
640
|
+
- Response times: P50=20ms, P95=150ms (not P99 for rare slow DB queries)
|
|
641
|
+
|
|
642
|
+
### Error Handling
|
|
643
|
+
| Code | Message | Client Action |
|
|
644
|
+
|------|---------|---------------|
|
|
645
|
+
| 400 | Invalid email format | Show validation error |
|
|
646
|
+
| 409 | Email already registered | Suggest password reset flow |
|
|
647
|
+
| 422 | Password too weak | Suggest stronger password |
|
|
648
|
+
| 500 | Internal server error | Show retry prompt |
|
|
649
|
+
|
|
650
|
+
### Integration Points
|
|
651
|
+
- **Auth Flow**: registerHandler.ts → UserService.ts → database
|
|
652
|
+
- **Cache**: User data cached for 1 hour (or until invalidation)
|
|
653
|
+
- **Events**: No webhook on registration (future feature)
|
|
654
|
+
|
|
655
|
+
---
|
|
656
|
+
|
|
657
|
+
## Testing Checklist for Phase 4
|
|
658
|
+
|
|
659
|
+
Before implementing SDK:
|
|
660
|
+
- [ ] Call /api/users/register with valid data → 200 with user ID
|
|
661
|
+
- [ ] Call /api/users/register with duplicate email → 409
|
|
662
|
+
- [ ] Call /api/users/register with weak password → 422
|
|
663
|
+
- [ ] Retrieve user via GET /api/users/{id} → correct data
|
|
664
|
+
- [ ] Verify response times < 150ms P95
|
|
665
|
+
- [ ] Verify error messages are clear
|
|
666
|
+
|
|
667
|
+
---
|
|
668
|
+
|
|
669
|
+
## Remaining Work
|
|
670
|
+
|
|
671
|
+
### For SDK/Client (Phase 4)
|
|
672
|
+
1. Create `AuthService` class
|
|
673
|
+
2. Implement `register(email, password, name)` method
|
|
674
|
+
3. Add input validation (client-side)
|
|
675
|
+
4. Add session management
|
|
676
|
+
5. Tests: Create unit tests for AuthService + E2E registration flow
|
|
677
|
+
|
|
678
|
+
### For Future Phases
|
|
679
|
+
1. Email verification (v2.1)
|
|
680
|
+
2. Avatar upload implementation (v2.1)
|
|
681
|
+
3. Social registration (v2.2)
|
|
682
|
+
4. Multi-factor authentication (v2.3)
|
|
683
|
+
|
|
684
|
+
---
|
|
685
|
+
|
|
686
|
+
## Questions for Phase 4 Team
|
|
687
|
+
|
|
688
|
+
1. **Session Management**: How should auth tokens be stored (localStorage, cookie)?
|
|
689
|
+
2. **Validation**: Should we duplicate server-side validation on client, or trust server?
|
|
690
|
+
3. **Error Recovery**: For 409 (email exists), should we auto-suggest password reset?
|
|
691
|
+
|
|
692
|
+
---
|
|
693
|
+
|
|
694
|
+
## Sign-Off
|
|
695
|
+
|
|
696
|
+
- **Backend Lead**: ✅ [name] - All tests passing, ready for handoff
|
|
697
|
+
- **QA**: ✅ [name] - Integration tests verified
|
|
698
|
+
- **Date**: May 31, 2026
|
|
699
|
+
```
|
|
700
|
+
|
|
701
|
+
---
|
|
702
|
+
|
|
703
|
+
## 🔐 Validation Gates
|
|
704
|
+
|
|
705
|
+
### Pre-Commit Validation
|
|
706
|
+
|
|
707
|
+
```yaml
|
|
708
|
+
Validation Suite (Must All Pass):
|
|
709
|
+
|
|
710
|
+
1. MARKDOWN SYNTAX
|
|
711
|
+
- Valid markdown formatting
|
|
712
|
+
- Code blocks properly fenced
|
|
713
|
+
- Links properly formatted
|
|
714
|
+
- No dangling references
|
|
715
|
+
|
|
716
|
+
2. CODE REFERENCE VALIDATION
|
|
717
|
+
- All file paths exist
|
|
718
|
+
- All line numbers accurate
|
|
719
|
+
- All type references resolve
|
|
720
|
+
- All API endpoints exist
|
|
721
|
+
|
|
722
|
+
3. CROSS-PHASE CONSISTENCY
|
|
723
|
+
- Phase 1 API contract ⊂ Phase 3 implementation
|
|
724
|
+
- Phase 2 test data ⊂ Phase 4 SDK expectations
|
|
725
|
+
- Phase 3 response schema ⊂ Phase 4 type definitions
|
|
726
|
+
- Phase 5 scenarios ⊂ Phase 1 contract
|
|
727
|
+
|
|
728
|
+
4. COMPLETENESS
|
|
729
|
+
- All endpoints have documentation
|
|
730
|
+
- All deprecations have migration guides
|
|
731
|
+
- All error codes documented
|
|
732
|
+
- No TODO markers remain
|
|
733
|
+
|
|
734
|
+
5. CHANGELOG VERIFICATION
|
|
735
|
+
- Change severity matches impact
|
|
736
|
+
- Migration guide provided for breaking changes
|
|
737
|
+
- Examples provided for new features
|
|
738
|
+
- Timeline clear for deprecations
|
|
739
|
+
|
|
740
|
+
6. HANDOFF READINESS
|
|
741
|
+
- All tests passing
|
|
742
|
+
- Known issues documented
|
|
743
|
+
- Testing checklist provided
|
|
744
|
+
- Open questions documented
|
|
745
|
+
```
|
|
746
|
+
|
|
747
|
+
### Manual Review Gates
|
|
748
|
+
|
|
749
|
+
**BREAKING CHANGES** (Always Manual):
|
|
750
|
+
- Removing field/endpoint
|
|
751
|
+
- Changing type/behavior
|
|
752
|
+
- Deprecating feature
|
|
753
|
+
- Changing error codes
|
|
754
|
+
- Database schema changes
|
|
755
|
+
|
|
756
|
+
**INCOMPLETE DOCS** (Flag for Review):
|
|
757
|
+
- Missing API examples
|
|
758
|
+
- Incomplete error handling documentation
|
|
759
|
+
- Missing performance notes
|
|
760
|
+
- Incomplete type definitions
|
|
761
|
+
- Missing test coverage documentation
|
|
762
|
+
|
|
763
|
+
**ARCHITECTURAL CHANGES** (Always Manual):
|
|
764
|
+
- New service/module
|
|
765
|
+
- Changed data flow
|
|
766
|
+
- New dependency
|
|
767
|
+
- Database schema change
|
|
768
|
+
- Security-related change
|
|
769
|
+
|
|
770
|
+
---
|
|
771
|
+
|
|
772
|
+
## ⚠️ Edge Cases & Recovery
|
|
773
|
+
|
|
774
|
+
### Edge Case 1: Conflicting Changes in Multiple Phases
|
|
775
|
+
|
|
776
|
+
**Scenario**: Phase 3 backend AND Phase 4 SDK both changed for same endpoint
|
|
777
|
+
|
|
778
|
+
**Detection**:
|
|
779
|
+
```
|
|
780
|
+
Changed files detected:
|
|
781
|
+
- src/api/handlers/userHandler.ts (Phase 3)
|
|
782
|
+
- src/client/UserClient.ts (Phase 4)
|
|
783
|
+
|
|
784
|
+
Checking alignment:
|
|
785
|
+
- Phase 3 response type: { id, email, name }
|
|
786
|
+
- Phase 4 type definition: { id, email }
|
|
787
|
+
|
|
788
|
+
MISMATCH: Phase 4 missing 'name' field
|
|
789
|
+
```
|
|
790
|
+
|
|
791
|
+
**Resolution**:
|
|
792
|
+
1. Flag conflict in DOCS_UPDATE_LOG.md
|
|
793
|
+
2. Request manual review (don't proceed with auto-update)
|
|
794
|
+
3. Suggest: Update Phase 4 types to include 'name' field
|
|
795
|
+
4. Block pre-commit until resolved
|
|
796
|
+
|
|
797
|
+
### Edge Case 2: Deprecated Endpoint Still Referenced
|
|
798
|
+
|
|
799
|
+
**Scenario**: Documentation mentions deprecated /api/auth/register without migration guide
|
|
800
|
+
|
|
801
|
+
**Detection**:
|
|
802
|
+
```
|
|
803
|
+
Deprecated endpoint found in docs: /api/auth/register
|
|
804
|
+
Searching for migration guide... NOT FOUND
|
|
805
|
+
|
|
806
|
+
Check: Is /api/users/register the replacement?
|
|
807
|
+
YES - Replacement found
|
|
808
|
+
|
|
809
|
+
INCOMPLETE: Migration guide missing
|
|
810
|
+
```
|
|
811
|
+
|
|
812
|
+
**Resolution**:
|
|
813
|
+
1. Flag in DOCS_UPDATE_LOG.md
|
|
814
|
+
2. Request manual creation of migration guide
|
|
815
|
+
3. Block pre-commit until guide added
|
|
816
|
+
4. Suggest template from `templates/migration-guide-template.md`
|
|
817
|
+
|
|
818
|
+
### Edge Case 3: Test Data Doesn't Match New Schema
|
|
819
|
+
|
|
820
|
+
**Scenario**: Phase 2 tests use old response schema, Phase 3 added new field
|
|
821
|
+
|
|
822
|
+
**Detection**:
|
|
823
|
+
```
|
|
824
|
+
Phase 2 test mock (tests/integration/users.test.ts):
|
|
825
|
+
Expected: { id, email }
|
|
826
|
+
|
|
827
|
+
Phase 3 new response schema (contracts/api/GetUser/response.json):
|
|
828
|
+
Actual: { id, email, name }
|
|
829
|
+
|
|
830
|
+
MISMATCH: Test data outdated
|
|
831
|
+
```
|
|
832
|
+
|
|
833
|
+
**Resolution**:
|
|
834
|
+
1. Auto-update test mocks to match new schema
|
|
835
|
+
2. Add comment: "Auto-updated on [date] to match Phase 3 schema"
|
|
836
|
+
3. Re-run tests to verify
|
|
837
|
+
4. Include in DOCS_UPDATE_LOG.md
|
|
838
|
+
5. If tests fail, flag for manual review
|
|
839
|
+
|
|
840
|
+
### Edge Case 4: Circular Documentation References
|
|
841
|
+
|
|
842
|
+
**Scenario**: Doc A references Doc B, Doc B references Doc A (but one is outdated)
|
|
843
|
+
|
|
844
|
+
**Detection**:
|
|
845
|
+
```
|
|
846
|
+
Checking reference chain:
|
|
847
|
+
API_REFERENCE.md → IMPLEMENTATION.md ✓
|
|
848
|
+
IMPLEMENTATION.md → ARCHITECTURE.md ✓
|
|
849
|
+
ARCHITECTURE.md → API_REFERENCE.md ✓
|
|
850
|
+
|
|
851
|
+
Checking freshness:
|
|
852
|
+
API_REFERENCE.md: Updated 2 hours ago ✓
|
|
853
|
+
IMPLEMENTATION.md: Updated 2 hours ago ✓
|
|
854
|
+
ARCHITECTURE.md: Updated 1 day ago ⚠️
|
|
855
|
+
|
|
856
|
+
STALE: ARCHITECTURE.md not updated with recent changes
|
|
857
|
+
```
|
|
858
|
+
|
|
859
|
+
**Resolution**:
|
|
860
|
+
1. Flag for manual review
|
|
861
|
+
2. Suggest updating ARCHITECTURE.md
|
|
862
|
+
3. Provide context of what changed
|
|
863
|
+
4. Don't auto-update circular references (too risky)
|
|
864
|
+
|
|
865
|
+
---
|
|
866
|
+
|
|
867
|
+
## 📊 Observability & Tracking
|
|
868
|
+
|
|
869
|
+
See `observability/docs-tracking.md` for:
|
|
870
|
+
- DOCS_UPDATE_LOG.md format
|
|
871
|
+
- docs-metrics.csv structure
|
|
872
|
+
- Monthly docs health reports
|
|
873
|
+
- Query examples for trend analysis
|
|
874
|
+
|
|
875
|
+
---
|
|
876
|
+
|
|
877
|
+
## 🎓 Examples
|
|
878
|
+
|
|
879
|
+
### Example 1: Feature Change (New Optional Field)
|
|
880
|
+
|
|
881
|
+
**Scenario**: Adding optional `avatarUrl` field to User
|
|
882
|
+
|
|
883
|
+
**File Changes**:
|
|
884
|
+
1. Phase 1: contracts/api/GetUser/response.json
|
|
885
|
+
2. Phase 3: src/api/handlers/userHandler.ts
|
|
886
|
+
3. Phase 4: src/client/types.ts
|
|
887
|
+
4. Phase 5: playwright/e2e/user-profile.spec.ts
|
|
888
|
+
|
|
889
|
+
**Auto-Generated Docs**:
|
|
890
|
+
```markdown
|
|
891
|
+
### API Documentation Update
|
|
892
|
+
- Added: avatarUrl (optional) to GET /api/users/{id} response
|
|
893
|
+
- Example: { id, email, name, avatarUrl }
|
|
894
|
+
|
|
895
|
+
### Changelog Entry
|
|
896
|
+
- Added: User profile now includes optional avatar URL
|
|
897
|
+
|
|
898
|
+
### Implementation Guide Update
|
|
899
|
+
- New service method: getAvatar(userId) for fetching URL
|
|
900
|
+
- Image cache invalidated on user update
|
|
901
|
+
|
|
902
|
+
### IMPLEMENTATION_HANDOFF Update
|
|
903
|
+
- Phase 4: Need to implement avatar upload UI
|
|
904
|
+
|
|
905
|
+
### Validation Result
|
|
906
|
+
- ✅ Backward compatible (optional field)
|
|
907
|
+
- ✅ All phases aligned
|
|
908
|
+
- ✅ Ready for pre-commit
|
|
909
|
+
```
|
|
910
|
+
|
|
911
|
+
### Example 2: Breaking Change (Removed Field)
|
|
912
|
+
|
|
913
|
+
**Scenario**: Removing deprecated `legacyId` field
|
|
914
|
+
|
|
915
|
+
**File Changes**:
|
|
916
|
+
1. Phase 1: contracts/api/GetUser/response.json
|
|
917
|
+
2. Phase 3: src/api/handlers/userHandler.ts
|
|
918
|
+
3. Phase 4: src/client/types.ts
|
|
919
|
+
4. Phase 5: playwright/e2e/user-profile.spec.ts
|
|
920
|
+
|
|
921
|
+
**Auto-Generated Docs**:
|
|
922
|
+
```markdown
|
|
923
|
+
### BREAKING CHANGE DETECTED
|
|
924
|
+
|
|
925
|
+
### Changelog Entry
|
|
926
|
+
- Removed: legacyId field (use id instead)
|
|
927
|
+
- Migration deadline: 3 months from v2.1
|
|
928
|
+
- See: [Migration Guide](#migration-legacyid)
|
|
929
|
+
|
|
930
|
+
### Migration Guide (Auto-Generated Template)
|
|
931
|
+
- What changed: legacyId removed
|
|
932
|
+
- Why: Consolidated ID fields
|
|
933
|
+
- How to migrate: Replace legacyId with id
|
|
934
|
+
- Timeline: Deprecation warning in v2.0.1, removal in v2.1
|
|
935
|
+
|
|
936
|
+
### Validation Result
|
|
937
|
+
⚠️ BREAKING CHANGE DETECTED
|
|
938
|
+
Manual review required before pre-commit
|
|
939
|
+
```
|
|
940
|
+
|
|
941
|
+
---
|
|
942
|
+
|
|
943
|
+
## 🔗 Dependencies
|
|
944
|
+
|
|
945
|
+
Works with:
|
|
946
|
+
- **genesis-spec-propagation**: Detects spec changes, triggers doc updates
|
|
947
|
+
- **genesis-harness-engineering**: Generates test fixtures for docs examples
|
|
948
|
+
- **genesis-research**: Provides context for implementation docs
|
|
949
|
+
- **genesis-api-contract**: Supplies contract details for API docs
|
|
950
|
+
- **genesis-ui-ux-test**: Provides UI flow documentation
|
|
951
|
+
|
|
952
|
+
---
|
|
953
|
+
|
|
954
|
+
## 🚀 Quick Start
|
|
955
|
+
|
|
956
|
+
1. **Read**: This SKILL.md (5 min)
|
|
957
|
+
2. **Review**: `checklists/docs-validation.md` (5 min)
|
|
958
|
+
3. **Study**: `playbooks/auto-update-flow.md` (10 min)
|
|
959
|
+
4. **Test**: Run `/update-docs` on a recent change (5 min)
|
|
960
|
+
|
|
961
|
+
---
|
|
962
|
+
|
|
963
|
+
## 📈 Success Metrics
|
|
964
|
+
|
|
965
|
+
| Metric | Before | After | Target |
|
|
966
|
+
|--------|--------|-------|--------|
|
|
967
|
+
| **Manual docs sync time** | 30-60 min/phase | 5 min | 5 min |
|
|
968
|
+
| **Docs staleness** | 1-2 days | < 1 hour | < 1 hour |
|
|
969
|
+
| **Changelog completeness** | 70% | 98% | 99%+ |
|
|
970
|
+
| **Cross-reference accuracy** | 85% | 99% | 99%+ |
|
|
971
|
+
| **Breaking change awareness** | 60% | 100% | 100% |
|
|
972
|
+
| **Handoff readiness score** | 60/100 | 95/100 | 95+/100 |
|
|
973
|
+
|
|
974
|
+
---
|
|
975
|
+
|
|
976
|
+
## 📞 Support & Troubleshooting
|
|
977
|
+
|
|
978
|
+
### Issue: Docs not updating after code change
|
|
979
|
+
|
|
980
|
+
**Check**:
|
|
981
|
+
1. Did tests pass? (Must pass to trigger docs auto-update)
|
|
982
|
+
2. Which files changed? (Must be in contract/backend/SDK/test folders)
|
|
983
|
+
3. Run: `/update-docs` manually to force update
|
|
984
|
+
|
|
985
|
+
**Solution**:
|
|
986
|
+
- If tests failed: Fix tests first, then re-run
|
|
987
|
+
- If file type not recognized: Check `File Type Classification` section
|
|
988
|
+
- If still failing: Check logs in `observability/docs-tracking.md`
|
|
989
|
+
|
|
990
|
+
### Issue: Manual review gate blocking commit
|
|
991
|
+
|
|
992
|
+
**Check**:
|
|
993
|
+
1. What triggered manual review? (Breaking change? Incomplete docs?)
|
|
994
|
+
2. Is this expected? (Breaking changes always need review)
|
|
995
|
+
|
|
996
|
+
**Solution**:
|
|
997
|
+
- For breaking changes: Follow checklist in `checklists/breaking-change-gate.md`
|
|
998
|
+
- For incomplete docs: Use template from `templates/` to complete
|
|
999
|
+
- For conflicts: Resolve in `observability/docs-tracking.md`
|
|
1000
|
+
|
|
1001
|
+
---
|
|
1002
|
+
|
|
1003
|
+
**Version**: v2.3 | **Last Updated**: May 31, 2026 | **Status**: ACTIVE
|