{
  "markdown": "# ctx\n\nA context layer for multi-repo workspaces. Maps features across repositories with product definitions, engineering contracts, and implementation docs — designed for AI-assisted development.\n\n## What it does\n\nctx sits on top of your repos and gives AI agents (and humans) a structured way to understand features that span multiple services. Each feature gets three files:\n\n- **product.md** — what the feature does, use cases, business rules\n- **engineering.md** — technical contracts, key interfaces, constraints\n- **implementation.md** — how it's actually built today, key files, flows\n\nSkills use these files to implement new use cases, review contracts, and map existing code — all without losing context across repos.\n\n## Install\n\nThis is a [Claude Code plugin](https://docs.anthropic.com/en/docs/claude-code/plugins). Add the marketplace and install:\n\n```bash\nclaude plugin marketplace add nicolasse/ctx\nclaude plugin install ctx\n```\n\nTo test locally during development:\n\n```bash\nclaude --plugin-dir ./ctx\n```\n\n## Getting started\n\n```bash\n# 1. Create a workspace directory\nmkdir my-project && cd my-project\n\n# 2. Clone your repos at the root level\ngit clone git@github.com:your-org/repo-a.git\ngit clone git@github.com:your-org/repo-b.git\n\n# 3. Open Claude Code and init\nclaude\n# then: /ctx:init\n```\n\n`/ctx:init` asks for your project name, sets up the workspace structure, explores all repos, and generates a workspace map.\n\n## Skills\n\n| Skill | What it does |\n|---|---|\n| `/ctx:init` | Name the project, set up workspace, explore repos, generate workspace map |\n| `/ctx:add-index` | Deep scan all repos and generate `_ctx/index.md` — the big-picture project map |\n| `/ctx:export` | Scan repos and export `_ctx/config.json` with repo list and context link |\n| `/ctx:pull-repos` | Clone repos from `config.json` into the workspace root |\n| `/ctx:add-feature` | Design and implement a new feature from scratch |\n| `/ctx:add-use-case` | Add a use case to an existing feature with contract validation |\n| `/ctx:modify-feature` | Modify an existing feature — loads context, implements changes, validates, updates docs |\n| `/ctx:map-product` | Explores repos + talks to you → generates `product.md` |\n| `/ctx:map-engineering` | Explores repos → extracts technical contracts into `engineering.md` |\n| `/ctx:map-implementation` | Explores repos → maps current implementation into `implementation.md` |\n| `/ctx:update` | Update workspace scaffolding files (CLAUDE.md, templates) to latest plugin version |\n\n## Workspace structure\n\n```\nmy-project/\n  _ctx/                      ← project context (its own git)\n    WORKSPACE.md             ← generated by ctx-init\n    index.md                 ← generated by ctx-add-index\n    config.json              ← repo list for ctx-pull-repos\n    follow-up/               ← feature context\n      product.md\n      engineering.md\n      implementation.md\n  repo-a/                    ← repos live at the root\n  repo-b/\n```\n\n## Automatic Routing\n\nUsers don't need to remember slash commands. When a user asks to work on a feature, route automatically:\n\n1. **Resolve**: list directories under `_ctx/` (skip `_template/`), match the request semantically.\n2. **Route**:\n\n| Situation | Skill |\n|---|---|\n| Feature **exists** in `_ctx/`, user wants to **change** it | `ctx:modify-feature` |\n| Feature **does not exist**, user wants to **build** something new | `ctx:add-feature` |\n| Feature exists, user wants to **add a new use case** | `ctx:add-use-case` |\n| User asks to **map/document** a feature | Ask: \"All three files (product, engineering, implementation) or a specific one?\" Then run the matching `ctx:map-*` skill(s) |\n| No `_ctx/WORKSPACE.md` | `ctx:init` |\n| Need project index | `ctx:add-index` |\n| Need to export/share | `ctx:export` |\n| Need to clone repos | `ctx:pull-repos` |\n\n## Workflow\n\n**First time:**\n1. `/ctx:init` — names project, explores repos, generates `WORKSPACE.md`\n2. `/ctx:add-index` — deep scans all repos, generates `_ctx/index.md`\n3. `/ctx:export` — scans repos and generates `_ctx/config.json`\n\n**Existing feature (already in code, needs context files):**\n1. `/ctx:map-product` → generates `product.md`\n2. `/ctx:map-engineering` → generates `engineering.md`\n3. `/ctx:map-implementation` → generates `implementation.md`\n\n**New feature (doesn't exist in code):**\n1. `/ctx:add-feature` — designs product + engineering, implements, validates, documents\n\n**Adding behavior to an existing feature:**\n1. `/ctx:add-use-case` — implements, validates contracts, updates context files\n\n**Modifying an existing feature:**\n1. `/ctx:modify-feature` — describe the change, implements it, validates, updates context files\n\n**Sharing the workspace:**\n1. `/ctx:export` — generates `_ctx/config.json` with all repo URLs\n2. Push the `_ctx/` repo to GitHub\n3. Others clone it and run `/ctx:pull-repos` to get all repos\n\n## Updating\n\nTo update the plugin:\n\n```bash\nclaude plugin marketplace update nicolasse-ctx && claude plugin update ctx@nicolasse-ctx\n```\n\nTo create a shell alias for quick updates, add this to your `~/.zshrc` (or `~/.bashrc`):\n\n```bash\nalias ctx-update=\"claude plugin marketplace update nicolasse-ctx && claude plugin update ctx@nicolasse-ctx\"\n```\n\nThen reload your shell (`source ~/.zshrc`) and run `ctx-update` anytime.\n",
  "bytes": 5286,
  "sha": "c001c7303fa2aa3a24e225ea899f486ac6f3e3c2aee81254e163a38e1bfe614d",
  "repo_slug": "nicolasse/ctx",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/plg_nicolasse_ctx_ctx_0219dbf1/readme"
}