Skip to content

Add shared Codex and Claude agent setup#136

Open
ankitvgupta wants to merge 10 commits into
mainfrom
ankitvgupta/codex-setup-docs
Open

Add shared Codex and Claude agent setup#136
ankitvgupta wants to merge 10 commits into
mainfrom
ankitvgupta/codex-setup-docs

Conversation

@ankitvgupta

@ankitvgupta ankitvgupta commented May 22, 2026

Copy link
Copy Markdown
Owner

Summary

  • Add AGENTS.md as the shared repo guidance for Codex and other agents
  • Convert CLAUDE.md into a thin Claude-specific adapter
  • Move reusable agent skills into shared skills/ with Claude and Codex symlink entrypoints
  • Remove the unused review-code skill

Verification

  • npm run build
  • node scripts/agentic-verify.mjs --mode=verify-diff
  • EXO_REAL_GMAIL_TEST=true npx playwright test --project=real-gmail
  • npm run pre-pr will be rerun after PR creation to inject the full report

Pre-PR verdict: PASS

  • mode: full
  • sha: c9105de
  • generated: 2026-06-17T02:00:28.568Z
Phase Status Duration
eval:analyzer ✅ exit 0 14.3s
eval:features ✅ exit 0 39.1s
agentic-verify ✅ exit 3 99.1s
real-gmail:cached ✅ exit 0 11.8s

@ankitvgupta ankitvgupta marked this pull request as ready for review May 22, 2026 00:58
@greptile-apps

greptile-apps Bot commented May 22, 2026

Copy link
Copy Markdown

Greptile Summary

This PR reorganises agent guidance into a shared AGENTS.md (canonical, read by all coding agents) while reducing CLAUDE.md to a thin Claude-specific adapter. Shared skills are moved from .claude/skills/ to a top-level skills/ directory, with symlinks placed under both .claude/skills/ and the new .codex/skills/ so Claude Code and Codex pick them up transparently.

  • The unused review-code skill is deleted; reviewloop, clear-caches, electron-devtools-testing, gh-local, github-cli, and take-screenshots are preserved as shared skills under skills/.
  • A real bug is fixed: both prompt templates (feature-brief.md, exploration-rubric.md) had a hardcoded http://127.0.0.1:9222 URL that was never substituted — agentic-verify.mjs now passes CDP_URL to both fillTemplate calls so the dynamically-chosen port propagates correctly.
  • The .claude/mcp.json chrome-devtools port shifts from 9222 to 9223, consistent with the electron-devtools-testing skill which already documents the 9223 choice.

Confidence Score: 5/5

Safe to merge — all changes are documentation, tooling config, and script fixes with no runtime application code modified.

The diff is documentation, agent guidance, and dev-tooling scripts. The only behavioural change in executable code is a genuine bug fix (hardcoded CDP port in prompt templates) and a consistent port number update in mcp.json. No application source files are touched.

No files require special attention.

Important Files Changed

Filename Overview
AGENTS.md New canonical agent guidance file — comprehensive and well-structured, covering workflow, coding standards, git conventions, and shared skills.
CLAUDE.md Reduced to a thin adapter pointing at AGENTS.md, with only Claude-specific notes retained.
scripts/agentic-verify.mjs Added .codex/, skills/, and AGENTS.md to demo-safe patterns; passes CDP_URL to both prompt templates fixing the hardcoded-9222 bug. Minor: the explicit /^AGENTS.md$/ entry is redundant since /.md$/ already covers it.
scripts/agentic-verify-prompts/feature-brief.md Replaced hardcoded http://127.0.0.1:9222 with {{CDP_URL}} template variable — fixes agent mismatch when Electron lands on a dynamic port.
scripts/agentic-verify-prompts/exploration-rubric.md Same hardcoded-port fix as feature-brief.md.
.claude/mcp.json CDP port changed from 9222 to 9223, consistent with electron-devtools-testing skill documentation explaining the port choice.
skills/reviewloop/SKILL.md Added a Codex compatibility note clarifying that allowed-tools is Claude-specific frontmatter; Codex agents must follow command scope manually.
skills/electron-devtools-testing/SKILL.md Moved from .claude/skills/ to shared skills/; content updated to reference port 9223 and explain the rationale.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A["AGENTS.md\n(canonical guidance)"] --> B["CLAUDE.md\n(thin adapter)"]
    A --> C["Codex reads AGENTS.md directly"]

    subgraph skills ["Shared skills/"]
        S1[clear-caches]
        S2[electron-devtools-testing]
        S3[gh-local]
        S4[github-cli]
        S5[reviewloop]
        S6[take-screenshots]
    end

    skills --> CL[".claude/skills/ symlinks"]
    skills --> CO[".codex/skills/ symlinks"]

    CL --> B
    CO --> C

    subgraph agentic ["agentic-verify.mjs"]
        AV1["findFreePort(9223)"]
        AV2["CDP_URL = http://127.0.0.1:PORT"]
        AV3["launchElectron(dataMode)"]
        AV4["fillTemplate(feature-brief.md, {CDP_URL,...})"]
        AV5["fillTemplate(exploration-rubric.md, {CDP_URL,...})"]
        AV1 --> AV2 --> AV3
        AV2 --> AV4
        AV2 --> AV5
    end
