~ / rigs / philngt / contextd

philngt/contextd

Build system for AI coding-agent context. Generate deterministic, explainable context artifacts for Claude, Codex, Cursor, and MCP.

↗ GitHub ★ 28 MIT updated 13d ago project Claude CodeCodex
stack: Python
share on X
ARCHETYPE
Orchestrator
A bench of specialised subagents. The main agent mostly delegates.
CONTEXT TAX · EVERY TURN
~2.3k tokens
Moderate · median rig: 2.3k · breakdown
GUARDRAILS
1/5
No YOLO mode · details
Quality 15/100 Guardrails v2

Copy this rig

# review before running: this installs third-party code
$ npx degit philngt/contextd/.claude ./rig-contextd  # inspect, then merge into .claude/

MCP servers are added to Claude Code at local scope; env vars are shown as YOUR_… placeholders — we never store values. Files are fetched with degit into a separate folder so you can review before merging.

$ npx degit philngt/contextd/scripts/test-fixtures/bad-plugin/.claude/skills/bad-skill .claude/skills/bad-skill
$ npx degit philngt/contextd/templates/graph-authoring/skills/docs-to-graph .claude/skills/docs-to-graph
$ npx degit philngt/contextd/templates/graph-authoring/skills/project-to-graph .claude/skills/project-to-graph
$ npx degit philngt/contextd/templates/graph-authoring/skills/spec-to-graph .claude/skills/spec-to-graph
$ curl -fsSL --create-dirs -o .claude/agents/contextd-context-selector.md https://raw.githubusercontent.com/philngt/contextd/main/.claude/agents/contextd-context-selector.md
$ curl -fsSL --create-dirs -o .claude/agents/contextd-curator.md https://raw.githubusercontent.com/philngt/contextd/main/.claude/agents/contextd-curator.md
$ curl -fsSL --create-dirs -o .claude/agents/contextd-planner.md https://raw.githubusercontent.com/philngt/contextd/main/.claude/agents/contextd-planner.md
$ curl -fsSL --create-dirs -o .claude/agents/contextd-reviewer.md https://raw.githubusercontent.com/philngt/contextd/main/.claude/agents/contextd-reviewer.md
$ curl -fsSL --create-dirs -o .claude/agents/bad-agent.md https://raw.githubusercontent.com/philngt/contextd/main/scripts/test-fixtures/bad-plugin/.claude/agents/bad-agent.md
$ curl -fsSL --create-dirs -o .claude/agents/coding-rules.md https://raw.githubusercontent.com/philngt/contextd/main/agents/coding-rules.md
$ curl -fsSL --create-dirs -o .claude/agents/constraints.md https://raw.githubusercontent.com/philngt/contextd/main/agents/constraints.md
$ curl -fsSL --create-dirs -o .claude/agents/cross-cutting-principles.md https://raw.githubusercontent.com/philngt/contextd/main/agents/cross-cutting-principles.md
$ curl -fsSL --create-dirs -o .claude/agents/PIPELINE-VISUAL.md https://raw.githubusercontent.<redacted>-VISUAL.md
$ curl -fsSL --create-dirs -o .claude/agents/automation-skeletons.md https://raw.githubusercontent.<redacted>-skeletons.md
$ curl -fsSL --create-dirs -o .claude/agents/code-analysis-prompts-agentic.md https://raw.githubusercontent.com/philngt/contextd/main/agents/pipeline/code-analysis-prompts-agentic.md
$ curl -fsSL --create-dirs -o .claude/agents/code-analysis-prompts-code.md https://raw.githubusercontent.com/philngt/contextd/main/agents/pipeline/code-analysis-prompts-code.md
$ curl -fsSL --create-dirs -o .claude/agents/code-analysis-prompts.md https://raw.githubusercontent.com/philngt/contextd/main/agents/pipeline/code-analysis-prompts.md
$ curl -fsSL --create-dirs -o .claude/agents/code-snapshot-conventions.md https://raw.githubusercontent.com/philngt/contextd/main/agents/pipeline/code-snapshot-conventions.md
$ curl -fsSL --create-dirs -o .claude/agents/concurrency-notes.md https://raw.githubusercontent.<redacted>-notes.md
$ curl -fsSL --create-dirs -o .claude/agents/context-filter.md https://raw.githubusercontent.<redacted>-filter.md
$ curl -fsSL --create-dirs -o .claude/agents/critical-analysis-prompts.md https://raw.githubusercontent.<redacted>-analysis-prompts.md
$ curl -fsSL --create-dirs -o .claude/agents/evidence-lifecycle.md https://raw.githubusercontent.<redacted>-lifecycle.md
$ curl -fsSL --create-dirs -o .claude/agents/multi-agent-pipeline.md https://raw.githubusercontent.com/philngt/contextd/main/agents/pipeline/multi-agent-pipeline.md
$ curl -fsSL --create-dirs -o .claude/agents/observability.md https://raw.githubusercontent.<redacted>.md
$ curl -fsSL --create-dirs -o .claude/agents/prompt-template.md https://raw.githubusercontent.<redacted>-template.md
$ curl -fsSL --create-dirs -o .claude/agents/qa-batching.md https://raw.githubusercontent.com/philngt/contextd/main/agents/pipeline/qa-batching.md
$ curl -fsSL --create-dirs -o .claude/agents/raw-storage-conventions.md https://raw.githubusercontent.com/philngt/contextd/main/agents/pipeline/raw-storage-conventions.md
$ curl -fsSL --create-dirs -o .claude/agents/repetition-detection.md https://raw.githubusercontent.<redacted>-detection.md
$ curl -fsSL --create-dirs -o .claude/agents/report-prompts.md https://raw.githubusercontent.<redacted>-prompts.md
$ curl -fsSL --create-dirs -o .claude/agents/task-to-docs-map.md https://raw.githubusercontent.com/philngt/contextd/main/agents/pipeline/task-to-docs-map.md
$ curl -fsSL --create-dirs -o .claude/agents/validator-rules.md https://raw.githubusercontent.<redacted>-rules.md
$ curl -fsSL --create-dirs -o .claude/agents/workspace-resolution.md https://raw.githubusercontent.<redacted>-resolution.md
$ curl -fsSL --create-dirs -o .claude/agents/system-prompt.md https://raw.githubusercontent.com/philngt/contextd/main/agents/system-prompt.md
$ curl -fsSL --create-dirs -o .claude/agents/backend-implementation.md https://raw.githubusercontent.<redacted>-implementation.md

