codex-genesis-harness 0.1.7 → 0.1.9
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/COMPRESSED_CONTEXT.md +80 -0
- package/.codebase/CURRENT_STATE.md +10 -10
- package/.codebase/DEPENDENCY_GRAPH.md +14 -1
- package/.codebase/IMPLEMENTATION_HANDOFF.md +34 -336
- package/.codebase/KNOWN_PROBLEMS.md +73 -3
- package/.codebase/MODULE_INDEX.md +23 -2
- package/.codebase/PIPELINE_FLOW.md +16 -6
- package/.codebase/RECOVERY_POINTS.md +80 -78
- package/.codebase/TECH_DEBT.md +6 -0
- package/.codebase/TEST_MATRIX.md +8 -3
- package/.codebase/VISUAL_GRAPH.md +127 -0
- package/.codebase/context-policy.json +68 -0
- package/.codebase/memories/lessons_learned.md +63 -0
- package/.codebase/memories/preferences.md +17 -0
- package/.codebase/state.json +156 -17
- package/.codex/skills/genesis-architecture/SKILL.md +5 -0
- package/.codex/skills/genesis-debug-guide/SKILL.md +10 -4
- package/.codex/skills/genesis-docs-automation/SKILL.md +52 -973
- package/.codex/skills/genesis-executing-plans/SKILL.md +54 -0
- package/.codex/skills/genesis-executing-plans/agents/openai.yaml +6 -0
- package/.codex/skills/genesis-executing-plans/checklists/.gitkeep +0 -0
- package/.codex/skills/genesis-executing-plans/examples/.gitkeep +0 -0
- package/.codex/skills/genesis-executing-plans/templates/.gitkeep +0 -0
- package/.codex/skills/genesis-harness/SKILL.md +73 -1385
- package/.codex/skills/genesis-harness/agents/openai.yaml +1 -2
- package/.codex/skills/genesis-harness/references/state-machine.md +4 -1
- package/.codex/skills/genesis-harness/references/workflows.md +7 -1
- package/.codex/skills/genesis-harness/scripts/check-docs-sync.sh +3 -3
- package/.codex/skills/genesis-harness/scripts/init-planning.sh +246 -14
- package/.codex/skills/genesis-new-design/SKILL.md +4 -1
- package/.codex/skills/genesis-new-design/agents/openai.yaml +2 -0
- package/.codex/skills/genesis-observability-automation/SKILL.md +69 -303
- package/.codex/skills/genesis-observability-automation/references/common-mistakes-and-recovery.md +84 -0
- package/.codex/skills/genesis-observability-automation/references/workflow-phases.md +78 -0
- package/.codex/skills/genesis-performance-profiling/SKILL.md +1 -22
- package/.codex/skills/genesis-performance-profiling/agents/openai.yaml +1 -1
- package/.codex/skills/genesis-pipeline-orchestration/SKILL.md +15 -3
- package/.codex/skills/genesis-planning/SKILL.md +6 -1
- package/.codex/skills/genesis-release/SKILL.md +5 -0
- package/.codex/skills/genesis-research-first/SKILL.md +6 -0
- package/.codex/skills/genesis-spec-propagation/SKILL.md +52 -504
- package/.codex/skills/genesis-test-driven-development/SKILL.md +55 -0
- package/.codex/skills/genesis-test-driven-development/agents/openai.yaml +6 -0
- package/.codex/skills/genesis-test-driven-development/checklists/.gitkeep +0 -0
- package/.codex/skills/genesis-test-driven-development/examples/.gitkeep +0 -0
- package/.codex/skills/genesis-test-driven-development/templates/.gitkeep +0 -0
- package/.codex/skills/genesis-upgrade-design/SKILL.md +4 -2
- package/.codex/skills/genesis-upgrade-design/agents/openai.yaml +2 -0
- package/.codex/skills/genesis-using-git-worktrees/SKILL.md +54 -0
- package/.codex/skills/genesis-using-git-worktrees/agents/openai.yaml +6 -0
- package/.codex/skills/genesis-using-git-worktrees/checklists/.gitkeep +0 -0
- package/.codex/skills/genesis-using-git-worktrees/examples/.gitkeep +0 -0
- package/.codex/skills/genesis-using-git-worktrees/templates/.gitkeep +0 -0
- package/.codex/skills/genesis-verification-before-completion/SKILL.md +53 -0
- package/.codex/skills/genesis-verification-before-completion/agents/openai.yaml +6 -0
- package/.codex/skills/genesis-verification-before-completion/checklists/.gitkeep +0 -0
- package/.codex/skills/genesis-verification-before-completion/examples/.gitkeep +0 -0
- package/.codex/skills/genesis-verification-before-completion/templates/.gitkeep +0 -0
- package/.codex/skills/spec-impact-engine/SKILL.md +77 -500
- package/.codex/skills/spec-impact-engine/checklists/checklist.md +10 -0
- package/.codex-plugin/plugin.json +6 -5
- package/CHANGELOG.md +25 -1
- package/README.EN.md +74 -17
- package/README.VI.md +77 -19
- package/README.md +126 -10
- package/VERSION +1 -2
- package/bin/genesis-harness.js +2979 -149
- package/contracts/features/project-registry-schema.json +37 -0
- package/contracts/features/registry-schema.json +15 -0
- package/contracts/observability/agent-run-schema.json +39 -0
- package/contracts/observability/failure-schema.json +35 -0
- package/contracts/ui/auth/login-screen-contract.json +43 -0
- package/features/REGISTRY.md +65 -0
- package/features/SCOPE-template.md +65 -0
- package/fixtures/pipeline/end-to-end-project-lifecycle-fixture.md +39 -0
- package/fixtures/pipeline/feature-completion-fixture.md +26 -0
- package/fixtures/pipeline/run-to-feature-execution-fixture.md +20 -0
- package/fixtures/planning/MOCKUP_PROMPT_TEMPLATE.md +16 -0
- package/observability/agent-runs/sample-run.json +13 -0
- package/observability/decision-logs/sample-decision.md +43 -0
- package/observability/failures/sample-failure.json +12 -0
- package/package.json +15 -4
- package/playwright/e2e/app-template.spec.js +37 -0
- package/playwright/e2e/auth/login-screen.spec.js +65 -0
- package/playwright/e2e/web-template.spec.js +28 -0
- package/scripts/check-repository-hygiene.js +48 -0
- package/scripts/check-scope.sh +100 -0
- package/scripts/cold-start-check.js +133 -0
- package/scripts/install.sh +4 -0
- package/scripts/prompt_sentinel.js +35 -4
- package/scripts/run-evals.sh +152 -3
- package/scripts/schema/001-init.sql +129 -0
- package/scripts/schema/002-story-verify.sql +9 -0
- package/scripts/schema/003-tool-registry.sql +15 -0
- package/scripts/schema/004-intervention.sql +15 -0
- package/scripts/scratch_parser.js +49 -0
- package/scripts/spec_visual_sync.js +1 -1
- package/scripts/test_generator.js +2 -2
- package/scripts/transition_state.sh +32 -8
- package/scripts/uninstall.sh +4 -0
- package/scripts/validation_gates.sh +2 -80
- package/scripts/verify.sh +19 -2
- package/tests/fixtures/fixture-index.md +5 -0
- package/tests/integration/cli-smoke.test.js +506 -0
- package/tests/unit/feature_registry.test.js +152 -0
- package/tests/unit/prompt_sentinel.test.js +1 -1
- package/tests/unit/repository_hygiene.test.js +17 -0
- package/tests/unit/spec_visual_sync.test.js +1 -1
- package/tests/unit/state_metadata.test.js +76 -0
- package/tests/unit/test_generator.test.js +1 -1
- package/tests/unit/verify_gate.test.js +25 -0
- package/tests/unit/workflow_contracts.test.js +90 -0
- package/fixtures/tts/tts-fixture-template.md +0 -14
- package/fixtures/videos/video-fixture-template.md +0 -14
- package/playwright/e2e/e2e-template.md +0 -4
package/.codebase/state.json
CHANGED
|
@@ -1,37 +1,176 @@
|
|
|
1
1
|
{
|
|
2
2
|
"current_state": "COMPLETED",
|
|
3
|
+
"active_work": "",
|
|
4
|
+
"session_id": "2026-06-12-lifecycle-pipeline-hardening",
|
|
5
|
+
"session_started_at": "2026-06-12T16:47:17+07:00",
|
|
6
|
+
"ttfv_seconds": 180,
|
|
7
|
+
"_comment_ttfv": "Time-to-First-Verification: 180s from session start to first passing targeted lifecycle test.",
|
|
8
|
+
"latest_handoff": ".codebase/IMPLEMENTATION_HANDOFF.md",
|
|
9
|
+
"latest_recovery_point": "End-to-end lifecycle pipeline verified with project closure and audit",
|
|
10
|
+
"required_verification": [
|
|
11
|
+
"npm run verify",
|
|
12
|
+
"npm run eval",
|
|
13
|
+
"npm run pack:check",
|
|
14
|
+
"node tests/unit/feature_registry.test.js",
|
|
15
|
+
"node scripts/cold-start-check.js",
|
|
16
|
+
"node bin/genesis-harness.js docs-gate",
|
|
17
|
+
"node bin/genesis-harness.js leanctx",
|
|
18
|
+
"node tests/unit/verify_gate.test.js",
|
|
19
|
+
"node tests/unit/workflow_contracts.test.js",
|
|
20
|
+
"node tests/integration/cli-smoke.test.js",
|
|
21
|
+
"node tests/unit/state_metadata.test.js",
|
|
22
|
+
"node tests/unit/repository_hygiene.test.js",
|
|
23
|
+
"node bin/genesis-harness.js verify-gate"
|
|
24
|
+
],
|
|
3
25
|
"history": [
|
|
4
26
|
{
|
|
5
|
-
"from": "
|
|
6
|
-
"to": "
|
|
7
|
-
"reason": "
|
|
8
|
-
"timestamp": "2026-
|
|
27
|
+
"from": "IMPLEMENTATION",
|
|
28
|
+
"to": "COMPLETED",
|
|
29
|
+
"reason": "Added project feature registry routing, evidence-gated feature completion, lifecycle metrics, observability output, and repository hygiene enforcement.",
|
|
30
|
+
"timestamp": "2026-06-12T16:50:17+07:00",
|
|
31
|
+
"session_id": "2026-06-12-lifecycle-pipeline-hardening"
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
"from": "COMPLETED",
|
|
35
|
+
"to": "COMPLETED",
|
|
36
|
+
"reason": "Prepared README and changelog notes for the v0.1.9 release and verified package contents.",
|
|
37
|
+
"timestamp": "2026-06-11T10:25:00+07:00",
|
|
38
|
+
"session_id": "2026-06-11-release-readme-prep"
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
"from": "IMPLEMENTATION",
|
|
42
|
+
"to": "COMPLETED",
|
|
43
|
+
"reason": "Runtime pipeline now emits API/UI-specific contracts and fixtures for the first scaffolded feature slice.",
|
|
44
|
+
"timestamp": "2026-06-10T10:25:00Z",
|
|
45
|
+
"session_id": "2026-06-10-typed-first-slice-bootstrap"
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
"from": "IMPLEMENTATION",
|
|
49
|
+
"to": "COMPLETED",
|
|
50
|
+
"reason": "Runtime pipeline now auto-scaffolds the first execution-ready feature and persists the active feature checkpoint for resume.",
|
|
51
|
+
"timestamp": "2026-06-10T10:05:00Z",
|
|
52
|
+
"session_id": "2026-06-10-feature-execution-bootstrap"
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
"from": "VERIFICATION",
|
|
56
|
+
"to": "COMPLETED",
|
|
57
|
+
"reason": "Harness drift gate hardening completed with source-of-truth, handoff, state, and CLI smoke verification gates.",
|
|
58
|
+
"timestamp": "2026-06-03T08:31:59+07:00",
|
|
59
|
+
"session_id": "2026-06-03-drift-gate"
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
"from": "VERIFICATION",
|
|
63
|
+
"to": "COMPLETED",
|
|
64
|
+
"reason": "LeanCTX policy, CLI reporting, prompt sentinel thresholds, and portable npm-user command guidance added.",
|
|
65
|
+
"timestamp": "2026-06-03T09:06:31+07:00",
|
|
66
|
+
"session_id": "2026-06-03-leanctx"
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
"from": "VERIFICATION",
|
|
70
|
+
"to": "COMPLETED",
|
|
71
|
+
"reason": "LeanCTX policy auto-seeding added for install and npm postinstall without overwriting project custom policy.",
|
|
72
|
+
"timestamp": "2026-06-03T09:28:41+07:00",
|
|
73
|
+
"session_id": "2026-06-03-leanctx-seed"
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
"from": "COMPLETED",
|
|
77
|
+
"to": "IMPLEMENTATION",
|
|
78
|
+
"reason": "Started full harness evaluation and score fix: L08 feature registry, L11 observability live, L04 instruction size, L03 cold-start, L05 session boundary, L07 scope, L09 victory blocker, L12 known problems.",
|
|
79
|
+
"timestamp": "2026-06-03T02:35:00Z",
|
|
80
|
+
"session_id": "2026-06-03-full-score-fix"
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
"from": "COMPLETED",
|
|
84
|
+
"to": "IMPLEMENTATION",
|
|
85
|
+
"reason": "Implement end-to-end multi-feature project lifecycle",
|
|
86
|
+
"timestamp": "2026-06-12T10:03:52.067Z",
|
|
87
|
+
"session_id": "2026-06-12-lifecycle-pipeline-hardening"
|
|
9
88
|
},
|
|
10
89
|
{
|
|
11
|
-
"from": "
|
|
12
|
-
"to": "
|
|
13
|
-
"reason": "
|
|
14
|
-
"timestamp": "2026-
|
|
90
|
+
"from": "IMPLEMENTATION",
|
|
91
|
+
"to": "VERIFICATION",
|
|
92
|
+
"reason": "Run full lifecycle and repository verification",
|
|
93
|
+
"timestamp": "2026-06-12T10:03:52.118Z",
|
|
94
|
+
"session_id": "2026-06-12-lifecycle-pipeline-hardening"
|
|
15
95
|
},
|
|
16
96
|
{
|
|
17
|
-
"from": "
|
|
97
|
+
"from": "VERIFICATION",
|
|
18
98
|
"to": "IMPLEMENTATION",
|
|
19
|
-
"reason": "
|
|
20
|
-
"timestamp": "2026-
|
|
99
|
+
"reason": "Refresh lifecycle metadata after transition script fix",
|
|
100
|
+
"timestamp": "2026-06-12T10:04:41.327Z",
|
|
101
|
+
"session_id": "2026-06-12-lifecycle-pipeline-hardening"
|
|
21
102
|
},
|
|
22
103
|
{
|
|
23
104
|
"from": "IMPLEMENTATION",
|
|
24
105
|
"to": "VERIFICATION",
|
|
25
|
-
"reason": "
|
|
26
|
-
"timestamp": "2026-
|
|
106
|
+
"reason": "Run full lifecycle and repository verification",
|
|
107
|
+
"timestamp": "2026-06-12T10:04:41.409Z",
|
|
108
|
+
"session_id": "2026-06-12-lifecycle-pipeline-hardening"
|
|
27
109
|
},
|
|
28
110
|
{
|
|
29
111
|
"from": "VERIFICATION",
|
|
112
|
+
"to": "IMPLEMENTATION",
|
|
113
|
+
"reason": "Refresh current-state metadata contract",
|
|
114
|
+
"timestamp": "2026-06-12T10:05:21.693Z",
|
|
115
|
+
"session_id": "2026-06-12-lifecycle-pipeline-hardening"
|
|
116
|
+
},
|
|
117
|
+
{
|
|
118
|
+
"from": "IMPLEMENTATION",
|
|
119
|
+
"to": "VERIFICATION",
|
|
120
|
+
"reason": "Run full lifecycle and repository verification",
|
|
121
|
+
"timestamp": "2026-06-12T10:05:21.810Z",
|
|
122
|
+
"session_id": "2026-06-12-lifecycle-pipeline-hardening"
|
|
123
|
+
},
|
|
124
|
+
{
|
|
125
|
+
"from": "VERIFICATION",
|
|
126
|
+
"to": "RELEASE_READY",
|
|
127
|
+
"reason": "All feature and project verification gates passed",
|
|
128
|
+
"timestamp": "2026-06-12T10:05:54.545Z",
|
|
129
|
+
"session_id": "2026-06-12-lifecycle-pipeline-hardening"
|
|
130
|
+
},
|
|
131
|
+
{
|
|
132
|
+
"from": "RELEASE_READY",
|
|
133
|
+
"to": "COMPLETED",
|
|
134
|
+
"reason": "End-to-end lifecycle pipeline verified with project closure and audit",
|
|
135
|
+
"timestamp": "2026-06-12T10:06:47.807Z",
|
|
136
|
+
"session_id": "2026-06-12-lifecycle-pipeline-hardening"
|
|
137
|
+
},
|
|
138
|
+
{
|
|
139
|
+
"from": "COMPLETED",
|
|
140
|
+
"to": "IMPLEMENTATION",
|
|
141
|
+
"reason": "Refresh completed-state metadata behavior",
|
|
142
|
+
"timestamp": "2026-06-12T10:07:09.243Z",
|
|
143
|
+
"session_id": "2026-06-12-lifecycle-pipeline-hardening"
|
|
144
|
+
},
|
|
145
|
+
{
|
|
146
|
+
"from": "IMPLEMENTATION",
|
|
147
|
+
"to": "VERIFICATION",
|
|
148
|
+
"reason": "Final verification after state writer hardening",
|
|
149
|
+
"timestamp": "2026-06-12T10:07:09.342Z",
|
|
150
|
+
"session_id": "2026-06-12-lifecycle-pipeline-hardening"
|
|
151
|
+
},
|
|
152
|
+
{
|
|
153
|
+
"from": "VERIFICATION",
|
|
154
|
+
"to": "RELEASE_READY",
|
|
155
|
+
"reason": "Canonical verify-gate passed for end-to-end lifecycle",
|
|
156
|
+
"timestamp": "2026-06-12T10:07:09.466Z",
|
|
157
|
+
"session_id": "2026-06-12-lifecycle-pipeline-hardening"
|
|
158
|
+
},
|
|
159
|
+
{
|
|
160
|
+
"from": "RELEASE_READY",
|
|
30
161
|
"to": "COMPLETED",
|
|
31
|
-
"reason": "
|
|
32
|
-
"timestamp": "2026-
|
|
162
|
+
"reason": "End-to-end lifecycle pipeline verified with project closure and audit",
|
|
163
|
+
"timestamp": "2026-06-12T10:07:37.415Z",
|
|
164
|
+
"session_id": "2026-06-12-lifecycle-pipeline-hardening"
|
|
33
165
|
}
|
|
34
166
|
],
|
|
35
|
-
"context": {
|
|
36
|
-
|
|
167
|
+
"context": {
|
|
168
|
+
"package_version": "0.1.9",
|
|
169
|
+
"verification_owner": "scripts/run-evals.sh",
|
|
170
|
+
"context_policy": ".codebase/context-policy.json",
|
|
171
|
+
"evaluation_report": ".codebase/../artifacts/harness_evaluation_report.md"
|
|
172
|
+
},
|
|
173
|
+
"pending_tasks": [],
|
|
174
|
+
"last_updated_at": "2026-06-12T10:07:37.415Z",
|
|
175
|
+
"completed_at": "2026-06-12T10:07:37.415Z"
|
|
37
176
|
}
|
|
@@ -44,3 +44,8 @@ Changing dependency direction silently, documenting intent without tests, and sc
|
|
|
44
44
|
## Recovery workflow
|
|
45
45
|
If architecture drift is found, stop feature work, create a failing boundary test, update the contract, then repair the smallest module slice.
|
|
46
46
|
|
|
47
|
+
## MCP Automation Requirements
|
|
48
|
+
|
|
49
|
+
To ensure that architectural decisions are properly contextualized and persisted across the entire lifecycle of the project, you **MUST** use the following MCP server:
|
|
50
|
+
1. **`@modelcontextprotocol/server-memory`**: Use this MCP tool to automatically query the Knowledge Graph for past architectural decisions, trade-offs, and boundary definitions before making any new system-wide changes. After establishing a new architecture rule, you must save it to the memory graph.
|
|
51
|
+
|
|
@@ -161,13 +161,13 @@ Update `.codebase` memory after meaningful changes.
|
|
|
161
161
|
- Update documentation if behavior changed
|
|
162
162
|
```
|
|
163
163
|
|
|
164
|
-
## Auto-Trigger Workflow (Post /fix-bug)
|
|
164
|
+
## Auto-Trigger Workflow (Post /fix-bug or Heal Directive)
|
|
165
165
|
|
|
166
|
-
When `/fix-bug` completes successfully
|
|
166
|
+
When `/fix-bug` completes successfully, or when you receive the `[AGENT_DIRECTIVE] TESTS FAILED` from `genesis-harness heal`:
|
|
167
167
|
|
|
168
168
|
```yaml
|
|
169
|
-
Hook: PostToolUse → "/fix-bug completed"
|
|
170
|
-
Action: Activate genesis-debug-guide
|
|
169
|
+
Hook: PostToolUse → "/fix-bug completed" OR "[AGENT_DIRECTIVE] TESTS FAILED" printed to stdout.
|
|
170
|
+
Action: Activate genesis-debug-guide. Do NOT stop until tests pass.
|
|
171
171
|
|
|
172
172
|
1. Fix Verification (5 min):
|
|
173
173
|
- Run: npm test (or equivalent)
|
|
@@ -400,6 +400,12 @@ If debugging effort exceeds 30 minutes:
|
|
|
400
400
|
- Check GitHub issues/PRs for related bugs
|
|
401
401
|
```
|
|
402
402
|
|
|
403
|
+
## MCP Automation Requirements
|
|
404
|
+
|
|
405
|
+
To systematically isolate and resolve bugs, you **MUST** use the following MCP servers:
|
|
406
|
+
1. **`@modelcontextprotocol/server-puppeteer`**: For any UI, E2E, or visual bug, use this MCP tool to automatically navigate to the local dev server, interact with the UI, reproduce the bug, capture the browser console logs, and take screenshots for Vision analysis.
|
|
407
|
+
2. **`@modelcontextprotocol/server-memory`**: Query the Knowledge Graph to see if this bug is a known regression or if a similar issue has been resolved in the past.
|
|
408
|
+
|
|
403
409
|
## Integration with Genesis Harness
|
|
404
410
|
|
|
405
411
|
**Works with**:
|