119 Commits

Author SHA1 Message Date
grayhook 36cafc4405 Phase 2: add settings tests — defaults, merge, effective helpers.
Covers layered settings merge, incremental global file writes, and
delivery-mode resolution per SPEC §6.5.3.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-17 10:13:56 +07:00
grayhook 00ffdff578 Phase 2: add effective helpers — enabled and delivery mode resolution.
Implements SPEC §5.1 session/global layering and §6.5.3 integration
table for defer vs immediate delivery decisions.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-17 10:12:21 +07:00
grayhook 9b0264f687 Phase 2: add writeGlobalSettings — merge into global settings.json.
Preserves unrelated keys in ~/.pi/agent/settings.json when persisting
/skill-reinject global on|off and other skillReinject fields.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-17 10:12:04 +07:00
grayhook d8abd46f90 Phase 2: add settings read — merge global and project via SettingsManager.
Parses skillReinject from Pi settings layers with defaults and project-trust
aware loading so extension code shares one merged settings view.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-17 10:11:43 +07:00
grayhook 04dcab5b42 Phase 2: add settings types — SPEC §7.3 contract and defaults.
Defines SkillReinjectSettings and default values so read/merge/effective
helpers share one source of truth.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-17 10:08:04 +07:00
grayhook 6050ca98ea TODO: mark phase 1 complete — state types, persist, load, trackSkill.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-17 10:05:02 +07:00
grayhook a671a6dc35 Phase 1: add trackSkill — dedupe tracked skills by name.
Upsert merges sources without reordering the skills list per SPEC §6.1
dedupe and insertion-order rules.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-17 10:04:55 +07:00
grayhook edcf5352c4 Phase 1: add loadStateFromBranch — restore last state entry.
Walk branch backwards for skill-reinject:state custom entries per SPEC §6.3;
return structuredClone of valid v1 snapshot or null for full rescan.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-17 10:04:11 +07:00
grayhook db04a1dd01 Phase 1: add saveState — persist ExtensionState via appendEntry.
STATE_ENTRY_TYPE skill-reinject:state matches SPEC §6.1 so state survives
/resume and branch reload without a full rescan.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-17 10:02:42 +07:00
grayhook 195ed026ff Phase 1: add state factories — predictable session bootstrap.
createInitialState and createRuntimeFlags return SPEC §6.1 defaults
before load, detect, and settings merge on session_start.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-17 10:00:46 +07:00
grayhook 57d96e8b46 Phase 1: add state.ts types — shared SPEC §6.1 contract.
TrackedSkill, ExtensionState (version 1), and RuntimeFlags with union
aliases for skill sources, compaction source, and auto-compact integration.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-17 09:59:51 +07:00
grayhook 645a46c0e9 TODO: mark phase 0 complete — package manifest, tsconfig, scripts, index shell.
AGENTS status table updated; next up is phase 1 (state and persistence).

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-17 09:56:31 +07:00
grayhook 2ddb9431b5 Phase 0: add src/index.ts shell — minimal ExtensionAPI entry for pi -e smoke.
Register empty session_start handler; real tracking and reinject logic follow in later phases.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-17 09:56:20 +07:00
grayhook 3ed38d7e1e Phase 0: add npm scripts — typecheck, test, and build entry points.
Vitest with passWithNoTests keeps CI green before test files land in later phases.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-17 09:54:57 +07:00
grayhook 311c329f87 Phase 0: add tsconfig.json — strict typecheck aligned with jiti ESM load.
Use ESNext/Bundler resolution so extension imports match Pi's jiti runtime.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-17 09:53:47 +07:00
grayhook 2e3f909527 Phase 0: add package.json — pi.extensions manifest for pi -e load.
Declare devDependencies for typecheck against Pi's public ExtensionAPI.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-17 09:52:35 +07:00
grayhook fb028336ec TODO: fill implementation plan — 14 phases from SPEC
Atomic checklists for phases 0–13 so agents can run the AGENTS.md cycle without re-deriving scope from SPEC.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-17 09:46:40 +07:00
grayhook 0de128372f Add agent workflow for phased development.
Introduce AGENTS.md, TODO maintenance rules, BACKLOG, and Cursor rules
so agents can run the full cycle: changes, review, fixes, and commits.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-17 09:18:06 +07:00
grayhook 0622ccbb32 Add initial spec for pi-skill-reinject extension.
Document skill tracking, post-compaction re-inject, pi-auto-compact
compatibility, and configuration via /skill-reinject commands.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-17 08:58:00 +07:00