@rubytech/create-maxy-code 0.1.112 → 0.1.114
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/dist/__tests__/brew-install.test.js +10 -0
- package/dist/__tests__/brew-resolve.test.js +35 -0
- package/dist/__tests__/launchd-plist.test.js +46 -0
- package/dist/__tests__/macos-darwin-branch.test.js +85 -0
- package/dist/brew-install.js +5 -0
- package/dist/index.js +26 -6
- package/package.json +1 -1
- package/payload/platform/neo4j/schema.cypher +7 -2
- package/payload/platform/plugins/admin/skills/public-agent-manager/SKILL.md +14 -7
- package/payload/platform/plugins/cloudflare/references/manual-setup.md +105 -0
- package/payload/platform/plugins/docs/references/deployment.md +22 -4
- package/payload/platform/plugins/docs/references/internals.md +10 -26
- package/payload/platform/plugins/memory/PLUGIN.md +2 -1
- package/payload/platform/plugins/memory/mcp/dist/index.js +35 -0
- package/payload/platform/plugins/memory/mcp/dist/index.js.map +1 -1
- package/payload/platform/plugins/memory/mcp/dist/tools/image-fetch.d.ts +15 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/image-fetch.d.ts.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/image-fetch.js +64 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/image-fetch.js.map +1 -0
- package/payload/platform/plugins/memory/references/schema-estate-agent.md +25 -0
- package/payload/platform/plugins/venture-studio/PLUGIN.md +7 -3
- package/payload/platform/plugins/venture-studio/bin/scaffold.sh +14 -2
- package/payload/platform/plugins/venture-studio/skills/investor-data-room/references/data-room-structure.md +10 -0
- package/payload/platform/plugins/venture-studio/skills/prototype-host/SKILL.md +179 -0
- package/payload/platform/plugins/venture-studio/skills/prototype-host/references/cloudflared-ingress-edit.md +81 -0
- package/payload/platform/plugins/venture-studio/skills/prototype-host/references/scaffold-frameworks.md +60 -0
- package/payload/platform/plugins/venture-studio/skills/prototype-host/references/systemd-user-service.md +104 -0
- package/payload/platform/plugins/whatsapp/.claude-plugin/plugin.json +9 -0
- package/payload/platform/plugins/whatsapp/PLUGIN.md +1 -1
- package/payload/platform/services/claude-session-manager/dist/brand-foreign-filter.d.ts +30 -0
- package/payload/platform/services/claude-session-manager/dist/brand-foreign-filter.d.ts.map +1 -0
- package/payload/platform/services/claude-session-manager/dist/brand-foreign-filter.js +86 -0
- package/payload/platform/services/claude-session-manager/dist/brand-foreign-filter.js.map +1 -0
- package/payload/platform/services/claude-session-manager/dist/index.js +51 -9
- package/payload/platform/services/claude-session-manager/dist/index.js.map +1 -1
- package/payload/platform/services/claude-session-manager/dist/pty-spawner.d.ts.map +1 -1
- package/payload/platform/services/claude-session-manager/dist/pty-spawner.js +35 -4
- package/payload/platform/services/claude-session-manager/dist/pty-spawner.js.map +1 -1
- package/payload/platform/services/claude-session-manager/dist/system-prompt.d.ts +7 -0
- package/payload/platform/services/claude-session-manager/dist/system-prompt.d.ts.map +1 -1
- package/payload/platform/services/claude-session-manager/dist/system-prompt.js +7 -0
- package/payload/platform/services/claude-session-manager/dist/system-prompt.js.map +1 -1
- package/payload/platform/templates/agents/public/IDENTITY.md +11 -1
- package/payload/premium-plugins/real-agent/BUNDLE.md +1 -1
- package/payload/premium-plugins/real-agent/agents/listing-curator.md +21 -2
- package/payload/premium-plugins/real-agent/plugins/buyers/.claude-plugin/plugin.json +1 -1
- package/payload/premium-plugins/real-agent/plugins/buyers/PLUGIN.md +3 -2
- package/payload/premium-plugins/real-agent/plugins/buyers/skills/property-recommender/SKILL.md +116 -0
- package/payload/premium-plugins/venture-studio/PLUGIN.md +7 -3
- package/payload/premium-plugins/venture-studio/bin/scaffold.sh +14 -2
- package/payload/premium-plugins/venture-studio/skills/investor-data-room/references/data-room-structure.md +10 -0
- package/payload/premium-plugins/venture-studio/skills/prototype-host/SKILL.md +179 -0
- package/payload/premium-plugins/venture-studio/skills/prototype-host/references/cloudflared-ingress-edit.md +81 -0
- package/payload/premium-plugins/venture-studio/skills/prototype-host/references/scaffold-frameworks.md +60 -0
- package/payload/premium-plugins/venture-studio/skills/prototype-host/references/systemd-user-service.md +104 -0
- package/payload/server/server.js +92 -41
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"system-prompt.js","sourceRoot":"","sources":["../src/system-prompt.ts"],"names":[],"mappings":"AAAA,0EAA0E;AAC1E,wEAAwE;AACxE,oBAAoB;AACpB,EAAE;AACF,2EAA2E;AAC3E,oEAAoE;AACpE,mDAAmD;AACnD,6EAA6E;AAC7E,4EAA4E;AAC5E,4DAA4D;AAC5D,iEAAiE;AACjE,oFAAoF;AACpF,iEAAiE;AACjE,gFAAgF;AAChF,2EAA2E;AAC3E,0EAA0E;AAC1E,8EAA8E;AAC9E,2EAA2E;AAC3E,+EAA+E;AAC/E,6EAA6E;AAC7E,4EAA4E;AAC5E,8EAA8E;AAC9E,gFAAgF;AAChF,+EAA+E;AAC/E,8EAA8E;AAC9E,6EAA6E;AAC7E,yEAAyE;AACzE,6CAA6C;AAC7C,2EAA2E;AAC3E,mFAAmF;AACnF,mFAAmF;AACnF,gFAAgF;AAChF,gFAAgF;AAChF,mFAAmF;AACnF,EAAE;AACF,uEAAuE;AACvE,2EAA2E;AAC3E,2EAA2E;AAC3E,WAAW;AACX,EAAE;AACF,uEAAuE;AACvE,4EAA4E;AAC5E,4EAA4E;AAC5E,yEAAyE;AACzE,0EAA0E;AAC1E,2EAA2E;AAC3E,8CAA8C;AAC9C,EAAE;AACF,wCAAwC;AACxC,0EAA0E;AAC1E,wEAAwE;AACxE,yEAAyE;AACzE,2EAA2E;AAC3E,yEAAyE;AACzE,4EAA4E;AAC5E,wEAAwE;AACxE,+CAA+C;AAE/C,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;AACtC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAA;AAqGhC,MAAM,CAAC,MAAM,wBAAwB,GAAG,UAAU,CAAA,CAAC,mCAAmC;AAEtF,SAAS,gBAAgB,CAAC,IAAY;IACpC,IAAI,OAAe,CAAA;IACnB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AK,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE,CAAC;YAClC,OAAO,EAAE,EAAE,EAAE,KAAK,EAAE,OAAO,EAAE,GAAG,EAAE,CAAA;QACpC,CAAC;IACH,CAAC;IACD,qEAAqE;IACrE,wEAAwE;IACxE,uEAAuE;IACvE,qEAAqE;IACrE,sEAAsE;IACtE,MAAM,UAAU,GAAG,iBAAiB,CAAC,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE;QACvD,UAAU,EAAE,EAAE,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,kBAAkB,EAAE;KACtD,CAAC,CAAA;IACF,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC,QAAQ,CAAC,sDAAsD,CAAC,EAAE,CAAC;QACvF,OAAO,EAAE,EAAE,EAAE,KAAK,EAAE,OAAO,EAAE,yBAAyB,EAAE,CAAA;IAC1D,CAAC;IACD,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC,QAAQ,CAAC,4DAA4D,CAAC,EAAE,CAAC;QAC7F,OAAO,EAAE,EAAE,EAAE,KAAK,EAAE,OAAO,EAAE,gCAAgC,EAAE,CAAA;IACjE,CAAC;IACD,OAAO,EAAE,EAAE,EAAE,IAAI,EAAE,CAAA;AACrB,CAAC"}
|
|
@@ -31,7 +31,17 @@ A landfill graph defeats EVIDENCE-BASED: search returns noise, the agent re-writ
|
|
|
31
31
|
|
|
32
32
|
## Visual content
|
|
33
33
|
|
|
34
|
-
|
|
34
|
+
Two sources of inline images are permitted, and only these two:
|
|
35
|
+
|
|
36
|
+
1. **Brand images at `/brand/`** — visual assets the business has prepared. When your knowledge lists an image and a visitor's question is relevant to it, embed it inline using standard markdown: ``. Only reference images explicitly listed in your knowledge — never guess or fabricate filenames.
|
|
37
|
+
|
|
38
|
+
2. **`:ImageObject` URLs returned by `memory-search`** — when a memory-search result includes `:ImageObject` neighbours on its `related` set (e.g. a `:Listing` returned with its `:DEPICTS`-linked images), the `url` field of those neighbours is permitted as an inline image source: ``. Use the ImageObject's own `description` as the alt text; never substitute placeholder alt text. Only embed URLs returned by memory-search in this turn — do not cache, reuse across turns from memory, or compose URLs from slugs.
|
|
39
|
+
|
|
40
|
+
No other external image embedding is permitted. The visitor sees the image directly in the conversation. When a relevant image exists, show it rather than describing what you could show.
|
|
41
|
+
|
|
42
|
+
### No fabrication on graph-backed content
|
|
43
|
+
|
|
44
|
+
When you relay graph-backed entities to a visitor — listings, prices, addresses, image content, anything sourced from `memory-search` — every field in the reply must trace to a property on a node the search just returned. If memory-search returns zero matches for the visitor's intent, say so plainly in one sentence. Never invent a listing, a price, a room photo, or a feature to fill the gap. Run the same intent three times and the no-match reply must stay consistent in meaning — the visitor's experience is the audit.
|
|
35
45
|
|
|
36
46
|
## Boundaries
|
|
37
47
|
|
|
@@ -27,7 +27,7 @@ Premium plugin bundle for UK estate agency professionals. Shipped on every non-M
|
|
|
27
27
|
| Negotiator | `agents/negotiator.md` | All Loop CRM tools + memory-search | Buyer pipeline, viewings, feedback, offers, deal progression |
|
|
28
28
|
| Valuer | `agents/valuer.md` | Loop property/people tools + memory-search | Market appraisal preparation, comparable evidence analysis |
|
|
29
29
|
| Compliance | `agents/compliance.md` | All Loop CRM tools + memory-search + perplexity-search | UK estate agency law, listing audit, AML/KYC, regulatory compliance |
|
|
30
|
-
| Listing Curator | `agents/listing-curator.md` | memory-search + memory-write + memory-update + Loop property/team tools | Ingestion of property listings into typed `:Listing` nodes — maps Loop CRM records, published zip-site directories, and manual operator dumps to renderable graph entities so the public agent can surface them as property cards |
|
|
30
|
+
| Listing Curator | `agents/listing-curator.md` | memory-search + memory-write + memory-update + memory-image-fetch + Loop property/team tools | Ingestion of property listings into typed `:Listing` nodes — maps Loop CRM records, published zip-site directories, and manual operator dumps to renderable graph entities so the public agent can surface them as property cards. Also writes one `:ImageObject` per Listing image (vision-LLM description + closed-set tags) so the public-side recommender can pick contextually rather than always emitting the hero. |
|
|
31
31
|
|
|
32
32
|
## Sub-Plugins
|
|
33
33
|
|
|
@@ -3,7 +3,7 @@ name: listing-curator
|
|
|
3
3
|
description: "Property listing ingestion. Maps any property-shaped input — a Loop CRM record, a published zip-site directory, or a manual operator dump — to one typed :Listing node that the public agent's memory-search can return as a renderable property card. Delegate when a property listing needs to enter the graph, when an existing Listing's status drifts (for-sale → under-offer → sold), or when a hosted property site has been published and the graph has no record of it yet."
|
|
4
4
|
summary: "Your listing curator — maps property inputs to typed :Listing nodes that visitor-facing chat can render."
|
|
5
5
|
model: claude-sonnet-4-6
|
|
6
|
-
tools: mcp__memory__memory-search, mcp__memory__memory-write, mcp__memory__memory-update, mcp__loop__loop-property-search, mcp__loop__loop-property-detail, mcp__loop__loop-property-listed, mcp__loop__loop-property-sold, mcp__loop__loop-key-list, mcp__loop__loop-team-info
|
|
6
|
+
tools: mcp__memory__memory-search, mcp__memory__memory-write, mcp__memory__memory-update, mcp__memory__image-fetch, mcp__loop__loop-property-search, mcp__loop__loop-property-detail, mcp__loop__loop-property-listed, mcp__loop__loop-property-sold, mcp__loop__loop-key-list, mcp__loop__loop-team-info
|
|
7
7
|
---
|
|
8
8
|
|
|
9
9
|
# Listing Curator
|
|
@@ -100,6 +100,23 @@ Write a `no-op` (no Listing produced; admin agent informed) when:
|
|
|
100
100
|
|
|
101
101
|
`no-op` is loud — the curator returns a one-sentence explanation of which field was missing. Silent skips are defects.
|
|
102
102
|
|
|
103
|
+
## Image curation
|
|
104
|
+
|
|
105
|
+
After writing the Listing, the curator writes one `:ImageObject` node per URL in `imageUrls` and a `[:DEPICTS]` edge from the Listing to each image. ImageObjects are what the public-agent recommender skill picks among when a visitor asks to see a specific room or feature — without them, the agent can only emit the hero image. The schema contract for `:ImageObject` lives in `schema-estate-agent.md`.
|
|
106
|
+
|
|
107
|
+
For each image URL on the Listing:
|
|
108
|
+
|
|
109
|
+
1. **Vision tag pass.** Call `mcp__memory__image-fetch` with the image URL; the tool returns the image bytes as an inline content block your model can see. Then produce `{description, tags}` from what you see using the same single-call doctrine as the blurb step. The description is a single sentence (≤ 200 characters, plain English, no estate-agent clichés). The tags are up to four labels drawn from this fixed set: `kitchen`, `bathroom`, `bedroom-master`, `bedroom-secondary`, `living-room`, `dining-room`, `garden-rear`, `garden-front`, `exterior-front`, `exterior-rear`, `hallway`, `utility`, `floorplan`, `epc`, `view`. The tag set is closed — never invent a tag outside it. When no tag applies, `tags` is the empty array. When `image-fetch` returns `isError`, write the ImageObject anyway with empty `description` and `tags` and log `[listing-curator] image-tag-failed url=<url> reason=<short>` — the validate step below handles that branch.
|
|
110
|
+
2. **Validate.** If the response fails to parse as JSON, or `description` is empty / >200 chars, write the ImageObject anyway with `description: ""` and `tags: []`. Log `[listing-curator] image-tag-failed url=<url> reason=<short>`. One image's tagging failure must not block the rest of the Listing's images — degraded room-pick on that image is the only consequence.
|
|
111
|
+
3. **Write the node.** `MERGE (i:ImageObject {accountId, listingSlug, url})` then `SET i.description, i.tags, i.heroIndex, i.scope, i.sourceSystem`. `scope` mirrors the parent Listing (`public` for visitor-renderable Listings; `shared` otherwise). `heroIndex` is the image's 0-based position in the source `imageUrls` array — `0` for the hero.
|
|
112
|
+
4. **Write the edge.** `MERGE (l:Listing {accountId, slug:listingSlug})-[:DEPICTS]->(i)`. The MERGE on the natural key `(accountId, listingSlug, url)` makes both the node write and the edge write idempotent; re-running the curator over a Listing tops up missing images without duplicating existing ones.
|
|
113
|
+
|
|
114
|
+
No `embedding` is written on `:ImageObject` v1. The recommender picks by reading the Listing's child ImageObjects from hybrid search's `related` set (graph-search expands one hop automatically). If pick quality is poor, a follow-up task will add per-image embeddings; not now.
|
|
115
|
+
|
|
116
|
+
Floorplans and the EPC document follow the same path — they get their own `:ImageObject` with `tags: ["floorplan"]` or `tags: ["epc"]`, written from the curator's `floorplanUrls` and `epcUrl` fields. The hero image carries `tags` reflecting what the photo actually shows (e.g. `["exterior-front"]`) — never the literal tag `hero`. `heroIndex: 0` identifies it.
|
|
117
|
+
|
|
118
|
+
Hybrid search's 1-hop expand caps `related` at 20 neighbours per Listing. Listings with > 20 images lose the surplus to the cap — acceptable for v1 (most Loop listings ≤ 20). Log `[listing-curator] image-cap-warning slug=<slug> imageCount=<N>` when `N > 20` so the gap is visible.
|
|
119
|
+
|
|
103
120
|
## Idempotency and update semantics
|
|
104
121
|
|
|
105
122
|
Every write executes `MERGE (l:Listing {accountId, sourceSystem, sourceId})`. On match, mutable fields are SET to the new values; immutable fields (`slug`, `sourceSystem`, `sourceId`, `createdAt`) are left untouched. The `lastVerifiedAt` timestamp is updated on every run; `ingestedAt` is set only on the first write.
|
|
@@ -121,11 +138,13 @@ The migration cypher is run once via SSH against the Pi as a manual backfill ste
|
|
|
121
138
|
One structured log line per write, emitted by the curator before returning to the admin agent:
|
|
122
139
|
|
|
123
140
|
```
|
|
124
|
-
[listing-curator] event=property-curated slug=<slug> sourceSystem=<system> sourceId=<id> action=<create|update|no-op> fieldsFilled=<comma-separated-list> fieldsMissing=<comma-separated-list> scope=<scope>
|
|
141
|
+
[listing-curator] event=property-curated slug=<slug> sourceSystem=<system> sourceId=<id> action=<create|update|no-op> fieldsFilled=<comma-separated-list> fieldsMissing=<comma-separated-list> scope=<scope> imagesWritten=<N> imagesTagged=<M> imagesFailed=<F>
|
|
125
142
|
```
|
|
126
143
|
|
|
127
144
|
`fieldsMissing` is the load-bearing signal. Operators reading the log see at a glance which curations landed incomplete (e.g. `epcUrl` missing on a Loop record means the EPC asset wasn't uploaded to Loop yet; `pageUrl` missing on a zip-site Listing means the hosting agent didn't pass the published URL through to the curator). Each missing field is a discoverable defect upstream of the curator, not a curator failure.
|
|
128
145
|
|
|
146
|
+
`imagesWritten` is the total `:ImageObject` count for the Listing after the run. `imagesTagged` is the count with non-empty `tags`. `imagesFailed` counts images where the vision pass failed JSON-validation and a placeholder ImageObject was written with empty description and tags. A high `imagesFailed / imagesWritten` ratio means the vision pass is degrading; investigate the prompt or the source images. When `imagesWritten > 20`, the recommender will only see the first 20 in its `related` set (one-hop expand cap) — emit a separate `[listing-curator] image-cap-warning slug=<slug> imageCount=<N>` line so the cap is visible.
|
|
147
|
+
|
|
129
148
|
## Out of scope
|
|
130
149
|
|
|
131
150
|
- Producing the visitor-facing markdown card from a `:Listing`. That's the public agent's job (a separate skill, blocked on this curator's existence; see `.tasks/`).
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "real-agent-buyers",
|
|
3
|
-
"description": "Full buyer lifecycle — enquiry handling, qualification, viewing management, feedback collection,
|
|
3
|
+
"description": "Full buyer lifecycle — enquiry handling, qualification, viewing management, feedback collection, educational guides, and the public-chat property recommender that surfaces current listings as rendered cards on visitor buyer intent.",
|
|
4
4
|
"version": "0.1.0",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Rubytech LLC"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: real-agent-buyers
|
|
3
|
-
description: "Full buyer lifecycle — enquiry handling, qualification, viewing management, feedback collection,
|
|
3
|
+
description: "Full buyer lifecycle — enquiry handling, qualification, viewing management, feedback collection, educational guides, and the public-chat property recommender that surfaces current listings as rendered cards on visitor buyer intent."
|
|
4
4
|
tools: []
|
|
5
5
|
always: false
|
|
6
6
|
metadata: {"platform":{"optional":true,"embed":["public","admin"]}}
|
|
@@ -8,7 +8,7 @@ metadata: {"platform":{"optional":true,"embed":["public","admin"]}}
|
|
|
8
8
|
|
|
9
9
|
# Real Agent — Buyer Management
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
Six skills covering the complete buyer lifecycle from initial enquiry through viewing management and educational content, plus the public-chat property recommender that fires on visitor buyer intent.
|
|
12
12
|
|
|
13
13
|
## When to Activate
|
|
14
14
|
|
|
@@ -21,6 +21,7 @@ The user is handling buyer enquiries, qualifying applicants, managing viewings,
|
|
|
21
21
|
| `buyer-management` | Full buyer lifecycle — enquiry, qualification, viewing, feedback, offer |
|
|
22
22
|
| `buyer-feedback` | Post-viewing feedback collection via conversational check-in |
|
|
23
23
|
| `property-enquiry` | Structured intake for new buyer enquiries — requirements, finances, timeline |
|
|
24
|
+
| `property-recommender` | Public-chat skill — render a property card (image + blurb + listing URL) on buyer intent, sourced from `:Listing` and `:ImageObject` via memory-search |
|
|
24
25
|
| `viewing-management` | Viewing lifecycle — booking, confirming, rescheduling, reminders |
|
|
25
26
|
| `buyer-seller-guides` | Educational guides for buyers and sellers — first-time, upsizing, downsizing, probate |
|
|
26
27
|
|
package/payload/premium-plugins/real-agent/plugins/buyers/skills/property-recommender/SKILL.md
ADDED
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: property-recommender
|
|
3
|
+
description: "Recommend a current property to a visitor as a rendered card (image + blurb + clickable listing URL). Activate on visitor buyer intent: a specific listing name, a filter (beds / area / price), a buyer-state statement (looking to buy, what's available), or a room-specific image question about a known listing. Sources only :Listing and :ImageObject nodes returned by memory-search on the public scope — never invents stock."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Property Recommender
|
|
7
|
+
|
|
8
|
+
You handle the moment a visitor on the public chat shows buyer intent. Your job is to find the right listing in the realagent's portfolio, pick the right image for the visitor's question, and present it as a single markdown card. You never invent a property. You never embed an image from outside the graph. You never recommend more than the visitor asked for.
|
|
9
|
+
|
|
10
|
+
## Outcome contract
|
|
11
|
+
|
|
12
|
+
For every turn this skill fires on, the reply contains either:
|
|
13
|
+
|
|
14
|
+
- **One property card** in the exact markdown shape below, or
|
|
15
|
+
- **A plain-English no-match sentence** when memory-search returns no `:Listing` with `scope: "public"` that fits the visitor's intent.
|
|
16
|
+
|
|
17
|
+
Never both. Never two cards in one reply. Never a card plus a "would you also like…?" follow-up. The visitor asks for more if they want more.
|
|
18
|
+
|
|
19
|
+
The card shape:
|
|
20
|
+
|
|
21
|
+
```markdown
|
|
22
|
+

|
|
23
|
+
|
|
24
|
+
**<displayName>** — <priceQualifier> £<priceFormatted>
|
|
25
|
+
|
|
26
|
+
<blurb>
|
|
27
|
+
|
|
28
|
+
[View full details](<tunnel-url>/listings/<slug>/click?session=<session_key>)
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
- `<image description>` is the picked `:ImageObject.description`, or the Listing's `displayName` when no ImageObject is suitable.
|
|
32
|
+
- `<imageUrl>` is the picked `:ImageObject.url`, or the Listing's `heroImageUrl` as fallback.
|
|
33
|
+
- `<priceQualifier>` is rendered only when present: `Guide` / `Offers over` / `OIEO` / `POA` / `Auction`. When `priceQualifier` is null, omit the qualifier.
|
|
34
|
+
- `<priceFormatted>` is the integer pounds with thousand-separators (`695,000`). When `price` is null or `status` is `sold`, render `Sold` instead of the price line entirely.
|
|
35
|
+
- `<blurb>` is the Listing's curator-written `blurb` field, used verbatim. Never paraphrase. Never extend.
|
|
36
|
+
- `<tunnel-url>` is the value of the `<host>` sentinel's `tunnel-url` line in the system prompt. `<slug>` is the picked Listing's `slug`. `<session_key>` is the value of the `<chat-session>` sentinel's `session_key` line. The link text is always exactly `View full details`.
|
|
37
|
+
- The card link routes through `/listings/<slug>/click` rather than the Listing's raw `pageUrl` directly. This is the first-party intercept that logs the click-through ([Task 336](.tasks/archive/336-property-card-click-through-telemetry.md)); the endpoint 302s the visitor to the live `pageUrl`. Never embed the raw `pageUrl` in the rendered markdown — that bypasses the click signal.
|
|
38
|
+
|
|
39
|
+
The card is one message. Nothing precedes it. A one-sentence conversational opener may follow on a new line below the card if the visitor asked a question the card alone doesn't answer (e.g. they asked "is this still available?" and the card already shows the answer via `status` — no opener needed; they asked "what's the rear garden like?" and you've shown the rear-garden image — answer their question in one sentence below).
|
|
40
|
+
|
|
41
|
+
## Triggers — when this skill fires
|
|
42
|
+
|
|
43
|
+
The skill fires on these visitor intents:
|
|
44
|
+
|
|
45
|
+
- **Specific listing name** — visitor names a property by address, road, or curator slug (e.g. "Griffin House", "the cottage on Upper Church Street", "Chepstow NP16").
|
|
46
|
+
- **Filter intent** — visitor names criteria (`4-bed`, `under £600k`, `in Monmouthshire`, `cottage`, `detached`) and asks what matches.
|
|
47
|
+
- **Buyer-state statement** — visitor says they're looking to buy, asks what's available, asks what's on the market, asks for current stock.
|
|
48
|
+
- **Room/feature question on a known listing** — visitor has just been shown a listing and asks to see the kitchen, the garden, the bathroom, the floorplan, the EPC. The recommender re-renders the same Listing's card with the matching `:ImageObject`.
|
|
49
|
+
|
|
50
|
+
The skill does **not** fire on:
|
|
51
|
+
|
|
52
|
+
- Greetings and small talk ("hi", "how are you", "good morning").
|
|
53
|
+
- Generic agency questions ("what areas do you cover?", "what are your fees?", "who runs the business?").
|
|
54
|
+
- Off-topic or hostile messages.
|
|
55
|
+
- Questions about a property type the realagent doesn't list (commercial, overseas) unless the visitor explicitly asks "do you list X".
|
|
56
|
+
|
|
57
|
+
When in doubt, do not fire. Over-triggering is the failure mode — a card on every turn turns the chat into a property portal, which the visitor did not ask for.
|
|
58
|
+
|
|
59
|
+
## How to find the right Listing
|
|
60
|
+
|
|
61
|
+
Call `memory-search` with the visitor's intent text as the query and `labels: ["Listing"]` as the filter. The public-agent runtime sets `ALLOWED_SCOPES=public`, so only `scope: "public"` Listings come back. Hybrid search expands one hop by default, so each `:Listing` result arrives with its `:ImageObject` neighbours in the `related` array.
|
|
62
|
+
|
|
63
|
+
Pick exactly one Listing:
|
|
64
|
+
|
|
65
|
+
- **Specific name match** — when the visitor named a property, the top hit on `displayName` / `slug` / `addressLine` / `postcode` is the answer. Confidence is unambiguous.
|
|
66
|
+
- **Filter match** — when the visitor named criteria, pick the highest-ranked Listing whose `status` is `for-sale` or `under-offer` (skip `sold` and `withdrawn` unless the visitor explicitly asks about sold stock) and whose structured fields match the filters. If no Listing matches the filters, do not pick the highest-ranked unrelated Listing — say no plainly.
|
|
67
|
+
- **General "what's available"** — pick the highest-ranked `for-sale` Listing. The visitor pulls more by asking.
|
|
68
|
+
|
|
69
|
+
If memory-search returns zero `:Listing` results in the public scope, do not fabricate. Say plainly: "We haven't got anything on the market that matches at the moment." Vary the wording for tone but never invent stock. Run the same intent three times in testing; the no-match sentence must be consistent in meaning across all three.
|
|
70
|
+
|
|
71
|
+
## How to pick the image
|
|
72
|
+
|
|
73
|
+
The picked Listing arrives with its `:ImageObject` neighbours in `related`. Each ImageObject carries `url`, `description`, `tags`, and `heroIndex`. Pick one:
|
|
74
|
+
|
|
75
|
+
- **Room-specific question** — when the visitor asked about a specific room or feature, pick the ImageObject whose `tags` array contains the matching label. The room labels are: `kitchen`, `bathroom`, `bedroom-master`, `bedroom-secondary`, `living-room`, `dining-room`, `garden-rear`, `garden-front`, `exterior-front`, `exterior-rear`, `hallway`, `utility`, `floorplan`, `epc`, `view`. When more than one ImageObject carries the matching tag, pick the one with the lowest `heroIndex` (closer to the hero in source order, usually higher quality).
|
|
76
|
+
- **No matching tag** — when the visitor asked for a room (e.g. "loft") that no ImageObject has tagged, fall back to the ImageObject with `heroIndex: 0` and add a one-sentence acknowledgement below the card: "I haven't got a loft photo for that one — here's the property." Plain, honest, no invented detail.
|
|
77
|
+
- **General recommendation** — pick the ImageObject with `heroIndex: 0` (the hero). When the hero ImageObject is missing, fall back to the Listing's `heroImageUrl` field directly.
|
|
78
|
+
|
|
79
|
+
The image embed always uses the picked image's `description` as the alt text. Never use the literal string "hero" or "image" or the slug as alt text — accessibility is not optional.
|
|
80
|
+
|
|
81
|
+
## Out of scope
|
|
82
|
+
|
|
83
|
+
- Fetching Loop CRM property data directly. The public agent's only tool is graph memory-search; Loop MCP tools are forbidden on this surface.
|
|
84
|
+
- Capturing visitor contact details on card click-through. Lead capture is a separate skill / task.
|
|
85
|
+
- Comparing two listings in one reply ("compare A and B"). One card per turn. The visitor asks about each in turn.
|
|
86
|
+
- Off-market or pre-marketing pipeline listings. Those carry `scope: "shared"` and are filtered out by the public agent's allowed-scopes gate.
|
|
87
|
+
- Generating images. The agent only embeds URLs returned as `:ImageObject.url` by memory-search; never invents image URLs and never describes images that aren't in the graph.
|
|
88
|
+
|
|
89
|
+
## Observability
|
|
90
|
+
|
|
91
|
+
Emit one structured log line per fire:
|
|
92
|
+
|
|
93
|
+
```
|
|
94
|
+
[property-recommended] sessionKey=<sk> trigger=<short-label> listingSlug=<slug> imagePick=<hero|tag:<tag>|fallback> imageUrl=<url>
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
`sessionKey` is the value of the `<chat-session>` sentinel's `session_key` line, copied verbatim. `trigger` is a 1-3 word label naming why the skill fired (`specific-name` / `filter-beds-area` / `buyer-state` / `room-kitchen`). `imagePick` is `hero` when `heroIndex: 0` was picked, `tag:<tag>` when a room-specific match drove the pick, or `fallback` when the picked Listing had no usable ImageObject and `heroImageUrl` was the source. When the skill fires but memory-search returned zero matches, emit `imagePick=none listingSlug=none` and confirm the reply was a no-match sentence — this is the fabrication-guardrail audit signal.
|
|
98
|
+
|
|
99
|
+
### Click-through join
|
|
100
|
+
|
|
101
|
+
The Hono route at `/listings/:slug/click` emits the companion line on each card-click:
|
|
102
|
+
|
|
103
|
+
```
|
|
104
|
+
[property-card-click] sessionKey=<sk> listingSlug=<slug> ts=<iso>
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
The two log lines share key names (`sessionKey`, `listingSlug`) so a grep + awk over `server.log` joins them per session. Per-session click-through rate:
|
|
108
|
+
|
|
109
|
+
```bash
|
|
110
|
+
# cards emitted per session
|
|
111
|
+
awk -F'sessionKey=' '/\[property-recommended\]/{split($2,a," "); print a[1]}' server.log | sort | uniq -c
|
|
112
|
+
# cards clicked per session
|
|
113
|
+
awk -F'sessionKey=' '/\[property-card-click\]/{split($2,a," "); print a[1]}' server.log | sort | uniq -c
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
Sessions appearing in the first count but not the second never clicked through. A high uniform zero is the load-bearing alarm — the recommendation is not earning the click. Sessions where `sessionKey=invalid` appears on the click line indicate a malformed `session` query param on the redirect URL (skill template defect); the click still landed but cannot be joined to its fire log.
|
|
@@ -4,6 +4,7 @@ description: "Founding-a-business agent. Drives an operator from raw idea to fun
|
|
|
4
4
|
requires:
|
|
5
5
|
- projects
|
|
6
6
|
- work
|
|
7
|
+
- cloudflare
|
|
7
8
|
- deep-research
|
|
8
9
|
metadata: {"platform":{"always":false,"embed":["admin"],"pluginKey":"venture-studio","optional":true,"recommended":true}}
|
|
9
10
|
---
|
|
@@ -35,7 +36,7 @@ If either check fails, run the scaffolding script (see below) before the skill f
|
|
|
35
36
|
|
|
36
37
|
### Scaffolding script
|
|
37
38
|
|
|
38
|
-
`bin/scaffold.sh` is the deterministic enforcement layer. It creates the Project +
|
|
39
|
+
`bin/scaffold.sh` is the deterministic enforcement layer. It creates the Project + nine artefact Tasks (via the work plugin's `project-create-cli` bridge) and materialises the ten-section directory tree plus the `prototype/` top-level for hosted surfaces. Graph write first, directories second; idempotent re-run if any partial state lands.
|
|
39
40
|
|
|
40
41
|
```bash
|
|
41
42
|
ACCOUNT_ID="${ACCOUNT_ID}" \
|
|
@@ -61,10 +62,11 @@ The script's three effects:
|
|
|
61
62
|
|
|
62
63
|
1. **Scaffolds the data room.** Materialises the ten-section directory tree under `<project-root>/.docs/data-room/`. Every artefact has a slot to land in before any artefact is produced.
|
|
63
64
|
2. **Creates the `Project` node.** Tier `full` (data-room work is multi-phase). Project name is the business's working name; description references the data-room root path.
|
|
64
|
-
3. **Enumerates the
|
|
65
|
+
3. **Enumerates the nine artefact Tasks** in section order — one transaction, atomic with the Project. The work-item list the script pre-seeds:
|
|
65
66
|
- **Stage 1 — Office-hours design doc** → produces `01-narrative/office-hours-design.md` (skill: `office-hours`)
|
|
66
67
|
- **Stage 2 — Wedge validation + landing page + PRD** → produces `01-narrative/{PMF, LANDING, PRD}.md` (skill: `zero-to-prototype`)
|
|
67
68
|
- **Brand pack** → produces brand guidelines + summary + color palette + typography system + tone-of-voice (voice/messaging/copy) + logo guidelines into `06-product-ip/brand/` (skill: `brand-pack`)
|
|
69
|
+
- **Prototype host** → public URL for the landing page and/or wedge prototype via cloudflared ingress + systemd-managed dev server (skill: `prototype-host`)
|
|
68
70
|
- **Stage 3 — Business plan** → produces `01-narrative/business-plan.md` (skill: `investor-data-room` Stage 3)
|
|
69
71
|
- **Stage 3b — Term sheet** → produces `html/prospectus/term_sheet.html` (skill: `investor-data-room` Stage 3b)
|
|
70
72
|
- **Stage 4 — Deck blueprint** → produces `01-narrative/deck-blueprint.md` (skill: `investor-data-room` Stage 4)
|
|
@@ -82,6 +84,7 @@ The following intent phrases route to specific skills. These calls are gated by
|
|
|
82
84
|
| "I want to think this through" / "office hours" / "is this worth building" | `office-hours` |
|
|
83
85
|
| "let's brand this" / "tokens for the brand" / "logo and palette" | `brand-pack` |
|
|
84
86
|
| "validate this idea" / "let's find PMF" / "draft the landing page" / "write the PRD" | `zero-to-prototype` |
|
|
87
|
+
| "host the landing" / "host the prototype" / "deploy this" / "give me a public URL" | `prototype-host` |
|
|
85
88
|
| "build me a data room" / "scaffold the data room" | `investor-data-room` (Stage 2) |
|
|
86
89
|
| "draft the business plan" | `investor-data-room` (Stage 3) |
|
|
87
90
|
| "draft the term sheet" | `investor-data-room` (Stage 3b) |
|
|
@@ -107,9 +110,10 @@ Founder-facing. Direct, evidence-based, no flattery. You are the chief of staff
|
|
|
107
110
|
|
|
108
111
|
## References
|
|
109
112
|
|
|
110
|
-
The
|
|
113
|
+
The five skills shipped under this plugin carry their own SKILL.md detail:
|
|
111
114
|
|
|
112
115
|
- `skills/office-hours/SKILL.md` — YC office-hours forcing questions in startup + builder modes; outputs the design-doc substrate every later artefact derives from.
|
|
113
116
|
- `skills/brand-pack/SKILL.md` — brand identity (palette, typography, tone, logo) tokenised for the data-room artefacts to consume.
|
|
114
117
|
- `skills/zero-to-prototype/SKILL.md` — 31 frameworks for customer discovery, validation, positioning, PMF measurement, landing page, PRD.
|
|
118
|
+
- `skills/prototype-host/SKILL.md` — scaffolds the landing page or wedge prototype, allocates a port, edits the brand's cloudflared ingress, runs the dev server under a systemd-user unit, and verifies the public URL returns HTTP 200.
|
|
115
119
|
- `skills/investor-data-room/SKILL.md` — full seed-raise pack: data room scaffold, business plan, term sheet, deck blueprint, prospectus, A4 print pipeline.
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
# Venture-studio data-room scaffold — deterministic enforcement of the
|
|
3
3
|
# scaffold-first principle (Task 286 + feedback_doctrine_paragraph_is_not_a_gate).
|
|
4
4
|
#
|
|
5
|
-
# Creates exactly one Project (with
|
|
5
|
+
# Creates exactly one Project (with nine pre-seeded artefact Tasks) in
|
|
6
6
|
# the graph, then materialises the ten-section data-room directory tree
|
|
7
7
|
# on disk. The venture-studio agent's downstream skills are gated on
|
|
8
8
|
# both signals existing — see venture-studio/PLUGIN.md.
|
|
@@ -53,9 +53,14 @@ fi
|
|
|
53
53
|
|
|
54
54
|
DATA_ROOM="${PROJECT_ROOT}/.docs/data-room"
|
|
55
55
|
|
|
56
|
-
#
|
|
56
|
+
# Nine pre-seeded artefact tasks — order and names match
|
|
57
57
|
# premium-plugins/venture-studio/PLUGIN.md § First-conversation routing.
|
|
58
58
|
# Section order is preserved so the agent can walk them sequentially.
|
|
59
|
+
# Prototype-host is slotted between Stage 2 (wedge + landing copy) and
|
|
60
|
+
# Stage 3 (business plan): brand-pack and wedge are hard prerequisites
|
|
61
|
+
# (the skill consumes 06-product-ip/brand/ tokens and 01-narrative/LANDING.md);
|
|
62
|
+
# hosting before business plan keeps the founder's wedge-validation loop
|
|
63
|
+
# (live URL) ahead of investor-pack work.
|
|
59
64
|
PAYLOAD=$(cat <<JSON
|
|
60
65
|
{
|
|
61
66
|
"accountId": "${ACCOUNT_ID}",
|
|
@@ -66,6 +71,7 @@ PAYLOAD=$(cat <<JSON
|
|
|
66
71
|
{"name": "Stage 1 — Office-hours design doc", "description": "Produces 01-narrative/office-hours-design.md via the office-hours skill."},
|
|
67
72
|
{"name": "Stage 2 — Wedge validation + landing page + PRD", "description": "Produces 01-narrative/{PMF,LANDING,PRD}.md via the zero-to-prototype skill."},
|
|
68
73
|
{"name": "Brand pack", "description": "Produces brand guidelines + summary + color palette + typography system + tone-of-voice (voice/messaging/copy) + logo guidelines into 06-product-ip/brand/ via the brand-pack skill."},
|
|
74
|
+
{"name": "Prototype host", "description": "Public URL for the landing page and/or wedge prototype via cloudflared ingress + systemd-managed dev server (skill: prototype-host)."},
|
|
69
75
|
{"name": "Stage 3 — Business plan", "description": "Produces 01-narrative/business-plan.md via investor-data-room Stage 3."},
|
|
70
76
|
{"name": "Stage 3b — Term sheet", "description": "Produces html/prospectus/term_sheet.html via investor-data-room Stage 3b."},
|
|
71
77
|
{"name": "Stage 4 — Deck blueprint", "description": "Produces 01-narrative/deck-blueprint.md via investor-data-room Stage 4."},
|
|
@@ -101,4 +107,10 @@ for section in \
|
|
|
101
107
|
mkdir -p "${DATA_ROOM}/${section}"
|
|
102
108
|
done
|
|
103
109
|
|
|
110
|
+
# Hosted-prototype source roots live alongside the numbered sections under
|
|
111
|
+
# data-room/. The prototype-host skill populates this with one subdir per
|
|
112
|
+
# surface (landing/, prototype/, etc.); creating the parent here so the
|
|
113
|
+
# directory exists before the first invocation.
|
|
114
|
+
mkdir -p "${DATA_ROOM}/prototype"
|
|
115
|
+
|
|
104
116
|
echo "scaffold.sh: data-room scaffolded at ${DATA_ROOM}"
|
|
@@ -58,6 +58,16 @@ Standard ten numbered sections plus root README, internal-narrative subdirectory
|
|
|
58
58
|
|
|
59
59
|
**Standard contents.** Press kit, pitch deck (live presentation version), demo recording, reference contacts, advisor letters, awards, published thought leadership.
|
|
60
60
|
|
|
61
|
+
### prototype/ (sibling of the ten numbered sections)
|
|
62
|
+
**Purpose.** Running code: landing page source, wedge prototype source, dev-server logs. This is the only top-level under `.docs/data-room/` that ships an executable surface rather than narrative or diligence artefacts. Lives outside the numbered investor sections because investors read the rendered URL, not the source tree.
|
|
63
|
+
|
|
64
|
+
**Standard contents.** One subdirectory per hosted surface (e.g. `landing/`, `prototype/`, `prototype-v2/`), each containing:
|
|
65
|
+
- Framework scaffold (e.g. Vite `package.json`, `src/`, `index.html`) or a single static `index.html`.
|
|
66
|
+
- `.port` — the local port the dev server / file server binds to (allocated by `prototype-host` skill from the 4100–4199 range).
|
|
67
|
+
- Framework dotfiles (`.gitignore`, `vite.config.ts`, etc.).
|
|
68
|
+
|
|
69
|
+
**Lifecycle.** Created by `bin/scaffold.sh` (empty directory) when the data room is first scaffolded. Populated by the `prototype-host` skill when the founder runs "host the landing" or "host the prototype". Multiple surfaces can coexist — port allocation, cloudflared ingress rules, and systemd unit names are all namespaced by surface name.
|
|
70
|
+
|
|
61
71
|
## Top-level README.md doubles as data-room index
|
|
62
72
|
|
|
63
73
|
Three things at the root:
|
|
@@ -0,0 +1,179 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: prototype-host
|
|
3
|
+
description: Use when the operator asks to "host the landing", "host the prototype", "deploy this", "give me a public URL", or any variant that means "make the landing page or wedge prototype reachable on a real URL the founder can send to a customer". Scaffolds a source tree, allocates a local port, edits the brand's cloudflared ingress, creates a DNS row, runs the dev server (or static file-server) under a systemd-user unit, and verifies HTTP 200 from outside the box. Idempotent: re-run for the same surface restarts cleanly without duplicating ports, ingress rows, or units.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# prototype-host
|
|
7
|
+
|
|
8
|
+
## Outcome
|
|
9
|
+
|
|
10
|
+
A founder asks "host the landing" or "host the prototype" and ends the turn with a working public URL — `https://<surface>.<brand-hostname>` — that returns HTTP 200, backed by a dev server (or static file server) supervised by systemd so it survives reboot. No CI, no Vercel, no Pages — the install device itself serves the prototype through the brand's existing cloudflared tunnel.
|
|
11
|
+
|
|
12
|
+
The skill is a composition of primitives that already exist on every Maxy Code install: cloudflared multi-hostname ingress (see [`cloudflared/references/manual-setup.md`](../../../../platform/plugins/cloudflare/references/manual-setup.md)), `systemctl --user` unit files for per-process supervision, and the agent's Bash + Read + Write + Edit tools for source scaffolding. The skill's job is to compose them deterministically so the founder never has to.
|
|
13
|
+
|
|
14
|
+
## Inputs
|
|
15
|
+
|
|
16
|
+
The agent gathers these before invoking any of the six phases. Defaults below; use `AskUserQuestion` only when the operator's intent is ambiguous about surface name or framework.
|
|
17
|
+
|
|
18
|
+
| Input | Default | Notes |
|
|
19
|
+
|---|---|---|
|
|
20
|
+
| `surface` | `landing` for "host the landing"; `prototype` for "host the prototype"; otherwise ask | The DNS label; becomes `<surface>.<brand-hostname>`. Lowercase, kebab-case, must be a valid DNS label (`^[a-z0-9-]+$`, max 63 chars). |
|
|
21
|
+
| `framework` | `static` for `landing`; `vite` for `prototype` | One of `static`, `vite`, `next`, `sveltekit`, `astro`. See [`references/scaffold-frameworks.md`](references/scaffold-frameworks.md). |
|
|
22
|
+
| `surface-dir` | `${PROJECT_ROOT}/.docs/data-room/prototype/<surface>/` | Source tree root. |
|
|
23
|
+
|
|
24
|
+
Two environment values the skill derives, never asks for:
|
|
25
|
+
|
|
26
|
+
- `BRAND` — from `jq -r '.hostname' <PROJECT_ROOT>/platform/config/brand.json` (same idiom every other skill uses).
|
|
27
|
+
- `BRAND_HOSTNAME` — the cloudflared root domain for this install: `jq -r '.cloudflareRootDomain // .hostname' <PROJECT_ROOT>/platform/config/brand.json`. If the field is empty, abort with literal stderr `[prototype-host] FATAL brand-hostname-unresolved — set cloudflareRootDomain in brand.json`.
|
|
28
|
+
|
|
29
|
+
## Hard prerequisite — brand-pack must have run
|
|
30
|
+
|
|
31
|
+
Before phase 1, check `[ -d "${PROJECT_ROOT}/.docs/data-room/06-product-ip/brand" ]` and `[ -n "$(ls -A "${PROJECT_ROOT}/.docs/data-room/06-product-ip/brand" 2>/dev/null)" ]`. If either fails, abort:
|
|
32
|
+
|
|
33
|
+
```
|
|
34
|
+
[prototype-host] FATAL brand-pack-missing — run brand-pack first; hosted surfaces consume 06-product-ip/brand/{color-palette,typography-system,tone-of-voice}.md
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
This is doctrinal — hosting a brandless landing ships a surface that either confounds conversion data or forces a re-render after brand-pack. The check is exit-code, not LLM judgement.
|
|
38
|
+
|
|
39
|
+
## Phases
|
|
40
|
+
|
|
41
|
+
Every phase emits exactly one structured stdout line on success:
|
|
42
|
+
|
|
43
|
+
```
|
|
44
|
+
[prototype-host] phase=<n> surface=<surface> framework=<framework> port=<port> ingress=<state> dns=<state> service=<unit> status=<systemd-state> http=<code>
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
Any phase that cannot produce its key/value pair fails by emitting literal stderr (no narration, no retry, no menu-phrasings — [[feedback_no_stdout_parsing_for_control_flow]]) and exits non-zero. The agent surfaces the stderr verbatim to the operator.
|
|
48
|
+
|
|
49
|
+
### Phase 1 — Surface intake (idempotency check)
|
|
50
|
+
|
|
51
|
+
If `<surface-dir>/.port` exists, this is a re-run. Read the port from `.port`, skip directly to phase 5 (systemd restart) then phase 6 (verify). Log:
|
|
52
|
+
|
|
53
|
+
```
|
|
54
|
+
[prototype-host] phase=1 surface=<surface> idempotent=true port=<port>
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
Otherwise proceed to phase 2.
|
|
58
|
+
|
|
59
|
+
### Phase 2 — Scaffold source
|
|
60
|
+
|
|
61
|
+
Run the framework's canonical scaffolder into `<surface-dir>/`. The exact commands per framework live in [`references/scaffold-frameworks.md`](references/scaffold-frameworks.md). Static `landing` is a special case: write `<surface-dir>/index.html` directly from `01-narrative/LANDING.md` using the brand tokens.
|
|
62
|
+
|
|
63
|
+
Brand application (every framework):
|
|
64
|
+
|
|
65
|
+
1. Read `06-product-ip/brand/color-palette.md` — extract the CSS custom properties (the file ships a `:root { --color-*: ... }` block).
|
|
66
|
+
2. Read `06-product-ip/brand/typography-system.md` — extract the font-family + scale tokens.
|
|
67
|
+
3. For `static`: inline both into the `<head>` of `<surface-dir>/index.html`.
|
|
68
|
+
4. For framework scaffolds: write the tokens into the framework's global stylesheet entry point (`src/index.css` for Vite/Astro, `app/globals.css` for Next, `src/app.css` for SvelteKit).
|
|
69
|
+
5. For the landing's hero + CTA copy: read `06-product-ip/brand/tone-of-voice.md` and apply it when rewriting `01-narrative/LANDING.md` into HTML.
|
|
70
|
+
|
|
71
|
+
### Phase 3 — Port allocation
|
|
72
|
+
|
|
73
|
+
First unbound port in 4100–4199:
|
|
74
|
+
|
|
75
|
+
```bash
|
|
76
|
+
for p in $(seq 4100 4199); do
|
|
77
|
+
ss -tln 2>/dev/null | awk '{print $4}' | grep -qE ":${p}$" || { echo "$p"; break; }
|
|
78
|
+
done
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
Write to `<surface-dir>/.port`. If the range is exhausted, abort:
|
|
82
|
+
|
|
83
|
+
```
|
|
84
|
+
[prototype-host] FATAL port-range-exhausted range=4100-4199 — free a port or extend the range
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
The range is a skill constant (not a `brand.json` field) because it sits below every documented admin/chat/VNC band and above the OS ephemeral range default. Extending the range is a follow-up task, not a per-install knob.
|
|
88
|
+
|
|
89
|
+
### Phase 4 — Cloudflared ingress edit
|
|
90
|
+
|
|
91
|
+
Per [`references/cloudflared-ingress-edit.md`](references/cloudflared-ingress-edit.md):
|
|
92
|
+
|
|
93
|
+
1. Append a hostname rule for `<surface>.<BRAND_HOSTNAME>` → `http://localhost:<port>` immediately before the final `http_status:404` catch-all in `${CFG_DIR}/config.yml`. The reference doc carries the exact `awk` insert pattern (sed cannot safely insert before the last line of a multi-line YAML rule).
|
|
94
|
+
2. Validate: `cloudflared --origincert "${CFG_DIR}/cert.pem" --config "${CFG_DIR}/config.yml" tunnel ingress validate`. Non-zero exit aborts with the literal cloudflared error.
|
|
95
|
+
3. Create DNS row: `cloudflared --origincert "${CFG_DIR}/cert.pem" tunnel route dns --overwrite-dns "${TUNNEL_ID}" <surface>.<BRAND_HOSTNAME>`. `TUNNEL_ID` comes from `${CFG_DIR}/tunnel.state` (the Step 5b file every install writes).
|
|
96
|
+
4. Reload cloudflared: `systemctl --user restart ${BRAND}-cloudflared.service`.
|
|
97
|
+
|
|
98
|
+
Idempotency: before appending, grep `${CFG_DIR}/config.yml` for `<surface>.<BRAND_HOSTNAME>`. If present, skip the append + DNS route + reload — the row already exists; this is a re-run after a failed phase 5 or 6.
|
|
99
|
+
|
|
100
|
+
### Phase 5 — Systemd user unit
|
|
101
|
+
|
|
102
|
+
Per [`references/systemd-user-service.md`](references/systemd-user-service.md), write `${HOME}/.config/systemd/user/${BRAND}-prototype-<surface>.service`. Two modes:
|
|
103
|
+
|
|
104
|
+
- **Dev-server mode** (frameworks with hot-reload — Vite, Next dev, SvelteKit dev, Astro dev): `ExecStart=` runs the framework's dev command bound to `<port>` via `PORT=` or `--port`.
|
|
105
|
+
- **Static file-server mode** (the `static` framework): run `npm run build` first (no-op for raw HTML), then `ExecStart=cloudflared file-server --port <port> <surface-dir>` (or `<surface-dir>/dist` for built output). No Node process for raw static landings.
|
|
106
|
+
|
|
107
|
+
Then:
|
|
108
|
+
|
|
109
|
+
```bash
|
|
110
|
+
systemctl --user daemon-reload
|
|
111
|
+
systemctl --user enable --now "${BRAND}-prototype-<surface>.service"
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
Check `systemctl --user is-active "${BRAND}-prototype-<surface>.service"` returns `active`. If not, dump the last 50 lines of `journalctl --user -u ${BRAND}-prototype-<surface>.service -n 50 --no-pager` to stderr and abort.
|
|
115
|
+
|
|
116
|
+
### Phase 6 — External verification
|
|
117
|
+
|
|
118
|
+
```bash
|
|
119
|
+
curl -I -m 15 "https://<surface>.<BRAND_HOSTNAME>"
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
The skill emits the full HTTP response line (e.g. `HTTP/2 200`) to chat. Anything other than `200` aborts with the full curl output as literal stderr — same setup-done contract Task 288 established for cloudflare setup. This is end-to-end proof because the chat itself runs through the same tunnel: if the cloudflared connector were dead, the agent would never have answered the operator.
|
|
123
|
+
|
|
124
|
+
Final success line:
|
|
125
|
+
|
|
126
|
+
```
|
|
127
|
+
[prototype-host] DONE surface=<surface> url=https://<surface>.<BRAND_HOSTNAME> port=<port> service=${BRAND}-prototype-<surface>.service http=200
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
## Idempotency contract
|
|
131
|
+
|
|
132
|
+
Re-running the skill with the same `<surface>` is a first-class flow, not an error:
|
|
133
|
+
|
|
134
|
+
| State on re-run | Behaviour |
|
|
135
|
+
|---|---|
|
|
136
|
+
| `<surface-dir>/.port` exists, ingress row exists, service active | Restart the systemd unit; re-verify; emit `idempotent=true` |
|
|
137
|
+
| `.port` exists, ingress row missing | Re-run phase 4 (append, validate, route, reload); restart unit; verify |
|
|
138
|
+
| `.port` exists, service failed | Restart unit; if still failing, dump journal and abort |
|
|
139
|
+
| Nothing exists | Fresh six-phase run |
|
|
140
|
+
|
|
141
|
+
The skill never allocates a second port for the same surface, never appends a duplicate ingress row, never creates a second systemd unit with a different name.
|
|
142
|
+
|
|
143
|
+
## Failure surfaces
|
|
144
|
+
|
|
145
|
+
Likely failure points and the literal stderr the agent should expect:
|
|
146
|
+
|
|
147
|
+
- **Port range exhausted** — `[prototype-host] FATAL port-range-exhausted range=4100-4199`
|
|
148
|
+
- **Ingress validate fails** — cloudflared's own multi-line YAML error, verbatim
|
|
149
|
+
- **DNS route fails** — cloudflared's stderr (typically a 1xxx error code from the API)
|
|
150
|
+
- **Systemd unit fails to start** — last 50 lines of journalctl, verbatim
|
|
151
|
+
- **Curl returns non-200** — full `curl -I` output, verbatim
|
|
152
|
+
|
|
153
|
+
Diagnostic commands the agent should suggest on failure:
|
|
154
|
+
|
|
155
|
+
```bash
|
|
156
|
+
cat ${CFG_DIR}/config.yml
|
|
157
|
+
cloudflared --origincert "${CFG_DIR}/cert.pem" --config ${CFG_DIR}/config.yml tunnel ingress validate
|
|
158
|
+
systemctl --user status ${BRAND}-prototype-<surface>.service
|
|
159
|
+
journalctl --user -u ${BRAND}-prototype-<surface>.service -n 200 --no-pager
|
|
160
|
+
ss -tln | grep :<port>
|
|
161
|
+
dig <surface>.<BRAND_HOSTNAME>
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
## Out of scope
|
|
165
|
+
|
|
166
|
+
- Production hosting (Cloudflare Pages, Vercel, Netlify, Workers). The dev server on the install device covers the founder workflow; production deploy is a separate, later task.
|
|
167
|
+
- TLS / cert handling beyond cloudflared's own.
|
|
168
|
+
- Per-prototype auth gating — the public landing is public; access control is a separate skill.
|
|
169
|
+
- `brand.json` schema changes. Port range is a skill constant.
|
|
170
|
+
- `paths.ts` reads.
|
|
171
|
+
- Multi-tunnel — one tunnel per install with multiple ingress rules is the existing pattern.
|
|
172
|
+
- CI/CD or git-push deploy.
|
|
173
|
+
- Pre-built framework templates beyond the framework's official `create-*` scaffolders.
|
|
174
|
+
- Telemetry on the public URL — the founder wires their own (Plausible, GA, server logs).
|
|
175
|
+
- A `prototype-host-remove` companion skill. For now: `systemctl --user disable --now ${BRAND}-prototype-<surface>.service` + manually strip the ingress row + delete the DNS record. Removal is a follow-up task if it becomes friction.
|
|
176
|
+
|
|
177
|
+
## Multi-prototype is supported by construction
|
|
178
|
+
|
|
179
|
+
Port allocation scans first-free; ingress rules are additive; systemd unit names are namespaced by `<surface>`. Running `landing` + `prototype` + `prototype-v2` simultaneously on the same install requires no special handling — invoke the skill three times with three different surface names.
|