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
2 changes: 2 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,5 @@ A draft plus local tests is not done. Pull-request done is signed commits
on a branch in this repository, grok quality and logic then Codex quality
and logic on this head with zero findings, CI green on this head, then
ready. The authoring session does not sit those PR reviews. A human merges.
The local-CI comment schema for private product repositories is
`docs/local-ci-v1.md`.
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Done is all of:
3. Codex runs only if both grok dimensions are approved. If a vendor cannot run, abort loudly; do not record `approved`; do not substitute another vendor.
4. Zero findings only after an explicit complete pass. Empty, partial, timeout, or unavailable output is not zero findings. Iterate until all four lane verdicts on this head are approved.
5. Inner implement/review rounds (`review-loop`) are not the PR reviews (`pr-review`).
6. CI green on **this** head. `skipped` and `cancelled` are not green unless the workflow documents that skip.
6. CI green on **this** head. This public repository uses GitHub Actions. `skipped` and `cancelled` are not green unless the workflow documents that skip. The local-CI comment schema for **private** product repositories is defined in [docs/local-ci-v1.md](docs/local-ci-v1.md) and verified by `agent local-ci verify`.
7. Stay draft until the reviews and CI above hold on this head. Then one comment whose review-pass count is those four `approved` verdicts on this head, then mark the GitHub pull request ready. When spine and pr-review are attached, `agent allow --action pr-ready` only checks task state (`pushing` or `pr-review`); it is not the leave-draft verdict. Do not mark ready if it denies.
8. A human merges. When spine is attached, `agent allow --action task-done` still needs the workflow checklist and both summary sentences.

Expand Down
4 changes: 3 additions & 1 deletion DESIGN.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ The AI session talks **only** to the local database. Scripts perform every actio
| AI vs scripts | The AI inserts local intent. Scripts perform every side effect that leaves the machine. Model text is never a state transition. |
| Checks and gates | A **check** records a fact (`agent check record`). A **gate** is a policy verdict over evidence (`agent gate record`). A model claim is neither. Confidence is not proof. |
| Pull request done | A draft plus local tests is not done. CONTRIBUTING.md is the contract for this repository. When spine and pr-review are attached, grok then Codex on this head are the gates; `agent allow --action pr-ready` only checks task state. A human merges. |
| Local CI report | Frozen comment schema `dfx-local-ci/v1` in [docs/local-ci-v1.md](docs/local-ci-v1.md). `agent local-ci verify` parses it and computes pass/fail. Private product repositories attach the block to the ready comment. This public client still uses GitHub Actions for its own PRs. |
| Merge | The client never merges. A human merges. |
| Repos | Public MIT: `DFXswiss/agent` (client), `DFXswiss/agent-core` (hub). |
| Website host | `agent.dfx.swiss` (development: `dev.agent.dfx.swiss`). Singular product name. |
Expand Down Expand Up @@ -400,6 +401,7 @@ agent checklist set … # spine skill
agent round start --task UUID # spine skill
agent agent start|finish … # review-loop (implementer|reviewer) or pr-review (pr-reviewer-*)
agent check record … # spine skill
agent local-ci verify|parse|render [--file PATH] [--require-ids id,id] [--expect-head SHA] [--expect-private] [--json]
agent gate record … # pr-review skill
agent work add|set|list … # spine skill (open_work)
agent allow|next|close-step|run … # spine skill; run: [--dry-run] [--head SHA] [--cwd PATH] [--spec-file PATH] [--no-tmux]
Expand Down Expand Up @@ -542,7 +544,7 @@ A draft plus local tests is not done. A check records the local suite. When spin

Quality and logic of one vendor stage run together. Vendors are `grok`, then `codex`. Codex runs only after both grok dimensions are `approved`. The session that authored the diff does not sit those PR reviews. If a vendor cannot run, abort loudly; do not record `approved`; do not substitute another vendor. Empty, partial, timeout, or unavailable review output is not zero findings.

CI on this head is a script-measured fact. `skipped` and `cancelled` are not green unless the workflow documents that skip. Stay draft until that holds. One comment whose review-pass count is those four `approved` verdicts on this head, then ready. A retry reuses the existing draft. A human merges.
CI on this head is a script-measured fact. On a **private** GitHub repository that fact is a full local `ci:full` equivalent, recorded as `dfx-local-ci/v1` and checked with `agent local-ci verify` (`--expect-head`, `--expect-private`, status `pass`). GitHub Actions is not the ready gate there. On a **public** repository, GitHub Actions on this head remains the gate; `skipped` and `cancelled` are not green unless the workflow documents that skip. Stay draft until that holds. One comment whose review-pass count is those four `approved` verdicts on this head, then ready. A retry reuses the existing draft. A human merges.