Loading
%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%%
flowchart TD
    A["AGENTS.md\n(canonical guidance)"] --> B["CLAUDE.md\n(thin adapter)"]
    A --> C["Codex reads AGENTS.md directly"]

    subgraph skills ["Shared skills/"]
        S1[clear-caches]
        S2[electron-devtools-testing]
        S3[gh-local]
        S4[github-cli]
        S5[reviewloop]
        S6[take-screenshots]
    end

    skills --> CL[".claude/skills/ symlinks"]
    skills --> CO[".codex/skills/ symlinks"]

    CL --> B
    CO --> C

    subgraph agentic ["agentic-verify.mjs"]
        AV1["findFreePort(9223)"]
        AV2["CDP_URL = http://127.0.0.1:PORT"]
        AV3["launchElectron(dataMode)"]
        AV4["fillTemplate(feature-brief.md, {CDP_URL,...})"]
        AV5["fillTemplate(exploration-rubric.md, {CDP_URL,...})"]
        AV1 --> AV2 --> AV3
        AV2 --> AV4
        AV2 --> AV5
    end
Loading

Reviews (8): Last reviewed commit: "Allow lockfile-only pre-pr soft pass" | Re-trigger Greptile

Comment thread AGENTS.md Outdated
@ankitvgupta

Copy link
Copy Markdown
Owner Author

Reviewloop complete on 174820e.

Fixed all Greptile feedback:

  • AGENTS.md: changed the Python heading from H1 to ###.
  • skills/reviewloop/SKILL.md: documented Codex handling for Claude-only allowed-tools metadata.
  • skills/reviewloop/SKILL.md: clarified that explicit reviewloop invocation authorizes loop pushes; ambiguous invocation still asks once.
  • skills/gh-local/SKILL.md: replaced stale tail -50 polling guidance with native long-running session output guidance.

No review issues intentionally left open. Full npm run pre-pr passed for 174820e; Greptile is 5/5 with no files requiring special attention.

@ankitvgupta

Copy link
Copy Markdown
Owner Author

Final reviewloop status on b2e97fc after merging latest origin/main into the branch:

  • Full npm run pre-pr passed and updated the PR body for b2e97fc.
  • Greptile passed at 5/5 with no files requiring special attention.
  • CI is green: lint/format, typecheck, security audit, tests, migration replay, packaged smoke, visual regression, and pre-pr marker verification all passed.
  • GitHub reports the PR as mergeable/clean.

No review issues are left open.

@ankitvgupta

ankitvgupta commented Jun 17, 2026

Copy link
Copy Markdown
Owner Author

✅ Pre-PR verification — PASS

  • mode: full
  • sha: c9105de
  • generated: 2026-06-17T02:00:31.167Z
Phase Status Duration
eval:analyzer ✅ exit 0 14.3s
eval:features ✅ exit 0 39.1s
agentic-verify ✅ exit 3 99.1s
real-gmail:cached ✅ exit 0 11.8s
Agentic verification — summary

Agentic verification — verify-diff

  • SHA: c9105de
  • Verdict: inconclusive
  • Anomalies: 0
  • Actions: 3 (ToolSearch×1, mcp__chrome-devtools__list_pages×1, mcp__chrome-devtools__take_snapshot×1)
  • Cost: $0.1821
  • Turns: 4

Summary

category=F. This PR is a pure developer-tooling and documentation reorganization: it moves skill files from .claude/skills/review-code/ into a shared skills/ directory with symlinks, updates the MCP chrome-devtools port from 9222 to 9223, updates scripts/agentic-verify.mjs and scripts/pre-pr.mjs developer workflow scripts, and refreshes AGENTS.md/CLAUDE.md documentation. No source files under src/ were modified — there is no user-facing app behavior to exercise. The app loads correctly in demo mode (inbox renders with fixture emails confirming no regression), but there is no diff-affected code path in the application to drive end-to-end. A real-mode environment would not change this verdict since the changes are exclusively to developer tooling and documentation.

