Skip to content

chore(agents): adopt task-size workflow, CI guards and local review skills - #1

Merged
daniel-tsx merged 4 commits into
mainfrom
chore/agent-workflow-v2
Oct 24, 2026
Merged

daniel-tsx merged 4 commits into
mainfrom
chore/agent-workflow-v2

Conversation

@daniel-tsx

Copy link
Copy Markdown
Owner

What and why

Adapts the Fintech Lab agent workflow (daniel-tsx/fintech@7f5e1c2) to StackPulse:

  • T0/T1/T2 task sizes in a single AGENTS.md, plus a reading matrix in docs/AGENT_START_HERE.md.
  • Local codex-review, ship-pr and engineering-workflow skills.
  • CI guards for T2 paths, focused/skipped/todo tests and append-only drizzle/ migrations.

Skill changes: the Eastbase overlays are removed from routing, frontend-design and vercel-react-best-practices are vendored, and grill-me is dropped. No application code changes.

Review guide

  • Read carefully:
    • scripts/check-pr-review-signals.mjs. The T2/guard path lists set the labels. The line scanner (env gate, allow-skip, whole-file pass over changed test files) can fail a PR.
    • .github/workflows/ci.yml. The job names become the required checks. Note the permissions, and that the app job runs node --test tests/*.test.mjs with no database.
    • AGENTS.md: the task-size table, invariants, and Git/PR rules. Local commits on task branches are now allowed; this replaces the old "No commits unless the user asks".
    • scripts/engineering-workflow-state.mjs. One fix from the reference: verification.json may be re-recorded during re-verification.
  • Skim:
    • The vendored skill trees. They are byte-identical to the reference and hash-pinned in .agents/skill-sources.json.
    • .claude/skills/*, which are generated copies.
    • Moved and merged doc content in docs/AGENT_START_HERE.md, docs/operations/*.md and docs/README.md.
    • The ESLint and tsconfig ignores for .tmp/ and .claude/worktrees/.
  • Least confident about:
    • The granularity of the T2 path list.
    • The guard's known blind spots, listed under Review.
    • First hosted runs: the Windows integrity job, pnpm/action-setup with pnpm 11, and label sync.
  • Tests removed, weakened or skipped: none removed. One test was renamed, from initial sync from a CRLF checkout creates full copies, adapts Grill Me and is repeatable to … creates identical full copies and is repeatable. The Grill Me adapter it asserted no longer exists. Sync fixtures now use grilling and frontend-design. No skips were added.

Task size

CI and guard change, so it needs independent review. No T2 application area is touched and no application code changes.

Checks

Run locally on c443f6d, in a fresh worktree with no .env and no DB/provider env.

Result Command Scope / notes
PASS node scripts/sync-agent-skills.mjs --check 8 skills, 136 files
PASS node scripts/check-engineering-workflow.mjs Local skills mirrored on both hosts
PASS pnpm test:agent-workflow 35 tests, 0 failed, 0 skipped
PASS node --test tests/*.test.mjs (same files as pnpm test) 256 tests: 237 passed, 0 failed, 19 env-gated skips
PASS pnpm lint, pnpm typecheck No next-env.d.ts, as in CI
PASS node scripts/check-pr-review-signals.mjs origin/main HEAD No T2 files; 5 guard files; 1 renamed test listed
PASS Whole-file guard scan of all 20 real test files 0 false positives
PASS node scripts/check-migration-history.mjs origin/main HEAD Also replayed over all 8 historical drizzle/ commits: no false positives
PASS YAML parse of ci.yml (js-yaml, PyYAML), bash -n on every run: block, frontmatter of all 22 SKILL.md files
PASS Relative links and anchors in changed Markdown 110 links, 0 broken; doc statuses present
PASS git diff --check origin/main HEAD; prettier on authored files
NOT RUN Hosted CI Runs after push
NOT RUN pnpm build, SQL/HTTP database cases, live providers Workflow-only change; builds prerender against .env

Unverified boundaries

  • Hosted GitHub Actions: the Windows runner, pnpm 11 setup, and gh label sync with the job token.
  • Codex/Claude skill discovery in fresh sessions, and whether routing actually triggers as intended. The pilot prompts are in docs/operations/ai-workflow.md.

Review

Round Reviewer SHA Result
1 Fallback: fresh read-only Claude subagent (Codex was over its usage limit) 3f783b5 2 P1, 7 P2
2 Codex gpt-6.1-sol, high effort, read-only 142e8cf 2 P1, 4 P2
3 Codex gpt-6.1-sol, high effort, read-only (verification) c443f6d 0 P1, 4 P2, all handed to the human

Fixed with regression tests:

  • An env-gate line could be deleted, leaving an unconditional skip. A whole-file scan of changed test files now catches this.
  • The { todo } option was not detected. Literal and suffixed gates (!false, || true) and a second option on the same line passed.
  • A multi-line only: slipped through.
  • A deleted test file listed none of its removed tests.
  • Newly allowed skips whose key line was unchanged were not reported.
  • package.json could narrow CI's test run unlabeled; CI now owns the glob.
  • The sync and workflow-check scripts were not guard paths.
  • T2 gaps: src/app/(auth)/, src/app/digest/unsubscribe/ and scripts/evaluate-skill-updates.ts. The read-only releases GET was a false positive.
  • A nested .tmp/ worktree was scanned by lint and tsc.
  • The LICENSE(\.txt) regex was unescaped and its failure path untested.
  • verification.json could not be refreshed during re-verification.
  • Doc drift about pnpm build.

Declined:

  • The loopback refusals inside tests/release-votes-db.test.mjs and tests/release-pages-http.test.mjs are not guard paths. Weakening them still raises assertion-loss signals.
  • The PR-head copy of the script still decides its own guard-change label, as in the reference. Fixing that means also running the base copy in CI.

Open, round 3 (P2, line-scanner limits; correction budget spent):

  1. A gate followed by || true, on the next line passes.
  2. A blank or comment line between only: and true hides the focus.
  3. Strings or comments containing test.skip(…) are false positives.
  4. Removed-test titles are not detected for multi-line titles or the integration(...) wrapper; assertion-loss warnings still fire.

/security-review: not applicable, since no auth, ownership, cron-auth or secret code changed.

Docs and temporary files

Docs updated: AGENTS.md, CLAUDE.md, docs/AGENT_START_HERE.md, docs/README.md, docs/operations/ai-workflow.md and docs/operations/verification.md. No new docs. The ADR convention uses the existing docs/architecture/decisions/.

Temporary files, kept until merge in the task worktree's .tmp/agent-workflow-v2/: review-prompt.md, review-2.md, review-3.md, pr.md. Round 1's report is summarized above.

ADRs consulted: none applies.

🤖 Generated with Claude Code

daniel-tsx and others added 4 commits October 24, 2026 18:42
…kills

Adapt the Fintech Lab agent workflow (7f5e1c2) to StackPulse:

- AGENTS.md: T0/T1/T2 task sizes, verification commands, project
  invariants, files/artifacts, skill routing and Git/PR rules; Eastbase
  overlays removed. CLAUDE.md stays a thin @AGENTS.md entry point.
- docs/AGENT_START_HERE.md: reading matrix by task; ai-workflow.md and
  verification.md updated for provenance, local skills, guards and CI.
- Skills: vendor vercel-react-best-practices and frontend-design
  byte-for-byte with manifest hashes; remove grill-me; add local
  codex-review, ship-pr and engineering-workflow (+ state helper and
  check script) with generalized wording.
- Guards: review signals (T2/guard paths, node:test focus/skip rules)
  and append-only drizzle/ migration history, with regression tests.
- CI: integrity on Ubuntu/Windows, PR guards, and lint, typecheck and
  offline tests (no database, providers or build).
- .gitattributes (LF), ignore .tmp/ and .claude/worktrees/, PR template,
  pnpm test.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Scan every changed test file whole, so deleting an env-gate line
  cannot leave an unconditional skip; detect { todo } options, quoted
  keys, bracket access, shorthand and .skip()/.todo() calls; require
  the gate to be `!<env var or identifier> &&`.
- List removed tests and assertions of deleted test files.
- T2: vote route only (not the read-only releases GET), digest
  unsubscribe page, evaluate-skill-updates; guard: sync and workflow
  integrity scripts.
- CI runs `node --test tests/*.test.mjs` directly so package.json
  cannot narrow it unlabeled.
- Escape the LICENSE(.txt) check and test its failure path.
- Ignore .tmp/ and .claude/worktrees/ in ESLint and tsconfig.
- verification.md: build only against an isolated database.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Accept only the complete env gate (`!<var> && '<reason>'` then `,`,
  `}`, a comment or end of line) and check every skip/todo option on a
  line; detect `only:` split across lines.
- List newly allowed skips found in changed test files' post-image,
  not only on added lines; CLI regression against a temporary repo.
- T2: src/app/(auth)/ (sign-in passes the return path into OAuth).
- engineering-workflow-state: re-verification after a correction may
  re-record verification evidence; reviewer reports stay immutable.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@vercel

vercel Bot commented Oct 24, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
stack-pulse Ready Ready Preview Oct 24, 2026 12:33pm UTC

Request Review

@github-actions github-actions Bot added the guard-change Changes CI or a guard script: independent review label Oct 24, 2026
@daniel-tsx
daniel-tsx merged commit 558d223 into main Oct 24, 2026
7 checks passed
@daniel-tsx
daniel-tsx deleted the chore/agent-workflow-v2 branch October 24, 2026 13:25

This branch was successfully deployed

1 active deployment
Preview — c443f6d6 Deployed Oct 24, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

guard-change Changes CI or a guard script: independent review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant