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>
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>
Defines SkillReinjectSettings and default values so read/merge/effective
helpers share one source of truth.
Co-authored-by: Cursor <cursoragent@cursor.com>
Upsert merges sources without reordering the skills list per SPEC §6.1
dedupe and insertion-order rules.
Co-authored-by: Cursor <cursoragent@cursor.com>
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>
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>
createInitialState and createRuntimeFlags return SPEC §6.1 defaults
before load, detect, and settings merge on session_start.
Co-authored-by: Cursor <cursoragent@cursor.com>
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>
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>
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>