This file provides universal guidelines for any AI agent (Claude Code, Codex, GitHub Copilot, or custom) working in this repository.
Before starting any work:
- Read
CLAUDE.mdfor repo structure, conventions, and workflow - Read this file for development workflow and review process
- Check
docs/pr-reviews/README.mdfor the PR review process
PLAN -> JIRA -> BRANCH -> CODE -> TESTS -> PR -> REVIEW
- Plan: Present a 3-7 bullet checklist before coding
- JIRA: Create or update a JIRA ticket using
createJiraService()from~/Projects/deved-agents/src/services/jira-service.js - Branch: Create branch as
{type}/{TICKET-KEY}-{description} - Code: Follow conventions in
CLAUDE.md - Tests: Run
npm run check(lint + test), ensure all pass - PR: Create PR with JIRA ticket key in description
- Review: Follow 3-agent + 1-human pattern (see below)
Every PR gets reviewed by 3 AI agents + 1 human:
| Reviewer | Focus | Template |
|---|---|---|
| Claude Code | Architecture, quality, test coverage | docs/pr-reviews/<ID>/claude.md |
| Codex | Correctness, security, edge cases | docs/pr-reviews/<ID>/codex.md |
| GitHub Copilot | Inline suggestions, style | docs/pr-reviews/<ID>/copilot.md |
| Human | Business logic, acceptance criteria | docs/pr-reviews/<ID>/human.md |
Create review scaffold: mkdir docs/pr-reviews/<PR-number> and add template files.
See docs/pr-reviews/README.md for the full review template and process.
Before committing, verify:
- No secrets in code (API keys, tokens, passwords)
-
.envfile is not staged -
.claude/settings.local.jsonis not staged (gitignored) - No hardcoded credentials — use environment variables
Before creating a PR:
-
npm run checkpasses (lint + test) -
npm run releasebuilds successfully - New UI uses CSS variables from
tokens.css, not hard-coded colors - Interactive elements have
tabindex,role, andaria-label - Both
dist/anddocs/scripts/built artifacts are committed
DevEd JIRA is at twilio-productivity.atlassian.net, project DEVED.
Programmatic access uses ~/Projects/deved-agents/src/services/jira-service.js:
import { createJiraService } from '~/Projects/deved-agents/src/services/jira-service.js';
const jira = await createJiraService();
const ticket = await jira.createTicket({
summary: 'Messaging: Short description',
description: 'Markdown description (auto-converted to ADF)',
issueType: 'Task',
component: 'DevEd Internal',
storyPoints: 2,
});Conventions:
- Story points: 1, 2, 3, 5 (if 5+, consider breaking into an Epic)
- Required: acceptance criteria on every ticket
- Include JIRA key in branch name and PR description for auto-linking
| Element | Convention | Example |
|---|---|---|
| Library modules | PascalCase | SegmentedMessage.ts |
| Browser modules | camelCase | segmenter.ts, renderer.ts |
| Test files | camelCase + .test.js |
segments.test.js |
| CSS files | kebab-case | tokens.css, components.css |
| PR review docs | docs/pr-reviews/<PR#>/<reviewer>.md |
docs/pr-reviews/60/claude.md |
- Library code (
src/libs/) throws on invalid input (e.g., GSM-7 encoding with Unicode chars) - Browser code (
src/browser/) catches errors and renders user-friendly messages - The
sms-errorelement inindex.htmldisplays encoding errors gracefully