This rig commits no guardrails. Here is the community baseline instead — the deny/ask rules most often found across all 16.2k rigs:

{
  "permissions": {
    "deny": [
      "Read(./.env)",
      "Read(./.env.*)",
      "Read(**/.env)",
      "Read(~/.ssh/**)",
      "Bash(git push --force:*)",
      "Read(**/*.pem)",
      "Read(.env)",
      "Read(~/.aws/**)",
      "Read(**/*.key)",
      "Read(**/.env.*)",
      "Bash(git push --force*)",
      "Bash(rm -rf:*)",
      "Bash(rm -rf *)",
      "Bash(sudo *)",
      "Bash(sudo:*)",
      "Bash(rm -rf /)",
      "Bash(git push -f:*)",
      "Read(.env.*)",
      "Bash(git reset --hard*)",
      "Bash(rm -rf /*)"
    ],
    "ask": [
      "Bash(git push:*)",
      "Bash(git push *)",
      "Bash(gh pr merge *)",
      "Bash(git commit:*)",
      "Bash(rm *)",
      "Bash(gh pr merge:*)",
      "Bash(gh pr create *)",
      "Bash(git reset --hard:*)",
      "Bash(npm publish:*)",
      "Bash(git rebase *)"
    ]
  }
}

Skills (4)

Subagents (30)

contextd-context-selector
model: sonnet
Compatibility adapter đọc/summarize context artifact từ `contextd context`; canonical source là `.contextd/context/current-task.json`, markdown chỉ là render. KHÔNG tự invent retrieval rules.
contextd-curator
model: sonnet
Cập nhật knowledge repo sau khi code thay đổi — pattern mới, contract mới, service mới, ADR mới. DÙNG KHI user gọi /update-contextd hoặc khi cần đồng bộ knowledge sau merge. KHÔNG DÙNG để chỉnh code p
contextd-planner
model: sonnet
Legacy planner reference. Canonical task classification now happens inside `contextd context`, which emits `.contextd/context/current-task.json`. KHÔNG dùng planner này để override artifact.
contextd-reviewer
model: sonnet
Review output against contracts/patterns/domain rules referenced by `.contextd/context/current-task.json`. Markdown is render-only; JSON artifact is canonical.
bad-agent
model: sonnet
A helper agent
coding-rules—
constraints—
cross-cutting-principles—
PIPELINE-VISUAL—
automation-skeletons—
code-analysis-prompts-agentic—
code-analysis-prompts-code—
code-analysis-prompts—
code-snapshot-conventions—
concurrency-notes—
context-filter—
critical-analysis-prompts—
evidence-lifecycle—
multi-agent-pipeline—
observability—
prompt-template—
qa-batching—
raw-storage-conventions—
repetition-detection—
report-prompts—
task-to-docs-map—
validator-rules—
workspace-resolution—
system-prompt—
backend-implementation—

Hooks (2)

eventmatcherruns
PostToolUseTaskpython scripts/emit_trace.py
UserPromptSubmit*python scripts/detect_repetition.py

Slash commands (36)

/business-view/code-analyze/contextd-admin/contextd-backup/contextd-detect/contextd-eval/contextd-explain/contextd-export-manifest/contextd-report/contextd-restore/contextd-setup/contextd-team-sync/contextd-trace/contextd-upgrade/contextd-version/contextd-viz/evidence-analyze/evidence-apply/evidence-ingest/evidence-qa/find/list-workspaces/new-workspace/observations-clear/obsidian-ingest/product-brief/rebase-contextd/suggest-automation/switch-workspace/tool-design/tool-extend/tool-list/update-contextd/use-contextd/bad-cmd/secret-cmd

Similar rigs

copied ✓