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,428 @@
|
|
|
1
|
+
# Load Test Config Template
|
|
2
|
+
|
|
3
|
+
Copy and customize this template for each new service or endpoint group. All three tools (k6, Artillery, Locust) are provided — use the one that matches your team's toolchain preference.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## k6 Load Test Script Template
|
|
8
|
+
|
|
9
|
+
```javascript
|
|
10
|
+
// load-test.js
|
|
11
|
+
// Generated by genesis-performance-profiling
|
|
12
|
+
// Service: [SERVICE_NAME]
|
|
13
|
+
// Version: [APP_VERSION]
|
|
14
|
+
// Generated: [DATE]
|
|
15
|
+
|
|
16
|
+
import http from 'k6/http';
|
|
17
|
+
import { sleep, check, group } from 'k6';
|
|
18
|
+
import { Counter, Rate, Trend, Gauge } from 'k6/metrics';
|
|
19
|
+
import { randomIntBetween, randomItem } from 'https://jslib.k6.io/k6-utils/1.4.0/index.js';
|
|
20
|
+
|
|
21
|
+
// ─── Custom metrics ────────────────────────────────────────────────────────
|
|
22
|
+
const customErrorRate = new Rate('custom_errors');
|
|
23
|
+
const endpointLatency = new Trend('endpoint_latency', true);
|
|
24
|
+
const activeUsers = new Gauge('active_users');
|
|
25
|
+
const requestsCompleted = new Counter('requests_completed');
|
|
26
|
+
|
|
27
|
+
// ─── Configuration ─────────────────────────────────────────────────────────
|
|
28
|
+
export const options = {
|
|
29
|
+
// MODIFY THESE VALUES to match your service's SLO targets
|
|
30
|
+
stages: [
|
|
31
|
+
{ duration: '1m', target: 1 }, // Smoke: validate connectivity
|
|
32
|
+
{ duration: '2m', target: 100 }, // Ramp-up to target concurrency
|
|
33
|
+
{ duration: '10m', target: 100 }, // Peak: steady state at target
|
|
34
|
+
{ duration: '2m', target: 150 }, // Stress: push beyond target
|
|
35
|
+
{ duration: '1m', target: 0 }, // Ramp-down
|
|
36
|
+
],
|
|
37
|
+
|
|
38
|
+
thresholds: {
|
|
39
|
+
// MODIFY THESE THRESHOLDS to match your SLO definitions
|
|
40
|
+
'http_req_duration': ['p(50)<50', 'p(95)<200', 'p(99)<500'],
|
|
41
|
+
'http_req_failed': ['rate<0.01'],
|
|
42
|
+
'custom_errors': ['rate<0.005'],
|
|
43
|
+
// Per-endpoint thresholds (add one per critical endpoint):
|
|
44
|
+
'http_req_duration{name:users-list}': ['p(95)<150'],
|
|
45
|
+
'http_req_duration{name:user-detail}': ['p(95)<100'],
|
|
46
|
+
'http_req_duration{name:create-order}': ['p(95)<300'],
|
|
47
|
+
'http_req_duration{name:health}': ['p(95)<50'],
|
|
48
|
+
},
|
|
49
|
+
|
|
50
|
+
// Global tags applied to all metrics (enables filtering in Grafana/Datadog)
|
|
51
|
+
tags: {
|
|
52
|
+
service: __ENV.SERVICE_NAME || 'unknown-service',
|
|
53
|
+
environment: __ENV.ENVIRONMENT || 'staging',
|
|
54
|
+
version: __ENV.APP_VERSION || 'unknown',
|
|
55
|
+
test_type: __ENV.TEST_TYPE || 'load',
|
|
56
|
+
test_run_id: __ENV.TEST_RUN_ID || `run-${Date.now()}`,
|
|
57
|
+
},
|
|
58
|
+
|
|
59
|
+
// Graceful stop: allow in-flight requests to complete before shutdown
|
|
60
|
+
gracefulStop: '30s',
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
// ─── Environment configuration ─────────────────────────────────────────────
|
|
64
|
+
const CONFIG = {
|
|
65
|
+
baseUrl: __ENV.BASE_URL || 'https://api.staging.example.com',
|
|
66
|
+
authToken: __ENV.AUTH_TOKEN || '',
|
|
67
|
+
timeout: __ENV.TIMEOUT || '10s',
|
|
68
|
+
};
|
|
69
|
+
|
|
70
|
+
const DEFAULT_HEADERS = {
|
|
71
|
+
'Content-Type': 'application/json',
|
|
72
|
+
'Accept': 'application/json',
|
|
73
|
+
'Authorization': `Bearer ${CONFIG.authToken}`,
|
|
74
|
+
};
|
|
75
|
+
|
|
76
|
+
// ─── Test data sets ─────────────────────────────────────────────────────────
|
|
77
|
+
// CUSTOMIZE: Replace with realistic test data for your service
|
|
78
|
+
const USER_STATUSES = ['active', 'inactive', 'pending'];
|
|
79
|
+
const PAGE_SIZES = [10, 20, 50];
|
|
80
|
+
const PRODUCT_IDS = ['prod-001', 'prod-002', 'prod-003', 'prod-004', 'prod-005'];
|
|
81
|
+
|
|
82
|
+
// ─── Setup ─────────────────────────────────────────────────────────────────
|
|
83
|
+
export function setup() {
|
|
84
|
+
// Verify connectivity and get any dynamic test data
|
|
85
|
+
const res = http.get(`${CONFIG.baseUrl}/health`, { timeout: '5s' });
|
|
86
|
+
if (res.status !== 200) {
|
|
87
|
+
throw new Error(`Service not reachable. Status: ${res.status}. URL: ${CONFIG.baseUrl}/health`);
|
|
88
|
+
}
|
|
89
|
+
console.log(`✅ Service healthy. Starting load test against ${CONFIG.baseUrl}`);
|
|
90
|
+
|
|
91
|
+
return {
|
|
92
|
+
baseUrl: CONFIG.baseUrl,
|
|
93
|
+
startTime: Date.now(),
|
|
94
|
+
};
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
// ─── Main VU function ──────────────────────────────────────────────────────
|
|
98
|
+
export default function(data) {
|
|
99
|
+
activeUsers.add(1);
|
|
100
|
+
|
|
101
|
+
group('User browsing journey', function() {
|
|
102
|
+
// Step 1: List users
|
|
103
|
+
const listStatus = randomItem(USER_STATUSES);
|
|
104
|
+
const listLimit = randomItem(PAGE_SIZES);
|
|
105
|
+
|
|
106
|
+
const listRes = http.get(
|
|
107
|
+
`${data.baseUrl}/api/users?status=${listStatus}&page=1&limit=${listLimit}`,
|
|
108
|
+
{
|
|
109
|
+
headers: DEFAULT_HEADERS,
|
|
110
|
+
tags: { name: 'users-list' },
|
|
111
|
+
timeout: CONFIG.timeout,
|
|
112
|
+
}
|
|
113
|
+
);
|
|
114
|
+
|
|
115
|
+
endpointLatency.add(listRes.timings.duration, { endpoint: 'users-list' });
|
|
116
|
+
requestsCompleted.add(1);
|
|
117
|
+
|
|
118
|
+
const listChecks = check(listRes, {
|
|
119
|
+
'users-list: status 200': (r) => r.status === 200,
|
|
120
|
+
'users-list: has data array': (r) => {
|
|
121
|
+
try { return Array.isArray(JSON.parse(r.body).data); }
|
|
122
|
+
catch { return false; }
|
|
123
|
+
},
|
|
124
|
+
'users-list: latency < 200ms': (r) => r.timings.duration < 200,
|
|
125
|
+
});
|
|
126
|
+
customErrorRate.add(!listChecks);
|
|
127
|
+
|
|
128
|
+
sleep(randomIntBetween(1, 2));
|
|
129
|
+
|
|
130
|
+
// Step 2: View user detail (if list returned results)
|
|
131
|
+
if (listRes.status === 200) {
|
|
132
|
+
try {
|
|
133
|
+
const body = JSON.parse(listRes.body);
|
|
134
|
+
const users = body.data;
|
|
135
|
+
if (users && users.length > 0) {
|
|
136
|
+
const userId = randomItem(users).id;
|
|
137
|
+
const detailRes = http.get(
|
|
138
|
+
`${data.baseUrl}/api/users/${userId}`,
|
|
139
|
+
{
|
|
140
|
+
headers: DEFAULT_HEADERS,
|
|
141
|
+
tags: { name: 'user-detail' },
|
|
142
|
+
timeout: CONFIG.timeout,
|
|
143
|
+
}
|
|
144
|
+
);
|
|
145
|
+
|
|
146
|
+
endpointLatency.add(detailRes.timings.duration, { endpoint: 'user-detail' });
|
|
147
|
+
requestsCompleted.add(1);
|
|
148
|
+
|
|
149
|
+
check(detailRes, {
|
|
150
|
+
'user-detail: status 200': (r) => r.status === 200,
|
|
151
|
+
'user-detail: latency < 100ms': (r) => r.timings.duration < 100,
|
|
152
|
+
});
|
|
153
|
+
}
|
|
154
|
+
} catch(e) {
|
|
155
|
+
console.error(`Failed to parse users list: ${e.message}`);
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
sleep(randomIntBetween(1, 3));
|
|
160
|
+
});
|
|
161
|
+
|
|
162
|
+
// Only 20% of VUs create orders (matches production traffic distribution)
|
|
163
|
+
if (Math.random() < 0.2) {
|
|
164
|
+
group('Order creation journey', function() {
|
|
165
|
+
const createRes = http.post(
|
|
166
|
+
`${data.baseUrl}/api/orders`,
|
|
167
|
+
JSON.stringify({
|
|
168
|
+
product_id: randomItem(PRODUCT_IDS),
|
|
169
|
+
quantity: randomIntBetween(1, 5),
|
|
170
|
+
}),
|
|
171
|
+
{
|
|
172
|
+
headers: DEFAULT_HEADERS,
|
|
173
|
+
tags: { name: 'create-order' },
|
|
174
|
+
timeout: CONFIG.timeout,
|
|
175
|
+
}
|
|
176
|
+
);
|
|
177
|
+
|
|
178
|
+
endpointLatency.add(createRes.timings.duration, { endpoint: 'create-order' });
|
|
179
|
+
requestsCompleted.add(1);
|
|
180
|
+
|
|
181
|
+
check(createRes, {
|
|
182
|
+
'create-order: status 201': (r) => r.status === 201,
|
|
183
|
+
'create-order: has id': (r) => {
|
|
184
|
+
try { return !!JSON.parse(r.body).id; }
|
|
185
|
+
catch { return false; }
|
|
186
|
+
},
|
|
187
|
+
'create-order: latency < 300ms': (r) => r.timings.duration < 300,
|
|
188
|
+
});
|
|
189
|
+
|
|
190
|
+
sleep(2);
|
|
191
|
+
});
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
activeUsers.add(-1);
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
// ─── Teardown ──────────────────────────────────────────────────────────────
|
|
198
|
+
export function teardown(data) {
|
|
199
|
+
const duration = (Date.now() - data.startTime) / 1000;
|
|
200
|
+
console.log(`Load test complete. Duration: ${duration.toFixed(0)}s`);
|
|
201
|
+
}
|
|
202
|
+
```
|
|
203
|
+
|
|
204
|
+
---
|
|
205
|
+
|
|
206
|
+
## Artillery YAML Config Template
|
|
207
|
+
|
|
208
|
+
```yaml
|
|
209
|
+
# artillery-config.yml
|
|
210
|
+
# Generated by genesis-performance-profiling
|
|
211
|
+
# Service: [SERVICE_NAME]
|
|
212
|
+
# Generated: [DATE]
|
|
213
|
+
|
|
214
|
+
config:
|
|
215
|
+
target: "https://api.staging.example.com"
|
|
216
|
+
|
|
217
|
+
environments:
|
|
218
|
+
staging:
|
|
219
|
+
target: "https://api.staging.example.com"
|
|
220
|
+
phases:
|
|
221
|
+
- name: "Smoke"
|
|
222
|
+
duration: 60
|
|
223
|
+
arrivalRate: 1
|
|
224
|
+
- name: "Ramp-up"
|
|
225
|
+
duration: 120
|
|
226
|
+
arrivalRate: 1
|
|
227
|
+
rampTo: 50
|
|
228
|
+
- name: "Peak"
|
|
229
|
+
duration: 600
|
|
230
|
+
arrivalRate: 50
|
|
231
|
+
- name: "Ramp-down"
|
|
232
|
+
duration: 60
|
|
233
|
+
arrivalRate: 50
|
|
234
|
+
rampTo: 0
|
|
235
|
+
|
|
236
|
+
production-canary:
|
|
237
|
+
target: "https://api.example.com"
|
|
238
|
+
phases:
|
|
239
|
+
- name: "Conservative canary"
|
|
240
|
+
duration: 300
|
|
241
|
+
arrivalRate: 5
|
|
242
|
+
|
|
243
|
+
# Common phases (used when no environment specified)
|
|
244
|
+
phases:
|
|
245
|
+
- name: "Load test"
|
|
246
|
+
duration: 300
|
|
247
|
+
arrivalRate: 50
|
|
248
|
+
|
|
249
|
+
http:
|
|
250
|
+
timeout: 10
|
|
251
|
+
pool: 50
|
|
252
|
+
|
|
253
|
+
defaults:
|
|
254
|
+
headers:
|
|
255
|
+
Content-Type: "application/json"
|
|
256
|
+
Accept: "application/json"
|
|
257
|
+
Authorization: "Bearer {{ $env.AUTH_TOKEN }}"
|
|
258
|
+
|
|
259
|
+
plugins:
|
|
260
|
+
expect: {}
|
|
261
|
+
|
|
262
|
+
ensure:
|
|
263
|
+
p95: 200
|
|
264
|
+
p99: 500
|
|
265
|
+
maxErrorRate: 1
|
|
266
|
+
|
|
267
|
+
# Variables available in scenarios
|
|
268
|
+
variables:
|
|
269
|
+
userStatuses:
|
|
270
|
+
- "active"
|
|
271
|
+
- "inactive"
|
|
272
|
+
pageSizes:
|
|
273
|
+
- 10
|
|
274
|
+
- 20
|
|
275
|
+
- 50
|
|
276
|
+
|
|
277
|
+
scenarios:
|
|
278
|
+
- name: "Browse users"
|
|
279
|
+
weight: 40
|
|
280
|
+
flow:
|
|
281
|
+
- get:
|
|
282
|
+
url: "/api/users?status={{ userStatuses | random }}&page=1&limit={{ pageSizes | random }}"
|
|
283
|
+
expect:
|
|
284
|
+
- statusCode: 200
|
|
285
|
+
- contentType: json
|
|
286
|
+
capture:
|
|
287
|
+
- json: "$.data[0].id"
|
|
288
|
+
as: "firstUserId"
|
|
289
|
+
- think: 1
|
|
290
|
+
- get:
|
|
291
|
+
url: "/api/users/{{ firstUserId }}"
|
|
292
|
+
ifTrue: "firstUserId"
|
|
293
|
+
expect:
|
|
294
|
+
- statusCode: 200
|
|
295
|
+
- think: 2
|
|
296
|
+
|
|
297
|
+
- name: "Create and retrieve order"
|
|
298
|
+
weight: 20
|
|
299
|
+
flow:
|
|
300
|
+
- post:
|
|
301
|
+
url: "/api/orders"
|
|
302
|
+
json:
|
|
303
|
+
product_id: "prod-{{ $randomInt(1, 100) }}"
|
|
304
|
+
quantity: "{{ $randomInt(1, 5) }}"
|
|
305
|
+
expect:
|
|
306
|
+
- statusCode: 201
|
|
307
|
+
capture:
|
|
308
|
+
- json: "$.id"
|
|
309
|
+
as: "orderId"
|
|
310
|
+
- think: 1
|
|
311
|
+
- get:
|
|
312
|
+
url: "/api/orders/{{ orderId }}"
|
|
313
|
+
ifTrue: "orderId"
|
|
314
|
+
expect:
|
|
315
|
+
- statusCode: 200
|
|
316
|
+
|
|
317
|
+
- name: "Health check"
|
|
318
|
+
weight: 40
|
|
319
|
+
flow:
|
|
320
|
+
- get:
|
|
321
|
+
url: "/health"
|
|
322
|
+
expect:
|
|
323
|
+
- statusCode: 200
|
|
324
|
+
```
|
|
325
|
+
|
|
326
|
+
---
|
|
327
|
+
|
|
328
|
+
## Environment-Specific Config Overrides
|
|
329
|
+
|
|
330
|
+
```javascript
|
|
331
|
+
// k6/configs/env-overrides.js
|
|
332
|
+
// Import and spread into your main options object
|
|
333
|
+
|
|
334
|
+
export const ENV_CONFIGS = {
|
|
335
|
+
local: {
|
|
336
|
+
baseUrl: 'http://localhost:3000',
|
|
337
|
+
stages: [
|
|
338
|
+
{ duration: '30s', target: 5 },
|
|
339
|
+
{ duration: '2m', target: 5 },
|
|
340
|
+
{ duration: '30s', target: 0 },
|
|
341
|
+
],
|
|
342
|
+
thresholds: {
|
|
343
|
+
'http_req_duration': ['p(95)<500'], // relaxed for local
|
|
344
|
+
'http_req_failed': ['rate<0.05'],
|
|
345
|
+
},
|
|
346
|
+
},
|
|
347
|
+
|
|
348
|
+
staging: {
|
|
349
|
+
baseUrl: 'https://api.staging.example.com',
|
|
350
|
+
stages: [
|
|
351
|
+
{ duration: '1m', target: 1 },
|
|
352
|
+
{ duration: '2m', target: 100 },
|
|
353
|
+
{ duration: '10m', target: 100 },
|
|
354
|
+
{ duration: '1m', target: 0 },
|
|
355
|
+
],
|
|
356
|
+
thresholds: {
|
|
357
|
+
'http_req_duration': ['p(95)<250'], // slightly relaxed vs prod
|
|
358
|
+
'http_req_failed': ['rate<0.02'],
|
|
359
|
+
},
|
|
360
|
+
},
|
|
361
|
+
|
|
362
|
+
production: {
|
|
363
|
+
baseUrl: 'https://api.example.com',
|
|
364
|
+
stages: [
|
|
365
|
+
{ duration: '2m', target: 10 }, // Very conservative
|
|
366
|
+
{ duration: '5m', target: 10 },
|
|
367
|
+
{ duration: '1m', target: 0 },
|
|
368
|
+
],
|
|
369
|
+
thresholds: {
|
|
370
|
+
'http_req_duration': ['p(95)<200'],
|
|
371
|
+
'http_req_failed': ['rate<0.001'], // strictest for production
|
|
372
|
+
},
|
|
373
|
+
},
|
|
374
|
+
};
|
|
375
|
+
|
|
376
|
+
// Usage in main script:
|
|
377
|
+
// import { ENV_CONFIGS } from './configs/env-overrides.js';
|
|
378
|
+
// const envName = __ENV.ENVIRONMENT || 'staging';
|
|
379
|
+
// export const options = { ...ENV_CONFIGS[envName] };
|
|
380
|
+
```
|
|
381
|
+
|
|
382
|
+
---
|
|
383
|
+
|
|
384
|
+
## CI/CD Integration
|
|
385
|
+
|
|
386
|
+
```yaml
|
|
387
|
+
# .github/workflows/perf-test.yml
|
|
388
|
+
name: Performance Regression Test
|
|
389
|
+
|
|
390
|
+
on:
|
|
391
|
+
pull_request:
|
|
392
|
+
branches: [main]
|
|
393
|
+
push:
|
|
394
|
+
branches: [main]
|
|
395
|
+
|
|
396
|
+
jobs:
|
|
397
|
+
load-test:
|
|
398
|
+
runs-on: ubuntu-latest
|
|
399
|
+
steps:
|
|
400
|
+
- uses: actions/checkout@v4
|
|
401
|
+
|
|
402
|
+
- name: Install k6
|
|
403
|
+
run: |
|
|
404
|
+
curl https://github.com/grafana/k6/releases/download/v0.50.0/k6-v0.50.0-linux-amd64.tar.gz -L | tar xvz --strip-components 1
|
|
405
|
+
sudo mv k6 /usr/local/bin/
|
|
406
|
+
|
|
407
|
+
- name: Run performance regression test
|
|
408
|
+
env:
|
|
409
|
+
BASE_URL: ${{ vars.STAGING_URL }}
|
|
410
|
+
AUTH_TOKEN: ${{ secrets.STAGING_AUTH_TOKEN }}
|
|
411
|
+
ENVIRONMENT: staging
|
|
412
|
+
APP_VERSION: ${{ github.sha }}
|
|
413
|
+
run: |
|
|
414
|
+
k6 run \
|
|
415
|
+
--out json=perf-results.json \
|
|
416
|
+
--env BASE_URL=$BASE_URL \
|
|
417
|
+
--env AUTH_TOKEN=$AUTH_TOKEN \
|
|
418
|
+
--env ENVIRONMENT=$ENVIRONMENT \
|
|
419
|
+
--env APP_VERSION=$APP_VERSION \
|
|
420
|
+
.codex/skills/genesis-performance-profiling/templates/load-test-script.js
|
|
421
|
+
|
|
422
|
+
- name: Upload results
|
|
423
|
+
uses: actions/upload-artifact@v4
|
|
424
|
+
if: always()
|
|
425
|
+
with:
|
|
426
|
+
name: perf-results-${{ github.sha }}
|
|
427
|
+
path: perf-results.json
|
|
428
|
+
```
|
|
@@ -0,0 +1,238 @@
|
|
|
1
|
+
# Performance Report Template
|
|
2
|
+
|
|
3
|
+
Use this template to document every performance profiling cycle. Fill in every section — do not leave placeholders in a committed report. This document becomes the authoritative record of system performance at a point in time.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Report Header
|
|
8
|
+
|
|
9
|
+
```
|
|
10
|
+
Performance Report
|
|
11
|
+
==================
|
|
12
|
+
Service: [service name, e.g. "users-api"]
|
|
13
|
+
Version: [commit SHA or image tag, e.g. "abc1234"]
|
|
14
|
+
Environment: [environment name, e.g. "staging-isolated"]
|
|
15
|
+
Test type: [baseline | regression | optimization | incident]
|
|
16
|
+
Report date: [ISO 8601, e.g. "2026-05-31"]
|
|
17
|
+
Report author: [your name or "automated"]
|
|
18
|
+
Baseline file: [path to PERF_BASELINE.json, e.g. "observability/baselines/2026-05-31-v1.4.2.json"]
|
|
19
|
+
Prior baseline: [path to previous baseline if this is a comparison, or "N/A"]
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
---
|
|
23
|
+
|
|
24
|
+
## Section 1: Baseline Capture Summary
|
|
25
|
+
|
|
26
|
+
### Environment conditions at capture time
|
|
27
|
+
|
|
28
|
+
| Condition | Value | Within normal? |
|
|
29
|
+
|-----------|-------|----------------|
|
|
30
|
+
| Background CPU utilization | X% | ✅ / ❌ (should be < 5%) |
|
|
31
|
+
| Available memory | X MB | ✅ / ❌ (should be > 70% free) |
|
|
32
|
+
| Database connection pool usage | X% | ✅ / ❌ (should be < 20% of max) |
|
|
33
|
+
| Database row count (primary tables) | X rows | Reference only |
|
|
34
|
+
| Cache state | warm / cold | Note if cold (first run after restart) |
|
|
35
|
+
| Active background jobs | none / [list] | ✅ if none |
|
|
36
|
+
| Network utilization (background) | X Mbps | ✅ / ❌ (should be < 10 Mbps) |
|
|
37
|
+
| Number of instances / pods | X | Note for scaling context |
|
|
38
|
+
|
|
39
|
+
### Run summary
|
|
40
|
+
|
|
41
|
+
| Run # | p50 (ms) | p95 (ms) | p99 (ms) | RPS | Error rate | Status |
|
|
42
|
+
|-------|---------|---------|---------|-----|-----------|--------|
|
|
43
|
+
| Warm-up (discarded) | — | — | — | — | — | discarded |
|
|
44
|
+
| Run 1 | | | | | | recorded |
|
|
45
|
+
| Run 2 | | | | | | recorded |
|
|
46
|
+
| Run 3 | | | | | | recorded |
|
|
47
|
+
| Run 4 | | | | | | recorded |
|
|
48
|
+
| Run 5 | | | | | | recorded |
|
|
49
|
+
| **AVERAGE** | **XX** | **XX** | **XX** | **XX** | **XX%** | |
|
|
50
|
+
| **VARIANCE (%)** | **X%** | **X%** | **X%** | **X%** | | ✅ if < 30% |
|
|
51
|
+
|
|
52
|
+
### Per-endpoint baseline metrics
|
|
53
|
+
|
|
54
|
+
| Endpoint | p50 (ms) | p95 (ms) | p99 (ms) | RPS | Error % | p95 SLA | SLA Status |
|
|
55
|
+
|----------|---------|---------|---------|-----|---------|---------|-----------|
|
|
56
|
+
| GET /api/users | | | | | | 200 ms | ✅/❌ |
|
|
57
|
+
| GET /api/users/:id | | | | | | 200 ms | ✅/❌ |
|
|
58
|
+
| POST /api/orders | | | | | | 300 ms | ✅/❌ |
|
|
59
|
+
| GET /api/products | | | | | | 150 ms | ✅/❌ |
|
|
60
|
+
| POST /auth/login | | | | | | 500 ms | ✅/❌ |
|
|
61
|
+
|
|
62
|
+
### Memory profile
|
|
63
|
+
|
|
64
|
+
| Measurement | Value |
|
|
65
|
+
|-------------|-------|
|
|
66
|
+
| Heap at test start (MB) | |
|
|
67
|
+
| Heap at test end (MB) | |
|
|
68
|
+
| Heap delta (MB) | |
|
|
69
|
+
| RSS at test start (MB) | |
|
|
70
|
+
| RSS at test end (MB) | |
|
|
71
|
+
| Memory growth rate (MB/min) | |
|
|
72
|
+
| Leak suspected? | YES / NO (threshold: > 5 MB/min = suspect) |
|
|
73
|
+
|
|
74
|
+
---
|
|
75
|
+
|
|
76
|
+
## Section 2: Test Results Analysis
|
|
77
|
+
|
|
78
|
+
### Load test execution summary
|
|
79
|
+
|
|
80
|
+
| Stage | Duration | Concurrency | Completed? | Notes |
|
|
81
|
+
|-------|----------|-------------|-----------|-------|
|
|
82
|
+
| Smoke | 1 min | 1 VU | YES/NO | |
|
|
83
|
+
| Ramp-up | 2 min | 0 → X VUs | YES/NO | |
|
|
84
|
+
| Peak | 5-30 min | X VUs | YES/NO | |
|
|
85
|
+
| Stress (if run) | 5 min | 2X VUs | YES/NO | |
|
|
86
|
+
| Ramp-down | 1 min | X → 0 VUs | YES/NO | |
|
|
87
|
+
| Soak (if run) | 30 min | X VUs | YES/NO | |
|
|
88
|
+
|
|
89
|
+
### Threshold results
|
|
90
|
+
|
|
91
|
+
| Threshold | Configured | Actual | Result |
|
|
92
|
+
|-----------|-----------|--------|--------|
|
|
93
|
+
| `http_req_duration p(95)` | < 200 ms | X ms | ✅ PASS / ❌ FAIL |
|
|
94
|
+
| `http_req_duration p(99)` | < 500 ms | X ms | ✅ PASS / ❌ FAIL |
|
|
95
|
+
| `http_req_failed` | < 1% | X% | ✅ PASS / ❌ FAIL |
|
|
96
|
+
| `http_reqs` (min throughput) | ≥ X RPS | X RPS | ✅ PASS / ❌ FAIL |
|
|
97
|
+
|
|
98
|
+
### Observations during test
|
|
99
|
+
|
|
100
|
+
Document any anomalies observed during the test execution:
|
|
101
|
+
|
|
102
|
+
- **Latency spikes**: At [time into test], p95 spiked to X ms for approximately Y seconds. Cause: [known/unknown].
|
|
103
|
+
- **Error bursts**: At [time into test], error rate spiked to X% for Y seconds. HTTP status codes observed: [list].
|
|
104
|
+
- **Memory anomaly**: Memory grew from X MB to Y MB during [stage]. Drift rate: Z MB/min.
|
|
105
|
+
- **Throughput drop**: RPS dropped from X to Y at [time]. Correlates with [event].
|
|
106
|
+
- **External dependency issues**: [service] responded slowly / returned errors during [time period].
|
|
107
|
+
|
|
108
|
+
---
|
|
109
|
+
|
|
110
|
+
## Section 3: Before/After Comparison Table
|
|
111
|
+
|
|
112
|
+
Use this section for regression detection reports. Fill in after running the after-baseline.
|
|
113
|
+
|
|
114
|
+
### Summary
|
|
115
|
+
|
|
116
|
+
```
|
|
117
|
+
Before baseline: [path] captured [date] at version [X]
|
|
118
|
+
After baseline: [path] captured [date] at version [Y]
|
|
119
|
+
Change context: [description of what changed, e.g. "Added index on users.tenant_id, fixed N+1 query"]
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
### Metric delta table
|
|
123
|
+
|
|
124
|
+
| Endpoint | Metric | Before | After | Delta | Delta % | Status |
|
|
125
|
+
|----------|--------|--------|-------|-------|---------|--------|
|
|
126
|
+
| GET /api/users | p50 ms | | | | | ✅/❌/⚠️ |
|
|
127
|
+
| GET /api/users | p95 ms | | | | | ✅/❌/⚠️ |
|
|
128
|
+
| GET /api/users | p99 ms | | | | | ✅/❌/⚠️ |
|
|
129
|
+
| GET /api/users | RPS | | | | | ✅/❌/⚠️ |
|
|
130
|
+
| GET /api/users | Error % | | | | | ✅/❌/⚠️ |
|
|
131
|
+
| GET /api/users/:id | p50 ms | | | | | ✅/❌/⚠️ |
|
|
132
|
+
| GET /api/users/:id | p95 ms | | | | | ✅/❌/⚠️ |
|
|
133
|
+
| POST /api/orders | p95 ms | | | | | ✅/❌/⚠️ |
|
|
134
|
+
|
|
135
|
+
**Legend:**
|
|
136
|
+
- ✅ IMPROVEMENT: Latency decreased > 10% OR throughput increased > 10%
|
|
137
|
+
- ❌ REGRESSION: Latency increased > 20% OR throughput decreased > 15% OR error rate increased
|
|
138
|
+
- ⚠️ STABLE: Change within variance bounds (< 10% either direction)
|
|
139
|
+
|
|
140
|
+
---
|
|
141
|
+
|
|
142
|
+
## Section 4: Regression Flag Format
|
|
143
|
+
|
|
144
|
+
For each regression detected, create one entry in this format:
|
|
145
|
+
|
|
146
|
+
```
|
|
147
|
+
REGRESSION DETECTED
|
|
148
|
+
===================
|
|
149
|
+
Endpoint: GET /api/users
|
|
150
|
+
Metric: p95 latency
|
|
151
|
+
Before value: 180 ms
|
|
152
|
+
After value: 290 ms
|
|
153
|
+
Delta: +110 ms (+61.1%)
|
|
154
|
+
Threshold: +20% = REGRESSION
|
|
155
|
+
Severity: HIGH (exceeded SLA target of 200 ms)
|
|
156
|
+
|
|
157
|
+
Root cause hypothesis:
|
|
158
|
+
[Initial hypothesis — to be confirmed by profiling]
|
|
159
|
+
Example: "Added full-text search query may be triggering seq scan on users table."
|
|
160
|
+
|
|
161
|
+
Evidence:
|
|
162
|
+
[What evidence supports this hypothesis?]
|
|
163
|
+
Example: "pg_stat_statements shows new query with avg=110ms. Previous query avg=12ms."
|
|
164
|
+
|
|
165
|
+
Recommended action:
|
|
166
|
+
[Immediate recommended action]
|
|
167
|
+
Example: "Add GIN index for full-text search. Revert or defer feature until index is in place."
|
|
168
|
+
|
|
169
|
+
Blocking deployment? YES / NO
|
|
170
|
+
[If YES, this must be resolved before the change can be merged/deployed]
|
|
171
|
+
```
|
|
172
|
+
|
|
173
|
+
---
|
|
174
|
+
|
|
175
|
+
## Section 5: Optimization Recommendation Format
|
|
176
|
+
|
|
177
|
+
For each identified bottleneck, create one entry:
|
|
178
|
+
|
|
179
|
+
```
|
|
180
|
+
OPTIMIZATION RECOMMENDATION
|
|
181
|
+
============================
|
|
182
|
+
ID: PERF-2026-001
|
|
183
|
+
Status: OPEN / IN PROGRESS / IMPLEMENTED / CLOSED
|
|
184
|
+
Priority: P1 (Critical) / P2 (High) / P3 (Medium) / P4 (Low)
|
|
185
|
+
|
|
186
|
+
Bottleneck: [What is slow and where]
|
|
187
|
+
Example: "N+1 query pattern in GET /api/users — executing 1 + N SELECT queries per request"
|
|
188
|
+
|
|
189
|
+
Evidence:
|
|
190
|
+
- pg_stat_statements: query "SELECT * FROM profiles WHERE user_id=$1" called 50× per /api/users request
|
|
191
|
+
- EXPLAIN ANALYZE: Seq Scan on profiles table (50,000 rows per scan)
|
|
192
|
+
- DB query time = 380 ms avg (84% of total response time of 450 ms)
|
|
193
|
+
- Flame graph: 73% of CPU time in ORM hydration loop
|
|
194
|
+
|
|
195
|
+
Recommended fix:
|
|
196
|
+
[Specific, actionable fix]
|
|
197
|
+
Example:
|
|
198
|
+
1. Change ORM call from users.findAll() to users.findAll({ include: ['profile'] })
|
|
199
|
+
This replaces 1+N queries with a single LEFT JOIN query.
|
|
200
|
+
2. Add index: CREATE INDEX CONCURRENTLY idx_profiles_user_id ON profiles(user_id);
|
|
201
|
+
|
|
202
|
+
Estimated impact: HIGH (expected p95 improvement: 300-370 ms, ~70-82% reduction)
|
|
203
|
+
Implementation effort: EASY (3 lines of ORM code + 1 migration)
|
|
204
|
+
Risk: LOW (index creation is non-blocking with CONCURRENTLY)
|
|
205
|
+
|
|
206
|
+
Validation method:
|
|
207
|
+
1. Run after-baseline with this fix deployed.
|
|
208
|
+
2. Confirm p95 ≤ 80 ms (well under 200 ms SLA).
|
|
209
|
+
3. Confirm error rate unchanged.
|
|
210
|
+
4. Check pg_stat_statements — N+1 query should no longer appear.
|
|
211
|
+
|
|
212
|
+
Implemented in: [PR # or commit SHA, filled in after implementation]
|
|
213
|
+
After p95: [measured after implementation]
|
|
214
|
+
Improvement: [% improvement achieved]
|
|
215
|
+
Closed date: [date when confirmed working in production]
|
|
216
|
+
```
|
|
217
|
+
|
|
218
|
+
---
|
|
219
|
+
|
|
220
|
+
## Report Footer
|
|
221
|
+
|
|
222
|
+
```
|
|
223
|
+
OVERALL ASSESSMENT
|
|
224
|
+
==================
|
|
225
|
+
SLA compliance: ALL PASS / X FAILS
|
|
226
|
+
Regressions: X detected (list IDs)
|
|
227
|
+
Improvements: X detected
|
|
228
|
+
Open recommendations: X items (list IDs)
|
|
229
|
+
Baseline updated: YES / NO (path: ...)
|
|
230
|
+
PERF_LOG.md updated: YES / NO
|
|
231
|
+
Next review: [date, typically 1 sprint from now]
|
|
232
|
+
|
|
233
|
+
Sign-off:
|
|
234
|
+
[ ] Performance report reviewed by: ___________
|
|
235
|
+
[ ] Regressions dispositioned (fixed or accepted): ___________
|
|
236
|
+
[ ] PERF_LOG.md updated: ___________
|
|
237
|
+
[ ] Recommendations assigned: ___________
|
|
238
|
+
```
|