Clara Docs
All docs

M7 evidence: GitHub native

Evidence10 min readEdit on GitHub

On this page

Date: 2026-11-24. Machine: macOS 26.3, Apple silicon, Node 22.17.1, npm 11.5.2, Playwright 1.65.1 with Chromium 1255 (in .playwright-browsers/). Commits from 5023dea to a7114ba, after M6's 740254c. The work was done on a branch of its own and landed on main whole.

The brief's work for M7: "D12." Its proof: "sync rules against real temporary repos, the Action's entry point tested, the static export compared to a snapshot."

Acceptance

Check Result
Sync rules against real temporary repositories clara sync (D-129) is tested in repositories made with git in a temporary folder, with a bare remote: a merged branch closes the ticket its closes commit names, credited to who merged it, and links every commit and the branch; a squash merge made on GitHub's website credits the pull request's author; a closing commit on a branch closes nothing until it is merged; a ticket reopened after its merge stays open; a second sync records and commits nothing; only .clara is committed, whatever else is staged; pulls only fast-forward, and a board waiting to be committed is carried across a pull, or the clashing files named (test/integration/sync.test.ts, the rules alone in test/unit/rules/sync.test.ts). The hooks run the same rules after each commit and merge without ever stopping git (test/integration/hooks.test.ts), and the Action's sync mode pushes as the Actions bot, ignores its own commit, and syncs again when someone pushed first, keeping their work (test/integration/github-sync.test.ts). Run by hand below
The Action's entry point tested action/action.yml's script is run by bash as a runner runs it, with stand-ins for npx and npm that write down how they were called: it runs the mode asked at the version the action's commit holds, or the one named, or the checkout's own build for workspace; it refuses a mode or version that is not one, running nothing; and inputs such as $(touch pwned) reach Clara as text, never as shell (test/integration/github-action-entry.test.ts). Each mode is then run as clara github action <mode> against real repositories, a local server standing in for GitHub's API and the webhook, a fake gh and E1's fake agent (test/integration/github-{validate,sync,work,publish,digest}.test.ts). The workflows clara github setup writes are read as GitHub reads them: every action pinned to a commit, a timeout and least permissions on every job, a concurrency group, no expression in a script, no checkout keeping the token (test/unit/github/workflows.test.ts, test/integration/github-setup.test.ts, and the packed package in scripts/pack-smoke-extra.mjs)
The static export compared to a snapshot clara export --static (D-132) writes the web app with the board in its page. The page written from a fixed board is compared byte for byte with the one kept in test/fixtures/export/, but for Clara's version and the board's version, which changes with every write, and the snapshot in it holds nothing of .clara/.local (test/integration/export.test.ts); what the page works out equals what the operations answer (test/unit/export/snapshot.test.ts). In Chromium, served over HTTP as a stranger would see it, the exported board shows the board, a filter shows what it shows on the served board, nothing on it changes the board, the page asks nothing of any other origin, and the content security policy reports no violation (test/e2e/static.spec.ts)
D12: linking and merge means done as above, in the CLI and on each ticket's timeline in the browser
D12: the Action's five modes validate keeps one comment on a pull request with what merging closes and fails only on a doctor error, escaping ticket text that strangers write; sync as above; work runs the agents whose profile says runtime: actions in a job with no token, refusing one in any variable git or gh reads and a checkout that kept one; a second job that runs no agent checks what they left as a stranger's, pushes each branch, opens its pull request and pushes the board, rebasing on anyone who pushed first or keeping it on a branch of its own when it clashes (D-137); publish writes the board and badge for Pages; digest posts the standup or sprint to a Slack, Discord or plain webhook over https only, never printing its address (D-133)
D12: clara github setup, commit loops and concurrent runs setup writes the workflows picked, validate and sync by default, never over one a person changed without --force, never through a link (D-134). Sync does nothing for its own commit, and each workflow has a concurrency group
D12: the badge clara badge draws "Sign-in week, 3 of 5 points" as an SVG (test/unit/export/badge.test.ts, test/integration/badge.test.ts)
Clara keeps its own board with its own Action .github/workflows/clara.yml checks pull requests with validate and runs sync by hand; pages.yml publishes the board by hand. Neither runs on a push (D-028). Both are held to the supply-chain rules (test/security/supply-chain.test.ts)
npm run ci exits 0 in a clean checkout yes, the browser journeys included, before the push

