Skip to content

Commit 0420e24

Browse files
authored
Merge pull request #54 from MSiccDev/claude/checkpoint-skills
2 parents a3db3d3 + 087cdc1 commit 0420e24

31 files changed

Lines changed: 507 additions & 40 deletions

File tree

.agents/skills/create-checkpoint

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../../skills/create-checkpoint

.agents/skills/restore-checkpoint

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../../skills/restore-checkpoint

.claude-plugin/marketplace.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
"repo": "MSiccDev/ai-context-kit"
1313
},
1414
"description": "Context-aware AI collaboration skills for creating and validating user context, project AGENTS.md files, and skill artifacts across LLM providers.",
15-
"version": "1.4.1",
15+
"version": "1.4.2",
1616
"license": "MIT",
1717
"homepage": "https://github.com/MSiccDev/ai-context-kit",
1818
"repository": "https://github.com/MSiccDev/ai-context-kit",

.claude-plugin/plugin.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"$schema": "https://json.schemastore.org/claude-code-plugin-manifest.json",
33
"name": "ai-context-kit",
4-
"version": "1.4.1",
4+
"version": "1.4.2",
55
"description": "Context-aware AI collaboration skills for creating and validating user context, project AGENTS.md files, and skill artifacts across LLM providers.",
66
"author": {
77
"name": "MSiccDev Software Development",

AGENTS.md

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!-- spec_version: 1.4.1 -->
1+
<!-- spec_version: 1.4.2 -->
22

33
# AI Context Kit Agent Guide
44

@@ -11,7 +11,7 @@ This repository distinguishes:
1111

1212
## Source Of Truth And Precedence
1313
Use this order when files differ:
14-
1. **Specification (authoritative, v1.4.1):** `specs/context_aware_ai_session_spec.md`
14+
1. **Specification (authoritative, v1.4.2):** `specs/context_aware_ai_session_spec.md`
1515
2. **Templates (canonical structures):** `templates/*.instructions.md` and `templates/skill_template/SKILL.md`
1616
3. **Skills (canonical operational workflows):** `skills/*/SKILL.md` and skill-local references
1717
4. **Prompts (compatibility wrappers):** `prompts/*.prompt.md` (must defer detailed logic to skills)
@@ -47,6 +47,17 @@ Active session state includes:
4747
- No silent transitions: do not change project, role, phase, output style, tone, or interaction mode without explicit user signal.
4848
- If a task implies a context shift, ask for confirmation before switching.
4949

50+
### Cross-Session Persistence (spec section 4.4)
51+
- When the user signals session end or explicitly requests one, propose creating a checkpoint artifact using the `create-checkpoint` skill.
52+
- Never create a checkpoint silently. User approval is required before writing.
53+
- When a checkpoint artifact is provided at session start, apply the `restore-checkpoint` skill to restore state and surface any conflicts with active instruction files before proceeding.
54+
55+
### Context Compression (spec section 4.5)
56+
- When context window saturation is evident, propose compression explicitly — describe what will be retained and what will be dropped before asking for confirmation.
57+
- Never apply compression silently. The user must confirm before any context is dropped.
58+
- Before applying compression, offer to export the current state to a checkpoint file using the `create-checkpoint` skill.
59+
- After compression, do not imply that dropped context is recoverable.
60+
5061
### Ambiguity Rule
5162
- If assumptions, state, or intent are ambiguous, ask clarifying questions before acting.
5263

@@ -104,7 +115,7 @@ Alias policy:
104115
- Validation: skill-based validation workflows and reports
105116

106117
### Current Objectives
107-
- Keep templates and skills aligned with spec `v1.4.1`.
118+
- Keep templates and skills aligned with spec `v1.4.2`.
108119
- Maintain the AGENTS-first project-context model.
109120
- Preserve deterministic behavior and path stability.
110121
- Reduce duplication and migration noise.
@@ -185,7 +196,7 @@ When `specs/context_aware_ai_session_spec.md` changes, audit and update all impa
185196
- `AGENTS.md`
186197

187198
## Key References
188-
- Specification (v1.4.1): [`specs/context_aware_ai_session_spec.md`](specs/context_aware_ai_session_spec.md)
199+
- Specification (v1.4.2): [`specs/context_aware_ai_session_spec.md`](specs/context_aware_ai_session_spec.md)
189200
- Project operational defaults: this root `AGENTS.md` (Default State For This Repo)
190201
- User context template: [`templates/usercontext_template.instructions.md`](templates/usercontext_template.instructions.md)
191202
- Skill template: [`templates/skill_template/SKILL.md`](templates/skill_template/SKILL.md)

AGENTS.validation.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
- **Score:** 20/20
1515
- **Status:** PASS
1616
- Target file exists and is structurally complete.
17-
- `<!-- spec_version: 1.4.1 -->` comment is present and current — no version warning.
17+
- `<!-- spec_version: 1.4.2 -->` comment is present and current — no version warning.
1818
- Purpose, precedence model, and repository map are explicitly defined.
1919
- Heading structure is scannable and consistent.
2020

CHANGELOG.md

Lines changed: 29 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,33 @@ When a new version is released:
1515

1616
---
1717

18+
## [1.4.2] - 2026-05-12
19+
20+
### Added
21+
- **`create-checkpoint` skill** — guided workflow to capture session state as a checkpoint artifact per spec section 4.4, with schema reference and `agents/openai.yaml` sidecar
22+
- **`restore-checkpoint` skill** — guided workflow to load, validate, and restore a checkpoint artifact at session start per spec section 4.4 restore rules, with conflict resolution reference and `agents/openai.yaml` sidecar
23+
- **`checkpoint: true` required field** — added to spec section 4.4.2 schema so checkpoint files are self-identifying; restore validation is now fully spec-backed
24+
- AGENTS.md now references sections 4.4 (Cross-Session Persistence) and 4.5 (Context Compression) with explicit behavioral instructions for both
25+
- Prompts and Codex symlinks added for both new skills
26+
- `SKILL.validation.md` added to `create-checkpoint/` and `restore-checkpoint/` skill folders
27+
28+
### Safe to update from template
29+
- `skills/create-checkpoint/` (new)
30+
- `skills/restore-checkpoint/` (new)
31+
- `.agents/skills/` (two new symlinks)
32+
- `prompts/` (two new prompt files)
33+
- `specs/context_aware_ai_session_spec.md`
34+
- `AGENTS.md`
35+
- `README.md`
36+
- `CHANGELOG.md`
37+
38+
### Protect (never overwrite)
39+
- Your personal `*_usercontext.instructions.md`
40+
- Your project `AGENTS.md`
41+
- Any custom skills or checkpoint files you have created
42+
43+
---
44+
1845
## [1.4.1] - 2026-05-11
1946
- **Claude Code plugin**`.claude-plugin/plugin.json` manifest makes the repo installable as a native Claude Code plugin; skills are auto-discovered from `skills/`
2047
- **GitHub Copilot CLI plugin**`.claude-plugin/marketplace.json` turns the repo into a self-hosted marketplace, enabling `copilot plugin marketplace add MSiccDev/ai-context-kit` install flow (Claude Code and Copilot CLI share the same plugin spec)
@@ -41,8 +68,8 @@ When a new version is released:
4168
## [1.4.0] - 2026-05-08
4269

4370
### Added
44-
- **Spec §4.4 Cross-Session Persistence** — normative rules for checkpoint artifacts: proposal rules, required schema (project, role, phase, output_style, tone, interaction_mode, open_tasks, key_decisions, active_files, last_updated), and restore/conflict rules
45-
- **Spec §4.5 Context Compression** — normative rules for managing context window pressure: proposal rules, required compression checkpoint contents, and reversibility requirements
71+
- **Spec section 4.4 Cross-Session Persistence** — normative rules for checkpoint artifacts: proposal rules, required schema (project, role, phase, output_style, tone, interaction_mode, open_tasks, key_decisions, active_files, last_updated), and restore/conflict rules
72+
- **Spec section 4.5 Context Compression** — normative rules for managing context window pressure: proposal rules, required compression checkpoint contents, and reversibility requirements
4673
- `docs/spec-rationale.md`: new "Cross-Session Persistence and Context Compression" section with example checkpoint file, conflict resolution dialog, and annotated compression proposal dialog
4774

4875
### Changed

README.md

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ ai-context-kit/
8181
│ └── context_aware_ai_session_spec.md # Specification for AI session management
8282
8383
├── templates/
84-
│ ├── usercontext_template.instructions.md # Canonical v1.4.1 user context template (authoritative)
84+
│ ├── usercontext_template.instructions.md # Canonical v1.4.2 user context template (authoritative)
8585
│ ├── AGENTS_template.md # Canonical AGENTS template (authoritative)
8686
│ └── skill_template/SKILL.md # Canonical skill template
8787
@@ -114,7 +114,7 @@ ai-context-kit/
114114

115115
---
116116

117-
## Canonical Authority (Spec v1.4.1)
117+
## Canonical Authority (Spec v1.4.2)
118118

119119
When guidance differs across files, use this authority order:
120120

@@ -209,6 +209,8 @@ Operational workflow authority is skill-first:
209209
- `skills/repository-drift-control/`
210210
- `skills/create-skill/`
211211
- `skills/validate-skill/`
212+
- `skills/create-checkpoint/`
213+
- `skills/restore-checkpoint/`
212214

213215
### Invoking Skills
214216

@@ -242,13 +244,13 @@ The following paths are considered **canonical**:
242244
- `AGENTS.md`
243245
- Primary agent entrypoint (repo-specific operational contract)
244246
- `templates/`
245-
- Canonical instruction templates (spec v1.4.1)
247+
- Canonical instruction templates (spec v1.4.2)
246248
- `skills/`
247249
- Canonical workflow skills (`SKILL.md`-based folders)
248250
- `prompts/`
249251
- Composition wrappers for instruction/skill workflows
250252
- `specs/context_aware_ai_session_spec.md`
251-
- Authoritative specification (v1.4.1+)
253+
- Authoritative specification (v1.4.2+)
252254
- Root `README.md`
253255
- Human-facing entry point and workflow documentation
254256

@@ -352,6 +354,8 @@ Skills are namespaced to the plugin name. Inside a session:
352354
| `validate-project-instructions` | Validate a project-context `AGENTS.md` with scored report |
353355
| `validate-skill` | Validate a `SKILL.md` artifact with scored report |
354356
| `repository-drift-control` | Check and enforce consistency across spec, templates, and docs |
357+
| `create-checkpoint` | Capture session state as a checkpoint artifact (spec section 4.4) |
358+
| `restore-checkpoint` | Restore session state from a checkpoint artifact (spec section 4.4) |
355359

356360
### Update
357361

@@ -452,7 +456,7 @@ Each project `AGENTS.md` should define:
452456
- **Languages:** LLMs work best when instructions are in English, but you can include multilingual content in user context if needed (just be aware of potential comprehension issues)
453457
- **Versioning:** Update user context when skills/preferences evolve; update project `AGENTS.md` when phases/objectives change. Ideally, these should live in the same repository as your codebase once they are created.
454458
- **Discoverability:** Semantic file extensions help AI tools identify and load the appropriate instructions automatically
455-
- **Canonical structure:** The templates in `/templates` define the only supported artifact structures for spec v1.4.1
459+
- **Canonical structure:** The templates in `/templates` define the only supported artifact structures for spec v1.4.2
456460
457461
---
458462

docs/spec-rationale.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
---
22
context_type: rationale
33
document_type: companion_document
4-
spec_version: 1.4.1
4+
spec_version: 1.4.2
55
created: 2025-10-20
66
last_updated: 2026-05-09
77
status: active
88
---
99

10-
# Spec Rationale & Extended Reference (v1.4.1)
10+
# Spec Rationale & Extended Reference (v1.4.2)
1111

1212
This document is the companion to [`specs/context_aware_ai_session_spec.md`](../specs/context_aware_ai_session_spec.md). It contains the background reasoning, extended examples, project profile illustrations, end-to-end scenarios, and future enhancement notes that were removed from the normative spec to keep it readable.
1313

@@ -180,7 +180,7 @@ Assistant:
180180

181181
## Cross-Session Persistence and Context Compression
182182

183-
These features are defined normatively in §4.4 and §4.5 of the spec. This section provides examples and rationale.
183+
These features are defined normatively in sections 4.4 and 4.5 of the spec. This section provides examples and rationale.
184184

185185
### Session Persistence: Example Checkpoint File
186186

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Load `skills/create-checkpoint/SKILL.md` and apply the create-checkpoint workflow to capture the current session state as a checkpoint artifact per spec section 4.4.

0 commit comments

Comments
 (0)