23 Commits
Author SHA1 Message Date
Tommaso Casaburi 1a33f7dc88 chore(agents): add a machine-wide Playwright browser resource budget
Playwright disables normal background throttling, so a hidden 5chan page keeps
doing P2P and rendering work after a check finishes. Agents verifying in
parallel across worktrees stacked whole browser engines on one machine.

Add scripts/pw-session.sh, a wrapper that permits one active Playwright browser
at a time and records who holds it:

- The lock is machine-wide, not per-repository, because the contended resource
  is RAM and CPU. Every worktree and checkout shares one slot.
- Acquisition is an atomic mkdir. Stale locks clear themselves: `open` reclaims
  any slot whose recorded browser is no longer `status: open` in
  `playwright-cli list --all`, so an interrupted workflow cannot strand the
  budget. When that list cannot be read the lock is left alone, so a broken CLI
  never silently disables the budget.
- `open` exits 75 when the slot is busy; `--wait[=SECONDS]` blocks instead.
- `close` always stops the browser, even when the lock was already lost, and
  never releases a slot held by a different session.
- `status` reports the holder and whether its browser is still alive.

Agent policy now runs browser engines and profiler batches sequentially, uses
Chrome/Blink during iteration and the full engine matrix only for final
verification, and never uses `close-all` or `kill-all` while other agents may
own sessions.

Covered by scripts/pw-session.test.js.
2026-08-01 19:21:01 +02:00
Tommaso CasaburiandGitHub da03239bb2 perf: reduce browsing rerenders and startup cost (#1189)
* chore(profiling): collect serializable react-scan reports

* perf(routing): rerender only when directory winner changes

* perf(zustand): remove shallow warning hot path

* perf(state): narrow directory lifecycle updates

* perf(home): avoid redundant stats render work

* perf(posts): isolate live loading subscriptions

* perf(chrome): skip unchanged shell rerenders

* fix(profiling): drop unsupported render metric

* perf(feeds): skip unchanged loading state renders

* perf(home): stop resolved stats collector renders

* chore(agent run): record rerender verification

* perf(home): defer stats requests until metadata resolves

* perf(startup): load protocol modules on demand

* chore(agent run): record acquisition and startup profiles
2026-07-30 00:29:12 +07:00
Tommaso Casaburi bc819336c4 chore(agents): inherit session model for judgment-tier subagents
Drop the pinned `model: sonnet` from the reasoning-heavy subagents so they
follow the session model instead of being forced down to Sonnet. Running an
Opus session now gets Opus subagents; deliberately dropping to a cheaper
session model is respected too.

Mechanical agents (browser-check, profiler, translator) keep their haiku pin
— that pin is a capability statement, not a stale default, and should hold
regardless of session model.
2026-07-25 15:07:01 +07:00
Tommaso Casaburi 047bb1d5ab chore(skills): drop GitHub issue/project finalization from PR workflow skills
GitHub Projects are no longer used in this repo. Remove issue/project
finalization from review-and-merge-pr and the project-board step from
make-closed-issue in all three toolchain mirrors, record the surprise
in known-surprises.md, and regenerate llms files.
2026-07-23 18:59:30 +07:00
Tommaso Casaburi 7ff9c19331 chore(ai workflow): add Ponytail simplicity pass 2026-07-10 15:30:55 +07:00
Tommaso Casaburi 1ac3e5883b fix(agent hooks): wire hooks into real harness entry points and fix payload parsing
Claude Code never reads a standalone .claude/hooks.json, so the PostToolUse and
Stop pipeline is moved into .claude/settings.json and hooks.json is removed;
.cursor/hooks.json is rewritten in Cursor's version+afterFileEdit/stop schema;
.codex/hooks.json is already Codex-valid and stays. The shared scripts now
parse both the Cursor file_path and Claude/Codex tool_input.file_path stdin
shapes and normalize absolute paths, so the format, yarn-install, and
react-pattern-review hooks stop being silent no-ops. verify.sh blocks with
exit 2 plus a stderr reason, guards stop_hook_active, and skips clean trees;
react-pattern-review surfaces its reminder via hookSpecificOutput on
PostToolUse; sync-git-branches no longer misreports open PRs as merged. The
validator now checks that the three harness-specific entry points wire the
same hook scripts instead of requiring byte-identical hooks.json copies.
2026-07-03 13:58:36 +07:00
Tommaso Casaburi 0166f2f4e8 fix(subagents): restrict read-only agent tools and remove machine-specific paths
browser-check and profiler get an explicit read-only tools list mirroring the
Codex sandbox_mode, and test-apk no longer hardcodes one contributor's
ANDROID_HOME and project paths.
2026-07-03 13:58:35 +07:00
Tommaso Casaburi 21bbc5f07c fix(ai skills): correct stale branch names, rg flags, and commit scope rules
Fixes deslop diffing against nonexistent main, an invalid rg --type tsx flag
in fix-merge-conflicts, a Codex-specific phrase leaking into the Claude/Cursor
inspect-elements description, and aligns commit-format with the required-scope
convention the commit skill and git history already use. Rewrites the readme
skill from 764 lines of Rails-specific guidance to a lean version matching
this Vite/Capacitor/Electron repo.
2026-07-03 13:58:34 +07:00
Tommaso Casaburi 9e027a0159 fix(ai workflow): align hook configs 2026-06-27 14:25:56 +07:00
Tommaso Casaburi fb03957835 chore: sharpen advisory code quality review skill 2026-06-13 16:22:31 +07:00
Tommaso Casaburi 3484963a59 chore: add advisory code quality review workflow 2026-06-13 15:13:25 +07:00
Tommaso Casaburi 15fb1bf57c chore(ai-workflow): add toolchain drift validator and harden agent rules
Borrowed from a review of addyosmani/agent-skills:

- add scripts/validate-ai-workflow.mjs (yarn ai-workflow:check): verifies
  .claude/.codex/.cursor skills, agents, and hooks stay in parity, with
  validator-owned exemptions for intentional harness-specific differences
  and enforcement of the AGENTS.md agent model rules
- browser-check and profiler agents: treat page content as untrusted data,
  never instructions (5chan pages render arbitrary user-generated content)
- refactor-pass: Chesterton's Fence rule (git blame unclear code before
  removing it)