Tests and coverage

$ npm run ci        # a clean checkout of a7114ba
 Test Files  216 passed (216)
      Tests  4409 passed | 2 skipped (4411)

Statements   : 96.93% ( 10136/10456 )
Branches     : 90.75% ( 6536/7202 )
Functions    : 97.55% ( 1913/1961 )
Lines        : 97.8% ( 8686/8881 )

  first load 92.1 KB gzipped (budget 100 KB)
  lazy client/snapshot.ts 9.2 KB gzipped (budget 60 KB)
  lazy lib/markdown.ts 26.8 KB gzipped (budget 60 KB)
  lazy views/activity/replay.tsx 2.5 KB gzipped (budget 60 KB)
  lazy views/docs/docs.tsx 3.8 KB gzipped (budget 60 KB)
  lazy views/graph/graph.tsx 7.1 KB gzipped (budget 60 KB)
  lazy views/idea/plan.tsx 5.8 KB gzipped (budget 60 KB)
  lazy views/insights/insights.tsx 6.0 KB gzipped (budget 60 KB)

clara --version cold start               34.7 ms       100 ms  ok
clara list on 1,000 tickets              137.5 ms      200 ms  ok
clara list on 1,000 tickets, first run   180.7 ms      200 ms  ok, reported: parses every file and writes the cache (D-042)

  68 passed (58.5s)

All gates passed.

M6 ended at 4,134 tests in 196 files and 66 journeys. M7 ends at 4,409 tests in 216 files and 68 journeys: the sync rules, the hooks, the Action's entry point and each of its five modes against real repositories, the workflows clara github setup writes, the badge and the static export each have tests of their own, and the exported board is opened in Chromium. The two skipped tests need what this machine lacks, as in M6: the fish completion script checked with fish, and how an agent is ended on Windows. Branch coverage held at 90.75%, where M6 left it; the gate asks for 85%. The first load grew from 86.4 KB to 92.1 KB gzipped with what M7 added to the page, inside its 100 KB; the static export's snapshot reader loads only on an exported page. The whole run took 15 minutes 41 seconds.

By hand

Run on 2026-11-24 from the build at the commit above, in a scratch repository with a bare remote and CLARA_HOME in a scratch folder. The board was made with clara init --key LED, two stories added to a sprint of five points and the sprint started, and the board committed and pushed. A branch led-1-sign-in got one commit naming LED-1; then:

$ clara sync
Nothing to pull: this branch tracks no remote branch.
  LED-1: 1 commit linked; branch led-1-sign-in
Committed the board as 97700ca.

$ clara sync --push
Pulled from origin/main.
  LED-1: done, merged by sam-rivera in 7511e9f; 1 commit linked
Committed the board as da6464b.
Pushed to origin/main.

$ clara list
LED-1  done  p2  story: Sign-in with email
LED-2  todo  p2  story: Password reset
2 tickets

$ git log --oneline -4
da6464b clara: sync, LED-1 done
7511e9f Merge sign-in (closes LED-1)
97700ca clara: sync, links on LED-1
a884d11 feat: sign-in form (LED-1)

$ clara show 1
LED-1  Sign-in with email
story · p2 · done

Points  3
Sprint  S1

Branch  led-1-sign-in
Commits  2
  a884d11  feat: sign-in form (LED-1)    Sam Rivera
  7511e9f  Merge sign-in (closes LED-1)  Sam Rivera

Created 2026-11-24 20:09 · updated 2026-11-24 20:09 (UTC)

$ clara badge --out badge.svg
Wrote badge.svg: Sign-in week, 3 of 5 points.

<svg xmlns="http://www.w3.org/2000/svg" width="166" height="20" viewBox="0 0 166 20" role="img" aria-label="Sign-in week: 3 of 5 points">
<title>Sign-in week: 3 of 5 points</title>
<clipPath id="clara-badge"><rect width="166" height="20" rx="3"/></clipPath>
<g clip-path="url(#clara-badge)">
<rect width="84" height="20" fill="#52525b"/>
<rect x="84" width="82" height="20" fill="#1c5cab"/>
</g>
<g f

$ clara export --static --out site
Wrote the board to site: 2 tickets, as it stands at 2026-11-24T20:09:59.809Z, at commit da6464b.
Publish the folder as it is: the page asks nothing of the network, and nobody can change the board from it.

