Repository navigation
Enforce agent-state UX for app→agent features - #18
Closed
ahmad-ajmal wants to merge 1 commit into
Closed
ahmad-ajmal wants to merge 1 commit into
ahmad-ajmal wants to merge 1 commit into
Conversation
Work an app queues for an agent now has to be visible in the View until it is done, and the default path makes that the easy thing to do (#13). - validate: new "agent work shown in the View" step. A stack-agnostic static scan finds trigger(...) calls that name a capability in app-owned code (JS, Go, Ruby, Python, Rust spellings; comments, strings, definitions, system files, deps and tests ignored) and fails when no View code renders the agent-task component or reads /api/_a2app/tasks/. The component's own file does not count. - UI kit: an agent-task panel, badge and useAgentTask hook in every blueprint with a queue and a View (AgentTask.jsx for react-node/go/rust; Vue components + agentTask.js for rails-vue). One shared poller per task, every state rendered (waiting with elapsed time and a no-listener hint, working with step, done with a readable full-width result, failed with the reason in words and Ask again), record-written progress for multi-user apps, and the run's printed output when the bridge closed the task without a summary. - Starters: "Ask an agent" button, agentTask field set by request-triage, and the previous task id in the payload so asking again is a new request. - Skills: creator states the result-rendering rule and the gate; walk-verify gets check 6c for queued work; modify points at both. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Oct 2, 2026
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.
Work an app queues for an agent now has to be visible in the View until it is done.
validateenforces it, walk-verify checks it, and every blueprint with a queue and a View ships a component that does it, so the default path is the good one.What changed
1. Validate gate: new step, "agent work shown in the View" (
framework/cli/src/lib/agentState.ts).trigger(…)calls in app-owned code that name a capability. It recognises the JS, Go, Ruby, Python (capability=) and Rust (Some(…)) spellings, plus the adapter's object form./api/_a2app/tasks/. The failure names each call site and points at the creator-skill rule.trigger, system-owned files, dependencies, build output and tests. The component's own file doesn't count, so shipping it is not using it.2. UI kit: an agent-task panel, badge and
useAgentTaskhook.AgentTask.jsxfor react-node, go-react and rust-react; Vue components plusagentTask.jsfor rails-vue.3. Starters:
agentTaskfield set byrequest-triage.4. Skills:
How it was verified
framework/cli/test/agent-state.test.mjscovers every stack spelling, the false-positive cases, the View verdicts, and all five shipped starters passing their own gate. Full suite green, conformance 86/86.validatefailed, naming the line. After rendering the panel, it passed.agent-app bridge startand both results displayed correctly. That needed the bridge fixes in the companion PR.Not covered
lib/a2app_schema.rb) has not been executed (no Ruby on the test machine).