Brief to plan
Turn a written brief into a checked .arch floor plan. Every step is a CLI call; never judge the
plan from the SVG markup.
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. The language is whatever archlang spec prints.
Scope
- Run the
archlang CLI commands below and no other program.
- Write one new plan file,
plan.arch here or the name the user gives, in the user's working
directory, plus the drawings the CLI renders beside it. If a file of that name already exists,
ask the user before replacing it.
- The user's explicit instructions take priority over these steps.
Steps
- Read the language. Run
archlang spec and read all of it before writing a line. For one
command's flags and examples run archlang <cmd> --help, for example archlang finish --help.
- List what the brief asks for. Write down each room, each stated area, each stated
connection ("opens off the hall"), each stated window, and any outer size. Keep numbers exactly
as the brief states them. If two requirements cannot both hold, stop and tell the user which
ones; do not quietly change a number.
- Write
plan.arch. Give every room an id, a label and a uses. Attach doors and windows
to walls and place furniture by anchor, as archlang spec shows, instead of computing coordinates.
Give every room a door or an opening.
- Compile.
archlang compile plan.arch -o plan.svg --json. If ok is false, read each
diagnostics[].fix. Preview the mechanical fixes with archlang fix plan.arch --dry-run --json,
then apply them with archlang fix plan.arch. Fix the rest by hand and compile again.
- Check the plan against your list.
archlang describe plan.arch --select rooms,doors,windows,totals --json.
Compare room count, labels, each area, what each door connects and which rooms have windows
with the list from step 2. Edit and repeat from step 4 until they match. area_m2 is measured on
wall centrelines; net_area_m2 is the floor no wall stands on.
- Check soundness.
archlang lint plan.arch --json. Fix each warning, or keep it on purpose and
say why. If a room cannot be reached or a bedroom has no window, archlang suggest plan.arch --json
returns door and window statements you can paste.
- Finish the drawing.
archlang finish plan.arch --dry-run --json shows the furniture and sheet
statements it would add; archlang finish plan.arch applies them. Read unresolved: it names each
room left empty and each statement left out, with the reason.
- Gate and show.
archlang validate plan.arch --strict --json must exit 0, or you must be able
to name each remaining warning as deliberate. Then archlang preview plan.arch -o plan.png to show
the user.
Report to the user
- The file you wrote and the drawing you rendered.
- Every requirement of the brief the plan does not meet, or "none".
- Which area you quote:
net_area_m2 is the floor no wall stands on, area_m2 the larger
centreline figure. If a room has no net_area_m2, say its net area could not be computed.
- Every lint warning still present, with the reason it stays.
When something goes wrong
- Exit code
2 is a fault in the source. Read the diagnostic and fix it; do not run the same
command again unchanged. 3 is a wrong flag: run archlang <cmd> --help.
- For an unfamiliar code, run
archlang explain <CODE> --json.
- To gate on the brief as data instead of by eye, write it as an intent file and run
archlang validate plan.arch --intent intent.json --feedback --json. The archlang-review-plan
skill covers this.
1---2name: archlang-brief-to-plan3description: Use when the user gives a written brief for a new floor plan (rooms, areas, how rooms connect, a plot size) and wants the drawing, e.g. "design a two-bedroom flat of about 75 m²" or "lay out a small office with four rooms". Writes an ArchLang .arch file from the brief, checks it against the brief with the archlang CLI, and finishes it as a sheet. Not for changing an existing plan (archlang-edit-plan) or for exporting one (archlang-export).4license: MIT5compatibility: Needs a shell with Node 18+ and the archlang CLI (npx -y @chanmeng666/archlang, or npm i -g @chanmeng666/archlang for a global archlang).6metadata:7 source: https://skillmd.com/skills/chanmeng666/archlang-brief-to-plan8---910# Brief to plan1112Turn a written brief into a checked `.arch` floor plan. Every step is a CLI call; never judge the13plan from the SVG markup.14If `archlang` is not on the path, write `npx -y @chanmeng666/archlang` in its place.15Never run a bare `arch`: on Linux, macOS and Git Bash that name is the coreutils command.1617This skill is a workflow, not a language reference. The language is whatever `archlang spec` prints.1819## Scope2021- Run the `archlang` CLI commands below and no other program.22- Write one new plan file, `plan.arch` here or the name the user gives, in the user's working23 directory, plus the drawings the CLI renders beside it. If a file of that name already exists,24 ask the user before replacing it.25- The user's explicit instructions take priority over these steps.2627## Steps28291. **Read the language.** Run `archlang spec` and read all of it before writing a line. For one30 command's flags and examples run `archlang <cmd> --help`, for example `archlang finish --help`.312. **List what the brief asks for.** Write down each room, each stated area, each stated32 connection ("opens off the hall"), each stated window, and any outer size. Keep numbers exactly33 as the brief states them. If two requirements cannot both hold, stop and tell the user which34 ones; do not quietly change a number.353. **Write `plan.arch`.** Give every room an `id`, a `label` and a `uses`. Attach doors and windows36 to walls and place furniture by anchor, as `archlang spec` shows, instead of computing coordinates.37 Give every room a door or an opening.384. **Compile.** `archlang compile plan.arch -o plan.svg --json`. If `ok` is false, read each39 `diagnostics[].fix`. Preview the mechanical fixes with `archlang fix plan.arch --dry-run --json`,40 then apply them with `archlang fix plan.arch`. Fix the rest by hand and compile again.415. **Check the plan against your list.** `archlang describe plan.arch --select rooms,doors,windows,totals --json`.42 Compare room count, labels, each area, what each door connects and which rooms have windows43 with the list from step 2. Edit and repeat from step 4 until they match. `area_m2` is measured on44 wall centrelines; `net_area_m2` is the floor no wall stands on.456. **Check soundness.** `archlang lint plan.arch --json`. Fix each warning, or keep it on purpose and46 say why. If a room cannot be reached or a bedroom has no window, `archlang suggest plan.arch --json`47 returns door and window statements you can paste.487. **Finish the drawing.** `archlang finish plan.arch --dry-run --json` shows the furniture and sheet49 statements it would add; `archlang finish plan.arch` applies them. Read `unresolved`: it names each50 room left empty and each statement left out, with the reason.518. **Gate and show.** `archlang validate plan.arch --strict --json` must exit `0`, or you must be able52 to name each remaining warning as deliberate. Then `archlang preview plan.arch -o plan.png` to show53 the user.5455## Report to the user5657- The file you wrote and the drawing you rendered.58- Every requirement of the brief the plan does not meet, or "none".59- Which area you quote: `net_area_m2` is the floor no wall stands on, `area_m2` the larger60 centreline figure. If a room has no `net_area_m2`, say its net area could not be computed.61- Every lint warning still present, with the reason it stays.6263## When something goes wrong6465- Exit code `2` is a fault in the source. Read the diagnostic and fix it; do not run the same66 command again unchanged. `3` is a wrong flag: run `archlang <cmd> --help`.67- For an unfamiliar code, run `archlang explain <CODE> --json`.68- To gate on the brief as data instead of by eye, write it as an intent file and run69 `archlang validate plan.arch --intent intent.json --feedback --json`. The archlang-review-plan70 skill covers this.