TypeAgent / planValidationDemo
CLAUDE.md745 starsChanged 5 months agoMITView on GitHub
This project is governed by a plan-validation MCP server. Every file access and shell call you make must go through the validated_* tools. The built-in Read, Write, Edit, Bash, Glob, Grep tools are NOT available in this session — only the MCP tools provided by the plan-validation server. A live dashboard is running at http://localhost:3100 — every tool call you make is visible there, including blocks. Call get_plan_schema. Read it carefully — the AgentPlan DSL has strict shape requirements and…
In this repository11 other files it gives its agents.
- ts/packages/agents/onboarding/AGENTS.mdAGENTS.md
- ts/packages/typeagent-core/AGENTS.mdAGENTS.md
- ts/packages/typeagent-studio/AGENTS.mdAGENTS.md
- ts/CLAUDE.mdCLAUDE.md
- ts/packages/agents/powershell/CLAUDE.mdCLAUDE.md
- ts/packages/agents/taskflow/CLAUDE.mdCLAUDE.md
- dotnet/autoShell/.github/copilot-instructions.mdCopilot instructions
- .github/copilot-instructions.mdCopilot instructions
- typeagent-memorySkill
- typeagent-macrosSkill
- typeagent-setupSkill
The file
We split this CLAUDE.md into the rules it gives an agent
10 rules. About 0 are common, 3 are distinctive, and 7 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
Distinctive · estimate
This author's own choices. Worth a look.
7
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 15
Call get_plan_schema. Read it carefully — the AgentPlan DSL has strict shape requirements and the validator runs 13 passes.
- Very specific: line 20
Use validated_read on brief.md and design-tokens.json.
- Very specific: line 25
Call submit_plan with an AgentPlan JSON that lists every tool call you intend to make, in order.
- Very specific: line 43
If submit_plan returns errors, fix them and resubmit.
- Distinctive: line 47
Use only these tools, in the exact order your plan declares:
- Very specific: line 66
After the last step, call check_postconditions.
- Very specific: line 81
NEVER use built-in Read, Write, Edit, Bash, Glob, Grep — only validated_*.
- Distinctive: line 82
NEVER try to fetch from the network — policy denies it and it would be blocked anyway.
- Very specific: line 84
NEVER skip submit_plan. No plan → no execution.
- Distinctive: line 85
Keep the plan tight — fewer steps means less that can drift.
≈ “Common” is an estimate: at least 1 in 5 of the 12,729 CLAUDE.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Plan-Validated Agent Execution
This project is governed by a plan-validation MCP server. Every file access and
shell call you make must go through the validated_* tools. The built-in
Read, Write, Edit, Bash, Glob, Grep tools are NOT available in this
session — only the MCP tools provided by the plan-validation server.
A live dashboard is running at http://localhost:3100 — every tool call you make is visible there, including blocks.
Required Workflow
1. Read the plan schema
Call get_plan_schema. Read it carefully — the AgentPlan DSL has strict shape
requirements and the validator runs 13 passes.
2. Read the task inputs
Use validated_read on brief.md and design-tokens.json.
These files describe what to build.
3. Submit a plan
Call submit_plan with an AgentPlan JSON that lists every tool call you
intend to make, in order. The plan must include:
version: "1.1", uniqueid, and agoaldescribing the landing pagesteps: ordered array ofPlanStepnodes. Each step needstool,inputSpec(input constraints — use{ type: "exact", value: "..." }or{ type: "regex", pattern: "..." }),dependsOn, andeffect.limits: resource limits — must fit under the org policy caps (maxTotalSteps ≤ 20, maxFileWrites ≤ 10, maxBytesWritten ≤ 524288)permissions.allowedWritePaths: use a glob covering this directory, e.g.<absolute path of this dir>/**with forward slashes.postconditions: predicates checked after the last step. At minimum include:file_containsonindex.htmlforDecisions, measured.file_containsonindex.htmlforStart a free trialfile_containsonstyle.cssfor--color-primaryfile_containsonscript.jsforcta_click
metadata.allowedTools: list every distinct tool used by the steps.
If submit_plan returns errors, fix them and resubmit. The errors are specific.
4. Execute
Use only these tools, in the exact order your plan declares:
| Tool | Purpose |
validated_read | Read file contents |
validated_write | Create or overwrite a file |
validated_edit | String replacement in a file |
validated_glob | Find files by pattern |
validated_grep | Search file contents |
validated_npm | Run npm/pnpm (structured, safe) |
validated_git | Run git (structured, safe) |
validated_node | Run a node script (structured, safe) |
validated_tsc | Run tsc (structured, safe) |
validated_bash is blocked by policy (capabilities-only mode). Any attempt
to use it will be visible on the dashboard as a block event.
5. Verify
After the last step, call check_postconditions. Every declared predicate must
pass. Then call plan_trace to see the hash-chained audit log.
Failure handling
- Plan violation (wrong tool, wrong inputs): the plan aborts. Call
plan_resetand build a corrected plan. - Policy violation (blocked bash command, denied path): the call is blocked but the plan continues. Adjust the next step.
- Permission denied (path outside your declared
allowedWritePaths): the call is blocked. Either widen the plan's permissions (requiresplan_reset) or use a path inside the declared set.
Rules
- NEVER use built-in
Read,Write,Edit,Bash,Glob,Grep— onlyvalidated_*. - NEVER try to fetch from the network — policy denies it and it would be blocked anyway.
- NEVER skip
submit_plan. No plan → no execution. - Keep the plan tight — fewer steps means less that can drift.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

