Dollhouse: SKILL.md, llms.txt and skills index for agents #189

Open
time wants to merge 4 commits from time/card-114-gh-pages into gh-pages
pull from: time/card-114-gh-pages
4 changed files with 83 additions and 0 deletions

No files matched your search

@@ -0,0 +1,10 @@
{
"skills": [
{
"name": "dollhouse",
"description": "Make isometric room diorama links from a floor plan, walls and furniture placed on a grid, that open at teahubxyz.github.io/time/ventures/dollhouse/ with the whole plan inside the link and nothing uploaded. Use when asked to lay out a room, test whether furniture fits, or share a floor plan as a link.",
"url": "https://teahubxyz.github.io/time/ventures/dollhouse/SKILL.md",
"files": ["SKILL.md"]
}
]
}
+63
View File
@@ -0,0 +1,63 @@
---
name: dollhouse
description: Make isometric room diorama links from a floor plan, walls and furniture placed on a grid, that open at teahubxyz.github.io/time/ventures/dollhouse/ with the whole plan inside the link and nothing uploaded. Use when asked to lay out a room, test whether furniture fits, or share a floor plan as a link.
---
# Room plans as Dollhouse links
Dollhouse (https://teahubxyz.github.io/time/ventures/dollhouse/) draws a floor plan as a live isometric diorama. The whole plan travels inside its link, in the `plan` query parameter, so nothing is uploaded and opening it needs no account. Whoever opens the link sees the room, can drag furniture or add walls, and can download it as PNG or SVG.
## Write the plan
A plan is JSON with two lists, on a grid of 30 columns (x, 0 to 29) by 20 rows (y, 0 to 19). One cell is one unit; x grows right, y grows down.
```json
{
"walls": [{"x1": 2, "y1": 2, "x2": 22, "y2": 2}],
"furniture": [{"type": "bed", "x": 4, "y": 4}]
}
```
- **Wall**: a straight line from `(x1, y1)` to `(x2, y2)`. Walls must be horizontal (`y1 == y2`) or vertical (`x1 == x2`); a diagonal snaps to its longer axis, and a zero-length wall is dropped. A closed room is four walls, and a partition is one more.
- **Furniture**: `type` plus `x`, `y`, the top-left cell. Its size is fixed by the type, in cells (width by height):
- `couch` 6×3
- `bed` 6×4
- `desk` 4×2
- `plant` 1×1
- `tv` 3×1
- Values are rounded to whole cells and clamped to the grid (furniture is kept fully inside it). Unknown furniture types are dropped. There are no rotations, labels or colours, so a piece can't be turned: pick the type whose fixed shape fits.
- Furniture isn't checked against walls or other furniture. Work out the overlaps yourself from the sizes above.
## Make the link
The link is `https://teahubxyz.github.io/time/ventures/dollhouse/?plan=` followed by the plan's JSON as UTF-8, encoded as base64url without padding. There is no compression. In Python:
```python
import base64, json
plan = {"walls": [...], "furniture": [...]}
link = "https://teahubxyz.github.io/time/ventures/dollhouse/?plan=" + \
base64.urlsafe_b64encode(json.dumps(plan, separators=(",", ":")).encode()).decode().rstrip("=")
```
In Node:
```js
const plan = { walls: [/* ... */], furniture: [/* ... */] };
const link = "https://teahubxyz.github.io/time/ventures/dollhouse/?plan=" +
Buffer.from(JSON.stringify(plan)).toString("base64url");
```
There is no no-code form: the page only reads `plan` as base64url, so you need to run code or encode the JSON by hand. A link with a missing or unreadable `plan` opens a sample studio instead, so check yours before you send it.
## Example
A 20×14 studio with a bed, desk, couch, TV and a plant:
```json
{"walls":[{"x1":2,"y1":2,"x2":22,"y2":2},{"x1":22,"y1":2,"x2":22,"y2":16},{"x1":22,"y1":16,"x2":2,"y2":16},{"x1":2,"y1":16,"x2":2,"y2":2},{"x1":14,"y1":2,"x2":14,"y2":9}],"furniture":[{"type":"bed","x":4,"y":4},{"type":"desk","x":16,"y":4},{"type":"couch","x":4,"y":11},{"type":"tv","x":12,"y":14},{"type":"plant","x":19,"y":13}]}
```
## Hand it over
Reply with the link and keep the plan JSON so you can revise it: every change makes a new link. Say what you placed where, since the page labels furniture by name only.
+2
View File
@@ -4,6 +4,7 @@
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Dollhouse - Floor Plan Diorama Generator</title>
<link rel="alternate" type="text/markdown" href="SKILL.md" title="Dollhouse skill for agents">
<link rel="stylesheet" href="style.css">
</head>
<body>
@@ -112,6 +113,7 @@
<!-- Footer -->
<footer>
<p>For agents: <a href="SKILL.md">SKILL.md</a></p>
<p>Built by <a href="https://teahub.xyz/teahubxyz/time" target="_blank" rel="noopener">Time, an agent-run venture studio on GitHub</a></p>
<p>Want the next version? <a href="https://teahub.xyz/teahubxyz/time/issues/19" target="_blank" rel="noopener">👍 the signal issue</a></p>
</footer>
+8
View File
@@ -0,0 +1,8 @@
# Dollhouse
> Floor plan in, isometric room diorama out. Dollhouse draws walls and furniture placed on a grid as a shareable diorama, with the whole plan carried inside the link (the plan query parameter), so nothing is uploaded and no account is needed.
Read SKILL.md and follow it to make room plans for people as Dollhouse links.
- [SKILL.md](https://teahubxyz.github.io/time/ventures/dollhouse/SKILL.md): how to write a plan and build its link
- [Editor](https://teahubxyz.github.io/time/ventures/dollhouse/): the page a plan link opens in