Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 9 additions & 6 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,18 +46,21 @@ Run what you build before calling it done. **If you can't run it, say so.**
## PR discipline

- Paste the full PR URL, not the number.
- Record it through the declared surface too: prose URLs are inert, so use
`@agency:pr.link(url: "<full URL>", item: "<item id>")` or the `pr:` field on
`items.state` when shipping an item.
- When the change lands on master, close the PR and delete the branch in the same breath
(`gh pr merge --delete-branch`). An open PR whose content already shipped reads as
unfinished work.

## Closing an item you were given

Reply checkboxes edit the project's item list: `- [ ]` proposes, `- [x] <exact title>`
closes, `- [-] <exact title>` strikes an obsolete row. Titles match exactly and
case-insensitively, so a paraphrase silently appends a near-duplicate. Full contract:
[`docs/task-manager.md`](docs/task-manager.md#the-project-session-contract-three-checkboxes).
Read that, not `projects.rs`: the verbs arrived late, and an older tree reads as
append-only. [`wt-tools`](crates/wt-tools) reads the list and never writes.
The project prompt supplies item ids and the declared Prompt Syntax surface. Report
state with `@agency:items.state`, create with `@agency:items.add`, and remove an
incorrect row with `@agency:items.retire`. Never address an existing row by title:
paraphrases were how the old checkbox contract created near-duplicates. Full contract:
[`docs/task-manager.md`](docs/task-manager.md#the-project-session-contract).
[`wt-tools`](crates/wt-tools) reads the list and never writes.

- **Close in the same turn the work ships.** Shipped means merged and released.
- **Read the title before striking it.** `wt-tools search-items <word>` prints it as stored.
Expand Down
17 changes: 7 additions & 10 deletions AgencyZero.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,18 @@
3. Ship through a pull request.
4. Merge only after review passes, or the owner overrides.
5. No em dashes.
6. Track the work as items, in your reply, as it happens:
`- [ ]` opens, `- [~]` plans, `- [/]` starts, `- [>] title (#35)` ships.
`- [?]` when you are stuck on an answer only the owner can give.
Never `- [x]`: you cannot confirm your own fix works. The owner closes it.
Quoted or fenced checklists are never read as items, so quote freely.
7. To retire a row, or to write into another project, ask the host directly:
`<ps @agency:items.inject(project: "ui")>` … checkbox lines … `</ps>`.
Project by name or by id, omit it to mean this one. Prose can open, plan,
start and ship a row here; only a directive can delete or reach elsewhere.
8. Report item state by id, on its own line, as it happens:
6. Track work through the declared Prompt Syntax surface, in your reply, as it
happens. Prose, checkboxes, quotes, fences and URLs are inert.
7. Report item state by id, on its own line:
`<ps @agency:items.state(id: "item-a3f9", status: "active")>`
`<ps @agency:items.add(ref: "t1", title: "One line", status: "planning")>`
`<ps @agency:items.retire(id: "item-a3f9")>` removes one that should not
be there. The turn's prompt lists the open items and their ids, and answers
back with what each directive did. Never address a row by its title.
8. A pull request is state only when authored as state:
`<ps @agency:pr.link(url: "https://github.com/owner/repo/pull/35", item: "item-a3f9")>`.
Also paste the full URL in prose so the owner can open it. A run started from
an item ships with `items.state(..., status: "shipped", pr: "<full URL>")`.
9. Ask before installing anything: a download, a global cache, a browser, a
toolchain. A repo doc recommending it is not permission.
10. Persisted data goes in a WorkTable table. Not a JSON file beside the store,
Expand Down
18 changes: 9 additions & 9 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ members = [
]

[workspace.package]
version = "0.1.55"
version = "0.1.56"
edition = "2024"
publish = false

Expand Down
2 changes: 1 addition & 1 deletion apps/gui/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ tauri-build = { version = "2", features = [] }
[dependencies]
# Carries the store forward when a column changes; see crates/wt-migrate.
wt-migrate = { path = "../../crates/wt-migrate" }
agent-abstraction = "0.4.4"
agent-abstraction = "0.4.5"
az-core.workspace = true
worktable = "0.9"
# The `worktable!` macro emits code that names these by bare path rather than
Expand Down
4 changes: 2 additions & 2 deletions apps/gui/frontend/src/api/fixtures.ts
Original file line number Diff line number Diff line change
Expand Up @@ -412,8 +412,8 @@ export const AGENT_STATUS: AgentStatus[] = [
events: true,
nativeSystem: false,
commands: false,
liveFollowUp: false,
approvals: false,
liveFollowUp: true,
approvals: true,
},
checkedAt: ago(2 * 60_000),
},
Expand Down
5 changes: 1 addition & 4 deletions apps/gui/frontend/src/features/settings/SettingsTab.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -302,10 +302,7 @@ export function SettingsTab(): JSX.Element {
onChange={(defaultEffort) => void actions.saveSettings({ defaultEffort })}
/>
</Row>
<Row
label="Completed items"
hint="what a session's own “done” report does to the row"
>
<Row label="Completed items" hint="what marking an item finished does to the row">
<PillMenu
label="Completed items"
value={current().completedItems}
Expand Down
8 changes: 4 additions & 4 deletions apps/gui/frontend/src/stores/models.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -203,14 +203,14 @@ describe("what the prompt offers", () => {
expect(sent?.model).toBe("gpt-5.6-sol");
});

it("moves Ask to read-only when switching to OpenAI", async () => {
it("keeps Ask when switching to an approval-capable OpenAI model", async () => {
const workspace = await mountWorkspace();
workspace.actions.setTabModel("worktable", "claude", "sonnet", "ask");
workspace.actions.setTabModel("worktable", "codex", "gpt-5.6-sol", "ask");

const tab = workspace.state.tabs.find((candidate) => candidate.key === "worktable");
expect(tab?.agent).toBe("codex");
expect(tab?.permission).toBe("read_only");
expect(tab?.permission).toBe("ask");
});

it("restores the last provider when a project is closed and reopened", async () => {
Expand Down Expand Up @@ -322,15 +322,15 @@ describe("posture follows Settings too", () => {
expect(workspace.activeTab().permission).toBe("read_only");
});

it("opens a Codex draft as read-only when Settings says Ask", async () => {
it("opens a Codex draft with Ask when Settings says Ask", async () => {
const workspace = await mountWorkspace();
await workspace.actions.saveSettings({ defaultAgent: "codex", defaultPermission: "ask" });

workspace.actions.openDraft();

await waitFor(() => expect(workspace.activeTab().kind).toBe("draft"));
expect(workspace.activeTab().agent).toBe("codex");
expect(workspace.activeTab().permission).toBe("read_only");
expect(workspace.activeTab().permission).toBe("ask");
});

it("keeps Copilot out of project tabs until project runs support it", async () => {
Expand Down
2 changes: 1 addition & 1 deletion apps/gui/frontend/src/stores/workspace.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ describe("startup", () => {
it("derives approval postures from provider capabilities", async () => {
const workspace = await mountWorkspace();
expect(workspace.permissionsFor("claude")).toContain("ask");
expect(workspace.permissionsFor("codex")).not.toContain("ask");
expect(workspace.permissionsFor("codex")).toContain("ask");
});
});

Expand Down
4 changes: 2 additions & 2 deletions apps/gui/frontend/src/types/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -477,8 +477,8 @@ export interface GlobalSettings {
forwardProxyVars: boolean;
notifications: NotificationSettings;
/**
* What a session's `- [x]` does to an existing item: `"resolve"` marks it
* finished and keeps the row, `"delete"` removes it outright.
* What the owner's finished action does to an existing item: `"resolve"`
* keeps the finished row, while `"delete"` removes it outright.
*/
completedItems: "resolve" | "delete";
/** How the workspace is coloured. See {@link ThemeSettings}. */
Expand Down
4 changes: 2 additions & 2 deletions apps/gui/src/agents.rs
Original file line number Diff line number Diff line change
Expand Up @@ -249,8 +249,8 @@ mod tests {
assert!(claude.live_follow_up);
assert!(claude.approvals);
assert!(claude.commands);
assert!(!codex.live_follow_up);
assert!(!codex.approvals);
assert!(codex.live_follow_up);
assert!(codex.approvals);
assert!(!codex.commands);
}
}
2 changes: 1 addition & 1 deletion apps/gui/src/db/schema/pull_request.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//! Pull requests cut during a project's runs, tracked as chips over the composer.
//!
//! One row per PR URL per project, upserted when a reply mentions the URL and
//! One row per PR URL per project, created from an authored PS directive and
//! refreshed through `gh` when available. `state` is GitHub's own word
//! (`OPEN` | `MERGED` | `CLOSED`, or `unknown` before the first refresh);
//! `ci` is the check rollup reduced to `pass` | `fail` | `pending` | `none` |
Expand Down
Loading
Loading