Repository navigation
feat: dashboard ★/Goals + batch brief --new with goal provenance (Mind#565) - #624
Merged
Merged
Conversation
…ox, brief --new (PyAutoMind#565) Design B, as ruled 2026-11-13. The published dashboard becomes the Mind's write door for queue.md and goals.md; the Mind's dashboard_input.yml does the validating and committing. - dashboard.html: a ★ toggle on every prompt row (pressed with its queue position, matched by basename, in every section), and a Goals and queue box above the section cards with a Connect panel for the token. The page reads right with JS off; stars stay disabled until a token is present. - dashboard_edit.js (inlined into the one <script>): one tap = one workflow_dispatch with an Actions-only fine-grained token kept in this browser (forget control; a 401 clears it; writes off inside a frame). Optimistic, serialised per task, confirmed when the run succeeds, reverted with the workflow's own ::error reason (read from the check-run annotations) when it refuses. Live state re-read from main on load. - A meta CSP pins the script by sha256 (computed at render, so --check stays deterministic) and allows connect-src https://api.github.com only. - dashboard.md gains read-only Goals and Queue sections. - batch/_steer.py: the queue.md/goals.md readers the renderer and the planner share. `batch brief --new <slot> --review-at <ISO>` prints a skeleton brief with goals: from goals.md (backlog scoped to their epics/tags, merge-cap 0); `brief --check` warns when goal 1 is missing. - Tests: golden HTML (stars, box, CSP hash, escaping, absent files), JS parsers held to the Python readers in node, brief --new prefill + check, and tests/dashboard_edit_browser.cjs (Chromium, fake API, 320/390 px). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ard goals untrusted in briefs (PyAutoMind#565, design C) Design B (workflow_dispatch with an Actions token) was blocked by review: such a token can run any workflow at any ref. Design C, as ruled: - dashboard_edit.js opens one `dashboard-input` issue per edit (fixed key: value body, Issues-only token), then polls the issue until it is closed and reads the result comment — only the workflow bot's counts. One issue in flight at a time; taps made meanwhile coalesce (latest state per task wins, a tap and its undo send nothing). A label GitHub drops means no run, so the stray issue is closed and the tap reverted. - The Connect panel asks for Issues: read and write; the token link prefills issues=write. CSP, textContent and the rest unchanged. - batch brief --new: goals whose line was last written by a `Via: mind-dashboard` commit (git blame) are emitted commented out, "from dashboard, last edited <date>", so a worker never sees page text the human did not adopt; their epics/tags do not widen the dip. Prints the goal diff since the newest brief on stderr. --check no longer nudges toward a dashboard-sourced goal 1. - Tests: issue form held to the Mind parser, bot-only results, coalescing, provenance with a git fixture; browser harness reworked for issue create then poll (10 steps). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… issue after creating it (PyAutoMind#565) - batch brief --new: when provenance cannot be read (no git, uncommitted goals.md, blame out of step with the goals) every goal is emitted commented out, "provenance unknown" — none reaches a worker until the human adopts it; --check no longer nudges toward an unknown goal 1. - dashboard_edit.js: the Mind workflow now runs on `issues: labeled` (labels set at creation are dropped for an account without push access, and the token is a Triage machine account's). The page opens the issue, then adds `dashboard-input`; if the label is refused it closes the stray issue and reverts. - Connect panel: the machine account's token, never the human's own. - Tests: fail-closed provenance (3 cases), git fixtures for hand-written goals, Mind parser parity on the labeled event; browser harness 10/10. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Pre-M3 build 2 (PyAutoLabs/PyAutoMind#565): the editable dashboard, Brain half.
_intake.py,intake/dashboard_edit.js):connect-srclimited to api.github.com;textContent;batch brief --new <slot>: fillsgoals:fromgoals.md. Goals last written by the dashboard, or of unknown provenance, are commented out with "from dashboard, last edited ", and a diff since the last brief is printed.Test plan
pytest tests/: 1870 passed.Gate
workflow_dispatchworkflows that put inputs into shell. A lint now blocks the pattern. Old branches still carry the old YAML: seedraft/maintenance/pyautomind/old_branch_workflow_secret_exposure.md.🤖 Generated with Claude Code