pi-extensions 0.1.12 → 0.1.13
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/package.json +1 -1
- package/.ralph/import-cc-codex.md +0 -31
- package/.ralph/import-cc-codex.state.json +0 -14
- package/.ralph/mario-not-impl.md +0 -69
- package/.ralph/mario-not-impl.state.json +0 -14
- package/.ralph/mario-not-spec.md +0 -163
- package/.ralph/mario-not-spec.state.json +0 -14
- package/.ralph/todo-app-plan.state.json +0 -14
- package/control/control.ts +0 -1397
- package/review/review.ts +0 -807
package/package.json
CHANGED
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
# import-cc-codex implementation loop
|
|
2
|
-
|
|
3
|
-
## Goals
|
|
4
|
-
- Implement Phase 1 `pi --import <path>` CLI flow.
|
|
5
|
-
- Build Claude Code + Codex transcript parsing + mapping.
|
|
6
|
-
- Add usage exclusion + context estimate for imported ranges.
|
|
7
|
-
- Preserve metadata, ordering, and labels per spec.
|
|
8
|
-
- Prepare for Phase 2 `/import` selector (no UI changes yet unless required).
|
|
9
|
-
|
|
10
|
-
## Checklist (interleaved)
|
|
11
|
-
1. Wire CLI flags + import entrypoint (imp-001)
|
|
12
|
-
2. Implement parsers + mapping utilities (imp-002)
|
|
13
|
-
3. Add import metadata + labeling (imp-004)
|
|
14
|
-
4. Implement usage exclusion + context estimate (imp-003)
|
|
15
|
-
5. Add tool-output redaction (imp-005)
|
|
16
|
-
6. **Reflection**: summarize what works/doesn’t, adjust plan
|
|
17
|
-
7. **Cleanup**: refactor/simplify, remove redundancy, improve clarity
|
|
18
|
-
8. **Testing**: targeted tests for parsers/mapping
|
|
19
|
-
9. Repeat (1–5) as needed
|
|
20
|
-
10. **Reflection** (periodic)
|
|
21
|
-
11. **Cleanup** (periodic)
|
|
22
|
-
12. **Testing**: broaden scope; move toward E2E once CLI flow is stable
|
|
23
|
-
|
|
24
|
-
## Acceptance
|
|
25
|
-
- `pi --import <path>` creates a valid Pi session JSONL and opens it.
|
|
26
|
-
- Imported sessions are labeled, metadata preserved, and usage excluded.
|
|
27
|
-
- Deterministic context % works before first new assistant response.
|
|
28
|
-
- Tests cover key parsing and mapping behavior.
|
|
29
|
-
|
|
30
|
-
## Progress Log
|
|
31
|
-
- 2026-01-13: Wired `--import`/`--source` CLI flags, added core import module for CC/Codex parsing + mapping, updated README CLI docs, and added startup status banner plumbing. Pending: tests, usage exclusion/context estimate, redaction opt-out.
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "import-cc-codex",
|
|
3
|
-
"taskFile": ".ralph/import-cc-codex.md",
|
|
4
|
-
"iteration": 1,
|
|
5
|
-
"maxIterations": 50,
|
|
6
|
-
"itemsPerIteration": 3,
|
|
7
|
-
"reflectEvery": 3,
|
|
8
|
-
"reflectInstructions": "REFLECTION CHECKPOINT\n\nPause and reflect on your progress:\n1. What has been accomplished so far?\n2. What's working well?\n3. What's not working or blocking progress?\n4. Should the approach be adjusted?\n5. What are the next priorities?\n\nUpdate the task file with your reflection, then continue working.",
|
|
9
|
-
"active": false,
|
|
10
|
-
"status": "completed",
|
|
11
|
-
"startedAt": "2026-01-13T13:32:49.696Z",
|
|
12
|
-
"lastReflectionAt": 0,
|
|
13
|
-
"completedAt": "2026-01-13T13:33:21.479Z"
|
|
14
|
-
}
|
package/.ralph/mario-not-impl.md
DELETED
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
# Badlogic Game Implementation
|
|
2
|
-
|
|
3
|
-
## Goal
|
|
4
|
-
Implement `/badlogic-game` per `badlogic-game/spec.md` with deterministic core logic, reliable tests (unit + integration + E2E), and incremental milestones.
|
|
5
|
-
|
|
6
|
-
## Loop Protocol
|
|
7
|
-
- Work on 1 feature per iteration (small, shippable, testable).
|
|
8
|
-
- Each iteration MUST:
|
|
9
|
-
- Add or extend at least 1 regression test (unit or integration).
|
|
10
|
-
- Add or extend at least 1 E2E scripted scenario (headless run with golden frame or state snapshot).
|
|
11
|
-
- Record verification evidence (commands + results) in Reflection.
|
|
12
|
-
- After each story, do a quick refactor pass to keep code concise and modular.
|
|
13
|
-
- Keep diffs small; commit once the feature passes verification.
|
|
14
|
-
- Self-reflect every iteration and adjust plan if needed.
|
|
15
|
-
|
|
16
|
-
## Refactor Principles
|
|
17
|
-
- Keep files under ~400 LOC; split by responsibility (engine, render, entities, input, levels).
|
|
18
|
-
- Prefer pure functions and deterministic state updates; avoid hidden globals.
|
|
19
|
-
- Consolidate constants (tiles, glyphs, physics) in one place.
|
|
20
|
-
- Eliminate duplication by extracting helpers and data tables.
|
|
21
|
-
|
|
22
|
-
## Typing Strategy
|
|
23
|
-
- Use `// @ts-check` + JSDoc types for strict checks without a build step.
|
|
24
|
-
- Add `badlogic-game/tsconfig.json` with `checkJs`, `strict`, `noEmit`.
|
|
25
|
-
- Typecheck command: `npx tsc --noEmit -p badlogic-game/tsconfig.json` (record results).
|
|
26
|
-
|
|
27
|
-
## Verifiability Standard
|
|
28
|
-
- Unit tests: physics tick, jump apex, collision resolution, serialization.
|
|
29
|
-
- Integration tests: deterministic input sequences -> expected positions/collisions/state transitions.
|
|
30
|
-
- E2E tests: scripted input -> render frames or HUD/state snapshots; compare to golden fixtures.
|
|
31
|
-
- Manual checks: milestone smoke test in a live TUI session (M1..M4).
|
|
32
|
-
|
|
33
|
-
## Feature Checklist
|
|
34
|
-
- [x] Story 0: Test harness + engine/core separation
|
|
35
|
-
- Decide runner (node:test vs custom) and structure
|
|
36
|
-
- Deterministic RNG + headless renderer
|
|
37
|
-
- [x] Quality: strict typing setup (tsconfig + @ts-check)
|
|
38
|
-
- [x] Story 1: Core loop (map, movement, gravity, collision, camera clamp, Level 1)
|
|
39
|
-
- [x] Story 2: Enemies + stomp + hazards
|
|
40
|
-
- [x] Story 3: Blocks + coins + scoring + HUD
|
|
41
|
-
- [x] Story 4: Power-ups (mushroom) + big state
|
|
42
|
-
- [x] Story 5: Save/resume + pause/quit
|
|
43
|
-
- [x] Story 6: Polish (particles, text cues, camera dead-zone)
|
|
44
|
-
- [x] Docs + wiring: `/badlogic-game` command registration and README update
|
|
45
|
-
- [ ] Final: full test run + manual E2E checks; update harness logs
|
|
46
|
-
|
|
47
|
-
## Milestone Gates
|
|
48
|
-
- [x] M1: Story 1 + test harness + E2E scenario
|
|
49
|
-
- [x] M2: Story 2 + tests + E2E scenario
|
|
50
|
-
- [x] M3: Story 3/4 + tests + E2E scenario
|
|
51
|
-
- [ ] M4: Story 5/6 + tests + manual run
|
|
52
|
-
|
|
53
|
-
## References
|
|
54
|
-
- Spec: `badlogic-game/spec.md`
|
|
55
|
-
- Existing WIP: `arcade/wip/badlogic-game.ts`
|
|
56
|
-
|
|
57
|
-
## Reflection (Iteration 35)
|
|
58
|
-
1. What has been accomplished so far?
|
|
59
|
-
- Added invuln save regression test and paused cue frame E2E fixture.
|
|
60
|
-
- Verification: `node --test badlogic-game/tests/*.test.js` -> 77 pass; `npx tsc --noEmit -p badlogic-game/tsconfig.json` -> ok.
|
|
61
|
-
2. What's working well?
|
|
62
|
-
- Invuln persistence and paused cue overlay are covered deterministically.
|
|
63
|
-
3. What's not working or blocking progress?
|
|
64
|
-
- Manual M4 run still pending (interactive UI required).
|
|
65
|
-
4. Should the approach be adjusted?
|
|
66
|
-
- No; keep manual run as final gate.
|
|
67
|
-
5. What are the next priorities?
|
|
68
|
-
- M4 manual run.
|
|
69
|
-
- Final: update harness logs.
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "badlogic-game-impl",
|
|
3
|
-
"taskFile": ".ralph/badlogic-game-impl.md",
|
|
4
|
-
"iteration": 35,
|
|
5
|
-
"maxIterations": 80,
|
|
6
|
-
"itemsPerIteration": 1,
|
|
7
|
-
"reflectEvery": 1,
|
|
8
|
-
"reflectInstructions": "REFLECTION CHECKPOINT\n\nPause and reflect on your progress:\n1. What has been accomplished so far?\n2. What's working well?\n3. What's not working or blocking progress?\n4. Should the approach be adjusted?\n5. What are the next priorities?\n\nUpdate the task file with your reflection, then continue working.",
|
|
9
|
-
"active": false,
|
|
10
|
-
"status": "completed",
|
|
11
|
-
"startedAt": "2026-01-09T03:55:16.633Z",
|
|
12
|
-
"lastReflectionAt": 35,
|
|
13
|
-
"completedAt": "2026-01-09T09:09:36.947Z"
|
|
14
|
-
}
|
package/.ralph/mario-not-spec.md
DELETED
|
@@ -1,163 +0,0 @@
|
|
|
1
|
-
# Badlogic Game Spec
|
|
2
|
-
|
|
3
|
-
## Goal
|
|
4
|
-
Create a comprehensive Mario-style TUI extension spec in `badlogic-game/spec.md` with list-based outline and detailed, verifiable content. Each sub-subsection must include design intent + implementation guidance so it is directly actionable for engineering.
|
|
5
|
-
|
|
6
|
-
## Requirements
|
|
7
|
-
- Use list items + subitems for the outline and content.
|
|
8
|
-
- Draft section-by-section via ralph loop iterations.
|
|
9
|
-
- Iterate at the level of every sub-subsection (e.g., target size, scroll rules).
|
|
10
|
-
- After completing each sub-section (e.g., Player Experience & Feel), reflect on coherence and adjust if needed.
|
|
11
|
-
- Final coherence reflection at end of doc; adjust as needed.
|
|
12
|
-
- Commit after each major section: Core Gameplay, Presentation, Tech + Delivery.
|
|
13
|
-
|
|
14
|
-
## Planned Sections
|
|
15
|
-
1) Core Gameplay
|
|
16
|
-
- Player Experience & Feel
|
|
17
|
-
- Time-to-fun / quick boot
|
|
18
|
-
- Pace / difficulty ramp
|
|
19
|
-
- Failure/respawn cadence
|
|
20
|
-
- Feel targets vs SMB1
|
|
21
|
-
- Controls & Input
|
|
22
|
-
- Key mapping
|
|
23
|
-
- Input buffering
|
|
24
|
-
- Pausing/quitting/restart
|
|
25
|
-
- Game Loop & States
|
|
26
|
-
- State machine
|
|
27
|
-
- Transitions
|
|
28
|
-
- Level Design
|
|
29
|
-
- Tile palette
|
|
30
|
-
- Layout rules
|
|
31
|
-
- Level 1 (short)
|
|
32
|
-
- Entities & Interactions
|
|
33
|
-
- Player
|
|
34
|
-
- Blocks
|
|
35
|
-
- Items
|
|
36
|
-
- Enemies
|
|
37
|
-
- Hazards
|
|
38
|
-
- Physics & Movement
|
|
39
|
-
- Gravity / accel / friction
|
|
40
|
-
- Jump (variable)
|
|
41
|
-
- Collision resolution
|
|
42
|
-
|
|
43
|
-
2) Presentation
|
|
44
|
-
- Camera & Viewport
|
|
45
|
-
- Target size
|
|
46
|
-
- Scroll rules
|
|
47
|
-
- Bounds/edges
|
|
48
|
-
- Rendering & Palette
|
|
49
|
-
- 256-color plan
|
|
50
|
-
- Glyphs / tiles
|
|
51
|
-
- HUD & Scoring
|
|
52
|
-
- HUD layout
|
|
53
|
-
- Score/lives/time/coins
|
|
54
|
-
- FX & Feedback (optional)
|
|
55
|
-
- Particles
|
|
56
|
-
- Text cues
|
|
57
|
-
|
|
58
|
-
3) Tech + Delivery
|
|
59
|
-
- Save/Resume
|
|
60
|
-
- Autosave cadence
|
|
61
|
-
- Persisted fields
|
|
62
|
-
- Resume behavior
|
|
63
|
-
- Technical Architecture
|
|
64
|
-
- Data model
|
|
65
|
-
- Update order
|
|
66
|
-
- Collision handling
|
|
67
|
-
- Input handling
|
|
68
|
-
- Serialization
|
|
69
|
-
- Feature Stories & Sequencing
|
|
70
|
-
- Test Plan
|
|
71
|
-
- Milestones
|
|
72
|
-
- Open Questions
|
|
73
|
-
|
|
74
|
-
## Checklist
|
|
75
|
-
- [x] Create `badlogic-game/spec.md` with list-based scaffold
|
|
76
|
-
- [x] Draft Core Gameplay subsections (reflect + adjust after each)
|
|
77
|
-
- [x] Player Experience & Feel > Time-to-fun / quick boot
|
|
78
|
-
- [x] Player Experience & Feel > Pace / difficulty ramp
|
|
79
|
-
- [x] Player Experience & Feel > Failure/respawn cadence
|
|
80
|
-
- [x] Player Experience & Feel > Feel targets vs SMB1
|
|
81
|
-
- [x] Controls & Input > Key mapping
|
|
82
|
-
- [x] Controls & Input > Input buffering
|
|
83
|
-
- [x] Controls & Input > Pausing/quitting/restart
|
|
84
|
-
- [x] Game Loop & States > State machine
|
|
85
|
-
- [x] Game Loop & States > Transitions
|
|
86
|
-
- [x] Level Design > Tile palette
|
|
87
|
-
- [x] Level Design > Layout rules
|
|
88
|
-
- [x] Level Design > Level 1 (short)
|
|
89
|
-
- [x] Entities & Interactions > Player
|
|
90
|
-
- [x] Entities & Interactions > Blocks
|
|
91
|
-
- [x] Entities & Interactions > Items
|
|
92
|
-
- [x] Entities & Interactions > Enemies
|
|
93
|
-
- [x] Entities & Interactions > Hazards
|
|
94
|
-
- [x] Physics & Movement > Gravity / accel / friction
|
|
95
|
-
- [x] Physics & Movement > Jump (variable)
|
|
96
|
-
- [x] Physics & Movement > Collision resolution
|
|
97
|
-
- [x] Commit Core Gameplay section
|
|
98
|
-
- [x] Draft Presentation subsections (reflect + adjust after each)
|
|
99
|
-
- [x] Camera & Viewport > Target size
|
|
100
|
-
- [x] Camera & Viewport > Scroll rules
|
|
101
|
-
- [x] Camera & Viewport > Bounds/edges
|
|
102
|
-
- [x] Rendering & Palette > 256-color plan
|
|
103
|
-
- [x] Rendering & Palette > Glyphs / tiles
|
|
104
|
-
- [x] HUD & Scoring > HUD layout
|
|
105
|
-
- [x] HUD & Scoring > Score/lives/time/coins
|
|
106
|
-
- [x] FX & Feedback > Particles
|
|
107
|
-
- [x] FX & Feedback > Text cues
|
|
108
|
-
- [x] Commit Presentation section
|
|
109
|
-
- [x] Draft Tech + Delivery subsections (reflect + adjust after each)
|
|
110
|
-
- [x] Save/Resume > Autosave cadence
|
|
111
|
-
- [x] Save/Resume > Persisted fields
|
|
112
|
-
- [x] Save/Resume > Resume behavior
|
|
113
|
-
- [x] Technical Architecture > Data model
|
|
114
|
-
- [x] Technical Architecture > Update order
|
|
115
|
-
- [x] Technical Architecture > Collision handling
|
|
116
|
-
- [x] Technical Architecture > Input handling
|
|
117
|
-
- [x] Technical Architecture > Serialization
|
|
118
|
-
- [x] Feature Stories & Sequencing
|
|
119
|
-
- [x] Test Plan
|
|
120
|
-
- [x] Milestones
|
|
121
|
-
- [x] Open Questions
|
|
122
|
-
- [x] Commit Tech + Delivery section
|
|
123
|
-
- [x] Final coherence reflection; adjust doc as needed
|
|
124
|
-
|
|
125
|
-
## Reflection (Iteration 46)
|
|
126
|
-
1. What has been accomplished so far?
|
|
127
|
-
- Completed final coherence pass; clarified player glyph sizing.
|
|
128
|
-
2. What's working well?
|
|
129
|
-
- All sections align on sizes, timings, and rendering constraints.
|
|
130
|
-
3. What's not working or blocking progress?
|
|
131
|
-
- Nothing blocked.
|
|
132
|
-
4. Should the approach be adjusted?
|
|
133
|
-
- No; spec is complete.
|
|
134
|
-
5. What are the next priorities?
|
|
135
|
-
- None; ready to stop loop.
|
|
136
|
-
|
|
137
|
-
## Coherence Checks
|
|
138
|
-
- Physics & Movement: collision ordering aligns with stomp and head-bump rules.
|
|
139
|
-
|
|
140
|
-
## Tech + Delivery Coherence Check (Iteration 45)
|
|
141
|
-
- Save cadence aligns with resume behavior and pause/quit rules.
|
|
142
|
-
- Data model fields cover persisted fields list.
|
|
143
|
-
- Serialization versioning aligns with SaveState schema.
|
|
144
|
-
- Stories/milestones reflect the same delivery order.
|
|
145
|
-
|
|
146
|
-
## Final Coherence Check (Iteration 46)
|
|
147
|
-
- Glyph sizing clarified for player big state (1x3 tiles).
|
|
148
|
-
- Run modifier, jump buffer, and physics values are consistent.
|
|
149
|
-
- Save/resume flow matches input and state machine rules.
|
|
150
|
-
|
|
151
|
-
## Presentation Coherence Check (Iteration 32)
|
|
152
|
-
- Viewport size supports HUD lines and 2-char tile grid without wrap.
|
|
153
|
-
- Camera rules align with bounds clamp and no vertical scroll assumption.
|
|
154
|
-
- Glyphs/tiles use ASCII and 2-char width consistent with rendering plan.
|
|
155
|
-
- HUD fields (score/coins/lives/time) match scoring spec values.
|
|
156
|
-
- FX cues are lightweight and don't conflict with HUD overlays.
|
|
157
|
-
|
|
158
|
-
## Core Gameplay Coherence Check (Iteration 22)
|
|
159
|
-
- Consistency: run modifier defined in Controls; referenced in Physics and feel targets.
|
|
160
|
-
- Timing: coyote/jump buffer values consistent between Input and Jump sections.
|
|
161
|
-
- Level 1: pacing, layout rules, and hazards align with speed/jump targets.
|
|
162
|
-
- Death loop: hazards, enemies, and respawn cadence agree on invuln timing and lives.
|
|
163
|
-
- Tile palette: blocks/items/hazards align with symbols; ensure rendering uses same glyphs.
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "badlogic-game-spec",
|
|
3
|
-
"taskFile": ".ralph/badlogic-game-spec.md",
|
|
4
|
-
"iteration": 46,
|
|
5
|
-
"maxIterations": 60,
|
|
6
|
-
"itemsPerIteration": 1,
|
|
7
|
-
"reflectEvery": 1,
|
|
8
|
-
"reflectInstructions": "REFLECTION CHECKPOINT\n\nPause and reflect on your progress:\n1. What has been accomplished so far?\n2. What's working well?\n3. What's not working or blocking progress?\n4. Should the approach be adjusted?\n5. What are the next priorities?\n\nUpdate the task file with your reflection, then continue working.",
|
|
9
|
-
"active": false,
|
|
10
|
-
"status": "completed",
|
|
11
|
-
"startedAt": "2026-01-08T22:35:44.127Z",
|
|
12
|
-
"lastReflectionAt": 46,
|
|
13
|
-
"completedAt": "2026-01-08T23:04:52.947Z"
|
|
14
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "todo-app-plan",
|
|
3
|
-
"taskFile": ".ralph/todo-app-plan.md",
|
|
4
|
-
"iteration": 1,
|
|
5
|
-
"maxIterations": 50,
|
|
6
|
-
"itemsPerIteration": 3,
|
|
7
|
-
"reflectEvery": 10,
|
|
8
|
-
"reflectInstructions": "REFLECTION CHECKPOINT\n\nPause and reflect on your progress:\n1. What has been accomplished so far?\n2. What's working well?\n3. What's not working or blocking progress?\n4. Should the approach be adjusted?\n5. What are the next priorities?\n\nUpdate the task file with your reflection, then continue working.",
|
|
9
|
-
"active": false,
|
|
10
|
-
"status": "completed",
|
|
11
|
-
"startedAt": "2026-01-26T17:22:57.476Z",
|
|
12
|
-
"lastReflectionAt": 0,
|
|
13
|
-
"completedAt": "2026-01-26T17:23:25.779Z"
|
|
14
|
-
}
|