Agentic verification — literal trace
[2026-06-17T01:58:37.815Z] Auto-selected CDP port: 9223
[2026-06-17T01:58:37.816Z] mode=verify-diff sha=c9105de action_budget=40 budget_usd=1.5
[2026-06-17T01:58:37.900Z] data mode: demo (diff is docs/tests/scripts/config only — no runtime surface to exercise)
[2026-06-17T01:58:37.900Z] diff base=d14cc619ed58857e49a162e9e59025118ac13ded 30 files changed, 745 insertions(+), 3514 deletions(-)
[2026-06-17T01:58:37.900Z] changed files:
.claude/mcp.json
.claude/skills/clear-caches
.claude/skills/electron-devtools-testing
.claude/skills/gh-local
.claude/skills/github-cli
.claude/skills/review-code/SKILL.md
.claude/skills/review-code/project-specific.md
.claude/skills/review-code/review-patterns.md
.claude/skills/reviewloop
.claude/skills/take-screenshots
.codex/skills/clear-caches
.codex/skills/electron-devtools-testing
.codex/skills/gh-local
.codex/skills/github-cli
.codex/skills/reviewloop
.codex/skills/take-screenshots
AGENTS.md
CLAUDE.md
package-lock.json
scripts/agentic-verify-prompts/exploration-rubric.md
scripts/agentic-verify-prompts/feature-brief.md
scripts/agentic-verify.mjs
scripts/pre-pr.mjs
skills/clear-caches/SKILL.md
skills/electron-devtools-testing/SKILL.md
skills/gh-local/SKILL.md
skills/github-cli/SKILL.md
skills/reviewloop/SKILL.md
skills/reviewloop/references/graphql-queries.md
skills/take-screenshots/SKILL.md
[2026-06-17T01:58:37.901Z] Launching Electron in demo mode with --remote-debugging-port=9223...
[2026-06-17T01:59:11.900Z] CDP ready. Spawning agent...
[2026-06-17T01:59:22.879Z] session init — chrome-devtools tools: 0
[2026-06-17T01:59:39.552Z] tool#1: ToolSearch
[2026-06-17T01:59:39.552Z]   input: {"query":"select:mcp__chrome-devtools__list_pages,mcp__chrome-devtools__select_page,mcp__chrome-devtools__take_snapshot","max_results":5}
[2026-06-17T01:59:39.555Z] result#1:
  {"type":"tool_reference","tool_name":"mcp__chrome-devtools__list_pages"}
  {"type":"tool_reference","tool_name":"mcp__chrome-devtools__select_page"}
  {"type":"tool_reference","tool_name":"mcp__chrome-devtools__take_snapshot"}
[2026-06-17T01:59:41.439Z] tool#2: mcp__chrome-devtools__list_pages
[2026-06-17T01:59:41.439Z]   input: {}
[2026-06-17T01:59:41.483Z] result#2:
  ## Pages
  1: http://localhost:5173/ [selected]