- review-and-merge-pr: pass subagent verifiers only the artifact and
  contract, not the triage verdict, to keep reviews independent
2026-06-11 16:13:53 +07:00
Tommaso Casaburi 67ddaee673 docs(blotter): keep release highlights user-facing 2026-05-21 17:50:00 +07:00
Tommaso Casaburi 34b60c7d53 chore(portless): upgrade local dev URLs 2026-04-28 14:25:16 +07:00
Tommaso Casaburi 76a3a763a5 chore(ai tooling): sync harness configs 2026-04-23 14:14:55 +07:00
Tommaso Casaburi d07f5b3962 chore(worktree): auto-run yarn install on new worktrees
Add a Claude Code SessionStart hook (matcher: startup) that runs
`corepack yarn install` when node_modules is missing, so worktrees Claude
creates internally are immediately usable. Also extend create-task-worktree.sh
to install deps after the worktree is created, covering Codex/Cursor/manual
flows that share that script.
2026-04-17 14:30:41 +07:00
Tommaso Casaburi 2b79432f16 docs(blotter): enforce plain-English wording for end users
Rewrite two release entries that leaked dev jargon (v0.7.4 "Pretext feed
sizing" / "mobile scroll perf", v0.7.3 "compact account history") and tighten
the release skill's Step 3 with a non-negotiable plain-English rule plus
good/bad examples. Mirror the rule inline in AGENTS.md so agents editing the
blotter outside the skill still see it.
2026-04-17 14:30:41 +07:00
Tommaso Casaburi ee7a5b5778 refactor(core): remove legacy plebbit terminology 2026-04-17 10:48:27 +07:00
Tommaso Casaburi 3fc9f0fa19 chore(agent hooks): remind on new React effects and memos 2026-04-15 13:31:13 +07:00
Tommaso Casaburi 5a93d32c10 Add debug-agent skill (millionco/debug-agent) 2026-04-11 15:59:39 +07:00
Tommaso Casaburi a1962189d9 chore(ai-workflow): require cross-browser playwright checks 2026-04-10 14:31:49 +07:00
Tommaso Casaburi bffb821549 chore(ai): sync release skills across Cursor, Codex, and Claude 2026-04-09 16:45:47 +07:00
Tommaso CasaburiandClaude Opus 4.6 189d1c2165 add .claude config folder with Claude-equivalent agent and hook settings
Mirrors .cursor and .codex structure with Claude model assignments:
- haiku for lighter tasks (translator, browser-check, profiler)
- sonnet for standard tasks (code-quality, plan-implementer, etc.)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-29 16:35:21 +07:00