codex-genesis-harness 0.1.0
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/.codex/skills/project-genesis-harness/SKILL.md +727 -0
- package/.codex/skills/project-genesis-harness/agents/openai.yaml +9 -0
- package/.codex/skills/project-genesis-harness/references/planning-schema.md +35 -0
- package/.codex/skills/project-genesis-harness/references/quality-rubric.md +21 -0
- package/.codex/skills/project-genesis-harness/references/research-rubric.md +41 -0
- package/.codex/skills/project-genesis-harness/references/workflows.md +33 -0
- package/.codex/skills/project-genesis-harness/resources/agents-template.md +27 -0
- package/.codex/skills/project-genesis-harness/resources/api-docs-template.md +32 -0
- package/.codex/skills/project-genesis-harness/resources/architecture-template.md +30 -0
- package/.codex/skills/project-genesis-harness/resources/audit-template.md +26 -0
- package/.codex/skills/project-genesis-harness/resources/bug-template.md +34 -0
- package/.codex/skills/project-genesis-harness/resources/check-template.md +21 -0
- package/.codex/skills/project-genesis-harness/resources/conventions-template.md +42 -0
- package/.codex/skills/project-genesis-harness/resources/decision-template.md +33 -0
- package/.codex/skills/project-genesis-harness/resources/design-template.md +26 -0
- package/.codex/skills/project-genesis-harness/resources/escalation-template.md +21 -0
- package/.codex/skills/project-genesis-harness/resources/feature-template.md +49 -0
- package/.codex/skills/project-genesis-harness/resources/integrations-template.md +32 -0
- package/.codex/skills/project-genesis-harness/resources/journeys-template.md +13 -0
- package/.codex/skills/project-genesis-harness/resources/lessons-learned-template.md +12 -0
- package/.codex/skills/project-genesis-harness/resources/observability-template.md +34 -0
- package/.codex/skills/project-genesis-harness/resources/phase-template.md +34 -0
- package/.codex/skills/project-genesis-harness/resources/pitfalls-template.md +22 -0
- package/.codex/skills/project-genesis-harness/resources/planning-tree-template.md +39 -0
- package/.codex/skills/project-genesis-harness/resources/project-template.md +38 -0
- package/.codex/skills/project-genesis-harness/resources/quality-score-template.md +11 -0
- package/.codex/skills/project-genesis-harness/resources/requirements-template.md +26 -0
- package/.codex/skills/project-genesis-harness/resources/research-template.md +26 -0
- package/.codex/skills/project-genesis-harness/resources/review-template.md +22 -0
- package/.codex/skills/project-genesis-harness/resources/spec-changelog-template.md +6 -0
- package/.codex/skills/project-genesis-harness/resources/stack-template.md +33 -0
- package/.codex/skills/project-genesis-harness/resources/verification-template.md +26 -0
- package/.codex/skills/project-genesis-harness/scripts/check-architecture-boundaries.sh +23 -0
- package/.codex/skills/project-genesis-harness/scripts/check-docs-sync.sh +24 -0
- package/.codex/skills/project-genesis-harness/scripts/check-no-debug-logs.sh +21 -0
- package/.codex/skills/project-genesis-harness/scripts/check-required-planning-files.sh +46 -0
- package/.codex/skills/project-genesis-harness/scripts/check-spec-changelog.sh +24 -0
- package/.codex/skills/project-genesis-harness/scripts/check-task-tracking.sh +25 -0
- package/.codex/skills/project-genesis-harness/scripts/create-adr.sh +74 -0
- package/.codex/skills/project-genesis-harness/scripts/create-bug.sh +160 -0
- package/.codex/skills/project-genesis-harness/scripts/create-feature.sh +217 -0
- package/.codex/skills/project-genesis-harness/scripts/detect-stack.sh +26 -0
- package/.codex/skills/project-genesis-harness/scripts/init-planning.sh +719 -0
- package/.codex/skills/project-genesis-harness/scripts/list-changed-files.sh +12 -0
- package/.codex/skills/project-genesis-harness/scripts/run-verification.sh +47 -0
- package/.codex/skills/project-genesis-harness/scripts/update-state.sh +33 -0
- package/.codex-plugin/plugin.json +35 -0
- package/LICENSE +22 -0
- package/README.md +181 -0
- package/VERSION +2 -0
- package/bin/genesis-harness.js +164 -0
- package/package.json +37 -0
- package/scripts/install.sh +69 -0
- package/scripts/run-evals.sh +52 -0
- package/scripts/uninstall.sh +52 -0
- package/scripts/verify.sh +109 -0
|
@@ -0,0 +1,719 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
set -euo pipefail
|
|
3
|
+
|
|
4
|
+
confirmed="${PROJECT_BRIEF_CONFIRMED:-0}"
|
|
5
|
+
root="."
|
|
6
|
+
|
|
7
|
+
while [ "$#" -gt 0 ]; do
|
|
8
|
+
case "$1" in
|
|
9
|
+
--confirmed)
|
|
10
|
+
confirmed="1"
|
|
11
|
+
shift
|
|
12
|
+
;;
|
|
13
|
+
--root)
|
|
14
|
+
root="${2:-}"
|
|
15
|
+
[ -n "$root" ] || { echo "--root requires a path" >&2; exit 2; }
|
|
16
|
+
shift 2
|
|
17
|
+
;;
|
|
18
|
+
--help|-h)
|
|
19
|
+
echo "Usage: $0 --confirmed [--root path]" >&2
|
|
20
|
+
echo "Or: PROJECT_BRIEF_CONFIRMED=1 $0 [--root path]" >&2
|
|
21
|
+
exit 0
|
|
22
|
+
;;
|
|
23
|
+
*)
|
|
24
|
+
root="$1"
|
|
25
|
+
shift
|
|
26
|
+
;;
|
|
27
|
+
esac
|
|
28
|
+
done
|
|
29
|
+
|
|
30
|
+
if [ "$confirmed" != "1" ]; then
|
|
31
|
+
cat >&2 <<'EOF'
|
|
32
|
+
Refusing to initialize .planning/ because project intent has not been confirmed.
|
|
33
|
+
|
|
34
|
+
First summarize the detected project brief and get user confirmation.
|
|
35
|
+
Then rerun with:
|
|
36
|
+
init-planning.sh --confirmed [--root path]
|
|
37
|
+
|
|
38
|
+
For an explicit blank harness, set PROJECT_BRIEF_CONFIRMED=1.
|
|
39
|
+
EOF
|
|
40
|
+
exit 2
|
|
41
|
+
fi
|
|
42
|
+
|
|
43
|
+
cd "$root"
|
|
44
|
+
|
|
45
|
+
mkdir -p \
|
|
46
|
+
.planning/diagrams \
|
|
47
|
+
.planning/research \
|
|
48
|
+
.planning/decisions \
|
|
49
|
+
.planning/phases/01-foundation \
|
|
50
|
+
.planning/features \
|
|
51
|
+
.planning/bugs \
|
|
52
|
+
.planning/audits \
|
|
53
|
+
.planning/checks \
|
|
54
|
+
.planning/quick \
|
|
55
|
+
.planning/codebase \
|
|
56
|
+
.planning/templates
|
|
57
|
+
|
|
58
|
+
write_if_missing() {
|
|
59
|
+
local path="$1"
|
|
60
|
+
shift
|
|
61
|
+
if [ ! -e "$path" ]; then
|
|
62
|
+
cat > "$path"
|
|
63
|
+
else
|
|
64
|
+
cat >/dev/null
|
|
65
|
+
fi
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
write_if_missing AGENTS.md <<'EOF'
|
|
69
|
+
# AGENTS.md
|
|
70
|
+
|
|
71
|
+
This repository uses the Project Genesis Harness.
|
|
72
|
+
|
|
73
|
+
Before doing feature work, bug fixes, refactors, or architecture changes, read:
|
|
74
|
+
|
|
75
|
+
1. `.planning/SUMMARY.md`
|
|
76
|
+
2. `.planning/STATE.md`
|
|
77
|
+
3. `.planning/PROJECT.md`
|
|
78
|
+
4. `.planning/REQUIREMENTS.md`
|
|
79
|
+
5. `.planning/STACK.md`
|
|
80
|
+
6. `.planning/ARCHITECTURE.md`
|
|
81
|
+
7. `.planning/CONVENTIONS.md`
|
|
82
|
+
8. `.planning/PITFALLS.md`
|
|
83
|
+
9. `.planning/LESSONS_LEARNED.md`
|
|
84
|
+
|
|
85
|
+
For new features, create a folder under `.planning/features/`.
|
|
86
|
+
For bug fixes, create a folder under `.planning/bugs/`.
|
|
87
|
+
For major decisions, create an ADR under `.planning/decisions/`.
|
|
88
|
+
|
|
89
|
+
Do not claim completion unless verification passed, docs were synchronized, task tracking was updated, and changed files were reviewed.
|
|
90
|
+
EOF
|
|
91
|
+
|
|
92
|
+
write_if_missing .planning/PROJECT.md <<'EOF'
|
|
93
|
+
# Project
|
|
94
|
+
|
|
95
|
+
## What This Project Is
|
|
96
|
+
|
|
97
|
+
TBD
|
|
98
|
+
|
|
99
|
+
## Target Users
|
|
100
|
+
|
|
101
|
+
TBD
|
|
102
|
+
|
|
103
|
+
## Core Value
|
|
104
|
+
|
|
105
|
+
TBD
|
|
106
|
+
|
|
107
|
+
## Product Scope
|
|
108
|
+
|
|
109
|
+
- [ ] TBD
|
|
110
|
+
|
|
111
|
+
## Out Of Scope
|
|
112
|
+
|
|
113
|
+
- [ ] TBD
|
|
114
|
+
|
|
115
|
+
## Constraints
|
|
116
|
+
|
|
117
|
+
- [ ] TBD
|
|
118
|
+
|
|
119
|
+
## Assumptions
|
|
120
|
+
|
|
121
|
+
- [ ] TBD
|
|
122
|
+
|
|
123
|
+
## Current Milestone
|
|
124
|
+
|
|
125
|
+
TBD
|
|
126
|
+
|
|
127
|
+
## Success Criteria
|
|
128
|
+
|
|
129
|
+
- [ ] TBD
|
|
130
|
+
EOF
|
|
131
|
+
|
|
132
|
+
write_if_missing .planning/REQUIREMENTS.md <<'EOF'
|
|
133
|
+
# Requirements
|
|
134
|
+
|
|
135
|
+
## Functional Requirements
|
|
136
|
+
|
|
137
|
+
- [ ] TBD
|
|
138
|
+
|
|
139
|
+
## Non-Functional Requirements
|
|
140
|
+
|
|
141
|
+
- [ ] TBD
|
|
142
|
+
|
|
143
|
+
## User Stories
|
|
144
|
+
|
|
145
|
+
- [ ] As a user, I want TBD so that TBD.
|
|
146
|
+
|
|
147
|
+
## Acceptance Criteria
|
|
148
|
+
|
|
149
|
+
- [ ] TBD
|
|
150
|
+
|
|
151
|
+
## Edge Cases
|
|
152
|
+
|
|
153
|
+
- [ ] TBD
|
|
154
|
+
|
|
155
|
+
## Known Unknowns
|
|
156
|
+
|
|
157
|
+
- [ ] TBD
|
|
158
|
+
EOF
|
|
159
|
+
|
|
160
|
+
write_if_missing .planning/ROADMAP.md <<'EOF'
|
|
161
|
+
# Roadmap
|
|
162
|
+
|
|
163
|
+
| Phase | Status | Dependencies | Acceptance Criteria |
|
|
164
|
+
|---|---|---|---|
|
|
165
|
+
| 01 Foundation | [ ] | None | Planning harness initialized and verified |
|
|
166
|
+
EOF
|
|
167
|
+
|
|
168
|
+
write_if_missing .planning/STATE.md <<'EOF'
|
|
169
|
+
# State
|
|
170
|
+
|
|
171
|
+
Current project state: [ ] Initialized planning harness pending product confirmation.
|
|
172
|
+
Current phase: 01 Foundation
|
|
173
|
+
Current feature or bug: None
|
|
174
|
+
Last completed task: None
|
|
175
|
+
Next task: Confirm project brief and refine planning docs.
|
|
176
|
+
Blocked items: None
|
|
177
|
+
Latest verification result: Not run
|
|
178
|
+
EOF
|
|
179
|
+
|
|
180
|
+
write_if_missing .planning/STACK.md <<'EOF'
|
|
181
|
+
# Stack
|
|
182
|
+
|
|
183
|
+
Language: TBD
|
|
184
|
+
Framework: TBD
|
|
185
|
+
Runtime: TBD
|
|
186
|
+
Database: TBD
|
|
187
|
+
Package manager: TBD
|
|
188
|
+
Test framework: TBD
|
|
189
|
+
Lint/typecheck tools: TBD
|
|
190
|
+
Deployment target: TBD
|
|
191
|
+
Version constraints: TBD
|
|
192
|
+
|
|
193
|
+
## Local Development Commands
|
|
194
|
+
|
|
195
|
+
```sh
|
|
196
|
+
# start
|
|
197
|
+
# test
|
|
198
|
+
# lint
|
|
199
|
+
# typecheck
|
|
200
|
+
# build
|
|
201
|
+
```
|
|
202
|
+
EOF
|
|
203
|
+
|
|
204
|
+
write_if_missing .planning/ARCHITECTURE.md <<'EOF'
|
|
205
|
+
# Architecture
|
|
206
|
+
|
|
207
|
+
## High-Level Architecture
|
|
208
|
+
|
|
209
|
+
TBD
|
|
210
|
+
|
|
211
|
+
## Module Boundaries
|
|
212
|
+
|
|
213
|
+
- [ ] TBD
|
|
214
|
+
|
|
215
|
+
## Data Flow
|
|
216
|
+
|
|
217
|
+
TBD
|
|
218
|
+
|
|
219
|
+
## Dependency Direction
|
|
220
|
+
|
|
221
|
+
TBD
|
|
222
|
+
|
|
223
|
+
## Service Boundaries
|
|
224
|
+
|
|
225
|
+
TBD
|
|
226
|
+
|
|
227
|
+
## System Design Principles
|
|
228
|
+
|
|
229
|
+
- [ ] TBD
|
|
230
|
+
|
|
231
|
+
## Forbidden Architecture Patterns
|
|
232
|
+
|
|
233
|
+
- [ ] TBD
|
|
234
|
+
EOF
|
|
235
|
+
|
|
236
|
+
write_if_missing .planning/DESIGN.md <<'EOF'
|
|
237
|
+
# Design
|
|
238
|
+
|
|
239
|
+
## UX Principles
|
|
240
|
+
|
|
241
|
+
- [ ] TBD
|
|
242
|
+
|
|
243
|
+
## Screens / Pages
|
|
244
|
+
|
|
245
|
+
- [ ] TBD
|
|
246
|
+
|
|
247
|
+
## Component Conventions
|
|
248
|
+
|
|
249
|
+
- [ ] TBD
|
|
250
|
+
|
|
251
|
+
## State Management Rules
|
|
252
|
+
|
|
253
|
+
- [ ] TBD
|
|
254
|
+
|
|
255
|
+
## Accessibility Notes
|
|
256
|
+
|
|
257
|
+
- [ ] TBD
|
|
258
|
+
|
|
259
|
+
## Design Constraints
|
|
260
|
+
|
|
261
|
+
- [ ] TBD
|
|
262
|
+
EOF
|
|
263
|
+
|
|
264
|
+
write_if_missing .planning/API_DOCS.md <<'EOF'
|
|
265
|
+
# API Docs
|
|
266
|
+
|
|
267
|
+
| Method | Path | Purpose | Auth |
|
|
268
|
+
|---|---|---|---|
|
|
269
|
+
| TBD | TBD | TBD | TBD |
|
|
270
|
+
EOF
|
|
271
|
+
|
|
272
|
+
write_if_missing .planning/INTEGRATIONS.md <<'EOF'
|
|
273
|
+
# Integrations
|
|
274
|
+
|
|
275
|
+
## External Services
|
|
276
|
+
|
|
277
|
+
- [ ] TBD
|
|
278
|
+
|
|
279
|
+
## Environment Variables
|
|
280
|
+
|
|
281
|
+
| Name | Purpose | Required | Notes |
|
|
282
|
+
|---|---|---:|---|
|
|
283
|
+
| TBD | TBD | TBD | TBD |
|
|
284
|
+
EOF
|
|
285
|
+
|
|
286
|
+
write_if_missing .planning/CONVENTIONS.md <<'EOF'
|
|
287
|
+
# Conventions
|
|
288
|
+
|
|
289
|
+
## Patterns To Follow
|
|
290
|
+
|
|
291
|
+
- [ ] TBD
|
|
292
|
+
|
|
293
|
+
## Patterns To Avoid
|
|
294
|
+
|
|
295
|
+
- [ ] TBD
|
|
296
|
+
EOF
|
|
297
|
+
|
|
298
|
+
write_if_missing .planning/PITFALLS.md <<'EOF'
|
|
299
|
+
# Pitfalls
|
|
300
|
+
|
|
301
|
+
- [ ] TBD
|
|
302
|
+
EOF
|
|
303
|
+
|
|
304
|
+
write_if_missing .planning/LESSONS_LEARNED.md <<'EOF'
|
|
305
|
+
# Lessons Learned
|
|
306
|
+
|
|
307
|
+
No bug lessons recorded yet.
|
|
308
|
+
EOF
|
|
309
|
+
|
|
310
|
+
write_if_missing .planning/SPEC_CHANGELOG.md <<'EOF'
|
|
311
|
+
# Spec Changelog
|
|
312
|
+
|
|
313
|
+
| Date/Time | Change | Reason | Impacted Docs | Impacted Tests | Migration Notes |
|
|
314
|
+
|---|---|---|---|---|---|
|
|
315
|
+
| TBD | Initial planning harness | Project initialization | All planning docs | Initial checks | None |
|
|
316
|
+
EOF
|
|
317
|
+
|
|
318
|
+
write_if_missing .planning/FEATURE_INDEX.md <<'EOF'
|
|
319
|
+
# Feature Index
|
|
320
|
+
|
|
321
|
+
| Feature | Status | Phase | Path | Notes |
|
|
322
|
+
|---|---|---|---|---|
|
|
323
|
+
| Foundation | [ ] | 01 | phases/01-foundation | Pending |
|
|
324
|
+
EOF
|
|
325
|
+
|
|
326
|
+
write_if_missing .planning/CHANGE_IMPACT_MATRIX.md <<'EOF'
|
|
327
|
+
# Change Impact Matrix
|
|
328
|
+
|
|
329
|
+
| Change Type | Required Docs |
|
|
330
|
+
|---|---|
|
|
331
|
+
| API behavior | API_DOCS.md, REQUIREMENTS.md, SPEC_CHANGELOG.md |
|
|
332
|
+
| Database schema | ARCHITECTURE.md, API_DOCS.md, diagrams/database-erd.mmd, SPEC_CHANGELOG.md |
|
|
333
|
+
| UI behavior | DESIGN.md, REQUIREMENTS.md, SPEC_CHANGELOG.md |
|
|
334
|
+
| Integration | INTEGRATIONS.md, STACK.md, SPEC_CHANGELOG.md |
|
|
335
|
+
| Architecture | ARCHITECTURE.md, diagrams/*.mmd, decisions/*.md |
|
|
336
|
+
| Convention | CONVENTIONS.md, PITFALLS.md |
|
|
337
|
+
| Environment variable | INTEGRATIONS.md, STACK.md, SPEC_CHANGELOG.md |
|
|
338
|
+
| Security behavior | ARCHITECTURE.md, API_DOCS.md, CONVENTIONS.md, SPEC_CHANGELOG.md |
|
|
339
|
+
EOF
|
|
340
|
+
|
|
341
|
+
write_if_missing .planning/QUALITY_SCORE.md <<'EOF'
|
|
342
|
+
# Quality Score
|
|
343
|
+
|
|
344
|
+
| Area | Score | Issues | Next Action |
|
|
345
|
+
|---|---:|---|---|
|
|
346
|
+
| Architecture | 0/10 | TBD | TBD |
|
|
347
|
+
| Tests | 0/10 | TBD | TBD |
|
|
348
|
+
| Docs Sync | 0/10 | TBD | TBD |
|
|
349
|
+
| Security | 0/10 | TBD | TBD |
|
|
350
|
+
| Maintainability | 0/10 | TBD | TBD |
|
|
351
|
+
| Observability | 0/10 | TBD | TBD |
|
|
352
|
+
EOF
|
|
353
|
+
|
|
354
|
+
write_if_missing .planning/ESCALATION.md <<'EOF'
|
|
355
|
+
# Escalation
|
|
356
|
+
|
|
357
|
+
Codex must stop and ask the user before ambiguous product, security, destructive migration, paid-service, data-loss, compliance, or architecture-conflict decisions.
|
|
358
|
+
|
|
359
|
+
## Escalation Log
|
|
360
|
+
|
|
361
|
+
| Date/Time | Reason | Decision Needed | Resolution |
|
|
362
|
+
|---|---|---|---|
|
|
363
|
+
| TBD | TBD | TBD | TBD |
|
|
364
|
+
EOF
|
|
365
|
+
|
|
366
|
+
write_if_missing .planning/OBSERVABILITY.md <<'EOF'
|
|
367
|
+
# Observability
|
|
368
|
+
|
|
369
|
+
Logs: TBD
|
|
370
|
+
Metrics: TBD
|
|
371
|
+
Traces: TBD
|
|
372
|
+
Error reporting: TBD
|
|
373
|
+
Health checks: TBD
|
|
374
|
+
Debug commands: TBD
|
|
375
|
+
Local inspection commands: TBD
|
|
376
|
+
EOF
|
|
377
|
+
|
|
378
|
+
write_if_missing .planning/SMOKE_TESTS.md <<'EOF'
|
|
379
|
+
# Smoke Tests
|
|
380
|
+
|
|
381
|
+
- [ ] Start app
|
|
382
|
+
- [ ] Run health check
|
|
383
|
+
- [ ] Open main page or CLI command
|
|
384
|
+
- [ ] Test one core flow
|
|
385
|
+
- [ ] Verify logs do not show critical errors
|
|
386
|
+
EOF
|
|
387
|
+
|
|
388
|
+
write_if_missing .planning/JOURNEYS.md <<'EOF'
|
|
389
|
+
# Journeys
|
|
390
|
+
|
|
391
|
+
## Journey: First Core Flow
|
|
392
|
+
|
|
393
|
+
Steps:
|
|
394
|
+
1. TBD
|
|
395
|
+
|
|
396
|
+
Expected UI:
|
|
397
|
+
Expected API calls:
|
|
398
|
+
Expected DB state:
|
|
399
|
+
Expected logs:
|
|
400
|
+
Verification command:
|
|
401
|
+
EOF
|
|
402
|
+
|
|
403
|
+
write_if_missing .planning/SUMMARY.md <<'EOF'
|
|
404
|
+
# Summary
|
|
405
|
+
|
|
406
|
+
## Current Focus
|
|
407
|
+
|
|
408
|
+
- [ ] Initialize and confirm planning harness.
|
|
409
|
+
|
|
410
|
+
## Recent Changes
|
|
411
|
+
|
|
412
|
+
- [ ] Initial planning skeleton created.
|
|
413
|
+
|
|
414
|
+
## Next Recommended Task
|
|
415
|
+
|
|
416
|
+
- [ ] Confirm product brief and fill required planning docs.
|
|
417
|
+
EOF
|
|
418
|
+
|
|
419
|
+
write_if_missing .planning/config.json <<'EOF'
|
|
420
|
+
{
|
|
421
|
+
"workflow": {
|
|
422
|
+
"init_requires_confirmation": true,
|
|
423
|
+
"research_before_plan": true,
|
|
424
|
+
"best_practice_research": true,
|
|
425
|
+
"diagram_before_implementation": true,
|
|
426
|
+
"test_first": true,
|
|
427
|
+
"task_tracking": true,
|
|
428
|
+
"docs_sync_required": true,
|
|
429
|
+
"lessons_read_required": true,
|
|
430
|
+
"code_review": true,
|
|
431
|
+
"cleanup_pass": true,
|
|
432
|
+
"mechanical_checks": true,
|
|
433
|
+
"audit_supported": true,
|
|
434
|
+
"escalation_required": true
|
|
435
|
+
},
|
|
436
|
+
"tracking": {
|
|
437
|
+
"todo": "[ ]",
|
|
438
|
+
"in_progress": "[~]",
|
|
439
|
+
"done": "[x]",
|
|
440
|
+
"blocked": "[!]"
|
|
441
|
+
},
|
|
442
|
+
"required_reads_before_work": [
|
|
443
|
+
".planning/SUMMARY.md",
|
|
444
|
+
".planning/STATE.md",
|
|
445
|
+
".planning/PITFALLS.md",
|
|
446
|
+
".planning/LESSONS_LEARNED.md",
|
|
447
|
+
".planning/CONVENTIONS.md",
|
|
448
|
+
".planning/ARCHITECTURE.md",
|
|
449
|
+
".planning/STACK.md"
|
|
450
|
+
],
|
|
451
|
+
"docs_sync_targets": [
|
|
452
|
+
".planning/REQUIREMENTS.md",
|
|
453
|
+
".planning/API_DOCS.md",
|
|
454
|
+
".planning/ARCHITECTURE.md",
|
|
455
|
+
".planning/DESIGN.md",
|
|
456
|
+
".planning/INTEGRATIONS.md",
|
|
457
|
+
".planning/CONVENTIONS.md",
|
|
458
|
+
".planning/ROADMAP.md",
|
|
459
|
+
".planning/STATE.md",
|
|
460
|
+
".planning/SPEC_CHANGELOG.md",
|
|
461
|
+
".planning/QUALITY_SCORE.md",
|
|
462
|
+
".planning/OBSERVABILITY.md",
|
|
463
|
+
".planning/JOURNEYS.md",
|
|
464
|
+
".planning/SMOKE_TESTS.md"
|
|
465
|
+
],
|
|
466
|
+
"mermaid_required_for": [
|
|
467
|
+
"architecture",
|
|
468
|
+
"database",
|
|
469
|
+
"api_flow",
|
|
470
|
+
"integration",
|
|
471
|
+
"deployment",
|
|
472
|
+
"feature_flow",
|
|
473
|
+
"auth_flow",
|
|
474
|
+
"background_job_flow"
|
|
475
|
+
],
|
|
476
|
+
"escalate_when": [
|
|
477
|
+
"ambiguous_product_intent",
|
|
478
|
+
"conflicting_requirements",
|
|
479
|
+
"breaking_api_change",
|
|
480
|
+
"destructive_migration",
|
|
481
|
+
"possible_user_data_loss",
|
|
482
|
+
"missing_credentials",
|
|
483
|
+
"paid_external_service_required",
|
|
484
|
+
"unclear_security_tradeoff",
|
|
485
|
+
"legal_or_compliance_risk"
|
|
486
|
+
]
|
|
487
|
+
}
|
|
488
|
+
EOF
|
|
489
|
+
|
|
490
|
+
for diagram in system-context container-architecture deployment-flow roadmap-flow; do
|
|
491
|
+
write_if_missing ".planning/diagrams/$diagram.mmd" <<EOF
|
|
492
|
+
flowchart LR
|
|
493
|
+
A["TBD"] --> B["TBD"]
|
|
494
|
+
EOF
|
|
495
|
+
done
|
|
496
|
+
|
|
497
|
+
write_if_missing .planning/diagrams/database-erd.mmd <<'EOF'
|
|
498
|
+
erDiagram
|
|
499
|
+
ENTITY {
|
|
500
|
+
string id
|
|
501
|
+
}
|
|
502
|
+
EOF
|
|
503
|
+
|
|
504
|
+
write_if_missing .planning/research/SUMMARY.md <<'EOF'
|
|
505
|
+
# Research Summary
|
|
506
|
+
|
|
507
|
+
- [ ] TBD
|
|
508
|
+
EOF
|
|
509
|
+
write_if_missing .planning/research/best-practices.md <<'EOF'
|
|
510
|
+
# Best Practices Research
|
|
511
|
+
|
|
512
|
+
- [ ] TBD
|
|
513
|
+
EOF
|
|
514
|
+
write_if_missing .planning/research/github-patterns.md <<'EOF'
|
|
515
|
+
# GitHub Patterns Research
|
|
516
|
+
|
|
517
|
+
- [ ] TBD
|
|
518
|
+
EOF
|
|
519
|
+
write_if_missing .planning/research/alternatives.md <<'EOF'
|
|
520
|
+
# Alternatives
|
|
521
|
+
|
|
522
|
+
- [ ] TBD
|
|
523
|
+
EOF
|
|
524
|
+
|
|
525
|
+
write_if_missing .planning/decisions/ADR-001-tech-stack.md <<'EOF'
|
|
526
|
+
# ADR-001: Tech Stack
|
|
527
|
+
|
|
528
|
+
Status: Proposed
|
|
529
|
+
|
|
530
|
+
## Context
|
|
531
|
+
|
|
532
|
+
TBD
|
|
533
|
+
|
|
534
|
+
## Decision
|
|
535
|
+
|
|
536
|
+
TBD
|
|
537
|
+
|
|
538
|
+
## Alternatives Considered
|
|
539
|
+
|
|
540
|
+
- [ ] TBD
|
|
541
|
+
|
|
542
|
+
## Consequences
|
|
543
|
+
|
|
544
|
+
- [ ] TBD
|
|
545
|
+
|
|
546
|
+
## Risks
|
|
547
|
+
|
|
548
|
+
- [ ] TBD
|
|
549
|
+
|
|
550
|
+
## Mitigation
|
|
551
|
+
|
|
552
|
+
- [ ] TBD
|
|
553
|
+
|
|
554
|
+
## Verification Evidence
|
|
555
|
+
|
|
556
|
+
TBD
|
|
557
|
+
EOF
|
|
558
|
+
|
|
559
|
+
write_if_missing .planning/decisions/ADR-002-architecture.md <<'EOF'
|
|
560
|
+
# ADR-002: Architecture
|
|
561
|
+
|
|
562
|
+
Status: Proposed
|
|
563
|
+
|
|
564
|
+
## Context
|
|
565
|
+
|
|
566
|
+
TBD
|
|
567
|
+
|
|
568
|
+
## Decision
|
|
569
|
+
|
|
570
|
+
TBD
|
|
571
|
+
|
|
572
|
+
## Alternatives Considered
|
|
573
|
+
|
|
574
|
+
- [ ] TBD
|
|
575
|
+
|
|
576
|
+
## Consequences
|
|
577
|
+
|
|
578
|
+
- [ ] TBD
|
|
579
|
+
|
|
580
|
+
## Risks
|
|
581
|
+
|
|
582
|
+
- [ ] TBD
|
|
583
|
+
|
|
584
|
+
## Mitigation
|
|
585
|
+
|
|
586
|
+
- [ ] TBD
|
|
587
|
+
|
|
588
|
+
## Verification Evidence
|
|
589
|
+
|
|
590
|
+
TBD
|
|
591
|
+
EOF
|
|
592
|
+
|
|
593
|
+
write_if_missing .planning/phases/01-foundation/PLAN.md <<'EOF'
|
|
594
|
+
# 01 Foundation Plan
|
|
595
|
+
|
|
596
|
+
- [ ] Confirm project brief
|
|
597
|
+
- [ ] Complete core planning docs
|
|
598
|
+
- [ ] Establish verification commands
|
|
599
|
+
- [ ] Run initial audit
|
|
600
|
+
EOF
|
|
601
|
+
write_if_missing .planning/phases/01-foundation/TASKS.md <<'EOF'
|
|
602
|
+
# 01 Foundation Tasks
|
|
603
|
+
|
|
604
|
+
- [ ] Confirm product intent
|
|
605
|
+
- [ ] Inspect repository
|
|
606
|
+
- [ ] Initialize `.planning/`
|
|
607
|
+
- [ ] Fill stack and architecture docs
|
|
608
|
+
- [ ] Run verification scripts
|
|
609
|
+
- [ ] Review planning harness
|
|
610
|
+
EOF
|
|
611
|
+
write_if_missing .planning/phases/01-foundation/TESTS.md <<'EOF'
|
|
612
|
+
# 01 Foundation Tests
|
|
613
|
+
|
|
614
|
+
- [ ] Required planning files exist
|
|
615
|
+
- [ ] Task tracking exists
|
|
616
|
+
- [ ] Base diagrams exist
|
|
617
|
+
EOF
|
|
618
|
+
write_if_missing .planning/phases/01-foundation/VERIFICATION.md <<'EOF'
|
|
619
|
+
# 01 Foundation Verification
|
|
620
|
+
|
|
621
|
+
- [ ] Run required planning file check
|
|
622
|
+
- [ ] Run task tracking check
|
|
623
|
+
|
|
624
|
+
```sh
|
|
625
|
+
.planning/scripts/check-required-planning-files.sh .
|
|
626
|
+
.planning/scripts/check-task-tracking.sh .
|
|
627
|
+
```
|
|
628
|
+
EOF
|
|
629
|
+
write_if_missing .planning/phases/01-foundation/REVIEW.md <<'EOF'
|
|
630
|
+
# 01 Foundation Review
|
|
631
|
+
|
|
632
|
+
- [ ] Changed files reviewed
|
|
633
|
+
- [ ] Unnecessary files removed
|
|
634
|
+
- [ ] Docs synchronized
|
|
635
|
+
EOF
|
|
636
|
+
|
|
637
|
+
write_if_missing .planning/features/FEATURE_TEMPLATE.md <<'EOF'
|
|
638
|
+
# Feature Template
|
|
639
|
+
|
|
640
|
+
Create feature folders as `.planning/features/NNN-feature-slug/` with SPEC.md, IMPACT.md, PLAN.md, TEST_CONTRACT.md, TASKS.md, VERIFICATION.md, REVIEW.md, and DIAGRAM.mmd.
|
|
641
|
+
EOF
|
|
642
|
+
write_if_missing .planning/bugs/BUG_TEMPLATE.md <<'EOF'
|
|
643
|
+
# Bug Template
|
|
644
|
+
|
|
645
|
+
Create bug folders as `.planning/bugs/NNN-bug-slug/` with REPORT.md, ROOT_CAUSE.md, PLAN.md, TEST_CONTRACT.md, TASKS.md, VERIFICATION.md, and REVIEW.md.
|
|
646
|
+
EOF
|
|
647
|
+
|
|
648
|
+
for audit in AUDIT_TEMPLATE architecture-drift dependency-audit dead-code-audit security-audit docs-freshness-audit; do
|
|
649
|
+
write_if_missing ".planning/audits/$audit.md" <<EOF
|
|
650
|
+
# ${audit}
|
|
651
|
+
|
|
652
|
+
- [ ] TBD
|
|
653
|
+
EOF
|
|
654
|
+
done
|
|
655
|
+
|
|
656
|
+
write_if_missing .planning/checks/CHECKS.md <<'EOF'
|
|
657
|
+
# Checks
|
|
658
|
+
|
|
659
|
+
- [ ] Required planning files
|
|
660
|
+
- [ ] Task tracking
|
|
661
|
+
- [ ] Debug logs
|
|
662
|
+
- [ ] Spec changelog
|
|
663
|
+
- [ ] Architecture boundaries
|
|
664
|
+
- [ ] Project verification
|
|
665
|
+
EOF
|
|
666
|
+
for check in lint typecheck test build docs-sync architecture-fitness; do
|
|
667
|
+
write_if_missing ".planning/checks/$check.md" <<EOF
|
|
668
|
+
# $check
|
|
669
|
+
|
|
670
|
+
Command:
|
|
671
|
+
|
|
672
|
+
\`\`\`sh
|
|
673
|
+
# TBD
|
|
674
|
+
\`\`\`
|
|
675
|
+
|
|
676
|
+
Pass criteria:
|
|
677
|
+
- [ ] TBD
|
|
678
|
+
EOF
|
|
679
|
+
done
|
|
680
|
+
|
|
681
|
+
write_if_missing .planning/quick/quick-fix-template.md <<'EOF'
|
|
682
|
+
# Quick Fix Template
|
|
683
|
+
|
|
684
|
+
- [ ] Confirm scope
|
|
685
|
+
- [ ] Reproduce or define verification
|
|
686
|
+
- [ ] Make minimal change
|
|
687
|
+
- [ ] Verify
|
|
688
|
+
- [ ] Update docs/tracking if behavior changed
|
|
689
|
+
EOF
|
|
690
|
+
write_if_missing .planning/quick/scratch.md <<'EOF'
|
|
691
|
+
# Scratch
|
|
692
|
+
|
|
693
|
+
Temporary notes. Promote durable knowledge to the proper planning file before completion.
|
|
694
|
+
EOF
|
|
695
|
+
|
|
696
|
+
for file in MAP ENTRYPOINTS MODULES DEPENDENCIES HOTSPOTS; do
|
|
697
|
+
write_if_missing ".planning/codebase/$file.md" <<EOF
|
|
698
|
+
# $file
|
|
699
|
+
|
|
700
|
+
- [ ] TBD
|
|
701
|
+
EOF
|
|
702
|
+
done
|
|
703
|
+
|
|
704
|
+
for template in adr-template phase-plan-template task-template test-contract-template review-template bug-lesson-template feature-template bug-template audit-template check-template; do
|
|
705
|
+
write_if_missing ".planning/templates/$template.md" <<EOF
|
|
706
|
+
# $template
|
|
707
|
+
|
|
708
|
+
- [ ] TBD
|
|
709
|
+
EOF
|
|
710
|
+
done
|
|
711
|
+
|
|
712
|
+
mkdir -p .planning/scripts
|
|
713
|
+
script_source="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
714
|
+
for script in "$script_source"/*.sh; do
|
|
715
|
+
cp "$script" ".planning/scripts/$(basename "$script")"
|
|
716
|
+
chmod +x ".planning/scripts/$(basename "$script")"
|
|
717
|
+
done
|
|
718
|
+
|
|
719
|
+
echo "Project Genesis Harness planning files initialized."
|