plan-0-v2-constitution
Establish or refresh the project constitution and align the supporting norms documents before any planning phases begin.
Skill by AI-Substrate
Chalk Labs
Need help deploying plan-0-v2-constitution?
Chalk Labs sets up agents like this inside real teams: connected to your tools, tested on your data, with a human in the loop where it matters.
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/ai-substrate-plan-0-v2-constitution
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/plan-0-v2-constitution
What's inside
- Skill name
plan-0-v2-constitution- Description
- Establish or refresh the project constitution and align the supporting norms documents before any planning phases begin. Re-entrant command that preserves user customizations during updates. Domain-aware v2.
- License
- MIT
- Instructions
- 467 lines in SKILL.md · view on GitHub
Files (1)
- SKILL.md
SKILL.md (first lines)
Please deep think / ultrathink as this is a complex task.
# plan-0-constitution (alias: phase-0-constitution)
**Re-entrancy Support**: This command is now re-entrant and will intelligently preserve user customizations when updating existing constitution files. Mark your custom content with `<!-- USER CONTENT START -->` and `<!-- USER CONTENT END -->` for guaranteed preservation across updates.
````md
The user input to you can be provided directly by the agent or as a command argument - you **MUST** consider it before proceeding (if not empty).
User input:
$ARGUMENTS
You are updating the project doctrine files in `docs/project-rules/`:
- `docs/project-rules/constitution.md` (Constitution – guiding principles and governance)
- `docs/project-rules/rules.md` (Rules – normative MUST/SHOULD statements)
- `docs/project-rules/idioms.md` (Idioms – recurring patterns and examples)
- `docs/project-rules/architecture.md` (Architecture – structure, boundaries, interaction contracts)
If any document uses placeholder tokens like `[ALL_CAPS_IDENTIFIER]`, your responsibility is to gather the values, fill or intentionally defer them, and keep all three files mutually consistent. Downstream templates or command prompts may reference these files; when they exist, update them last so they reflect the newly agreed doctrine.
--------------------------------
## Execution Flow (deterministic)
1) Resolve repository paths and detect mode
- If your environment supplies a repository metadata helper (e.g., a prerequisites script defined in command front matter), run it once and parse the returned JSON. Otherwise derive values from the current working directory.
- Set constants:
CONST = `docs/project-rules/constitution.md`
RULES = `docs/project-rules/rules.md`
IDIOMS = `docs/project-rules/idioms.md`
ARCH = `docs/project-rules/architecture.md`
TMPL = `templates/` # Optional helper content if present
- Ensure parent directories exist; create them atomically when missing.
**Domain Detection** (additive — skip if no domains present):
- Check if `docs/domains/registry.md` exists → read all registered domains
- Check if `docs/domains/domain-map.md` exists → read the domain architecture diagram
- If domains directory exists but no registry → read `docs/domains/*/domain.md` files directly
- If NO domain infrastructure exists: note "Domain system not yet initialized" — do NOT auto-create domain files (use `/plan-v2-extract-domain` when ready)
- Store domain context for use in Steps 4 and 6 (governance and architecture sections)
**Re-entrancy Detection**:
- Check if any of CONST, RULES, IDIOMS, ARCH already exist
- If ANY exist: **UPDATE MODE** - Will preserve user customizations
- If NONE exist: **CREATE MODE** - Will create fresh documents
- Display mode to user: "🔄 Updating existing constitution..." or "✨ Creating new constitution..."
2) Launch parallel context gatherers
**IMPORTANT**: Use **parallel subagent gatherers** for faster doctrine loading.
**Strategy**: Launch 4 parallel subagents (single message with 4 Task tool calls) to gather doctrine context concurrently.
**Subagent 1: Doctrine Loader (Re-entrancy Aware)**
"Load existing doctrine files and categorize content for preservation.
**Tasks**:
- For each of CONST, RULES, IDIOMS, ARCH:
* If file exists:
- Read fully and extract version number, [PLACEHOLDER] tokens, section headings, TODOs
- Identify sections marked with `<!-- USER CONTENT START -->` and `<!-- USER CONTENT END -->`
- Categorize each section as: 'generated' (safe to update), 'custom' (must preserve), or 'mixed' (needs merge)
- Extract any filled placeholder values that replaced `[ALL_CAPS_TOKENS]`
- Note custom sections not in standard template
* If missing: Note for creation with minimal outline
**Categorization Rules**:
- Content between USER CONTENT markers = 'custom'
- Standard template sections without modifications = 'generated'
- Standard sections with significant user additions = 'mixed'
- Entirely new user-added sections = 'custom'
**Output**: JSON with {file_path, exists, version, placeholders[], headings[], todos[],
sections[{name, type, content, preserve}], custom_additions[], filled_values{}}
**Return**: Results for all 4 files with preservation metadata."
**Subagent 2: Context Gatherer**
"Gather project governance and quality inputs from documentation.
**Priority order**: $ARGUMENTS > README.md > CONTRIBUTING.md > other handbooks
**Extract**:
- Guiding principles and values
- Quality/verification strategy and testing philosophy
- Delivery practices and governance rules
- Record source for each value (argument, README, etc.)
**Output**: JSON with {principles[], quality_strategy, delivery_practices, governance, sources{}}
Flag unknowns as 'UNKNOWN: <reason>' for TODO handling."
**Subagent 3: Template Scanner**
"Inventory templates and commands that reference doctrine.
**Scan**:
- skills/**/SKILL.md (and any `.claude/commands/*.md`) for references to constitution, rules, idioms, architecture
- templates/ directory for similar references
**Output**: JSON with {file_path, references_to[], link_format, expected_paths[]}
Note any hardcoded paths or placeholders that need updating."
**Subagent 4: Version Analyzer**
"Determine semantic version bump.
**Given**:
- Current versions from Subagent 1
- Changes from Subagent 2 ($ARGUMENTS and context)
**Apply rules**:
- MAJOR: Breaking changes to principles or governance
- MINOR: New principles/sections or materially expanded guidance
- PATCH: Clarifications or formatting adjustments
**Output**: JSON with {current_version, new_version, bump_type, rationale}
Include amendment date as ISO 8601."
**Wait for All Gatherers**: Block until all 4 subagents complete.
3) Synthesize gathered context and prepare merge strategy
- Merge outputs from all 4 subagents into unified doctrine view
- Conflict resolution: $ARGUMENTS > explicit docs > inferred > UNKNOWNFrom AI-Substrate/harness-engineering, MIT.
More from AI-Substrate/harness-engineering
- 0.529score
validate-v2
AI-Substrate
Adaptive, high-signal post-action validation for whatever was just produced — unified plan, tasks, code change, workshop, legacy spec, or any artifact.
SkillBFreshness: BClaude Code +9 - 0.525score
eng-harness-flow
AI-Substrate
Front door for the engineering-harness loop.
SkillBFreshness: BClaude Code +9 - 0.525score
builder
AI-Substrate
The single front door to the SDD pipeline (docs/plans/): research → product plan → implementation guide → tasks → implement → review → post-flight → ship.
SkillBFreshness: BClaude Code +9 - 0.524score
grill-agent-done
AI-Substrate
Interrogate and defend the definition of done and the evidence that will prove it — one claim at a time, until each claim is lined up against the right grade…
SkillBFreshness: BClaude Code +9 - 0.524score
eng-harness-in-a-box
AI-Substrate
The engineering-harness loop with zero dependencies — an engineering harness in a box.
SkillBFreshness: BClaude Code +9 - 0.524score
telemetry-insights-narrate
AI-Substrate
Route the LLM edge of the cohort-telemetry insights layer: turn a generated insights.json into short prose for the report's reserved narrator slot (narrator)…
SkillBFreshness: BClaude Code +9 - 0.524score
flow-eval-run
AI-Substrate
Start a peer-driven flow-conformance eval run with zero archaeology: pick or scaffold a scenario, spawn a BLIND subject peer to do the task, then score the…
SkillBFreshness: BClaude Code +9 - 0.521score
plan-v2-extract-domain
AI-Substrate
Collaboratively identify and formalize an existing codebase concept as a named domain.
SkillBFreshness: BClaude Code +9 - 0.519score
the-flow
AI-Substrate
Backwards-compatible redirect for the SDD pipeline.
SkillBFreshness: BClaude Code +9 - 0.515score
eng-harness-0-harnessability-assessment
AI-Substrate
Assess a Git repository's harnessability — how easily a human or agent can enter, operate, modify, observe, prove, and improve it through an engineering…
SkillBFreshness: BClaude Code +9
Signals
- Stars
- 0
- Forks
- 0
- Open issues
- 42
- Last commit (this folder)
- Jul 6, 2026 (3 months ago)
- Last release
- Aug 30, 2026 (2 months ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from AI-Substrate
- 0.529score
validate-v2
AI-Substrate
Adaptive, high-signal post-action validation for whatever was just produced — unified plan, tasks, code change, workshop, legacy spec, or any artifact.
SkillBFreshness: BClaude Code +9 - 0.525score
eng-harness-flow
AI-Substrate
Front door for the engineering-harness loop.
SkillBFreshness: BClaude Code +9 - 0.525score
builder
AI-Substrate
The single front door to the SDD pipeline (docs/plans/): research → product plan → implementation guide → tasks → implement → review → post-flight → ship.
SkillBFreshness: BClaude Code +9 - 0.524score
grill-agent-done
AI-Substrate
Interrogate and defend the definition of done and the evidence that will prove it — one claim at a time, until each claim is lined up against the right grade…
SkillBFreshness: BClaude Code +9 - 0.524score
eng-harness-in-a-box
AI-Substrate
The engineering-harness loop with zero dependencies — an engineering harness in a box.
SkillBFreshness: BClaude Code +9 - 0.524score
telemetry-insights-narrate
AI-Substrate
Route the LLM edge of the cohort-telemetry insights layer: turn a generated insights.json into short prose for the report's reserved narrator slot (narrator)…
SkillBFreshness: BClaude Code +9
Done for you
Rather not set it up yourself?
Chalk Labs scopes, builds and runs agents for your team: the task audit, the eval harness, the integrations and the weekly ops report. Fixed scope, priced before we start.
See how we build AI agents →Read the case studies
Chalk Labs is a two-founder AI and growth studio. We build AI agents, CRMs and MVPs for Web3 and AI companies, and have shipped 50+ product and token launches.
- launches shipped
- 50+
- launches shipped
- media placements
- 500+
- media placements
- founders on every account
- 2
- founders on every account
Press we've placed: Forbes · CoinDesk · Decrypt · Cointelegraph · The Block
Rahil Jain, Co-founder, Chalk Labs. Ex-Goldman Sachs engineer. You talk to the person who builds it.
Get plan-0-v2-constitution running in your business
Tell us what you want to automate. A founder replies within one working day with a plan, not a pitch deck.
Cite this page
plan-0-v2-constitution skill. Agent Mart. https://agentmart.dev/skills/ai-substrate-plan-0-v2-constitution (last updated 2026-10-24)