skilldrop-cli 1.4.0 → 1.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +8 -7
- package/bin/skilldrop.js +15 -10
- package/catalogue.json +13 -2
- package/contracts/catalogue.schema.json +2 -1
- package/model-routing.json +12 -8
- package/package.json +1 -1
- package/packs/ai-engineering/skills/judge-audit/SKILL.md +28 -11
- package/packs/ai-engineering/skills/judge-audit/evals/evals.json +30 -0
- package/packs/ai-engineering/skills/judge-audit/evals/files/12/judge_runs.csv +241 -0
- package/packs/ai-engineering/skills/judge-audit/evals/files/12/rosa_labels.csv +33 -0
- package/packs/ai-engineering/skills/judge-audit/evals/files/13/moderation_eval.csv +601 -0
- package/packs/ai-engineering/skills/judge-audit/manifest.json +2 -2
- package/packs/ai-engineering/skills/mcp-pairing/manifest.json +1 -1
- package/packs/ai-engineering/skills/mcp-pairing/reference.md +4 -3
- package/packs/ai-engineering/skills/subagent-design/SKILL.md +1 -0
- package/packs/ai-engineering/skills/subagent-design/examples/help-center-localization.md +146 -0
- package/packs/ai-engineering/skills/subagent-design/manifest.json +2 -2
- package/packs/api-builder/skills/prompt-caching-advisor/SKILL.md +4 -0
- package/packs/api-builder/skills/prompt-caching-advisor/examples/support-bot-block-order.md +120 -0
- package/packs/api-builder/skills/prompt-caching-advisor/manifest.json +2 -2
- package/packs/civil-architect/pack.json +60 -0
- package/packs/civil-architect/skills/floor-plan-layout/SKILL.md +103 -0
- package/packs/civil-architect/skills/floor-plan-layout/evals/eval_queries.json +30 -0
- package/packs/civil-architect/skills/floor-plan-layout/evals/evals.json +57 -0
- package/packs/civil-architect/skills/floor-plan-layout/evals/files/4/adu-programme.md +12 -0
- package/packs/civil-architect/skills/floor-plan-layout/examples/ground-floor.md +65 -0
- package/packs/civil-architect/skills/floor-plan-layout/examples/ground-floor.svg +135 -0
- package/packs/civil-architect/skills/floor-plan-layout/manifest.json +34 -0
- package/packs/civil-architect/skills/floor-plan-layout/scripts/plan_check.py +449 -0
- package/packs/civil-architect/skills/floor-plan-layout/templates/plan.json +38 -0
- package/packs/dev-team/loops/release/LOOP.md +4 -4
- package/packs/dev-team/loops/release/loop.json +1 -1
- package/packs/dev-team/skills/bug-triage/SKILL.md +1 -0
- package/packs/dev-team/skills/bug-triage/examples/export-row-limit-escalation.md +126 -0
- package/packs/dev-team/skills/bug-triage/manifest.json +2 -2
- package/packs/product-manager/skills/prd-draft/SKILL.md +1 -0
- package/packs/product-manager/skills/prd-draft/examples/approver-delay-not-slack.md +142 -0
- package/packs/product-manager/skills/prd-draft/manifest.json +2 -2
- package/profiles.json +1 -1
- package/packs/ai-engineering/loops/adopt/LOOP.md +0 -120
- package/packs/ai-engineering/loops/adopt/evals/eval_queries.json +0 -10
- package/packs/ai-engineering/loops/adopt/evals/evals.json +0 -69
- package/packs/ai-engineering/loops/adopt/evals/files/adopt-first-wave-to-sign-off/ai-ideas.md +0 -15
- package/packs/ai-engineering/loops/adopt/evals/files/adopt-first-wave-to-sign-off/org-context.md +0 -27
- package/packs/ai-engineering/loops/adopt/evals/files/adopt-first-wave-to-sign-off/staff-survey.csv +0 -11
- package/packs/ai-engineering/loops/adopt/evals/files/adopt-sponsor-slice-blocked-by-client-data/ai-ideas.md +0 -13
- package/packs/ai-engineering/loops/adopt/evals/files/adopt-sponsor-slice-blocked-by-client-data/firm-context.md +0 -23
- package/packs/ai-engineering/loops/adopt/loop.json +0 -53
- package/packs/career/loops/apply/LOOP.md +0 -97
- package/packs/career/loops/apply/evals/eval_queries.json +0 -9
- package/packs/career/loops/apply/evals/evals.json +0 -55
- package/packs/career/loops/apply/evals/files/apply-candidate-decided-full-run/application-form.md +0 -10
- package/packs/career/loops/apply/evals/files/apply-candidate-decided-full-run/job-posting.md +0 -33
- package/packs/career/loops/apply/evals/files/apply-candidate-decided-full-run/resume.md +0 -34
- package/packs/career/loops/apply/evals/files/apply-fit-gate-hard-requirement/cv.md +0 -27
- package/packs/career/loops/apply/evals/files/apply-fit-gate-hard-requirement/warehouse-supervisor.md +0 -30
- package/packs/career/loops/apply/loop.json +0 -52
- package/packs/product-manager/loops/discover/LOOP.md +0 -82
- package/packs/product-manager/loops/discover/evals/eval_queries.json +0 -30
- package/packs/product-manager/loops/discover/evals/evals.json +0 -54
- package/packs/product-manager/loops/discover/evals/files/discover-no-show-signal/interview-notes.md +0 -63
- package/packs/product-manager/loops/discover/evals/files/discover-no-show-signal/support-tickets.csv +0 -13
- package/packs/product-manager/loops/discover/evals/files/discover-vp-loyalty-no-evidence/vp-message.txt +0 -13
- package/packs/product-manager/loops/discover/loop.json +0 -41
- package/packs/sre-oncall/loops/operate/LOOP.md +0 -84
- package/packs/sre-oncall/loops/operate/evals/eval_queries.json +0 -30
- package/packs/sre-oncall/loops/operate/evals/evals.json +0 -53
- package/packs/sre-oncall/loops/operate/evals/files/operate-export-service-first-outage/alerts.log +0 -22
- package/packs/sre-oncall/loops/operate/evals/files/operate-export-service-first-outage/incident-chat.txt +0 -27
- package/packs/sre-oncall/loops/operate/evals/files/operate-export-service-first-outage/service-notes.md +0 -46
- package/packs/sre-oncall/loops/operate/evals/files/operate-incident-still-open/oncall-log.txt +0 -17
- package/packs/sre-oncall/loops/operate/evals/files/operate-incident-still-open/runbook-webhooks.md +0 -38
- package/packs/sre-oncall/loops/operate/loop.json +0 -41
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
# Worked example: a seven-agent localization plan that grades its own work
|
|
2
|
+
|
|
3
|
+
Input → output oracle for `subagent-design`. Shows a fan-out that is justified but drawn
|
|
4
|
+
wrong: a translator that checks itself, a middle layer with no job, a summary agent standing
|
|
5
|
+
in for a merge, and auto-publishing. It also shows the one barrier the work actually needs.
|
|
6
|
+
|
|
7
|
+
## Input
|
|
8
|
+
|
|
9
|
+
> We're localizing our help center with AI agents. My team lead drew up the plan below. Is
|
|
10
|
+
> this the right setup? Our docs lead has to sign off, so keep it short.
|
|
11
|
+
>
|
|
12
|
+
> **Plan:**
|
|
13
|
+
> 1. A Coordinator agent spawns three Language Leads (de, fr, ja).
|
|
14
|
+
> 2. Each Language Lead spawns one Translator agent per article. The Translator translates
|
|
15
|
+
> the article, then reviews its own translation against the glossary and fixes anything it
|
|
16
|
+
> finds.
|
|
17
|
+
> 3. When all 960 translations are done, a Summary agent reads them all and writes a report of
|
|
18
|
+
> quality issues for the docs lead.
|
|
19
|
+
> 4. The Coordinator publishes everything to the help center.
|
|
20
|
+
> 5. We want 7+ agents because more agents run faster.
|
|
21
|
+
>
|
|
22
|
+
> **Facts:**
|
|
23
|
+
> - 320 English articles, about 1,500 words each, into three languages.
|
|
24
|
+
> - A glossary of 410 product terms with an approved translation per language. Style rule: UI
|
|
25
|
+
> labels stay in English.
|
|
26
|
+
> - Pilot of 40 articles into Japanese: the Translator's self-review marked all 40 "pass". Our
|
|
27
|
+
> Japanese linguist found 11 with UI labels translated, and 4 where the same term was
|
|
28
|
+
> translated two different ways in different articles.
|
|
29
|
+
> - Today a linguist per language approves each article before it goes live.
|
|
30
|
+
|
|
31
|
+
## Output
|
|
32
|
+
|
|
33
|
+
**Not as drawn. Splitting the work per article is right, but four parts of the plan need to
|
|
34
|
+
change.** Keep one translation job per article and language. A separate agent should check
|
|
35
|
+
each translation instead of the translator checking itself. Code should build the report, not
|
|
36
|
+
a summary agent. Drop the Language Lead layer. And nothing goes live without the linguist,
|
|
37
|
+
who stays the final approval. That leaves two agent roles, each run once per article and
|
|
38
|
+
language, plus code around them. The pilot is the reason: the translator passed its own work
|
|
39
|
+
40 times out of 40, and the linguist found problems in at least 11 of those articles.
|
|
40
|
+
|
|
41
|
+
Assumed: each article can be translated on its own, given the glossary.
|
|
42
|
+
|
|
43
|
+
# Orchestration plan: help-center localization (320 articles × de, fr, ja)
|
|
44
|
+
|
|
45
|
+
> Fan-out justification: **context separation**, because about 480,000 words of source won't
|
|
46
|
+
> fit one context well and each article stands alone. **Role conflict** for checking, because
|
|
47
|
+
> the agent that wrote a translation can't honestly grade it, as the 40/40 pilot showed.
|
|
48
|
+
> Speed comes with the per-article split. It is not a reason on its own.
|
|
49
|
+
|
|
50
|
+
## Role cards
|
|
51
|
+
|
|
52
|
+
### orchestrator (code, not an agent)
|
|
53
|
+
- **Mission:** Move each article-language pair through translation, checking and the linguist queue.
|
|
54
|
+
- **Inputs:** article list, glossary, UI-label rule
|
|
55
|
+
- **Denied (isolation):** it doesn't judge translation quality. It acts only on the fields each step returns
|
|
56
|
+
- **Output contract:** `{ article_id: string, lang: "de"|"fr"|"ja", status: "translated"|"checked"|"flagged"|"invalid"|"queued_for_linguist" }[]`
|
|
57
|
+
- **Tools/permissions:** read source articles, write to the linguist's review queue. **No publish permission**
|
|
58
|
+
- **On failure:** marks the item `invalid` with the reason and carries on with the rest
|
|
59
|
+
- **Model:** none needed: routing and merging are code
|
|
60
|
+
|
|
61
|
+
### translator ×960
|
|
62
|
+
- **Mission:** Translate one article into one language using the glossary.
|
|
63
|
+
- **Inputs:** one source article, that language's glossary, the UI-label rule
|
|
64
|
+
- **Denied (isolation):** other articles' translations, so each job stays small. Consistency across articles comes from the glossary and the term check below
|
|
65
|
+
- **Output contract:** `{ article_id: string, lang: string, body: string, terms: [{ source: string, target: string, in_glossary: bool }], status: "ok"|"blocked", blocked_reason: string|null }`
|
|
66
|
+
- **Tools/permissions:** none beyond its inputs. No write access anywhere
|
|
67
|
+
- **On failure:** `status: "blocked"` with a reason. It never sends a partial translation as `ok`
|
|
68
|
+
- **Model:** mid-size: translating with a fixed glossary doesn't need the largest model
|
|
69
|
+
|
|
70
|
+
### checker ×960
|
|
71
|
+
- **Mission:** Find every place the translation departs from the source, the glossary or the UI-label rule.
|
|
72
|
+
- **Inputs:** source article, translated `body`, glossary, UI-label rule
|
|
73
|
+
- **Denied (isolation):** the translator's `terms` list and status, so it checks the text instead of confirming the translator's claims about it
|
|
74
|
+
- **Output contract:** `{ article_id: string, lang: string, verdict: "pass"|"fail"|"blocked", findings: [{ type: "glossary"|"ui_label"|"meaning"|"omission", source_excerpt: string, target_excerpt: string, expected: string }] }`
|
|
75
|
+
- **Tools/permissions:** read-only
|
|
76
|
+
- **On failure:** `verdict: "blocked"`, handled exactly like `fail`. It is never counted as a pass
|
|
77
|
+
- **Model:** mid-size: a different agent from the translator, which is what makes the check independent
|
|
78
|
+
|
|
79
|
+
## Topology
|
|
80
|
+
|
|
81
|
+
**Shape:** a pipeline per article (translate, then check), **because** no article's
|
|
82
|
+
translation depends on another's. **One barrier per language**, **because** the pilot's 4
|
|
83
|
+
inconsistent terms only show up across articles. Code groups every translator's `terms` by
|
|
84
|
+
source term and flags any term with more than one translation. That check needs all of a
|
|
85
|
+
language's articles, and nothing else in the plan does.
|
|
86
|
+
**Depth:** one level. The Language Leads would only pass articles along, and the orchestrator
|
|
87
|
+
already does that.
|
|
88
|
+
|
|
89
|
+
```mermaid
|
|
90
|
+
flowchart LR
|
|
91
|
+
O[orchestrator] --> T["translator ×960"]
|
|
92
|
+
T --> C["checker ×960"]
|
|
93
|
+
T -. terms .-> X{"term check per language"}
|
|
94
|
+
C --> X
|
|
95
|
+
X --> L["linguist approval"]
|
|
96
|
+
L -->|approved| P[help center]
|
|
97
|
+
T -->|invalid output| F[failure list]
|
|
98
|
+
C -->|invalid output| F
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
## Aggregation & verification
|
|
102
|
+
|
|
103
|
+
- **Aggregation:** code. The term check groups by `(lang, source term)`. The report for the
|
|
104
|
+
docs lead is counts of `findings` by type and language, plus the list of `fail` and
|
|
105
|
+
`invalid` articles. Output that doesn't match its schema goes to the failure list and never
|
|
106
|
+
into the report.
|
|
107
|
+
- **Verification:** the checker's job is to find faults, and it never sees the translator's
|
|
108
|
+
own assessment. A failed article goes to the linguist with its findings attached.
|
|
109
|
+
- **Vote rule:** a single checker. An article is flagged if it has any finding. The linguist's
|
|
110
|
+
approval gates publishing, as it does today.
|
|
111
|
+
|
|
112
|
+
## Budget line
|
|
113
|
+
|
|
114
|
+
No spending cap was given, so none is set here. Model sizes are on each card.
|
|
115
|
+
|
|
116
|
+
**Left out of the plan:** the Coordinator publishing everything. Every article still goes
|
|
117
|
+
through linguist approval before it goes live. The pilot shows why: the self-check missed all
|
|
118
|
+
11 UI-label errors.
|
|
119
|
+
|
|
120
|
+
**To confirm**
|
|
121
|
+
- The spending cap for a full run.
|
|
122
|
+
- Whether source articles mark UI labels in a way code can detect. If they do, that check
|
|
123
|
+
can move from the checker to code.
|
|
124
|
+
- Who reworks a failed article: the linguist, or a second translation pass with the findings.
|
|
125
|
+
|
|
126
|
+
Next step: design the run around this, meaning retries, the stop conditions and what happens
|
|
127
|
+
when the cap is hit, before the first full batch.
|
|
128
|
+
|
|
129
|
+
## Why this is the oracle
|
|
130
|
+
|
|
131
|
+
- **The verifier is separate and adversarial, never the generator.** The plan's step 2 has
|
|
132
|
+
the translator check itself, and the pilot's 40/40 self-pass is the evidence that this
|
|
133
|
+
fails. The checker is denied the translator's own claims, so it can't just agree with them.
|
|
134
|
+
- **Aggregation is code, and a barrier needs a named dependency across items.** The summary
|
|
135
|
+
agent becomes a group-by over typed `findings`. The plan's "when all 960 are done"
|
|
136
|
+
synchronisation shrinks to one barrier per language, earned by cross-article term
|
|
137
|
+
consistency, the 4 inconsistent terms no per-article check can see.
|
|
138
|
+
- **Fan out only for a named reason, keep depth to one level, and take budget numbers only
|
|
139
|
+
from the user.** "More agents run faster" is rejected as a reason. The Language Lead layer
|
|
140
|
+
is cut. No cap is invented, and auto-publishing is removed and named as removed.
|
|
141
|
+
|
|
142
|
+
A cheaper pass approves the seven-agent plan and tunes the prompts. It keeps self-review,
|
|
143
|
+
lets a summary agent paraphrase 960 translations, and leaves the Coordinator publishing. That
|
|
144
|
+
ships the pilot's UI-label errors across three languages straight to the live help center. The
|
|
145
|
+
opposite cheap answer, "use one agent", fails too: 480,000 words don't fit one context, and it
|
|
146
|
+
leaves the role conflict in place.
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "subagent-design",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.4",
|
|
4
4
|
"description": "Decompose a task into an orchestrator and subagents — one-mission role cards with typed output contracts, a topology (pipeline / parallel / judge panel) chosen with a reason, context-isolation rationale, and a verification stage that is never a generator. Use when the user wants to fan work out across multiple agents, design a multi-agent workflow or orchestration, or asks \"should this be one agent or several\".",
|
|
5
5
|
"entrypoint": "SKILL.md",
|
|
6
6
|
"deps": { "npm": [], "pip": [] },
|
|
7
7
|
"env": { "required": [], "optional": [] },
|
|
8
8
|
"related": ["agent-budget", "agent-loop-design", "council-review", "devils-advocate", "feature-implement-loop"],
|
|
9
9
|
"tags": ["subagents", "orchestration", "multi-agent", "fan-out", "agentic", "role-cards"],
|
|
10
|
-
"model": { "tier": "
|
|
10
|
+
"model": { "tier": "heavy", "rationale": "Measured (RFC-0073): on its held-out evals the heavy tier met 100% and 100% of checks in two tier trials, against standard's 86% and light's 85% and 86%, more than 5 points ahead both times; moved once its examples/ oracle shipped (RFC-0074)." }
|
|
11
11
|
}
|
|
@@ -75,6 +75,10 @@ Produce:
|
|
|
75
75
|
1. **Annotated structure** — show the messages array with `cache_control` placements marked and commented
|
|
76
76
|
2. **Cache strategy summary** — one paragraph: what is cached, why, expected hit rate, and the dominant cost driver before and after
|
|
77
77
|
|
|
78
|
+
## Useful references in this skill
|
|
79
|
+
|
|
80
|
+
- [`examples/support-bot-block-order.md`](examples/support-bot-block-order.md) — worked example: a breakpoint under the minimum size and a per-customer block splitting a shared cache, fixed by reordering
|
|
81
|
+
|
|
78
82
|
## Anti-patterns
|
|
79
83
|
|
|
80
84
|
- **Caching dynamic content.** If a user query, timestamp, or per-request database result is inside a cached block, every request is a cache miss — the structure defeats itself. Identify and flag before recommending.
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
# Worked example: a cache breakpoint that "didn't move the bill"
|
|
2
|
+
|
|
3
|
+
Input → output oracle for `prompt-caching-advisor`. Shows a breakpoint that never caches
|
|
4
|
+
because its prefix is under the minimum size, a per-customer block that splits a shared cache
|
|
5
|
+
in two, and the fix as a reordering, not an extra marker.
|
|
6
|
+
|
|
7
|
+
## Input
|
|
8
|
+
|
|
9
|
+
> Our support bot runs on Haiku. We added `cache_control` to the instructions block because
|
|
10
|
+
> that's the static part, and the input bill didn't move. Should we add another one on the
|
|
11
|
+
> catalogue? Numbers: about 150,000 requests a day, conversations average 6 turns with a turn
|
|
12
|
+
> every 1–2 minutes, busy all day and quiet overnight. The catalogue is rebuilt once a night
|
|
13
|
+
> at 02:00.
|
|
14
|
+
|
|
15
|
+
```python
|
|
16
|
+
def build_request(customer, session, question):
|
|
17
|
+
system = [
|
|
18
|
+
{"type": "text", "text": INSTRUCTIONS, # ~3,200 characters
|
|
19
|
+
"cache_control": {"type": "ephemeral"}},
|
|
20
|
+
{"type": "text", "text": render_profile(customer)}, # ~1,400 characters, per customer
|
|
21
|
+
{"type": "text", "text": load_catalogue()}, # ~62,000 characters
|
|
22
|
+
]
|
|
23
|
+
messages = session.history + [{"role": "user", "content": question}]
|
|
24
|
+
return {"model": MODEL, "max_tokens": 800, "system": system, "messages": messages}
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
## Output
|
|
28
|
+
|
|
29
|
+
**Don't add a second marker yet. Fix the order first.** Two things are wrong, and a marker on
|
|
30
|
+
the catalogue in its current position would only fix half of it.
|
|
31
|
+
|
|
32
|
+
1. **Your current breakpoint caches nothing.** A breakpoint caches the whole prefix up to and
|
|
33
|
+
including its block. Here that is the instructions alone: 3,200 characters, or about 800
|
|
34
|
+
tokens. Haiku's minimum is about 1,024 tokens, so the API processes it as normal input,
|
|
35
|
+
with no error and no saving. That is why the bill didn't move.
|
|
36
|
+
2. **The customer profile sits in front of the catalogue.** The profile differs for every
|
|
37
|
+
customer, so any breakpoint after it makes a separate cache entry per customer. A marker
|
|
38
|
+
on the catalogue where it sits now would cache instructions + profile + catalogue together.
|
|
39
|
+
It would hit only on later turns of the same conversation, and every customer's first turn
|
|
40
|
+
would pay to write 16,600 tokens to the cache.
|
|
41
|
+
|
|
42
|
+
Move the catalogue above the profile, put one breakpoint at the end of the catalogue, and put
|
|
43
|
+
a second, moving breakpoint on the latest user turn.
|
|
44
|
+
|
|
45
|
+
### Annotated structure
|
|
46
|
+
|
|
47
|
+
| Block | Size (~4 chars/token) | Class | Cached by |
|
|
48
|
+
|---|---|---|---|
|
|
49
|
+
| Instructions | 3,200 ch ≈ 800 tok | Static | BP1 (as part of its prefix) |
|
|
50
|
+
| Catalogue | 62,000 ch ≈ 15,500 tok | Static until the 02:00 rebuild | BP1 |
|
|
51
|
+
| Customer profile | 1,400 ch ≈ 350 tok | Quasi-static (per conversation) | BP2 |
|
|
52
|
+
| Earlier turns | grows each turn | Fixed once sent | BP2 |
|
|
53
|
+
| Latest question | varies | Dynamic | written by BP2 for the *next* turn to read |
|
|
54
|
+
|
|
55
|
+
```python
|
|
56
|
+
def build_request(customer, session, question):
|
|
57
|
+
system = [
|
|
58
|
+
# Static. ~800 tokens: under Haiku's ~1,024 minimum, so no marker of its own.
|
|
59
|
+
# It is still cached, because BP1's prefix includes it.
|
|
60
|
+
{"type": "text", "text": INSTRUCTIONS},
|
|
61
|
+
# Static until the 02:00 rebuild. ~15,500 tokens.
|
|
62
|
+
{"type": "text", "text": load_catalogue(),
|
|
63
|
+
"cache_control": {"type": "ephemeral"}}, # BP1: instructions + catalogue, ~16,300 tokens,
|
|
64
|
+
# identical for every customer
|
|
65
|
+
# Quasi-static: the same for a whole conversation, different per customer.
|
|
66
|
+
# It sits after BP1 so it can't split the shared entry.
|
|
67
|
+
{"type": "text", "text": render_profile(customer)},
|
|
68
|
+
]
|
|
69
|
+
latest = {
|
|
70
|
+
"role": "user",
|
|
71
|
+
"content": [{"type": "text", "text": question,
|
|
72
|
+
"cache_control": {"type": "ephemeral"}}], # BP2: profile + all earlier turns + this one
|
|
73
|
+
}
|
|
74
|
+
# session.history stores turns WITHOUT cache_control. If the marker is saved into history,
|
|
75
|
+
# markers pile up turn after turn, and from turn 4 the request carries more than the API's
|
|
76
|
+
# limit of four breakpoints.
|
|
77
|
+
messages = session.history + [latest]
|
|
78
|
+
return {"model": MODEL, "max_tokens": 800, "system": system, "messages": messages}
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
BP2 is not caching dynamic content. It writes the conversation so far, so that the next turn,
|
|
82
|
+
where this question is now fixed history, can read it. Nothing that changes between requests
|
|
83
|
+
sits in front of BP1, and that is the prefix every customer shares.
|
|
84
|
+
|
|
85
|
+
Two breakpoints, one per logical boundary: content shared by everyone, then content shared
|
|
86
|
+
within a conversation. A third marker on the instructions would add nothing, because they are
|
|
87
|
+
under the minimum and already inside BP1's prefix.
|
|
88
|
+
|
|
89
|
+
### Cache strategy summary
|
|
90
|
+
|
|
91
|
+
BP1 caches the instructions and catalogue, about 16,300 tokens, as one entry shared by every
|
|
92
|
+
customer. At about 150,000 requests a day it stays warm all through the busy hours, so its hit
|
|
93
|
+
rate is near 100%. It misses on the first request after the 02:00 rebuild and after any
|
|
94
|
+
overnight gap longer than the cache's five-minute lifetime. BP2 caches each conversation's
|
|
95
|
+
profile and earlier turns. With turns 1–2 minutes apart, turns 2–6 read it, about 5 of 6
|
|
96
|
+
requests. Before the change, about 16,600 tokens of instructions, profile and catalogue were
|
|
97
|
+
processed at full price on every request, roughly 2.5 billion input tokens a day. After it,
|
|
98
|
+
almost all of that is a cache read, billed at about a tenth of the normal input price. The
|
|
99
|
+
largest costs left are output tokens and each turn's new question. This answer gives no dollar
|
|
100
|
+
figure: the request didn't include prices, and the hit rates above are estimates until the
|
|
101
|
+
response `usage` fields (`cache_read_input_tokens`, `cache_creation_input_tokens`) confirm
|
|
102
|
+
them.
|
|
103
|
+
|
|
104
|
+
## Why this is the oracle
|
|
105
|
+
|
|
106
|
+
- **The last block caches everything before it.** The user's mental model, "mark the static
|
|
107
|
+
block", is per block. A breakpoint marks a prefix. That one rule explains why the
|
|
108
|
+
instructions marker did nothing (its prefix is 800 tokens) and why a catalogue marker in
|
|
109
|
+
the current order would be keyed per customer (its prefix includes the profile).
|
|
110
|
+
- **Check the size before recommending a cache.** The fix removes the user's existing marker,
|
|
111
|
+
because it is under Haiku's minimum. The instructions still get cached, inside BP1.
|
|
112
|
+
- **Never let dynamic or per-user content split a shared prefix.** The profile is not dynamic
|
|
113
|
+
per request, but it is per customer. Moving it below BP1 turns a per-conversation cache into
|
|
114
|
+
a shared one. The comment on `session.history` heads off the four-breakpoint error that a
|
|
115
|
+
moving breakpoint causes when it is stored.
|
|
116
|
+
|
|
117
|
+
A cheaper pass answers the question as asked: "Yes, add `cache_control` to the catalogue
|
|
118
|
+
block." That gives each conversation a cache entry of its own, a premium cache write on every
|
|
119
|
+
first turn, and a bill that drops far less than expected. The team blames caching, and the
|
|
120
|
+
dead instructions marker stays in the code.
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "prompt-caching-advisor",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.1",
|
|
4
4
|
"description": "Analyzes a prompt or conversation structure and identifies the highest-value cache breakpoints — where to insert cache_control checkpoints to minimize repeated token processing. Use when designing or optimizing a Claude API integration that uses prompt caching, when input costs are dominated by a static system prompt or few-shot block, or when a multi-turn conversation reprocesses the same context on every turn.",
|
|
5
5
|
"entrypoint": "SKILL.md",
|
|
6
6
|
"deps": { "npm": [], "pip": [] },
|
|
7
7
|
"env": { "required": [], "optional": [] },
|
|
8
8
|
"related": ["token-budget-estimator"],
|
|
9
9
|
"tags": ["claude-api", "caching", "cost", "optimization", "prompt-engineering"],
|
|
10
|
-
"model": { "tier": "
|
|
10
|
+
"model": { "tier": "heavy", "rationale": "Measured (RFC-0073): on its held-out evals the heavy tier met 90% and 90% of checks in two tier trials, against standard's 63% and light's 83% and 73%, more than 5 points ahead both times; moved once its examples/ oracle shipped (RFC-0074)." }
|
|
11
11
|
}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
{
|
|
2
|
+
"description": "Building design from a client's room list and a footprint: a schematic floor plan placed at real sizes and drawn as a dimensioned SVG, shown only once a script has checked it for overlapping rooms, rooms outside the footprint, doors on no shared wall, rooms no one can reach and habitable rooms with no window.",
|
|
3
|
+
"display_name": "Civil architect",
|
|
4
|
+
"keywords": [
|
|
5
|
+
"architecture",
|
|
6
|
+
"architect",
|
|
7
|
+
"floor plan",
|
|
8
|
+
"test fit",
|
|
9
|
+
"concept plan",
|
|
10
|
+
"zoning",
|
|
11
|
+
"layout",
|
|
12
|
+
"dimensions",
|
|
13
|
+
"svg"
|
|
14
|
+
],
|
|
15
|
+
"links": {
|
|
16
|
+
"documentation": "https://sananthanarayan.github.io/skilldrop/packs/civil-architect/"
|
|
17
|
+
},
|
|
18
|
+
"maintainers": [
|
|
19
|
+
{
|
|
20
|
+
"name": "sananthanarayan"
|
|
21
|
+
}
|
|
22
|
+
],
|
|
23
|
+
"first-value": {
|
|
24
|
+
"audience-posture": "non-technical",
|
|
25
|
+
"prerequisites": [
|
|
26
|
+
"The rooms you need with their sizes, and the footprint's width and depth",
|
|
27
|
+
"Python 3 on the machine, which the checker and drawing script run on"
|
|
28
|
+
],
|
|
29
|
+
"starter-task": "Get a checked, dimensioned concept plan from a room list and a footprint",
|
|
30
|
+
"starter-prompt": "Draw a ground floor plan for a 10 m wide × 9 m deep footprint, road on the south, front door from the road. Rooms: foyer 6 m², living 26 m², dining 14 m², kitchen 12.6 m², utility 4 m² next to the kitchen, prayer room 4.5 m² not next to the kitchen or the toilet, guest toilet 3.2 m², and a stair. Living, dining, kitchen and prayer room need windows.",
|
|
31
|
+
"verification": "floor-plan-layout states its zoning in a few lines, writes an SVG plan with overall dimensions, room sizes and areas, door swings, windows, a scale bar and a north arrow, and shows a room table from a checker that reported no overlaps, every door on a shared wall and every room reachable.",
|
|
32
|
+
"recovery": "If floor-plan-layout does not activate, ask for it by name (\"use floor-plan-layout\"). If the plan is too tight, ask for a second option with the rooms it may shrink named."
|
|
33
|
+
},
|
|
34
|
+
"requires": [
|
|
35
|
+
"core"
|
|
36
|
+
],
|
|
37
|
+
"journey": {
|
|
38
|
+
"when": "You have a client's room list and a footprint, and want a first plan to discuss.",
|
|
39
|
+
"you_bring": [
|
|
40
|
+
"the rooms, with their sizes or areas",
|
|
41
|
+
"the footprint's width and depth, or its corner coordinates",
|
|
42
|
+
"the road or entrance side, and north",
|
|
43
|
+
"what must sit next to what, and what must be kept apart"
|
|
44
|
+
],
|
|
45
|
+
"steps": [
|
|
46
|
+
{
|
|
47
|
+
"skill": "floor-plan-layout",
|
|
48
|
+
"you_do": "Give it the rooms, the footprint and the entrance side.",
|
|
49
|
+
"you_get": "Zoning in a few lines, then a dimensioned SVG plan per floor that has passed the checker, with every room's size and area.",
|
|
50
|
+
"decide": "Take the plan to the client, or ask for another option."
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
"skill": "floor-plan-layout",
|
|
54
|
+
"you_do": "Ask for a second option, naming what may change (a smaller hall, the stair moved).",
|
|
55
|
+
"you_get": "Another checked plan, with each room that changed against its target."
|
|
56
|
+
}
|
|
57
|
+
],
|
|
58
|
+
"you_end_with": "A checked concept plan, ready to develop in your CAD or BIM tool."
|
|
59
|
+
}
|
|
60
|
+
}
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: floor-plan-layout
|
|
3
|
+
description: Lay out a schematic floor plan from a space programme and a footprint, and draw it as a dimensioned SVG — rooms placed as rectangles at real sizes, doors and windows on real walls, overall dimensions, a scale bar and north arrow — with a script that fails the plan when rooms overlap, a room spills outside the footprint, a door sits on no shared wall or a room can't be reached from the entrance. Use when an architect asks to "draw a floor plan", "lay out these rooms", "make a plan for a 10 × 9 m footprint", for a concept plan, a test fit, a zoning diagram or a dimensioned layout from room sizes.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# floor-plan-layout
|
|
7
|
+
|
|
8
|
+
A concept floor plan: every room from the programme placed at its real size inside the
|
|
9
|
+
footprint, connected by doors, lit by windows on outside walls, and drawn to scale. The
|
|
10
|
+
agent does the design reasoning (what goes where and why); a script checks the geometry and
|
|
11
|
+
draws it, so a plan that looks right but has a room overlapping its neighbour or a bedroom
|
|
12
|
+
reachable only through a bathroom never reaches the client. Its inputs are the
|
|
13
|
+
client's room list and the footprint the site allows.
|
|
14
|
+
|
|
15
|
+
## How to respond
|
|
16
|
+
|
|
17
|
+
1. **Gather the three inputs.** Take them from the conversation or the files the user names:
|
|
18
|
+
- **Rooms and target areas,** with adjacencies: an area schedule or the user's list
|
|
19
|
+
- **The outline** of the floor: footprint width × depth, or corner coordinates, inside the site's envelope
|
|
20
|
+
- **Fixed points:** the road side and entrance, north, a stair or core position, an existing wall to keep
|
|
21
|
+
|
|
22
|
+
Ask at most two questions, only for a missing outline or entrance side. A plan with no
|
|
23
|
+
footprint and no plot to derive one from is `BLOCKED`.
|
|
24
|
+
|
|
25
|
+
2. **Decide the zoning before any coordinates.** Write three to six lines:
|
|
26
|
+
- public rooms (living, reception) on the entrance side; private rooms (bedrooms) away from it
|
|
27
|
+
- wet rooms (kitchen, toilets, bathrooms) grouped so plumbing stacks, and stacked over each other across floors
|
|
28
|
+
- every `near` from the programme met by a shared wall, every `apart` by at least one room between
|
|
29
|
+
- daylight: every habitable room on an outside wall; north or south as the climate wants, stated
|
|
30
|
+
- the stair in the same place on every floor
|
|
31
|
+
|
|
32
|
+
Then place rooms as rectangles on a grid of 0.3 m (1 ft) or its multiples, starting from a
|
|
33
|
+
corner, so shared walls line up exactly. An L-shaped room is two or three rectangles under
|
|
34
|
+
one name.
|
|
35
|
+
|
|
36
|
+
3. **Write `plan.json`** in the shape of [`templates/plan.json`](templates/plan.json): `outline`,
|
|
37
|
+
each room's `rect` `[x, y, width, depth]` (or `rects`) with `target_area`, `min_width` and
|
|
38
|
+
`habitable`, every door as `between` two rooms (or `"outside"`) `at` a point on the shared
|
|
39
|
+
wall, and windows `at` a point on an outside wall. x runs left to right, y from the front
|
|
40
|
+
(road side) to the back. One file per floor.
|
|
41
|
+
|
|
42
|
+
4. **Run the checker and fix every FAIL before showing anything.**
|
|
43
|
+
|
|
44
|
+
```bash
|
|
45
|
+
# Claude Code
|
|
46
|
+
python3 "${CLAUDE_SKILL_DIR}/scripts/plan_check.py" plan.json --svg ground-floor.svg
|
|
47
|
+
# Other IDEs (from the skill folder)
|
|
48
|
+
python3 scripts/plan_check.py plan.json --svg ground-floor.svg
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
Exit 0 means no failures; 1 means a failure (overlap, outside the outline, door on no
|
|
52
|
+
shared wall, a room unreachable, no entrance); 2 means the input is malformed. Move rooms
|
|
53
|
+
and rerun until it exits 0. A WARN can stand only with a sentence saying why.
|
|
54
|
+
|
|
55
|
+
5. **Report in this order:**
|
|
56
|
+
1. **The plan's path** and one line on its organising idea. ✅ *"Public rooms along the road, wet rooms stacked on the east wall, stair by the entrance so the first floor is reached without crossing the living room."*
|
|
57
|
+
2. **The zoning lines** from step 2.
|
|
58
|
+
3. **The checker's room table and result,** unchanged.
|
|
59
|
+
4. **Every remaining WARN with its reason,** and every area off target with what it traded for.
|
|
60
|
+
5. **What this plan is not:** schematic, wall thicknesses nominal, no structure, services or code check. The architect checks it against the local rules before it goes further.
|
|
61
|
+
|
|
62
|
+
**Non-interactive runs** (subagent, CI, headless): take the entrance on the first outline edge
|
|
63
|
+
and north as up, tagged `[assumption]`, and size unsized rooms from the programme. With no
|
|
64
|
+
outline and no plot dimensions, emit `BLOCKED: need the footprint's dimensions or the plot and
|
|
65
|
+
setbacks to derive it`.
|
|
66
|
+
|
|
67
|
+
## Useful references in this skill
|
|
68
|
+
|
|
69
|
+
- [`templates/plan.json`](templates/plan.json) — the input shape: a 10 × 9 m ground floor with an L-shaped hall
|
|
70
|
+
- [`scripts/plan_check.py`](scripts/plan_check.py) — overlap, containment, doors on shared walls, reachability, areas, windows; draws the SVG
|
|
71
|
+
- [`examples/ground-floor.md`](examples/ground-floor.md) — worked example: a programme and footprint become a checked, drawn plan, including the FAIL the first draft hit
|
|
72
|
+
|
|
73
|
+
## Quality bar
|
|
74
|
+
|
|
75
|
+
- **The checker exits 0.** No plan with an overlap, a room outside the outline, a door on no wall or an unreachable room is shown to the user.
|
|
76
|
+
- **Every room from the programme is on the plan,** at its target area within 10 %, or the difference is explained.
|
|
77
|
+
- **Every stated adjacency is a shared wall,** and every `apart` has a room between.
|
|
78
|
+
- **Every habitable room has a window on an outside wall.**
|
|
79
|
+
- **No bedroom or living space is reached only through a bathroom, toilet or another bedroom.**
|
|
80
|
+
- **The drawing has overall dimensions, room sizes, a scale bar and a north arrow,** and says it is schematic.
|
|
81
|
+
|
|
82
|
+
## When to use this skill
|
|
83
|
+
|
|
84
|
+
- ✅ A concept plan or test fit from a programme and footprint
|
|
85
|
+
- ✅ Two or three layout options for the same brief, each checked
|
|
86
|
+
- ✅ Re-planning after the client changes a room
|
|
87
|
+
- ✅ A zoning diagram before detailed design
|
|
88
|
+
|
|
89
|
+
## When NOT to use this skill
|
|
90
|
+
|
|
91
|
+
- ❌ Working out the room list and areas from a brief, before any layout: total them first, then plan
|
|
92
|
+
- ❌ How big the footprint may be under setbacks, coverage and FAR: that is a site feasibility check, done before the plan
|
|
93
|
+
- ❌ Construction, working or submission drawings in CAD/BIM: this is a schematic for discussion
|
|
94
|
+
- ❌ Structural grids, MEP routing or a code compliance check
|
|
95
|
+
|
|
96
|
+
## Anti-patterns to avoid
|
|
97
|
+
|
|
98
|
+
- ❌ **Drawing the plan in ASCII or Mermaid.** Neither holds a dimension; the SVG does.
|
|
99
|
+
- ❌ **Showing a plan before the checker passes.** The overlap you can't see in a list of coordinates is the one the client finds.
|
|
100
|
+
- ❌ **Rooms that touch "nearly":** a 3.95 and a 4.0 leave a 50 mm sliver no one can build. Use the grid.
|
|
101
|
+
- ❌ **A corridor that serves nothing.** Circulation that reaches no door is area the client pays for.
|
|
102
|
+
- ❌ **Toilet doors opening onto the dining or kitchen,** and a prayer or puja room sharing a wall with a toilet when the brief keeps them apart.
|
|
103
|
+
- ❌ **Calling the plan code-compliant.** The checker tests geometry, not the building code.
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
[
|
|
2
|
+
{
|
|
3
|
+
"query": "Draw a floor plan for these rooms in a 12 × 15 m footprint",
|
|
4
|
+
"should_trigger": true
|
|
5
|
+
},
|
|
6
|
+
{
|
|
7
|
+
"query": "Lay out a 3BHK in this footprint and give me a dimensioned plan",
|
|
8
|
+
"should_trigger": true
|
|
9
|
+
},
|
|
10
|
+
{
|
|
11
|
+
"query": "Can you do a quick test fit of the clinic programme on the ground floor?",
|
|
12
|
+
"should_trigger": true
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
"query": "Make a zoning diagram for the house with the bedrooms away from the road",
|
|
16
|
+
"should_trigger": true
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
"query": "Make a Figma diagram of our microservices",
|
|
20
|
+
"should_trigger": false
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
"query": "Draw a sequence diagram of the checkout flow",
|
|
24
|
+
"should_trigger": false
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
"query": "Build an interactive diagram of our data pipeline I can click through",
|
|
28
|
+
"should_trigger": false
|
|
29
|
+
}
|
|
30
|
+
]
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
{
|
|
2
|
+
"skill_name": "floor-plan-layout",
|
|
3
|
+
"evals": [
|
|
4
|
+
{
|
|
5
|
+
"id": 1,
|
|
6
|
+
"prompt": "Draw a ground floor plan for a 10 m wide × 9 m deep footprint, road on the south, front door from the road. Rooms: foyer 6 m², living 26 m², dining 14 m², kitchen 12.6 m², utility 4 m² next to the kitchen, prayer room 4.5 m² not next to the kitchen or the toilet, guest toilet 3.2 m², and a stair to the first floor. Living, dining, kitchen and prayer room need windows.",
|
|
7
|
+
"assertions": [
|
|
8
|
+
"Writes a plan.json and runs plan_check.py, and the final run exits 0 (no FAIL lines)",
|
|
9
|
+
"Writes an SVG with overall dimensions, room sizes and areas, a scale bar and a north arrow",
|
|
10
|
+
"Every room listed is on the plan, each within 10 % of its area or the difference is explained",
|
|
11
|
+
"The prayer room shares no wall with the kitchen or the toilet",
|
|
12
|
+
"Living, dining, kitchen and prayer room each have a window on an outside wall",
|
|
13
|
+
"States the zoning decisions (public at the front, wet rooms grouped, stair placement) before or with the plan",
|
|
14
|
+
"Says the plan is schematic and not checked against the building code"
|
|
15
|
+
]
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
"id": 2,
|
|
19
|
+
"prompt": "Quick test fit: 2-bed apartment, footprint is 7.2 x 10.8 m, entrance in the middle of the long east side. Need living/dining 22 m², kitchen 8 m², two bedrooms 11 m² each, one bathroom 4.5 m², and a hall. Bedrooms must not open off the living room. Just give me the plan.",
|
|
20
|
+
"assertions": [
|
|
21
|
+
"Runs plan_check.py and shows a plan only after it exits 0",
|
|
22
|
+
"Neither bedroom's only door opens onto the living/dining room; both are reached from the hall",
|
|
23
|
+
"No bedroom or living space is reached only through the bathroom",
|
|
24
|
+
"Every room has its size and area on the drawing, and the totals fit inside 7.2 × 10.8 m",
|
|
25
|
+
"Delivers the plan without asking questions first, tagging anything it had to assume",
|
|
26
|
+
"Does not draw the plan in ASCII or Mermaid"
|
|
27
|
+
]
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
"id": 3,
|
|
31
|
+
"held_out": "2026-11-05",
|
|
32
|
+
"prompt": "make a plan for a 10 x 9 m footprint. 10m runs E-W, entrance on the south side. rooms: living 5x4.5, kitchen 3x3, bed 1 3.5x3.5, bed 2 3x3, bath 2.4x2. bath door must NOT open off the kitchen. single storey holiday cottage at Lake Ternholm, concept only",
|
|
33
|
+
"assertions": [
|
|
34
|
+
"It produces an SVG plan with overall dimensions of 10.0 m (E-W) × 9.0 m (N-S), a scale bar, and a north arrow that agrees with the entrance being on the south wall",
|
|
35
|
+
"All five rooms are drawn at their stated sizes (to within about 0.1 m), all fully inside the footprint, with no two rooms overlapping",
|
|
36
|
+
"The entrance door is on the south external wall",
|
|
37
|
+
"Every room can be reached from the entrance through doors, via the living room or a hall/corridor",
|
|
38
|
+
"The bathroom door does not open into the kitchen, and there is no door between the bathroom and the kitchen",
|
|
39
|
+
"Windows are only on external walls, never on internal partitions",
|
|
40
|
+
"It does not invent rooms beyond the five requested plus circulation (no second bathroom, store, garage or porch presented as part of the brief)"
|
|
41
|
+
]
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
"id": 4,
|
|
45
|
+
"held_out": "2026-11-05",
|
|
46
|
+
"prompt": "Hi, attached is the space programme from our meeting with the Okafor-Lindqvist family for their backyard ADU in Brambleton (adu-programme.md). Buildable footprint is 30 ft x 24 ft, single storey, with the 30 ft side facing the street to the west, and the entry comes from the street. Could you lay out the rooms and draw a dimensioned concept plan we can show them on Thursday?",
|
|
47
|
+
"assertions": [
|
|
48
|
+
"It reports that the programme's rooms add up to 869 sq ft (320 + 144 + 182 + 121 + 54 + 48) against a 720 sq ft footprint (30 × 24), 149 sq ft over before any circulation, so it cannot fit as given",
|
|
49
|
+
"It does not hand over a plan where rooms overlap, rooms sit outside the 30 × 24 ft footprint, or rooms have been shrunk without saying which ones and by how much",
|
|
50
|
+
"It offers concrete ways to fix it (named rooms cut or resized with new sizes, a larger footprint, or a second storey as an option for the user to decide) or asks the user to choose; if it draws a test fit, it lists every changed room size next to the programme size",
|
|
51
|
+
"Any plan it draws is an SVG dimensioned in feet and inches, 30'-0\" × 24'-0\" overall, with a scale bar and a north arrow that puts the street on the west",
|
|
52
|
+
"Any plan it draws has the entry door on the west (street) wall, and every room can be reached from it",
|
|
53
|
+
"It does not invent rooms, a second storey stated as fact, or zoning rules that are not in the prompt or the programme"
|
|
54
|
+
]
|
|
55
|
+
}
|
|
56
|
+
]
|
|
57
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# Okafor-Lindqvist ADU - space programme (draft 2)
|
|
2
|
+
|
|
3
|
+
| Room | Size |
|
|
4
|
+
|---|---|
|
|
5
|
+
| Great room (living + dining) | 20 x 16 ft |
|
|
6
|
+
| Kitchen | 12 x 12 ft |
|
|
7
|
+
| Primary bedroom | 14 x 13 ft |
|
|
8
|
+
| Bedroom 2 | 11 x 11 ft |
|
|
9
|
+
| Bathroom | 9 x 6 ft |
|
|
10
|
+
| Laundry | 8 x 6 ft |
|
|
11
|
+
|
|
12
|
+
Single storey. Entry from the street side.
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
# Worked example: ground floor on Plot 14
|
|
2
|
+
|
|
3
|
+
## Input
|
|
4
|
+
|
|
5
|
+
> *"Lay out the ground floor for the family house. Programme is in program.json (foyer,
|
|
6
|
+
> living, dining, kitchen, utility, prayer room, guest toilet), footprint 10 m wide × 9 m
|
|
7
|
+
> deep, road on the south side, front door from the road. Keep the prayer room away from the
|
|
8
|
+
> kitchen and the toilet. Stair to the first floor."*
|
|
9
|
+
|
|
10
|
+
## Zoning, decided before coordinates
|
|
11
|
+
|
|
12
|
+
- Public front: foyer, then living along the road, so a guest never passes the kitchen.
|
|
13
|
+
- Stair beside the foyer, so the first floor is reached without crossing the living room.
|
|
14
|
+
- Service back: dining, kitchen, utility and toilet across the rear, with a back door from the hall for deliveries.
|
|
15
|
+
- Wet rooms (kitchen, utility, toilet) side by side at the back, so drains run to one side of the plot and stack under the first-floor bathrooms.
|
|
16
|
+
- Prayer room in the south-east corner, off the living room: an outside wall for a window, and the hall, not the kitchen or toilet, on its other side.
|
|
17
|
+
|
|
18
|
+
## First draft: the checker caught it
|
|
19
|
+
|
|
20
|
+
The first draft widened the kitchen to 3.2 m. The checker exited 1:
|
|
21
|
+
|
|
22
|
+
```text
|
|
23
|
+
FAIL Kitchen and Utility overlap by 0.46
|
|
24
|
+
FAIL Kitchen and Toilet overlap by 0.38
|
|
25
|
+
FAIL door 8 (Kitchen – Utility) at (6.6, 6) is not on a wall both sides share
|
|
26
|
+
FAIL Utility cannot be reached from an entrance
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
The extra 0.2 m pushed the kitchen into the utility and the toilet. The utility door, moved
|
|
30
|
+
to the kitchen's new wall, then sat inside the utility rather than on a wall the two share,
|
|
31
|
+
so the utility could not be reached. Kitchen back to 3.0 m (12.6 m², its target).
|
|
32
|
+
|
|
33
|
+
## `plan.json`
|
|
34
|
+
|
|
35
|
+
See [`../templates/plan.json`](../templates/plan.json), unchanged.
|
|
36
|
+
|
|
37
|
+
## Response
|
|
38
|
+
|
|
39
|
+
**Plan:** [`ground-floor.svg`](ground-floor.svg). Public rooms along the road, service
|
|
40
|
+
rooms across the back, the stair beside the foyer.
|
|
41
|
+
|
|
42
|
+
| Room | Size (m) | Area (m²) | Target (m²) |
|
|
43
|
+
|---|---|---:|---:|
|
|
44
|
+
| Foyer | 2.5 × 2.4 | 6.0 | 6.0 |
|
|
45
|
+
| Stair | 2.5 × 2.4 | 6.0 | |
|
|
46
|
+
| Living | 5.4 × 4.8 | 25.9 | 25.9 |
|
|
47
|
+
| Prayer room | 2.1 × 2.2 | 4.6 | 4.5 |
|
|
48
|
+
| Dining | 3.4 × 4.2 | 14.3 | 14.0 |
|
|
49
|
+
| Kitchen | 3 × 4.2 | 12.6 | 12.6 |
|
|
50
|
+
| Utility | 1.6 × 2.3 | 3.7 | 4.0 |
|
|
51
|
+
| Toilet | 1.6 × 1.9 | 3.0 | 3.2 |
|
|
52
|
+
| Hall | 2.1 × 2.6 + 2 × 4.2 | 13.9 | |
|
|
53
|
+
| **Rooms** | | **90.0** | |
|
|
54
|
+
| **Outline** | | **90.0** | |
|
|
55
|
+
|
|
56
|
+
PASS no overlaps, every door on a shared wall, every room reachable.
|
|
57
|
+
|
|
58
|
+
**Off target:** utility 3.7 m² against 4 (−8 %) and toilet 3.0 against 3.2 (−6 %), both inside
|
|
59
|
+
the 10 % tolerance, traded for keeping the toilet off the prayer room. The hall is 13.9 m²
|
|
60
|
+
because it doubles as the back entrance; a tighter option moves the back door to the utility
|
|
61
|
+
and gives the spare 4 m² to the kitchen.
|
|
62
|
+
|
|
63
|
+
**What this plan is not:** schematic; walls drawn at a nominal 230 mm; no structure, services
|
|
64
|
+
or bye-law check. The architect checks the toilet's ventilation and the stair's width against
|
|
65
|
+
the local rules.
|