## 20. Refused: hub as a coding control plane

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Local session-store client. Record sessions, activities and (when a skill is attached) tasks on this machine, then pair the device to the [agent-core](https://github.com/DFXswiss/agent-core) hub with GitHub.

Product decisions (visibility, pairing, sync, restore, what we will not build) are in [DESIGN.md](DESIGN.md). That file also locks the deterministic core: scripts execute, checks measure, gates decide, model text is never a transition, and the hub is not a coding control plane. A draft plus local tests is not a finished pull request; see [CONTRIBUTING.md](CONTRIBUTING.md). Production-error → draft pull request is the opt-in **error-fix** skill on this device, not the hub.
Product decisions (visibility, pairing, sync, restore, what we will not build) are in [DESIGN.md](DESIGN.md). That file also locks the deterministic core: scripts execute, checks measure, gates decide, model text is never a transition, and the hub is not a coding control plane. A draft plus local tests is not a finished pull request; see [CONTRIBUTING.md](CONTRIBUTING.md). The frozen local-CI comment schema for private product repositories is [docs/local-ci-v1.md](docs/local-ci-v1.md) (`agent local-ci verify`). Production-error → draft pull request is the opt-in **error-fix** skill on this device, not the hub.

This device is the write owner of its own rows. The local store is PostgreSQL on `127.0.0.1`. `device.json` next to it is the device identity: wiping only the database must not mint a new device. The hub holds a full copy. `agent sync` pushes own events and pulls own catch-up, session-mail inbox snapshots, and person-ping snapshots. `agent restore` rebuilds a wiped database from the hub.

Expand Down
70 changes: 70 additions & 0 deletions docs/local-ci-v1.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
# Local CI report `dfx-local-ci/v1`

This is the frozen comment payload that records a **full local CI run**
(`ci:full` equivalent) for a pull request. `agent local-ci verify` parses it
and decides pass or fail. Do not invent a second format.

Private GitHub repositories must attach this block to the ready comment.
Public repositories keep GitHub Actions as the CI gate and omit the block.

## Markers

A pull-request comment contains **exactly one** pair of HTML comments:
`<!-- DFX-LOCAL-CI:v1 -->` and `<!-- /DFX-LOCAL-CI:v1 -->`. Between them
sits one fenced JSON object whose language tag is `json`. Nothing else may
sit between the markers.

## Payload

Every key is required. Unknown keys are rejected.

| Key | Rule |
|---|---|
| `schema` | Exactly `dfx-local-ci/v1` |
| `repo` | `owner/name` |
| `head` | 40-character lowercase hex SHA of the pull-request head |
| `private` | JSON boolean. `true` for the private-repo local-CI gate |
| `recorded_at` | UTC `YYYY-MM-DDTHH:MM:SSZ` |
| `required` | Unique kebab-case ids. This is the full `ci:full` job set. Empty only when the repository has no pull-request CI jobs |
| `runs` | One object per id that ran. Empty only when `required` is empty |

Each run object:

| Key | Rule |
|---|---|
| `id` | kebab-case, unique, must match an entry in `required` for that job |
| `name` | Human job name |
| `command` | Exact local command that was executed |
| `result` | `pass` \| `fail` \| `error` \| `timeout` |
| `exit_code` | Integer |
| `duration_s` | Number ≥ 0 |
| `timeout_s` | Number > 0. The job timeout |

There is no `verdict` field. The script computes it.

## Verdict

`agent local-ci verify` exits `0` only when:

1. The comment parses.
2. `private` is `false` (`not_applicable`), **or**
3. `private` is `true` and every `required` id has a run with `result=pass`,
`exit_code=0`, and `duration_s <= timeout_s`. An empty `required` list
(no pull-request CI jobs in the repository) is a pass.

`--require-ids a,b,c` additionally demands that `required` is exactly that set.
`--expect-head SHA` demands the payload head matches. `--expect-private` demands
`private` is true and rejects `not_applicable`.

Parse errors exit with `agent: …`. A computed fail exits `1` after printing
`local-ci fail …`.

## Commands

```
agent local-ci verify [--file PATH] [--require-ids id,id] [--expect-head SHA] [--expect-private] [--json]
agent local-ci parse [--file PATH] [--json]
agent local-ci render [--file PATH]
```

Without `--file`, the comment or JSON is read from stdin.
Loading
Loading