archlang-edit-plan
Skill33 starsChanged 21 days agoMITView on GitHub
Use when the user wants to change an existing ArchLang .arch floor plan, e.g. "make the bedroom 1 m wider", "add a bathroom next to the hall", "move the front door to the south wall", "merge the kitchen into the living room". Reads the plan's facts with the archlang CLI, makes the smallest edit that does the job, and re-verifies. Not for writing a plan from a brief (archlang-brief-to-plan).
- Installs packages
In this repository9 other files it gives its agents.
- AGENTS.mdAGENTS.md
- docs-site/agents.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- llms-full.txtllms.txt
- llms.txtllms.txt
- archlang-brief-to-planSkill
- archlang-exportSkill
- archlang-review-planSkill
- archlangSkill
The file
We split this skill into the rules it gives an agent
8 rules. About 0 are common, 2 are distinctive, and 6 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
6
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 11
If archlang is not on the path, write npx -y @chanmeng666/archlang in its place.
- Very specific: line 12
Never run a bare arch: on Linux, macOS and Git Bash that name is the coreutils command.
- Very specific: line 19
Run the archlang CLI commands below and no other program.
- Very specific: line 27
Record the starting state: Run archlang validate plan.arch --json and archlang describe plan.arch --select rooms,totals --json.
- Very specific: line 43
Move furniture out of the way if needed: If the edit pushed a piece into a wall, a doorway or a door swing, archlang repair plan.arch -o …
- Distinctive: line 46
Verify the change and nothing else: Run the two commands from step 1 again.
- Distinctive: line 69
Before and after for the facts the request is about (for example the room's area).
- Very specific: line 77
If the request needs a new door or window and you are unsure where it can go, archlang suggest plan.arch --json returns candidates with the …
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill 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
Edit an existing plan
Change a .arch file without breaking what already works.
If archlang is not on the path, write npx -y @chanmeng666/archlang in its place.
Never run a bare arch: on Linux, macOS and Git Bash that name is the coreutils command.
This skill is a workflow, not a language reference. Run archlang spec for the language and
archlang <cmd> --help for a command's flags.
Scope
- Run the
archlangCLI commands below and no other program. - Change the one
.archfile the user asked you to edit (plan.archbelow). If the user has not named it, ask. Besides it, write only the drawing the CLI renders and the.bakcopy that--backupkeeps. - The user's explicit instructions take priority over these steps.
Steps
- Record the starting state. Run
archlang validate plan.arch --jsonandarchlang describe plan.arch --select rooms,totals --json. Keep both results: they are what you compare against at the end. If the plan already has errors, tell the user before you edit. - Read only what the change touches.
archlang describe plan.arch --room <ids> --jsonreturns those rooms with the doors, windows and furniture that touch them.archlang describe plan.arch --select freedom --jsonsays which positions the author typed (absolute) and which the compiler derives. Change a typed number; a derived one moves by itself when the thing it depends on moves. - Read the language for the forms you will write.
archlang spec. - Make the smallest edit. Change the statements the request names and leave the rest as they are: same ids, same order, same comments. Do not reformat the file and do not rewrite statements you were not asked to change. When a room changes size, check the walls, doors, windows and neighbouring rooms that share its edges.
- Compile.
archlang compile plan.arch -o plan.svg --json. Ifokis false, preview the mechanical fixes witharchlang fix plan.arch --dry-run --jsonand read the diff before you apply them witharchlang fix plan.arch --backup. - Move furniture out of the way if needed. If the edit pushed a piece into a wall, a doorway
or a door swing,
archlang repair plan.arch -o plan.archmoves it. Readunresolvedfor the pieces it could not move. - Verify the change and nothing else. Run the two commands from step 1 again. The rooms you meant to change differ as intended. Every other room has the same area and the same connections. No diagnostic is new unless the request causes it; if one is, tell the user.
- Refresh the sheet if the drawing grew.
archlang finish plan.arch --dry-run --jsonshows what is missing. If it reports that the drawing no longer fits the authoredpaperorscale,archlang finish plan.arch --reissuemay replace those two statements and nothing else.
When another agent may edit the same file
Pass the file's current revision as --expected-hash <hash>, as in
archlang fix plan.arch --expected-hash <hash> --json. The --json result of each command that
rewrites the file (fix, finish, repair -o plan.arch, fmt --write) says which hash that is:
source_hash is the file as the command read it, and written_hash the file once the command has
written it. A result that hands you rewritten text instead (repair --json, a --dry-run, or the
MCP repair, fix and finish tools) gives output_hash, the file's revision once you write that
text to it unchanged. archlang fmt plan.arch --json reports source_hash without writing. If the
file changed since, the command writes nothing and exits 4 with E_STALE_SOURCE: read the file
again, redo your edit on what is there now, and use the new hash. This narrows the window for a
clash; it is not a lock.
Report to the user
- The statements you changed, as a short diff.
- Before and after for the facts the request is about (for example the room's area).
- Any new warning, and whether the request causes it.
When something goes wrong
- Exit code
2is a fault in the source: read the diagnostic, do not retry unchanged.3is a wrong flag: runarchlang <cmd> --help. archlang explain <CODE> --jsonexplains a diagnostic code.- If the request needs a new door or window and you are unsure where it can go,
archlang suggest plan.arch --jsonreturns candidates with the reason for each.
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.

