web: shared chat stars, pipeline mini graphs and agent questions

- Persist chat stars in the operator-session registry (chat_star) so every
  browser/device shows the same Starred group; migrate old local stars once.
- Add a compact pipeline graph shape to list responses and draw a lightweight
  list miniature; replace the cryptic id/version line with the stage count.
- Surface OpenCode form questions as a chat card (chat_answer), replay a
  pending form to late subscribers, and notify for background questions.
- Make the mobile dock's Search cell equal to every destination, keep the
  tab row visible with 100svh, and let Source use the full pane height.
- Let a fresh sign-in auto-connect to its own origin; use a Lax session cookie
  with Expires so Remember me survives app/link launches.
- Keep shipped starters and the skill agnostic: no repository paths, project
  areas or personal device commands; add Diagnose/Fix and Research starters.
- Refresh the installed skill and document the new browser conventions.
This commit is contained in:
2026-10-20 03:11:37 +01:00
parent caae8a8038
commit 526c19fc21
46 changed files with 1547 additions and 611 deletions
+1 -1
View File
@@ -9,7 +9,7 @@ import (
"path/filepath"
)
var skillFiles = []string{"SKILL.md", "references/orchestration.md", "references/work.md", "references/queue.md", "references/debugging.md", "references/delivery.md", "references/format.md", "references/notifications.md", "references/operations.md", "references/transfer.md", "references/verification.md", "references/control.md", "references/harnesses.md"}
var skillFiles = []string{"SKILL.md", "references/orchestration.md", "references/work.md", "references/queue.md", "references/debugging.md", "references/delivery.md", "references/format.md", "references/notifications.md", "references/operations.md", "references/transfer.md", "references/verification.md", "references/control.md", "references/harnesses.md", "references/access.md"}
func SkillDirectory() (string, error) {
dir := os.Getenv("XDG_CONFIG_HOME")
+46 -33
View File
@@ -5,51 +5,64 @@ description: Use and author Pipelines workflows, inspect runs, and recover or de
# Pipelines
Pipelines are optional execution tools. The manager may also implement, test,
review, resolve conflicts, merge and deliver directly. Do not turn a failed
workflow into repeated whole-run retries or another pipeline's landing job.
Pipelines are reusable workflows for repositories. They are optional: direct
work, delegation and a pipeline are all valid routes. Use whichever finishes the
task with the least ceremony, and keep work small enough to verify.
## Work
## Using it
Read the task and relevant project map before asking questions. Split changes
into small verifiable items, each with one goal and short acceptance checks.
Run independent items concurrently; use separate worktrees and the agreed model.
Preserve partial work and inspect real diffs and command results. A failed item
does not freeze unrelated work. Continue at the necessary stage or recover directly.
`pipelines list` shows the registered workflows; `pipelines runs` shows history.
Start a run with `pipelines run <name> "<task>"`, and inspect it with
`pipelines inspect <id>`. `pipelines wait <id>` blocks until it finishes.
## Definitions
A failed run keeps its worktree and commits. Read `pipelines inspect <id> --json`
before deciding: resume the failed stage (`pipelines retry <id>`), fix directly,
or continue from the preserved branch.
Edit a retained draft, not immutable history. Give each stage one simple job and
only the input it needs. Preserve review gates, runtime limits, permissions and
the user's constraints unless asked to change them.
Use `pipelines validate DRAFT --json` before publication. Publish or execute when
the user requests it; do not ask again for routine steps already authorized.
Keep version guards. `--yes` is not a conflict policy; never silently force an
update over somebody else's version. A draft-only request does not authorize a run.
## Authoring
For delivery-enabled stages, the committer prepares a clean checked candidate and
returns success; the server lands afterward. Check ancestry after landing, not as
a precondition that prevents the gate running. Direct recovery may merge reviewed
work itself, while preserving unrelated changes and checking the result.
A definition is Markdown: `# stage <Name>` sections with `prompt`, `configs`,
`tools`, `edges`, and optional `limits`/`checks`/`settings`. Start from
`examples/`. Use stage names that describe the work:
`Plan` · `Code` · `Review` · `UIReview` · `Land` (`Prepare` and `Survey` are
useful variants).
Keep prompts short and objective: what the stage should produce and any real
constraints. The runner enforces turns, tools and limits; prompts do not need to
repeat them. Only `# outcome` is parsed from `output.md`; everything else is
free markdown. Use `links` and `memory` only when they clarify a handoff.
`pipelines validate DRAFT` checks a draft; `pipelines submit DRAFT` publishes a
new immutable version. `pipelines help <command>` has flags.
## Turns and artifacts
Each visit has `input.md` (the run prompt or previous body), `memory.md`
(completed turns), `output.md`, and `private/`. Every run also has one shared
`public/` directory, addressed by its absolute path; files there are visible to
later stages and are the stage's real artifacts. `input.md`, `memory.md`,
`output.md` and `session.html` are system evidence for auditing, not stage
output.
## References
Do not preload references. Read only the reference needed for the current task:
Read only what the task needs:
| Need | Reference |
| --- | --- |
| Small tasks and stage roles | `references/orchestration.md` |
| Queue and parallel work | `references/work.md`, `references/queue.md` |
| Failures and recovery | `references/debugging.md` |
| Definition syntax and turn files | `references/format.md` |
| Limits, tools and permissions | `references/control.md` |
| Stages, parallel work, recovery | `references/orchestration.md` |
| CLI, storage and evidence | `references/operations.md` |
| Verification and accounting | `references/verification.md` |
| Failures | `references/debugging.md` |
| Delivery and installation | `references/delivery.md` |
| Definition syntax and handoffs | `references/format.md`, `references/control.md` |
| Harnesses and models | `references/harnesses.md` |
| Notifications | `references/notifications.md` |
| CLI, storage and retained evidence | `references/operations.md` |
| Transfer and version conflicts | `references/transfer.md` |
| Verification and accounting | `references/verification.md` |
| Transfer and versions | `references/transfer.md` |
| Hosting, auth and deployment | `references/access.md` |
| Queue and work items | `references/work.md`, `references/queue.md` |
Use command-specific `pipelines help COMMAND` rather than guessing flags.
Distinguish validation, executed tests, landed source and deployed behavior.
Preserve history, branches and user data. Do not disrupt active services or device
users. Ask before destructive or out-of-scope actions, not ordinary implementation.
Ask about real ambiguity, destructive actions or changes outside the request;
routine steps of an authorized task do not need another confirmation.
@@ -0,0 +1,55 @@
# Hosting, access and deployment
The browser client is `web/serve.mjs`: static files plus a `/connect` WebSocket
proxy and `/artifacts/` proxy to the Pipelines server. Plain `node serve.mjs` is
enough for local work.
## Password gate
`serve.mjs` refuses pages, assets, artifacts and `/connect` without a signed
session cookie. The password and signing secret live outside the repository:
`~/.config/pipelines/web-auth.json` (mode `600`), e.g.
```json
{ "password": "…", "secret": "…" }
```
The sign-in page is `/login`; **Remember me** keeps a 30-day cookie, otherwise
the cookie lives until the browser closes. Wrong passwords are throttled. Tests
that start their own `serve.mjs` set `PIPELINES_WEB_AUTH=disabled`; never put that
in a service.
Changing the password: edit the file, then restart the web service.
## Bind and exposure
For an untrusted network, keep the raw ports local:
- Pipelines server: `-addr 127.0.0.1:8080`.
- Web proxy: `--host 127.0.0.1` (reachable through Tailscale, not the LAN).
- OpenCode: `server.hostname = "127.0.0.1"` in `~/.config/opencode/opencode.json`.
Tailscale can terminate HTTPS for a tailnet-only name:
```sh
tailscale serve --bg --https=8443 http://127.0.0.1:8095
# https://<machine>.<tailnet>.ts.net:8443/
```
That gives a valid certificate and a secure context (service worker, installable
web app). Only tailnet devices can resolve the name; the password still applies
to the app and its WebSocket.
Keep the server and web proxy supervised by the platform's service manager so
they restart after a reboot. Name the service files for your installation; their
labels are local choices, not part of the protocol. The HTTPS proxy rule must
also survive a reboot.
## Before exposing anything
Check what listens beyond loopback (`lsof -nP -iTCP -sTCP:LISTEN`). The Pipelines
server and the agent harness are control APIs without their own login; bind them
to localhost and expose only the authenticated web proxy. If an app-managed
server cannot bind loopback, a host firewall or tailnet ACLs are the remaining
options. Unrelated operating-system services are outside this deployment.
@@ -13,23 +13,27 @@ at integration. Serialize only actual dependency or resource conflicts.
## Stage jobs
- Planner: produce a short plan and acceptance checks only when needed.
- Implementer: make the focused change, add tests, run focused checks.
- Reviewer: inspect the whole task diff and independently verify relevant checks.
- UI reviewer: exercise rendered behavior using ready controlled data; retain captures.
- Committer: commit all reviewed task changes, integrate main and resolve conflicts.
- Plan: a short approach and acceptance checks when they help.
- Code: the focused change, tests and focused checks.
- Review: the whole task diff and independent verification.
- UIReview: rendered behavior with controlled data and captures.
- Land: commit the reviewed work, integrate main and resolve conflicts.
Handoff desired behavior and necessary evidence, not another role's restrictions.
An implementer's "no device use performed" is not a ban on the UI reviewer.
A fresh clean worktree is a successful no-op for preparation, not a failure.
Nonvisual changes need no device. A visual change needs actual visual evidence.
Names are a convention, not a requirement; a pipeline can use any clear stage
names. Keep each stage's job narrow enough to judge its output.
Hand off the desired behavior and the evidence that should exist at the end, not
another stage's restrictions. A clean worktree is a successful no-op for
preparation, not a failure. Nonvisual work needs no rendered evidence; a visual
change does.
## Pipeline choice
When using the project's area workflows: Android for android/, TUI for internal/tui/,
Server for backend/protocol work, Generic for genuinely cross-area work, Plan and
land when design is necessary, UI sweep for a visual survey, Probe for a smoke check.
Read area maps for project-specific commands. Keep models and costs as agreed.
Prefer the smallest workflow that makes the work verifiable: plan when the design
is genuinely uncertain, review when a change is risky or broad, and a visual survey
when appearance is the question. Stage names describe jobs, not fixed roles. Read
the project's own maps and commands instead of assuming an area layout. Keep models
and costs as agreed.
## Recovery and landing
+1 -1
View File
@@ -43,7 +43,7 @@ func TestEveryEmbeddedReferenceIsInstalledAndLinksResolve(t *testing.T) {
if len(main) > 8000 {
t.Fatal("keep detailed knowledge out of the main skill", len(main))
}
for _, required := range []string{"operations.md", "transfer.md", "verification.md", "Do not preload", "before asking", "--yes` is not a conflict policy"} {
for _, required := range []string{"operations.md", "transfer.md", "verification.md", "access.md", "Only `# outcome`", "Ask about real ambiguity"} {
if !strings.Contains(string(main), required) {
t.Fatal("missing routing or safety rule", required)
}