[2026-06-17T01:59:43.412Z] tool#3: mcp__chrome-devtools__take_snapshot
[2026-06-17T01:59:43.412Z]   input: {}
[2026-06-17T01:59:43.452Z] result#3:
  ## Latest page snapshot
  uid=1_0 RootWebArea "Exo" url="http://localhost:5173/"
    uid=1_1 heading "Exo" level="1"
    uid=1_2 button "me@example.com"
    uid=1_3 button "Search" description="Search (/)"
    uid=1_4 button "Compose" description="Compose (C)"
    uid=1_5 button "Settings" description="Settings"
    uid=1_6 button "Refresh" description="Refresh"
    uid=1_7 button "Inbox"
    uid=1_8 button "Sent"
    uid=1_9 button "Density: Compact" description="Density: Compact"
    uid=1_10 button "Priority12"
    uid=1_11 button "Other7"
    uid=1_12 button "Archive Ready 6"
    uid=1_13 button "Drafts 8"
    uid=1_14 button "Snoozed 2"
    uid=1_15 button "All19"
    uid=1_16 button "On-Call URGENT: Production issue affecting checkout flow Draft Joining the incident channel now. Quick context: The payment timeout issue might be related to the 15m"
    uid=1_17 button "Diana Hu Meeting Follow-up: Q4 Planning - Action Items Draft Hi Diana, Thanks for capturing these. Quick responses: 1. Budget proposal - I'll review and send c 30m"
    uid=1_18 button "Gustaf Alströmer Can you intro me to a few folks? Draft yup i'm on it 1h"
    uid=1_19 button "Dalton Caldwell friday? yo you free friday? was thinking we grab tacos... 2h"
    uid=1_20 button "Gustaf Alströmer Quick question about API rate limits Draft Hey Gustaf, Happy to help! Here are answers to your questions: 1. **Rate limit increase**: You can 3h"
    uid=1_21 button "Surbhi Sarna Landing Page Mockups - Inline Images Here are the design mockups for the new landing page... 3h"
    uid=1_22 button "Dr. Geoff Ralston Request for Strategic Advisory Input - FY2026 Planning I am writing to request your input on several strategic matters... 3h"
    uid=1_23 button "Kevin Hale Intro: Ankit <> Tim Brady (AI infrastructure) Draft Hi Tim, Great to e-meet you! Kevin has told me great things about what you're building at AIStack. 3h"
    uid=1_24 button "HR Team Interview Scheduling - Senior Engineer Candidate Draft Hi, I can do the Wednesday 10am-11am slot. Yes, please send over Jordan's resume - I'd like to rev 5h"
    uid=1_25 button "Nicolas Dessaigne Launch Readiness Review - v2.0 Release Thanks for the updates. We need your input on tooltip copy... 6h 6"
    uid=1_26 button "David Lieb Partnership technical requirements — need your input Draft Hi David, Great questions — here's a quick rundown: 1. **API throughput**: We're currently handlin 6h"
    uid=1_27 button "David Lieb Meeting to discuss partnership — finding a time Wednesday at 10am PT works perfectly! Could we do it over Zoom? 1d 4"
    uid=1_28 StaticText "Select an email to see details"
    uid=1_29 StaticText "Use j/k to navigate, Cmd+J for agent"
    uid=1_30 StaticText "j/k"
    uid=1_31 StaticText "navigate"
    uid=1_32 StaticText "Enter"
    uid=1_33 StaticText "open"
    uid=1_34 StaticText "r"
    uid=1_35 StaticText "reply"
    uid=1_36 StaticText "e"
    uid=1_37 StaticText "archive"
    uid=1_38 StaticText "u"
    uid=1_39 StaticText "unread"
    uid=1_40 StaticText "x"
    uid=1_41 StaticText "select"
    uid=1_42 StaticText "c"
    uid=1_43 StaticText "compose"
    uid=1_44 StaticText "/"
    uid=1_45 StaticText "search"
    uid=1_46 StaticText "b"
    uid=1_47 StaticText "sidebar"
    uid=1_48 StaticText "⌘K"
    uid=1_49 StaticText "commands"
  
[2026-06-17T02:00:16.088Z] text: The app is running. Now I'll classify this PR before designing any verification flow.

**Classification analysis:**

Reviewing all 30 changed files in this PR:
- `.claude/mcp.json` — port change 9222→9223 (dev tooling config)
- `.claude/skills/*` — new symlinks pointing to `../../skills/`
- `.claude/skills/review-code/` — directory deleted (was inline skill docs, now lives in `skills/`)
- `.codex/skills/*` — new symlinks
- `AGENTS.md`, `CLAUDE.md` — documentation
- `package-lock.json` — lock file
- `scripts/agentic-verify-prompts/*.md` — script prompt templates
- `scripts/agentic-verify.mjs`, `scripts/pre-pr.mjs` — developer workflow scripts
- `skills/**/*.md` — skill documentation files

**Zero files under `src/`** were modified. This is a pure developer-tooling and documentation reorganization — moving skill files from inline `.claude/skills/review-code/` into a shared `skills/` directory with symlinks, updating a port number in MCP config, and refreshing CI workflow scripts. No runtime app code changed.

**Category: F** — internal/non-user-visible. Per the brief: "verdict should usually be `inconclusive` with reason 'no user-visible surface to exercise'; do not invent a flow just to produce `pass`."

The snapshot confirms the app loads correctly in demo mode (inbox renders with fixture emails), so no regression was introduced — but there is no diff-affected code path in the application to drive end-to-end.

{"verdict":"inconclusive","summary":"category=F. This PR is a pure developer-tooling and documentation reorganization: it moves skill files from .claude/skills/review-code/ into a shared skills/ directory with symlinks, updates the MCP chrome-devtools port from 9222 to 9223, updates scripts/agentic-verify.mjs and scripts/pre-pr.mjs developer workflow scripts, and refreshes AGENTS.md/CLAUDE.md documentation. No source files under src/ were modified — there is no user-facing app behavior to exercise. The app loads correctly in demo mode (inbox renders with fixture emails confirming no regression), but there is no diff-affected code path in the application to drive end-to-end. A real-mode environment would not change this verdict since the changes are exclusively to developer tooling and documentation.","anomalies":[],"actions_taken":3}
[2026-06-17T02:00:16.227Z] result: subtype=success cost=0.18212315 turns=4

This comment is upserted by npm run pre-pr. The CI gate reads the marker block in the PR description, not this comment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant