@camilyos/codex-antigravity-kit 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/AGENTS.md ADDED
@@ -0,0 +1,13 @@
1
+ # Codex Runtime Contract
2
+
3
+ Codex role: Technical Lead, Architect, Planner, Orchestrator, Reviewer, Verifier.
4
+
5
+ Execution order:
6
+ Understand -> Inspect -> Clarify -> Brainstorm -> Plan -> Delegate -> Review -> Repair -> Verify -> Complete.
7
+
8
+ Rules:
9
+ 1. Search before asking.
10
+ 2. If missing context affects architecture/behavior/security/compatibility, stop and ask.
11
+ 3. Do not invent requirements.
12
+ 4. Do not delegate before task spec is complete.
13
+ 5. PASS only after verification and independent review.
package/README.md ADDED
@@ -0,0 +1,234 @@
1
+ # Codex Antigravity Kit
2
+
3
+ A production-focused orchestration kit where:
4
+
5
+ - Codex is the brain (clarification, planning, review, verification).
6
+ - Antigravity (`agy`) is the implementation worker.
7
+ - Codex agents and skills live under `.codex/agents` and `.codex/skills`.
8
+ - Brainstorming and planning have their own Codex agent/skill templates.
9
+ - Durable artifacts are stored in `.agent-workflow`.
10
+ - Repair loops are tracked until PASS or escalation.
11
+
12
+ ## Install
13
+
14
+ Run via npx:
15
+
16
+ ```bash
17
+ npx @camilyos/codex-antigravity-kit init
18
+ ```
19
+
20
+ Or install globally:
21
+
22
+ ```bash
23
+ npm i -g @camilyos/codex-antigravity-kit
24
+ codex-antigravity-kit --help
25
+ ```
26
+
27
+ ## NPM Publish (public org)
28
+
29
+ Package is configured for public scoped publish:
30
+
31
+ - name: `@camilyos/codex-antigravity-kit`
32
+ - `publishConfig.access = public`
33
+ - dual module output (ESM + CJS)
34
+
35
+ Publish steps:
36
+
37
+ ```bash
38
+ npm run test
39
+ npm run build
40
+ npm publish --access public
41
+ ```
42
+
43
+ ## Commands
44
+
45
+ ### GSD-style output flow
46
+
47
+ ```bash
48
+ # 1. Brainstorm context, options, and constraints into BRAINSTORM.md
49
+ codex-antigravity-kit brainstorm --task TEST-01 --spec ./tasks/TEST-01-SPEC.md
50
+
51
+ # 2. Plan phases, tasks, and acceptance criteria into PLAN.md
52
+ codex-antigravity-kit plan --task TEST-01
53
+
54
+ # 3. Execute directly runs the worker on the context described in PLAN.md (auto-detects agent)
55
+ codex-antigravity-kit execute --task TEST-01
56
+
57
+ # (Optional) Explicitly select an agent or pass a custom context file:
58
+ codex-antigravity-kit execute --task TEST-01 --agent web-engineer
59
+ codex-antigravity-kit execute --task TEST-01 --file ./tasks/CUSTOM-CONTEXT.md
60
+ ```
61
+
62
+ ### Smart Agent Routing
63
+
64
+ The kit automatically inspects task specifications, keywords, and repository indicators to assign the most appropriate specialized agent and skill practices:
65
+ - **`web-engineer`**: React, Next.js, Vue, REST/GraphQL, Tailwind, CSS, DOM, CWV.
66
+ - **`mobile-engineer`**: Flutter, React Native, iOS Swift/SwiftUI, Android Kotlin/Compose, SQLite.
67
+ - **`game-engineer`**: Unity C#, Godot GDScript/C#, Cocos Creator TypeScript, Physics, RigidBody, FPS.
68
+ - **`researcher`**: Technical spikes, feasibility studies, library benchmarking, PoC analysis.
69
+ - **`business-analyst`**: Requirements elicitation, user stories, Gherkin Given/When/Then scenarios.
70
+ - **`codex`**: General technical lead & architecture fallback.
71
+
72
+ Override auto-detection anytime via `--agent <name>`.
73
+
74
+ These commands generate the durable artifacts that mirror the GSD-style workflow:
75
+
76
+ - `BRAINSTORM.md` (Problem framing, context, options, risks)
77
+ - `PLAN.md` (Actionable phases, scope, acceptance criteria)
78
+ - `EXECUTE.md` & `RESULT.md` (Execution package and worker implementation result)
79
+
80
+ ### 1) Initialize kit
81
+
82
+ ```bash
83
+ codex-antigravity-kit init
84
+ ```
85
+
86
+ Creates:
87
+
88
+ - `AGENTS.md`
89
+ - **Agents (`.codex/agents/`)**:
90
+ - `codex.md` (Tech lead & orchestrator)
91
+ - `brainstormer.md` (Problem framing & discovery)
92
+ - `planner.md` (Phases, tasks, and acceptance criteria)
93
+ - `researcher.md` (Deep technical spikes, benchmarks & feasibility)
94
+ - `business-analyst.md` (Requirements elicitation, user stories & Gherkin AC)
95
+ - `web-engineer.md` (Fullstack web, responsive UI, APIs & performance)
96
+ - `mobile-engineer.md` (iOS Swift, Android Kotlin, React Native, Flutter)
97
+ - `game-engineer.md` (Unity C#, Godot GDScript/C#, Cocos Creator TypeScript)
98
+ - **Skills (`.codex/skills/`)**:
99
+ - `codex-workflow.md` (Core orchestration flow)
100
+ - `brainstorming.md` (Decision framing & options evaluation)
101
+ - `planning.md` (Task breakdown & execution handoff)
102
+ - `research.md` (Spike analysis & architectural comparison)
103
+ - `requirements-analysis.md` (Domain modeling & Gherkin specifications)
104
+ - `web-engineering.md` (Component hierarchy, state flow & API contracts)
105
+ - `mobile-engineering.md` (Navigation, offline storage & native bridges)
106
+ - `game-engineering.md` (Game loops, physics layers & performance profiling)
107
+ - `.antigravity/WORKER_RULES.md`
108
+ - `.agent-workflow/PROJECT.md`
109
+ - `.agent-workflow/ARCHITECTURE.md`
110
+ - `.agent-workflow/DECISIONS.md`
111
+ - `.agent-workflow/STATE.md`
112
+ - `.agent-workflow/config.json`
113
+
114
+ ### 2) Doctor
115
+
116
+ ```bash
117
+ codex-antigravity-kit doctor
118
+ ```
119
+
120
+ Checks:
121
+
122
+ - `agy` availability
123
+ - workflow files present
124
+ - config present
125
+
126
+ ### 3) Status
127
+
128
+ ```bash
129
+ codex-antigravity-kit status
130
+ ```
131
+
132
+ Shows workflow state snapshot.
133
+
134
+ ### 4) Delegate implementation
135
+
136
+ ```bash
137
+ codex-antigravity-kit delegate \
138
+ --task AUTH-03 \
139
+ --spec ./tasks/AUTH-03-SPEC.md \
140
+ --timeout-ms 600000
141
+ ```
142
+
143
+ Optional repair request:
144
+
145
+ ```bash
146
+ codex-antigravity-kit delegate \
147
+ --task AUTH-03 \
148
+ --spec ./tasks/AUTH-03-SPEC.md \
149
+ --repair-request ./tasks/AUTH-03-REPAIR.md
150
+ ```
151
+
152
+ ### 5) Record review outcome
153
+
154
+ ```bash
155
+ codex-antigravity-kit review --task AUTH-03 --outcome FAIL
156
+ codex-antigravity-kit review --task AUTH-03 --outcome PASS
157
+ ```
158
+
159
+ ## Workflow Artifacts
160
+
161
+ Per task artifacts are stored under:
162
+
163
+ ```text
164
+ .agent-workflow/tasks/<task-id>/
165
+ SPEC.md
166
+ REPAIR_REQUEST.md (optional)
167
+ RESULT.md
168
+ REVIEW.md
169
+ ```
170
+
171
+ State snapshot:
172
+
173
+ - `.agent-workflow/STATE.md`
174
+
175
+ ## State Machine
176
+
177
+ - `IDLE -> DISCOVERY -> BRAINSTORMING -> PLANNING -> READY -> IMPLEMENTING -> VERIFYING -> REVIEWING`
178
+ - `REVIEWING -> COMPLETED` (PASS)
179
+ - `REVIEWING -> REPAIR_REQUIRED -> IMPLEMENTING` (FAIL)
180
+ - `REVIEWING/BLOCKED -> ESCALATION_REQUIRED` (BLOCKED or limits)
181
+
182
+ ## Recovery
183
+
184
+ Workflow can recover after interruption by reading:
185
+
186
+ - `.codex/agents/codex.md`
187
+ - `.codex/skills/codex-workflow.md`
188
+ - `.agent-workflow/STATE.md`
189
+ - latest task artifacts under `.agent-workflow/tasks`
190
+
191
+ ## Codex Agent And Skill Layer
192
+
193
+ Use the scaffold when you want Codex to work with named roles and reusable skills.
194
+
195
+ - Put agent definitions in `.codex/agents/*.md`
196
+ - Put reusable workflow skills in `.codex/skills/*.md`
197
+ - Keep `AGENTS.md` as the top-level runtime contract
198
+ - Use `doctor` to verify the scaffold exists before running tasks
199
+
200
+ Recommended usage for GSD-style work:
201
+
202
+ 1. `brainstormer` reads the request and writes the problem framing.
203
+ 2. `planner` turns the framing into phases, tasks, and acceptance criteria.
204
+ 3. `codex-workflow` keeps the whole flow consistent with `brainstorm -> plan -> execute -> delegate -> review`.
205
+
206
+ The starter files created by `init` are intentionally small so you can rename or extend them to fit your own Codex workflow.
207
+
208
+ ## Testing
209
+
210
+ ```bash
211
+ npm test
212
+ ```
213
+
214
+ Covers:
215
+
216
+ - transition validation
217
+ - repair loop limits
218
+ - result parsing
219
+ - state persistence
220
+
221
+ ## Example End-to-End
222
+
223
+ 1. Codex writes task spec to `AUTH-03-SPEC.md`.
224
+ 2. Run delegate.
225
+ 3. Worker writes result.
226
+ 4. Codex reviews and records FAIL.
227
+ 5. Codex writes repair request and delegates again.
228
+ 6. Codex records PASS.
229
+
230
+ ## Known Limitations
231
+
232
+ - This version does not auto-generate review findings; review authoring remains explicit.
233
+ - Worker result parsing is contract-driven and expects `DONE | BLOCKED | FAILED` in output.
234
+ - Integration simulation with real code edits depends on target repository and task specs.