placet-context-compress
Skill2 starsChanged 2 months agoMITView on GitHub
Placet inter-stage context compression. On stage advance, generate a "chapter skeleton + key points + SHA256" compressed context pack so the AI reads only the pack plus on-demand drill-down instead of re-reading prior documents in full, saving tokens. Natural language: context compress / compress context / handoff compress.
In this repository14 other files it gives its agents.
- .claude-collective/agents.mdAGENTS.md
- .claude-collective/CLAUDE.mdCLAUDE.md
- CLAUDE.mdCLAUDE.md
- .taskmaster/CLAUDE.mdCLAUDE.md
- ui-ux-pro-maxSkill
- placet-env-setupSkill
- placet-initSkill
- placet-knowledge-baseSkill
- placet-knowledge-base-updateSkill
- placet-knowledge-fact-gateSkill
- placet-nowSkill
- placet-skill-evalSkill
- placet-statusSkill
- placet-ui-uxSkill
The file
We split this skill into the rules it gives an agent
7 rules. About 0 are common, 3 are distinctive, and 4 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
Distinctive · estimate
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 24
Write docs/{requirement-id}/.handoff/{target-stage}.context.md, ending with "on-demand drill-down suggestions" (which file and line to read …
- Distinctive: line 25
If an old pack exists and source-document hashes are unchanged → reuse the old pack, do not regenerate
- Very specific: line 37
Before entering a new stage: run this script to generate that stage's .context.md (pass the target stage name)
- Distinctive: line 39
On-demand drill-down: when details are needed, follow the pack's "on-demand drill-down suggestions" to the corresponding chapter/line of …
- Very specific: line 41
Write output under the target project docs/{requirement-id}/.handoff/.
- Very specific: line 75
Do not hand-edit .handoff/*.context.md (the next run will overwrite or reuse based on hash checks)
- Distinctive: line 76
When source hashes are unchanged the script reuses the old pack.
≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
placet-context-compress — Inter-Stage Context Compression
On stage advance, use
docs/{requirement-id}/.handoff/{target-stage}.context.mdinstead of bringing all prior documents into context, saving 25-30% tokens.
Trigger
/placet-context-compress <target-project-path> <requirement-id> <target-stage>Natural language: context compress / compress context / generate handoff pack
Target stage ∈ {prd, design, build, test, report, kb}
What it does
- Scan completed documents in
docs/{requirement-id}/before the target stage (00-original-requirements → 05-test-report) - For each file, generate a compressed entry: file path, SHA256, line count, list of
##headings, first-sentence key points per chapter - Write
docs/{requirement-id}/.handoff/{target-stage}.context.md, ending with "on-demand drill-down suggestions" (which file and line to read for details) - If an old pack exists and source-document hashes are unchanged → reuse the old pack, do not regenerate
Execution (MUST run via tools)
node "$FRAMEWORK/skills/placet-context-compress/scripts/compress-handoff.js" "<target-project-absolute-path>" "<requirement-id>" "<target-stage>"On Windows PowerShell, also invoke node, using absolute paths. $FRAMEWORK comes from ~/.claude/placet-framework-path.
Pipeline hard rules (MUST run on stage advance)
- Before entering a new stage: run this script to generate that stage's
.context.md(pass the target stage name) - Read the pack only: restore prior context by reading only
.handoff/{stage}.context.md; do not re-read prior documents in full - On-demand drill-down: when details are needed, follow the pack's "on-demand drill-down suggestions" to the corresponding chapter/line of the original document
- After a document is edited: rerun the script; a hash change auto-regenerates the pack
- Write output under the target project
docs/{requirement-id}/.handoff/; do not write to the framework directory
Compressed-pack format example
# Stage handoff context pack (user-login → build)
> Generated at: 2026-08-19 14:30 · fingerprint: a1b2c3d4…
> Usage rule: restore context from this pack only; drill down on demand; do not re-read in full.
## Prior document list
- **Requirements analysis** — `01-requirements-analysis.md` (sha256: 3f9a…) · 132 lines
- Chapters: Project background / Goals / Functional requirements (12 items) / Non-functional requirements / Open questions
- "Functional requirements" key points: user login MUST support username-password login; support SMS verification-code login…
- **PRD** — `02-prd.md` (sha256: c0de…) · 90 lines
- …
## On-demand drill-down suggestions
- Need "Functional requirements" details → read around line 24 of `01-requirements-analysis.md`Common stage mapping
| Target stage | Prior documents included |
| prd | 00, 01 |
| design | 00, 01, 02(+02a) |
| build | 00, 01, 02, 03(+02a/03a) |
| test | 00, 01, 02, 03, 04(+02a/03a/04a) |
| report | 00 ~ 05 all |
| kb | 00 ~ 05 all |
Remember
- The pack is a machine-generated mirror; the documents remain the human-readable source of truth; hashes keep them consistent
- Do not hand-edit
.handoff/*.context.md(the next run will overwrite or reuse based on hash checks) - When source hashes are unchanged the script reuses the old pack; rerunning is zero-cost
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

