Skip to content

Repository files navigation

ai-context-framework

Status: archived predecessor. This is the v1 file-based Cursor context framework (rules · packs · graph · slash commands). Active development moved to context-forge — a local MCP server with typed entities, task packs, and FTS search. This repo is kept public as path evidence of the methodology that led there.

A lightweight, file-based framework for managing LLM context in Cursor. It separates canonical rules, structured work context (packs), and a relational graph so AI assistants receive high-signal, consistent inputs — session after session, across every repo.

For architecture, design rationale, governance, and full system documentation, see SYSTEM.md.

Setup

  1. Add the ai-context-framework/ folder to your Cursor workspace as a root folder (enables live @ references and command discovery).
  2. Run /sync-rules — copies canonical rules from rules-source/ into .cursor/rules/ so assistants inherit the latest policy.
  3. Run /sync-commands — copies command definitions from commands/ into .cursor/commands/ so all slash commands are available.

Usage

Before any planning or deep work, load context for the relevant project or system:

/lc <slug>        # load context — reads pack + graph, outputs a structured briefing
/uc <slug>        # update context — merges new information into a pack, bumps version
/new-project <slug>   # bootstrap a new project pack
/new-system <slug>    # bootstrap a new system pack
/link-context         # add bidirectional links in context-graph.md

Daily ritual:

  1. Open Cursor with this folder in your workspace.
  2. Run /sync-rules and /sync-commands once per session (or after any framework edits).
  3. Before planning or ticket work: /lc <slug>.
  4. Work in Plan Mode / Auto Mode as normal.
  5. When context needs correction: /uc <slug> then paste an update block.
  6. For new work: /new-project <slug> or /new-system <slug>, then /link-context.

Slash Commands

Command Purpose
/sync-rules Copy rules-source/*.cursor/rules/ and report a summary.
/sync-commands Copy commands/*.cursor/commands/ and report a summary.
/new-rule Prompt for metadata, add a rule file under rules-source/, then sync.
/lc Load context by slug (e.g. /lc example-blank); reads pack + graph.
/uc Update context by slug; merges pasted sections, bumps version, logs evolution.
/new-project Create projects/<slug>/project-pack.md, graph row, and placeholder cross-reference.
/new-system Create systems/<slug>/system-pack.md, graph row, and placeholder cross-reference.
/link-context Add bidirectional links and optional table updates in context-graph.md.
/graph-add Append a row to a chosen section of context-graph.md.
/update-framework Apply structured framework-level updates and log them in meta/system-evolution.md.
/log-evolution Append a concise framework evolution entry in meta/system-evolution.md.

Example Assets

Two blank scaffolds ship with this framework for onboarding and testing purposes. They are not part of the system — delete or repurpose them once you have real projects and systems.

  • projects/example-blank/project-pack.md — a blank project pack
  • systems/example-blank/system-pack.md — a blank system pack

Try /lc example-blank to test context loading before creating your own packs.

About

v1 file-based Cursor context framework (rules · packs · graph · commands) — superseded by context-forge (MCP). Kept as path evidence.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors