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,14 @@
|
|
|
1
|
+
# Render Fixture Template
|
|
2
|
+
|
|
3
|
+
## Input
|
|
4
|
+
|
|
5
|
+
Describe media inputs, timeline, subtitles, voice assets, and image assets.
|
|
6
|
+
|
|
7
|
+
## Expected Output
|
|
8
|
+
|
|
9
|
+
Describe rendered artifact metadata, duration, dimensions, and validation checks.
|
|
10
|
+
|
|
11
|
+
## Validation Notes
|
|
12
|
+
|
|
13
|
+
Check missing assets, invalid media, and deterministic output metadata.
|
|
14
|
+
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# TTS Fixture Template
|
|
2
|
+
|
|
3
|
+
## Input
|
|
4
|
+
|
|
5
|
+
Text, voice, language, timing, and provider options.
|
|
6
|
+
|
|
7
|
+
## Expected Output
|
|
8
|
+
|
|
9
|
+
Audio metadata, transcript alignment, and provider response shape.
|
|
10
|
+
|
|
11
|
+
## Validation Notes
|
|
12
|
+
|
|
13
|
+
Check retries, provider errors, empty text, and persistence.
|
|
14
|
+
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# Video Fixture Template
|
|
2
|
+
|
|
3
|
+
## Input
|
|
4
|
+
|
|
5
|
+
Scene plan, audio, subtitles, images, transitions, and render options.
|
|
6
|
+
|
|
7
|
+
## Expected Output
|
|
8
|
+
|
|
9
|
+
Video artifact metadata, duration, and validation checks.
|
|
10
|
+
|
|
11
|
+
## Validation Notes
|
|
12
|
+
|
|
13
|
+
Check missing clips, bad timing, retry behavior, and resumability.
|
|
14
|
+
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# Agent Run Template
|
|
2
|
+
|
|
3
|
+
## Reason
|
|
4
|
+
|
|
5
|
+
Why the autonomous change was started.
|
|
6
|
+
|
|
7
|
+
## Predicted Impact
|
|
8
|
+
|
|
9
|
+
Expected files, behavior, and risks.
|
|
10
|
+
|
|
11
|
+
## Files Changed
|
|
12
|
+
|
|
13
|
+
List changed files.
|
|
14
|
+
|
|
15
|
+
## Tests Executed
|
|
16
|
+
|
|
17
|
+
List commands and results.
|
|
18
|
+
|
|
19
|
+
## Result
|
|
20
|
+
|
|
21
|
+
Completed, blocked, or reverted.
|
|
22
|
+
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "codex-genesis-harness",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.4",
|
|
4
4
|
"description": "Install and manage the Project Genesis Harness Codex skill.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"bin": {
|
|
@@ -14,7 +14,13 @@
|
|
|
14
14
|
},
|
|
15
15
|
"files": [
|
|
16
16
|
".codex-plugin",
|
|
17
|
-
".codex/skills
|
|
17
|
+
".codex/skills",
|
|
18
|
+
".codebase",
|
|
19
|
+
"contracts",
|
|
20
|
+
"fixtures",
|
|
21
|
+
"tests",
|
|
22
|
+
"playwright",
|
|
23
|
+
"observability",
|
|
18
24
|
"bin",
|
|
19
25
|
"scripts",
|
|
20
26
|
"README.md",
|
|
@@ -0,0 +1,342 @@
|
|
|
1
|
+
# Scripts Reference
|
|
2
|
+
|
|
3
|
+
Utility scripts for verifying, testing, and managing the Genesis Harness project.
|
|
4
|
+
|
|
5
|
+
## Quick Start
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
# First time setup
|
|
9
|
+
./scripts/install.sh
|
|
10
|
+
|
|
11
|
+
# Verify everything works
|
|
12
|
+
./scripts/verify.sh
|
|
13
|
+
|
|
14
|
+
# Before PR submission
|
|
15
|
+
npm run verify && npm run eval && npm run pack:check
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
## Scripts
|
|
19
|
+
|
|
20
|
+
### install.sh
|
|
21
|
+
|
|
22
|
+
**Purpose**: Install Genesis Harness skills and dependencies
|
|
23
|
+
|
|
24
|
+
**When to run**:
|
|
25
|
+
- First time setting up the project
|
|
26
|
+
- After cloning the repository
|
|
27
|
+
- When adding new skills
|
|
28
|
+
|
|
29
|
+
**What it does**:
|
|
30
|
+
- Copies skills to `~/.codex/skills/`
|
|
31
|
+
- Installs npm dependencies
|
|
32
|
+
- Sets up environment paths
|
|
33
|
+
- Validates installation
|
|
34
|
+
|
|
35
|
+
**Usage**:
|
|
36
|
+
```bash
|
|
37
|
+
# Default installation
|
|
38
|
+
./scripts/install.sh
|
|
39
|
+
|
|
40
|
+
# Custom homes
|
|
41
|
+
CODEX_HOME=/path/to/.codex ./scripts/install.sh
|
|
42
|
+
GENESIS_HARNESS_HOME=/path/to/.agents ./scripts/install.sh
|
|
43
|
+
|
|
44
|
+
# Skip postinstall
|
|
45
|
+
GENESIS_HARNESS_SKIP_POSTINSTALL=1 npm install -g codex-genesis-harness@latest
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
**Success indicator**: "Installation complete" message, no errors
|
|
49
|
+
|
|
50
|
+
---
|
|
51
|
+
|
|
52
|
+
### verify.sh
|
|
53
|
+
|
|
54
|
+
**Purpose**: Run all verification checks
|
|
55
|
+
|
|
56
|
+
**When to run**:
|
|
57
|
+
- After making code changes
|
|
58
|
+
- Before submitting a PR (REQUIRED)
|
|
59
|
+
- When debugging test failures
|
|
60
|
+
- During development cycles
|
|
61
|
+
|
|
62
|
+
**What it does**:
|
|
63
|
+
- Runs all unit tests
|
|
64
|
+
- Runs all integration tests
|
|
65
|
+
- Checks TypeScript compilation
|
|
66
|
+
- Validates contract schemas
|
|
67
|
+
- Checks for linting errors
|
|
68
|
+
- Verifies package integrity
|
|
69
|
+
|
|
70
|
+
**Usage**:
|
|
71
|
+
```bash
|
|
72
|
+
# Verify project root
|
|
73
|
+
./scripts/verify.sh
|
|
74
|
+
|
|
75
|
+
# Verify installed copy
|
|
76
|
+
./scripts/verify.sh ~/.codex/skills
|
|
77
|
+
|
|
78
|
+
# Run specific test type
|
|
79
|
+
npm run verify:unit
|
|
80
|
+
npm run verify:integration
|
|
81
|
+
npm run verify:e2e
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
**Success indicator**: "✓ All checks passed", exit code 0
|
|
85
|
+
|
|
86
|
+
**Common issues**:
|
|
87
|
+
- Test failures → Fix code, re-run
|
|
88
|
+
- Schema validation errors → Update contracts
|
|
89
|
+
- TypeScript errors → Fix type issues
|
|
90
|
+
|
|
91
|
+
---
|
|
92
|
+
|
|
93
|
+
### run-evals.sh
|
|
94
|
+
|
|
95
|
+
**Purpose**: Run evaluation suite for coverage and quality metrics
|
|
96
|
+
|
|
97
|
+
**When to run**:
|
|
98
|
+
- Before final PR submission
|
|
99
|
+
- During sprint reviews
|
|
100
|
+
- When verifying coverage meets 80%
|
|
101
|
+
- Performance benchmarking
|
|
102
|
+
|
|
103
|
+
**What it does**:
|
|
104
|
+
- Measures test coverage (target: 80%+)
|
|
105
|
+
- Runs performance benchmarks
|
|
106
|
+
- Checks code complexity
|
|
107
|
+
- Validates fixture integrity
|
|
108
|
+
- Generates coverage reports
|
|
109
|
+
|
|
110
|
+
**Usage**:
|
|
111
|
+
```bash
|
|
112
|
+
# Run full evaluation
|
|
113
|
+
./scripts/run-evals.sh
|
|
114
|
+
|
|
115
|
+
# Run specific evaluation
|
|
116
|
+
npm run eval:coverage
|
|
117
|
+
npm run eval:performance
|
|
118
|
+
npm run eval:complexity
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
**Output**: Coverage report, performance metrics, complexity analysis
|
|
122
|
+
|
|
123
|
+
**Success indicator**: Coverage 80%+, no performance regressions
|
|
124
|
+
|
|
125
|
+
---
|
|
126
|
+
|
|
127
|
+
### npm Commands
|
|
128
|
+
|
|
129
|
+
These are defined in `package.json` and run via npm.
|
|
130
|
+
|
|
131
|
+
#### npm run verify
|
|
132
|
+
|
|
133
|
+
**Alias**: `./scripts/verify.sh`
|
|
134
|
+
|
|
135
|
+
Runs all verification checks. **Use this before every PR.**
|
|
136
|
+
|
|
137
|
+
```bash
|
|
138
|
+
npm run verify
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
---
|
|
142
|
+
|
|
143
|
+
#### npm run eval
|
|
144
|
+
|
|
145
|
+
**Alias**: `./scripts/run-evals.sh`
|
|
146
|
+
|
|
147
|
+
Runs evaluation suite. Check coverage and quality metrics.
|
|
148
|
+
|
|
149
|
+
```bash
|
|
150
|
+
npm run eval
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
---
|
|
154
|
+
|
|
155
|
+
#### npm run pack:check
|
|
156
|
+
|
|
157
|
+
**Purpose**: Verify package will publish correctly
|
|
158
|
+
|
|
159
|
+
**When to run**:
|
|
160
|
+
- Before publishing to npm
|
|
161
|
+
- Before PR submission
|
|
162
|
+
- When package.json changes
|
|
163
|
+
|
|
164
|
+
**What it does**:
|
|
165
|
+
- Simulates npm publish
|
|
166
|
+
- Validates all files in package
|
|
167
|
+
- Checks naming and metadata
|
|
168
|
+
- Verifies no secrets exposed
|
|
169
|
+
|
|
170
|
+
**Usage**:
|
|
171
|
+
```bash
|
|
172
|
+
npm run pack:check
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
**Success indicator**: "✓ Package ready for publish", exit code 0
|
|
176
|
+
|
|
177
|
+
---
|
|
178
|
+
|
|
179
|
+
## Typical Development Workflow
|
|
180
|
+
|
|
181
|
+
### 1. Start a Feature
|
|
182
|
+
|
|
183
|
+
```bash
|
|
184
|
+
./scripts/install.sh # If first time
|
|
185
|
+
./scripts/verify.sh # Baseline check
|
|
186
|
+
```
|
|
187
|
+
|
|
188
|
+
### 2. Make Changes
|
|
189
|
+
|
|
190
|
+
Write code, tests, update contracts.
|
|
191
|
+
|
|
192
|
+
### 3. Verify Locally
|
|
193
|
+
|
|
194
|
+
```bash
|
|
195
|
+
./scripts/verify.sh # All tests pass
|
|
196
|
+
npm run eval # Coverage 80%+
|
|
197
|
+
```
|
|
198
|
+
|
|
199
|
+
### 4. Before PR
|
|
200
|
+
|
|
201
|
+
```bash
|
|
202
|
+
./scripts/verify.sh # Final verification
|
|
203
|
+
npm run eval # Final coverage check
|
|
204
|
+
npm run pack:check # Package integrity
|
|
205
|
+
```
|
|
206
|
+
|
|
207
|
+
### 5. After Merge
|
|
208
|
+
|
|
209
|
+
```bash
|
|
210
|
+
./scripts/install.sh # Re-install with new code
|
|
211
|
+
./scripts/verify.sh # Validate in production paths
|
|
212
|
+
```
|
|
213
|
+
|
|
214
|
+
---
|
|
215
|
+
|
|
216
|
+
## Debugging Failed Scripts
|
|
217
|
+
|
|
218
|
+
### Verify Script Fails
|
|
219
|
+
|
|
220
|
+
**Check test output**:
|
|
221
|
+
```bash
|
|
222
|
+
npm test 2>&1 | tail -50 # Last 50 lines of output
|
|
223
|
+
```
|
|
224
|
+
|
|
225
|
+
**Run single test**:
|
|
226
|
+
```bash
|
|
227
|
+
npm run test -- --testNamePattern="specific test"
|
|
228
|
+
```
|
|
229
|
+
|
|
230
|
+
**Run test file**:
|
|
231
|
+
```bash
|
|
232
|
+
npm run test tests/unit/my-feature.test.md
|
|
233
|
+
```
|
|
234
|
+
|
|
235
|
+
### Eval Script Fails
|
|
236
|
+
|
|
237
|
+
**Check coverage only**:
|
|
238
|
+
```bash
|
|
239
|
+
npm run eval:coverage
|
|
240
|
+
```
|
|
241
|
+
|
|
242
|
+
**Check specific metric**:
|
|
243
|
+
```bash
|
|
244
|
+
npm run eval:performance
|
|
245
|
+
```
|
|
246
|
+
|
|
247
|
+
### Pack Check Fails
|
|
248
|
+
|
|
249
|
+
**Check what's included**:
|
|
250
|
+
```bash
|
|
251
|
+
npm pack --dry-run | head -100
|
|
252
|
+
```
|
|
253
|
+
|
|
254
|
+
**Check for secrets**:
|
|
255
|
+
```bash
|
|
256
|
+
grep -r "API_KEY\|SECRET\|password" . --exclude-dir=node_modules
|
|
257
|
+
```
|
|
258
|
+
|
|
259
|
+
---
|
|
260
|
+
|
|
261
|
+
## Environment Variables
|
|
262
|
+
|
|
263
|
+
Control script behavior:
|
|
264
|
+
|
|
265
|
+
```bash
|
|
266
|
+
# Skip postinstall during npm install
|
|
267
|
+
GENESIS_HARNESS_SKIP_POSTINSTALL=1
|
|
268
|
+
|
|
269
|
+
# Custom skill installation paths
|
|
270
|
+
CODEX_HOME=/path/to/.codex
|
|
271
|
+
GENESIS_HARNESS_HOME=/path/to/.agents
|
|
272
|
+
|
|
273
|
+
# Enable verbose output
|
|
274
|
+
DEBUG=*
|
|
275
|
+
|
|
276
|
+
# Set Node version
|
|
277
|
+
NODE_VERSION=18.0.0
|
|
278
|
+
```
|
|
279
|
+
|
|
280
|
+
---
|
|
281
|
+
|
|
282
|
+
## Manual Verification
|
|
283
|
+
|
|
284
|
+
If scripts fail, verify manually:
|
|
285
|
+
|
|
286
|
+
```bash
|
|
287
|
+
# Check Node version
|
|
288
|
+
node --version # Should be 18+
|
|
289
|
+
|
|
290
|
+
# Check npm modules installed
|
|
291
|
+
npm ls # Should have no errors
|
|
292
|
+
|
|
293
|
+
# List test files
|
|
294
|
+
find tests -name "*.test.md" -type f
|
|
295
|
+
|
|
296
|
+
# Count coverage
|
|
297
|
+
find . -name "coverage" -type d
|
|
298
|
+
```
|
|
299
|
+
|
|
300
|
+
---
|
|
301
|
+
|
|
302
|
+
## Performance Tips
|
|
303
|
+
|
|
304
|
+
**Faster local development**:
|
|
305
|
+
```bash
|
|
306
|
+
# Skip e2e tests during development
|
|
307
|
+
npm run verify:unit
|
|
308
|
+
npm run verify:integration
|
|
309
|
+
|
|
310
|
+
# Then run full verify before PR:
|
|
311
|
+
npm run verify
|
|
312
|
+
```
|
|
313
|
+
|
|
314
|
+
**Cache improvements**:
|
|
315
|
+
```bash
|
|
316
|
+
# Clear npm cache
|
|
317
|
+
npm cache clean --force
|
|
318
|
+
|
|
319
|
+
# Reinstall
|
|
320
|
+
./scripts/install.sh
|
|
321
|
+
```
|
|
322
|
+
|
|
323
|
+
---
|
|
324
|
+
|
|
325
|
+
## Continuous Integration
|
|
326
|
+
|
|
327
|
+
These scripts run in CI/CD:
|
|
328
|
+
|
|
329
|
+
1. `npm install` - Install dependencies
|
|
330
|
+
2. `npm run verify` - All checks must pass
|
|
331
|
+
3. `npm run eval` - Coverage and quality metrics
|
|
332
|
+
4. `npm run pack:check` - Package integrity
|
|
333
|
+
|
|
334
|
+
**Failed CI blocks PR merge.** Fix locally before pushing.
|
|
335
|
+
|
|
336
|
+
---
|
|
337
|
+
|
|
338
|
+
## Support
|
|
339
|
+
|
|
340
|
+
- Script errors? → Check exit code with `echo $?`
|
|
341
|
+
- Still failing? → Read full output, not just errors
|
|
342
|
+
- Clear cache and try again: `npm cache clean --force && ./scripts/install.sh`
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# ==============================================================================
|
|
3
|
+
# Genesis Codex Harness — Context Compaction Engine
|
|
4
|
+
# ==============================================================================
|
|
5
|
+
# Summarizes active project planning files, active tasks, and logs into a single
|
|
6
|
+
# .planning/CONTEXT_SUMMARY.md file to safely offload context before compacting.
|
|
7
|
+
# Reduces context window usage and prevents Context Rot.
|
|
8
|
+
# ==============================================================================
|
|
9
|
+
|
|
10
|
+
set -euo pipefail
|
|
11
|
+
|
|
12
|
+
PLANNING_DIR="${1:-.planning}"
|
|
13
|
+
SUMMARY_FILE="$PLANNING_DIR/CONTEXT_SUMMARY.md"
|
|
14
|
+
|
|
15
|
+
if [ ! -d "$PLANNING_DIR" ]; then
|
|
16
|
+
echo "Error: Planning directory '$PLANNING_DIR' does not exist." >&2
|
|
17
|
+
exit 1
|
|
18
|
+
fi
|
|
19
|
+
|
|
20
|
+
echo "==> Compacting active context..."
|
|
21
|
+
|
|
22
|
+
{
|
|
23
|
+
echo "# Context Compaction Summary"
|
|
24
|
+
echo "Generated: $(date +'%Y-%m-%d %H:%M:%S')"
|
|
25
|
+
echo ""
|
|
26
|
+
echo "## 📊 Active State Summary"
|
|
27
|
+
if [ -f "$PLANNING_DIR/STATE.md" ]; then
|
|
28
|
+
grep -E "^- (Current Phase|Active Feature|Last Completed Task|Next Task|Blockers):" "$PLANNING_DIR/STATE.md" || true
|
|
29
|
+
else
|
|
30
|
+
echo "State file not found. Project initialized but state unpopulated."
|
|
31
|
+
fi
|
|
32
|
+
echo ""
|
|
33
|
+
echo "## 🎯 Key Architectural Invariants"
|
|
34
|
+
if [ -f "$PLANNING_DIR/ARCHITECTURE.md" ]; then
|
|
35
|
+
head -n 25 "$PLANNING_DIR/ARCHITECTURE.md"
|
|
36
|
+
else
|
|
37
|
+
echo "Architecture file not found."
|
|
38
|
+
fi
|
|
39
|
+
echo ""
|
|
40
|
+
echo "## 📝 Active Task Progress"
|
|
41
|
+
# Find all task lists in active features or bugs
|
|
42
|
+
find "$PLANNING_DIR/features" "$PLANNING_DIR/bugs" -name "TASKS.md" 2>/dev/null | while read -r task_file; do
|
|
43
|
+
echo "### Tasks for: $(basename "$(dirname "$task_file")")"
|
|
44
|
+
grep -E "^- \[[x~ ]\]" "$task_file" | tail -n 15 || true
|
|
45
|
+
echo ""
|
|
46
|
+
done
|
|
47
|
+
echo ""
|
|
48
|
+
echo "## ⚠️ Fragile Areas & Lessons Learned"
|
|
49
|
+
if [ -f "$PLANNING_DIR/PITFALLS.md" ]; then
|
|
50
|
+
head -n 15 "$PLANNING_DIR/PITFALLS.md"
|
|
51
|
+
fi
|
|
52
|
+
} > "$SUMMARY_FILE"
|
|
53
|
+
|
|
54
|
+
echo "==> Context compaction complete! Summary saved to: file://$(pwd)/$SUMMARY_FILE"
|
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
|
|
3
|
+
# detect-changes.sh
|
|
4
|
+
# Auto-detect file changes and identify what .codebase docs need updating
|
|
5
|
+
# Run after implementation to identify sync needs
|
|
6
|
+
|
|
7
|
+
set -e
|
|
8
|
+
|
|
9
|
+
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"
|
|
10
|
+
PROJECT_ROOT="$(cd "$SCRIPT_DIR/.." && pwd)"
|
|
11
|
+
CODEBASE_DIR="$PROJECT_ROOT/.codebase"
|
|
12
|
+
|
|
13
|
+
# Color output
|
|
14
|
+
RED='\033[0;31m'
|
|
15
|
+
GREEN='\033[0;32m'
|
|
16
|
+
YELLOW='\033[1;33m'
|
|
17
|
+
BLUE='\033[0;34m'
|
|
18
|
+
NC='\033[0m' # No Color
|
|
19
|
+
|
|
20
|
+
echo -e "${BLUE}=== Auto-Detect Changes ===${NC}"
|
|
21
|
+
echo ""
|
|
22
|
+
|
|
23
|
+
# Track what needs updating
|
|
24
|
+
UPDATES_NEEDED=()
|
|
25
|
+
|
|
26
|
+
# 1. Check for new/modified API files
|
|
27
|
+
echo -e "${YELLOW}Scanning API changes...${NC}"
|
|
28
|
+
api_files=$(find "$PROJECT_ROOT/src" -name "*api*" -o -name "*endpoint*" -o -name "*route*" 2>/dev/null || true)
|
|
29
|
+
if [ ! -z "$api_files" ]; then
|
|
30
|
+
echo " ✓ API files detected"
|
|
31
|
+
UPDATES_NEEDED+=("API_CONTRACTS.md")
|
|
32
|
+
fi
|
|
33
|
+
|
|
34
|
+
# 2. Check for database/model changes
|
|
35
|
+
echo -e "${YELLOW}Scanning database changes...${NC}"
|
|
36
|
+
if find "$PROJECT_ROOT" -type f \( -name "*model*" -o -name "*schema*" -o -name "*db*" \) 2>/dev/null | grep -q .; then
|
|
37
|
+
echo " ✓ Database/model files detected"
|
|
38
|
+
UPDATES_NEEDED+=("DOMAIN_MODELS.md")
|
|
39
|
+
fi
|
|
40
|
+
|
|
41
|
+
# 3. Check for route/UI changes
|
|
42
|
+
echo -e "${YELLOW}Scanning UI route changes...${NC}"
|
|
43
|
+
if find "$PROJECT_ROOT" -type f \( -name "*route*" -o -name "*page*" \) -path "*/src/pages/*" 2>/dev/null | grep -q .; then
|
|
44
|
+
echo " ✓ UI route files detected"
|
|
45
|
+
UPDATES_NEEDED+=("UI_ROUTES.md")
|
|
46
|
+
fi
|
|
47
|
+
|
|
48
|
+
# 4. Check for test changes
|
|
49
|
+
echo -e "${YELLOW}Scanning test changes...${NC}"
|
|
50
|
+
test_count=$(find "$PROJECT_ROOT/tests" -name "*.test.*" 2>/dev/null | wc -l)
|
|
51
|
+
if [ "$test_count" -gt 0 ]; then
|
|
52
|
+
echo " ✓ $test_count test files found"
|
|
53
|
+
UPDATES_NEEDED+=("TEST_MATRIX.md")
|
|
54
|
+
fi
|
|
55
|
+
|
|
56
|
+
# 5. Check for module changes
|
|
57
|
+
echo -e "${YELLOW}Scanning module exports...${NC}"
|
|
58
|
+
if find "$PROJECT_ROOT/src" -name "index.*" 2>/dev/null | grep -q .; then
|
|
59
|
+
echo " ✓ Module index files detected"
|
|
60
|
+
UPDATES_NEEDED+=("MODULE_INDEX.md")
|
|
61
|
+
fi
|
|
62
|
+
|
|
63
|
+
# 6. Check for dependency changes
|
|
64
|
+
echo -e "${YELLOW}Scanning dependency changes...${NC}"
|
|
65
|
+
if [ -f "$PROJECT_ROOT/package.json" ]; then
|
|
66
|
+
echo " ✓ package.json found"
|
|
67
|
+
UPDATES_NEEDED+=("DEPENDENCY_GRAPH.md")
|
|
68
|
+
fi
|
|
69
|
+
|
|
70
|
+
# 7. Check for architecture changes
|
|
71
|
+
echo -e "${YELLOW}Scanning architecture changes...${NC}"
|
|
72
|
+
if find "$PROJECT_ROOT" -name "*.md" -exec grep -l "architecture\|diagram\|flow" {} \; 2>/dev/null | grep -q .; then
|
|
73
|
+
echo " ✓ Architecture documentation found"
|
|
74
|
+
UPDATES_NEEDED+=("ARCHITECTURE.md")
|
|
75
|
+
fi
|
|
76
|
+
|
|
77
|
+
# 8. Always update CURRENT_STATE after any implementation
|
|
78
|
+
UPDATES_NEEDED+=("CURRENT_STATE.md")
|
|
79
|
+
|
|
80
|
+
# Remove duplicates
|
|
81
|
+
UPDATES_NEEDED=($(printf '%s\n' "${UPDATES_NEEDED[@]}" | sort -u))
|
|
82
|
+
|
|
83
|
+
echo ""
|
|
84
|
+
echo -e "${GREEN}Files that need updating:${NC}"
|
|
85
|
+
for file in "${UPDATES_NEEDED[@]}"; do
|
|
86
|
+
echo " → $CODEBASE_DIR/$file"
|
|
87
|
+
done
|
|
88
|
+
|
|
89
|
+
echo ""
|
|
90
|
+
echo -e "${BLUE}=== Update Summary ===${NC}"
|
|
91
|
+
echo "Run these commands to sync documentation:"
|
|
92
|
+
echo ""
|
|
93
|
+
|
|
94
|
+
for file in "${UPDATES_NEEDED[@]}"; do
|
|
95
|
+
case $file in
|
|
96
|
+
"API_CONTRACTS.md")
|
|
97
|
+
echo -e "${YELLOW}1. API_CONTRACTS.md${NC}"
|
|
98
|
+
echo " Check: src/**/api.ts, src/**/endpoint.ts"
|
|
99
|
+
echo " Run: extract-api-contracts.sh"
|
|
100
|
+
echo ""
|
|
101
|
+
;;
|
|
102
|
+
"DOMAIN_MODELS.md")
|
|
103
|
+
echo -e "${YELLOW}2. DOMAIN_MODELS.md${NC}"
|
|
104
|
+
echo " Check: src/**/models, src/**/schema"
|
|
105
|
+
echo " Run: extract-domain-models.sh"
|
|
106
|
+
echo ""
|
|
107
|
+
;;
|
|
108
|
+
"UI_ROUTES.md")
|
|
109
|
+
echo -e "${YELLOW}3. UI_ROUTES.md${NC}"
|
|
110
|
+
echo " Check: src/pages/**, src/**/route.ts"
|
|
111
|
+
echo " Run: extract-routes.sh"
|
|
112
|
+
echo ""
|
|
113
|
+
;;
|
|
114
|
+
"TEST_MATRIX.md")
|
|
115
|
+
echo -e "${YELLOW}4. TEST_MATRIX.md${NC}"
|
|
116
|
+
echo " Check: tests/** coverage"
|
|
117
|
+
echo " Run: npm test -- --coverage && update-test-matrix.sh"
|
|
118
|
+
echo ""
|
|
119
|
+
;;
|
|
120
|
+
"MODULE_INDEX.md")
|
|
121
|
+
echo -e "${YELLOW}5. MODULE_INDEX.md${NC}"
|
|
122
|
+
echo " Check: src/**/index.ts exports"
|
|
123
|
+
echo " Run: extract-modules.sh"
|
|
124
|
+
echo ""
|
|
125
|
+
;;
|
|
126
|
+
"DEPENDENCY_GRAPH.md")
|
|
127
|
+
echo -e "${YELLOW}6. DEPENDENCY_GRAPH.md${NC}"
|
|
128
|
+
echo " Check: package.json dependencies"
|
|
129
|
+
echo " Run: extract-dependencies.sh"
|
|
130
|
+
echo ""
|
|
131
|
+
;;
|
|
132
|
+
"ARCHITECTURE.md")
|
|
133
|
+
echo -e "${YELLOW}7. ARCHITECTURE.md${NC}"
|
|
134
|
+
echo " Check: System design and data flows"
|
|
135
|
+
echo " Run: Review and update manually"
|
|
136
|
+
echo ""
|
|
137
|
+
;;
|
|
138
|
+
"CURRENT_STATE.md")
|
|
139
|
+
echo -e "${YELLOW}8. CURRENT_STATE.md${NC}"
|
|
140
|
+
echo " Always update after changes"
|
|
141
|
+
echo " Run: update-state.sh"
|
|
142
|
+
echo ""
|
|
143
|
+
;;
|
|
144
|
+
esac
|
|
145
|
+
done
|
|
146
|
+
|
|
147
|
+
echo -e "${BLUE}Next steps:${NC}"
|
|
148
|
+
echo "1. Update each file using the commands above"
|
|
149
|
+
echo "2. Run: ./scripts/verify.sh"
|
|
150
|
+
echo "3. Commit changes with descriptive message"
|
|
151
|
+
echo "4. Create PR with documentation sync"
|
|
152
|
+
echo ""
|