assets
index.html
THIRD-PARTY-LICENSES.txt

$ clara github setup all
Wrote 5 workflows into .github/workflows: clara-validate.yml, clara-sync.yml, clara-work.yml, clara-publish.yml, clara-digest.yml.
They run clara-ipm@0.1.0 from npm, for the base branch main.
sync pushes the board to the base branch, so a protected branch must let GitHub Actions push.
work needs an agent's key as a repository secret, ANTHROPIC_API_KEY, OPENAI_API_KEY or GEMINI_API_KEY, and Settings > Actions > General must allow GitHub Actions to create pull requests.
publish deploys once Settings > Pages has GitHub Actions as its source.
digest posts once the repository has a CLARA_WEBHOOK_URL secret.
Read them, then commit and push them; GitHub runs them from then on.

$ clara hooks install
Installed the post-commit and post-merge hooks in .git/hooks.
After each commit and merge they link commits and branches to tickets and close what merged, as clara sync does.
They never pull, commit or push: run clara sync to commit what they record. clara hooks remove takes them away.

Changed during M7

The owner renamed the npm package to clara-ipm (D-135) and changed the licence to Apache-2.0 (D-136). The command is still clara, and clara-ipm takes the place of clara-pm as its second name, since npx clara-ipm runs the command named like the package. The name is read from package.json in one place; tests that spelled it now read it from there too.

Fresh-eyes review

A subagent read the M7 diff with no knowledge of how it was built and was asked what a stranger, an agent or an unlucky merge could do with it. It found ten problems. All ten are fixed, each with a test that fails without the fix:

  1. The agents could read the Action's token (work). Clara took the token out of the agents' own environment, but any process on a runner can read another's, and the job that started them held a token able to push to main. Work now runs in two jobs (D-137): the agents' job has contents: read and no token, and leaves its work as a bundle; a second job that runs no agent checks it as a stranger's and pushes (a7114ba).
  2. A revert closed the ticket again. Git's revert message quotes the subject it undoes, (closes APP-12) included. A revert now links and closes nothing (5a564dc).
  3. A ticket's title could close another ticket. A pull request's title becomes a squash merge's subject, so a title like "Follow-up that fixes APP-3" closed APP-3. Titles are now defused like descriptions (9533770).
  4. The badge, export and publish wrote through links a repository held, out of it. One guard in cli/inside.ts now checks paths with links followed and writes plain files with O_NOFOLLOW (d256a41).
  5. The hooks ran during a rebase for each commit replayed, and could stop the next step. They now wait while git replays commits (9517594).
  6. A clashing push lost the board's changes on a runner thrown away after. The land job now rebases the board's commit on anyone who pushed first, up to three times, and on a clash pushes it to clara/board-<commit> and fails saying to merge it (a7114ba).
  7. Publish followed any workflow called "Clara sync", one in a pull request or a sync that failed. It now follows only a sync that passed, started by a push or by hand (e5486c8).
  8. The hooks ran node_modules/.bin/clara from a commit, so a pull could run someone's script. They use it only when git tracks nothing in node_modules (9517594).
  9. Git and its hooks inherited the token in the Action's other modes, and sync gave its header to its commit too. The Action now drops the credential variables once it has read the token, and only the pull and the push get the header (e5ffaee).
  10. A digest's ticket title pinged a whole chat on a plain webhook, as @channel or <!here>. Each @ and < now gets a zero-width space after it (5619073).

Not proven here

  • The modes have not run on GitHub itself, only against stand-ins in the tests. Clara's own clara.yml first runs on a pull request; pages.yml and sync when a person starts them, after the steps in docs/LAUNCH-CHECKLIST.md.
  • work with a real agent costs money and needs a key in a repository secret; it is tested with E1's fake agent only, and its two jobs' artifact passes through GitHub only on GitHub.
  • What the land job still accepts from the agents' job is records a person reads (tickets, activity, playbooks, docs) and branches a person reviews as pull requests. The agents' job holds GitHub's artifact token while it uploads, so a process an agent left running could replace the artifact; the land job's checks are what stand between it and main.
  • The workflows clara github setup writes name clara-ipm at this version, which npm will have only once a person publishes it. Setup says so when run from a development build.