mirror of
https://github.com/jparkerweb/plan2code.git
synced 2026-11-17 04:45:33 -08:00
Update the web console server, screens, help, prefs and loop setup, with matching page and logic suites
AI Assisted
This commit is contained in:
1 parent
2468027a5a
commit
8e34bf1005
119 files changed
+9957
-3728
No files matched your search
@@ -1,80 +1,25 @@
|
||||
# The Workspace on the Web Console
|
||||
# The Workspace
|
||||
|
||||
Part of the web console contract (`console.md`). Read when `open` lists more
|
||||
than one folder, a `Workspace:` line arrives, or someone writes `@name`.
|
||||
The console points here when a `Workspace:` change arrives. Read it also when `open` lists more than one folder or someone writes `@name`.
|
||||
|
||||
The person can add folders beside the one the session started in (a shared
|
||||
library, a design folder), from the footer's folder label. Together they are
|
||||
the session's **workspace**: context for every skill run in this console
|
||||
session, each folder addressed by a short `@name`. It outlives dashboard hops,
|
||||
and it is remembered: every change is saved to `workspaces.json` beside
|
||||
`looks.json` (never into the project), keyed by the folder the session runs
|
||||
in and then by spec. A session with a spec opens on that spec's list, one with
|
||||
none on the project's; a spec with nothing saved starts as a copy of the
|
||||
project's list. The dashboard's picker swaps the list as the selection moves,
|
||||
and a `specDir` you post mid-run takes the current list with it. There is
|
||||
nothing for you to load: `open` prints the list, and a switch of spec on a
|
||||
resume reaches you as ordinary workspace changes on your next `wait`.
|
||||
The person can add folders beside the one the session started in (a shared library, a design folder). Together they are the session's workspace: context for every skill run in it, each folder addressed by a short `@name`. It follows dashboard hops. There is nothing to load: `open` prints the list, and a spec switch on a resume reaches you as ordinary changes.
|
||||
|
||||
## What you are told
|
||||
|
||||
`open` (fresh or `--resume`) prints the whole list under `workspace`:
|
||||
`open` prints `workspace` when it holds more than the folder you started in: `{"folders":[{"name":"shop","path":"/home/sam/code/shop","original":true},{"name":"shared","path":"/home/sam/code/shared-ui","description":"Button and form styles"}],"missing":["old-docs"]}` (`missing` only when a folder is no longer on disk).
|
||||
|
||||
```jsonc
|
||||
{ "ok": true, "sid": "…", "url": "…",
|
||||
"workspace": {
|
||||
"folders": [
|
||||
{ "name": "shop", "path": "/home/sam/code/shop", "original": true },
|
||||
{ "name": "shared", "path": "/home/sam/code/shared-ui", "description": "Button and form styles" }
|
||||
],
|
||||
"missing": ["old-docs"]
|
||||
} }
|
||||
```
|
||||
|
||||
`missing` (only when there is one) names folders no longer on disk. After
|
||||
`open`, you hear only of changes, each exactly once:
|
||||
|
||||
- `wait` exit `0` carries them beside a send or chat as `workspace: [...]`
|
||||
(`{ kind, name, path, description?, from? }`, `kind` one of `added`,
|
||||
`renamed`, `described`, `removed`, `missing`, `found`), with one
|
||||
`Workspace: …` line each at the end of `reply`
|
||||
(`Workspace: added @shared — /home/sam/code/shared-ui`). A change alone never
|
||||
ends a slice: exit `10` counts it as `pendingWorkspace` and it rides on the
|
||||
next send.
|
||||
- `chat` hands changes over at once, with or without a Quick question, as
|
||||
`{ chat, workspace, reply }`.
|
||||
|
||||
Act on a change in the same turn it arrives: drop a removed folder, use the
|
||||
new name after a rename, note a missing one. No reply is needed unless the
|
||||
person asked something.
|
||||
After `open`, you hear only of changes, each once, as `Workspace:` lines last in `reply` of `wait` exit 0 or `chat`: `Workspace: added @shared`, then the folder path. The kinds are added, renamed, described, removed, missing and found. A change alone never ends a slice. Act on it in the same turn: drop a removed folder, use a new name, note a missing one. No reply is needed unless they asked something.
|
||||
|
||||
## Rules
|
||||
|
||||
- **Resolve `@name` from the workspace list.** `@shared` in an answer, a note
|
||||
or a Quick question means that folder's `path`. An `@name` not in the list
|
||||
is ordinary text.
|
||||
- **Added folders are read-only reference.** Read them freely; edit one only
|
||||
when the person asks for that change in this conversation. Chat edits still
|
||||
need approval (`console-chat.md` → Edits need approval first).
|
||||
- **Read an added folder's `AGENTS.md` before you first use it** (`CLAUDE.md`
|
||||
when there is no `AGENTS.md`), once per folder per skill run. It says how
|
||||
that folder is laid out; the original folder's `AGENTS.md` still governs
|
||||
this project and the work.
|
||||
- Resolve `@name` from the list: `@shared` in an answer, note or Quick question means that folder's `path`. An `@name` not in the list is ordinary text.
|
||||
- Added folders are read-only reference. Edit one only when they ask for that change in this conversation (chat edits still need approval, `console-chat.md`).
|
||||
- Read an added folder's `AGENTS.md` (`CLAUDE.md` without one) before first using it, once per folder per skill run. The original folder's `AGENTS.md` still governs the project.
|
||||
|
||||
## When a folder cannot be read
|
||||
## A folder you cannot read
|
||||
|
||||
When a read of an added folder genuinely fails (refused, not found), post, once
|
||||
per folder:
|
||||
When a read of an added folder fails (refused, not found), post once per folder, and print one terminal line saying which and why:
|
||||
|
||||
```jsonc
|
||||
{ "folderIssue": { "name": "shared", "reason": "Permission was refused", "hint": "/add-dir /home/sam/code/shared-ui" } }
|
||||
```
|
||||
`{"folderIssue":{"name":"shared","reason":"Permission was refused","hint":"/add-dir /home/sam/code/shared-ui"}}`
|
||||
|
||||
and print one terminal line saying which folder and why. The page marks the
|
||||
folder and tells the person once. `hint` is optional: an agent that knows it
|
||||
is Claude Code puts `/add-dir <path>` there. Your harness asking the person
|
||||
for permission is not a failure; report only a read that failed after it.
|
||||
|
||||
A `folderIssue` needs non-empty `name` and `reason` strings, and `hint`, when
|
||||
present, is one too; anything else is exit `3`. It goes to the session's
|
||||
ledger, never into the page state.
|
||||
`name` and `reason` are required non-empty strings; `hint` is optional (Claude Code: `/add-dir <path>`). Your harness asking the person for permission is not a failure; report only a read that failed after it.
|
||||
Reference in new issue
Block a user