# Manifold Context

> Preserve Manifold constraint state for context retention. Reads .manifold/ directory and outputs a summary of current features, phases, constraints, tensions, and next actions. Use this skill when resuming work or before starting a new phase. Use when this capability is needed.

- Skill: `tomevault-io/manifold-context` (Agent Skill, multi-file: 2 files)
- Install (CLI): `npx skillmds@latest add tomevault-io/manifold-context`
- Raw SKILL.md: https://api.skillmd.com/api/skills/tomevault-io/manifold-context/raw
- Safety review: pending (external: skill-scanner PASS, skillspector PASS)
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: tomevault-io (https://skillmd.com/u/tomevault-io)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/tomevault-io/manifold-context

---


# /manifold-context

## Purpose
Satisfies: RT-4 (Codex hooks via skills), TN1 (skills-as-hooks pattern)

This skill provides context preservation equivalent to Claude Code's PreCompact hook.
Since Codex CLI does not have lifecycle hooks, this skill packages the same functionality
as an on-demand capability.

## When to Use
- At the start of a session to load manifold context
- Before starting a new manifold phase
- When you need to recall the current state of constraint discovery
- After context compression or token limits are approached

## Instructions

Read all files in the `.manifold/` directory of the current project. For each feature found:

1. **Identify the feature** from the filename (e.g., `payment-retry.json` → feature: `payment-retry`)
2. **Read the JSON file** (`.manifold/<feature>.json`) to get:
   - Current phase (INITIALIZED, CONSTRAINED, TENSIONED, ANCHORED, GENERATED, VERIFIED)
   - Constraint counts by category (business, technical, UX, security, operational)
   - Tension count and resolution status
   - Required truth statuses
   - Convergence status
3. **Read the MD file** (`.manifold/<feature>.md`) to get:
   - Outcome statement
   - Key constraint statements
   - Tension descriptions
4. **Output a summary** in this format:

```
## Manifold State

### Feature: <name>
- Phase: <phase> (<n>/6)
- Outcome: <outcome>
- Constraints: Business: <n>, Technical: <n>, UX: <n>, Security: <n>, Operational: <n>
- Tensions: <n> detected, <n> resolved
- Next: <suggested next command>
```

### Phase → Next Action Mapping
| Phase | Next Command |
|-------|-------------|
| INITIALIZED | `/manifold:m1-constrain <feature>` |
| CONSTRAINED | `/manifold:m2-tension <feature>` |
| TENSIONED | `/manifold:m3-anchor <feature>` |
| ANCHORED | `/manifold:m4-generate <feature>` |
| GENERATED | `/manifold:m5-verify <feature>` |
| VERIFIED | Complete! |

If no `.manifold/` directory exists, output: "No manifold found in this project."

---
> Converted and distributed by [TomeVault](https://tomevault.io/claim/dhanesh) — claim your Tome and manage your conversions.
<!-- tomevault:4.0:skill_md:2026-04-13 -->

