Skip to content

chore: per-folder CLAUDE.md, OCI PR template, OCI issue forms#302

Merged
DevanshuNEU merged 2 commits into
OpenCodeIntel:mainfrom
DevanshuNEU:chore/oci-pipeline-templates-and-per-folder-claude
May 11, 2026
Merged

chore: per-folder CLAUDE.md, OCI PR template, OCI issue forms#302
DevanshuNEU merged 2 commits into
OpenCodeIntel:mainfrom
DevanshuNEU:chore/oci-pipeline-templates-and-per-folder-claude

Conversation

@DevanshuNEU

@DevanshuNEU DevanshuNEU commented May 11, 2026

Copy link
Copy Markdown
Collaborator

Summary

Wires the OCI pipeline scaffolding into the repo: three per-folder CLAUDE.md files (backend / frontend / mcp-server), an OCI-specific PR template replacing the generic OSS one, and three OCI-flavored YAML issue forms. Phase 1E of the OCI pipeline build (vault-side phases 1A through 1D shipped in DevVault first).

Type of change

  • chore (tooling, deps, CI)

Closes / implements

  • Closes # (no GH issue, this is Phase 1E of an internal pipeline build documented in DevVault oci/sessions/latest.md)
  • ADR: n/a, under ADR threshold (chore-level, no architectural impact on running services)
  • Stack(s): cross-cutting (no source code in backend/, frontend/, or mcp-server/ modified, only */CLAUDE.md and .github/)

What changed

Backend:

  • backend/CLAUDE.md new. Python / FastAPI / Supabase / Pinecone specifics, the 7 documented bugs, off-limits files (middleware/auth.py, config/startup_checks.py).

Frontend:

  • frontend/CLAUDE.md new. Bun, shadcn, React Query, Tailwind, design language, critical-files list, approved file-size exceptions.

MCP server:

  • mcp-server/CLAUDE.md new. FastMCP, dual transport, mcp>=1.25.0,<2.0.0 pin, MCP_API_KEY env var, Bearer-header space rule, structured-error policy, 500ms agent-loop budget.

Tests / docs:

  • .github/PULL_REQUEST_TEMPLATE.md replaced. OCI-specific shape with ADR adherence checklist, Paired-Ship Protocol tradeoff section, risk and rollback. No screenshots, no generic checklist.
  • .github/ISSUE_TEMPLATE/oci-issue.yml new. Internal work tracker (wave / type / stack / priority / ADR-required dropdowns).
  • .github/ISSUE_TEMPLATE/dogfood-finding.yml new. Friction-while-using-OCI capture in 60 seconds.
  • .github/ISSUE_TEMPLATE/ddia-finding.yml new. OCI flaws spotted while reading DDIA, three-pillar impact ratings.
  • bug_report.yml, feature_request.yml unchanged. External-contributor templates kept generic.

ADR adherence

n/a, chore commit, no architectural impact.

How to test

  1. Open this PR in the GitHub UI and confirm the new PR template renders. (Preview of THIS PR uses the old template since the new one is not merged yet; that's expected.)
  2. After merge, visit https://github.com/OpenCodeIntel/opencodeintel/issues/new/choose to confirm the issue picker shows 5 options: Bug Report, Feature Request, OCI Issue (internal), Dogfood Finding, DDIA Finding.
  3. From the OCI repo working tree, open backend/CLAUDE.md and confirm it auto-loads when Claude Code works inside backend/. Same for frontend/ and mcp-server/.

Expected: PR template has Summary / Type / Closes / What changed / ADR adherence / How to test / Verification / Deployment notes / Tradeoff / Risk-and-rollback sections. Issue picker shows 5 forms with consistent visual style.

Verification

  • No source code modified (chore-only commit)
  • All YAML forms validate against the bug_report.yml shape (name: and body: keys present, body is a list of typed blocks)
  • 0 emdashes across all 7 new files
  • No Co-Authored-By trailer on the commit (OCI rule overrides global default)
  • Per-folder CLAUDE.mds reference root CLAUDE.md without duplicating it
  • Backend / frontend / mcp-server tests, n/a (no source code changes)

Deployment notes

  • No new env vars
  • No DB migration
  • No off-limits files modified (backend/middleware/auth.py, backend/config/startup_checks.py, bun.lockb)
  • No mcp package version change (still >=1.25.0,<2.0.0)
  • No breaking change to /api/v1/* contracts (no source code in PR)

Tradeoff (Paired-Ship Protocol)

Replaced the generic OSS PR template instead of keeping both. The old shape (Description / Motivation / Type / Testing / Checklist / Screenshots / Additional Context) was creating friction in real PRs and has been the source of unstructured PR bodies historically. Keeping both via a PULL_REQUEST_TEMPLATE_legacy.md rename was considered, but GitHub uses the unprefixed file as default, so the legacy version would have been visibly second-class anyway. Trade: external contributors filing their first PR see a denser, OCI-specific template instead of the familiar OSS one. Mitigation: the new template's first 2 sections (Summary and Type) match the OSS pattern, and deeper sections are explicitly optional ("delete if n/a").

Chose YAML issue forms over Markdown templates so the picker has a single visual style alongside existing bug_report.yml and feature_request.yml. The DevVault Markdown counterparts at oci/templates/*.md remain in place for gh issue create --body-file use (used by /oci-plan and /oci-merge-done); both formats coexist by design.

Risk and rollback

  • Symptom if wrong: PR template renders broken Markdown (unlikely, all sections are standard) or YAML forms fail to validate and disappear from the issue picker.
  • Blast radius: all future PRs and external-contributor issue filings on the repo.
  • Rollback path: git revert this commit, or open a tiny follow-up PR restoring prior template files from history.
  • Time-to-rollback: under 5 minutes via revert.

Summary by CodeRabbit

  • Documentation

    • Added comprehensive development guidelines establishing standards and best practices for backend, frontend, and MCP server development.
  • Chores

    • Introduced standardized GitHub issue form templates for structured problem reporting workflows.
    • Updated pull request template to improve review consistency and streamline the contribution process.

Review Change Stack

Wires the OCI pipeline scaffolding into the repo so future sessions read stack-specific rules and contributors get OCI-grounded issue and PR templates by default.

backend/CLAUDE.md  - Python / FastAPI / Supabase / Pinecone, the 7 documented
  bugs, off-limits files (auth.py, startup_checks.py).
frontend/CLAUDE.md - Bun, shadcn, React Query, Tailwind, design language,
  critical-files list, approved file-size exceptions.
mcp-server/CLAUDE.md - FastMCP, dual transport, mcp pin, MCP_API_KEY env var,
  Bearer header space rule, structured-error policy, 500ms agent-loop budget.

.github/PULL_REQUEST_TEMPLATE.md - replaces the generic OSS template with an
  OCI-specific one. Summary, type, ADR adherence checklist, how-to-test,
  verification, deployment notes (env vars, migrations, off-limits files,
  mcp version, /api/v1 contract), Paired-Ship Protocol tradeoff, risk and
  rollback. No screenshots, no generic checklist.

.github/ISSUE_TEMPLATE/oci-issue.yml - internal work tracker. Wave / type /
  stack / priority / ADR-required as dropdowns. Why, what-ships,
  acceptance-criteria as required textareas.
.github/ISSUE_TEMPLATE/dogfood-finding.yml - friction-while-using-OCI capture.
  Fast: what-I-tried / what-happened / what-expected / repro / tool.
.github/ISSUE_TEMPLATE/ddia-finding.yml - OCI flaws spotted while reading
  DDIA. Chapter, concept, OCI surface, what-is-wrong (DDIA-grounded),
  three-pillar impact ratings.

bug_report.yml and feature_request.yml unchanged - those serve external
contributors and stay generic.
@vercel

vercel Bot commented May 11, 2026

Copy link
Copy Markdown

@DevanshuNEU is attempting to deploy a commit to the Dev's projects Team on Vercel.

A member of the Team first needs to authorize it.

@coderabbitai

coderabbitai Bot commented May 11, 2026

Copy link
Copy Markdown

Warning

Rate limit exceeded

@DevanshuNEU has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 46 minutes and 14 seconds before requesting another review.

You’ve run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: a50dab4c-4e0b-4934-930e-cdd3545a24a5

📥 Commits

Reviewing files that changed from the base of the PR and between 49afb64 and cb05f2e.

📒 Files selected for processing (2)
  • .github/PULL_REQUEST_TEMPLATE.md
  • frontend/CLAUDE.md
📝 Walkthrough

Walkthrough

This PR standardizes the OCI development workflow by introducing three GitHub issue templates for different work types (DDIA findings, dogfood user reports, internal OCI tasks), overhauling the PR template with a checklist-driven structure, and adding stack-specific engineering rule documents (CLAUDE.md) for backend, frontend, and MCP server subsystems.

Changes

GitHub Workflow Templates

Layer / File(s) Summary
PR Template Structure
.github/PULL_REQUEST_TEMPLATE.md
Replaces narrative Description/Motivation structure with checklist-driven format including Summary, Type of change, Closes/implements, What changed, ADR adherence, How to test, Verification, Deployment notes, Tradeoff, and Risk/rollback sections.
DDIA Finding Issue Template
.github/ISSUE_TEMPLATE/ddia-finding.yml
New form collects DDIA chapter, specific concept, affected OCI surface, stack scope (backend/frontend/mcp-server/cross-cutting), DDIA-grounded problem description, proposed fix sketch, acceptance criteria, and impact assessments (reliability/scalability/maintainability) with automatic ddia-finding and state/backlog labels.
Dogfood Finding Issue Template
.github/ISSUE_TEMPLATE/dogfood-finding.yml
New form captures rapid 60-second triage: what was tried, what happened, what was expected, repro steps, required OCI tool selection (with "other" option), optional root-cause hypothesis, and stack area checkboxes for fix location.
OCI Issue (Internal) Template
.github/ISSUE_TEMPLATE/oci-issue.yml
New form for internal work items with required fields: rationale (Why this exists), deliverables (What ships), acceptance criteria, Wave selection, commit type, stack scope, Priority (with default), ADR requirement, dogfooding signal, and related references section.

Stack-Specific Engineering Rules

Layer / File(s) Summary
Backend Engineering Rules
backend/CLAUDE.md
Establishes standards for type hints, PEP 8, async I/O; layered architecture (routes call services; services do not directly access Pinecone/Supabase/Redis); graceful degradation and lazy initialization of optional dependencies; JWT validation returning None on AuthenticationError for API-key fallback; API keys stored as SHA-256 hashes only; Supabase RLS and schema conventions; Pinecone async upsert behavior; path/filter correctness rules; pytest execution guidance; test coverage for both JWT-valid and JWT-invalid-to-API-key-fallback flows.
Frontend Engineering Rules
frontend/CLAUDE.md
Establishes Bun-only package management (forbids npm/yarn); functional hooks-based React components; TanStack Query for all server data access; Tailwind-only styling with cn() for conditionals; TypeScript interfaces in src/types.ts; dark theme UI conventions; Vitest + happy-dom testing with QueryClientProvider per test; registry of critical files and approved larger exceptions; bun.lockb marked off-limits for manual deletion or editing.
MCP Server Engineering Rules
mcp-server/CLAUDE.md
Establishes FastMCP stack with Python 3.11+, dual stdio/streamable-http transport, strict file layout (entrypoint, tool definitions, implementations, backend client, formatters, config); Authorization: Bearer {key} header formatting requirement; tool design rules (verb-style names, explicit JSON schemas without Any, deterministic outputs, idempotency); error handling rules (structured errors only, no stack traces, backend-unreachable within 2s); latency targets (p95), test coverage (malformed input schemas, Bearer-space auth), and mcp>=1.25.0,<2.0.0 pin marked off-limits without ADR.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes


A rabbit hops through documents neat,
With templates and rules, the workflow's complete.
From DDIA findings to backend constraints,
The standards align—no more workflow complaints! 🐰✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely summarizes the main changes: addition of per-folder CLAUDE.md files, OCI PR template, and OCI issue forms. It accurately reflects the primary focus of the changeset.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Tip

💬 Introducing Slack Agent: The best way for teams to turn conversations into code.

Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.

  • Generate code and open pull requests
  • Plan features and break down work
  • Investigate incidents and troubleshoot customer tickets together
  • Automate recurring tasks and respond to alerts with triggers
  • Summarize progress and report instantly

Built for teams:

  • Shared memory across your entire org—no repeating context
  • Per-thread sandboxes to safely plan and execute work
  • Governance built-in—scoped access, auditability, and budget controls

One agent for your entire SDLC. Right inside Slack.

👉 Get started


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.github/PULL_REQUEST_TEMPLATE.md:
- Line 47: The checklist line "Latency target honored, measured: p50 ___ ms /
p95 ___ ms (ADR target: ___)" triggers MD037 due to raw underscores; update that
line in the PULL_REQUEST_TEMPLATE.md by replacing the bare underscores with
either backticked placeholders (e.g., `___`) or angle-bracket tokens (e.g.,
<value>) so the placeholders are treated as code/text and not parsed as
emphasis, and keep the surrounding wording unchanged.
- Around line 29-39: Convert the Setext-style section labels in the PR template
to ATX headings to satisfy markdownlint MD003: replace the four labels
"Backend:", "Frontend:", "MCP server:", and "Tests / docs:" with ATX-style
headings (e.g., prefix each with one or more # characters such as "# Backend",
"# Frontend", "# MCP server", "# Tests / docs") so the headings are consistent
and lint-clean.

In `@frontend/CLAUDE.md`:
- Line 11: Update the inconsistent lockfile name in CLAUDE.md by replacing the
incorrect `bun.lock` mention with the canonical `bun.lockb` used elsewhere in
the document; specifically edit the sentence at the top (current line
referencing `bun.lock`) and the off-limits section (the block around lines
79–83) so all occurrences consistently read `bun.lockb`.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 0e782559-f6fe-452b-a045-b506cda79b9f

📥 Commits

Reviewing files that changed from the base of the PR and between 4e65fd8 and 49afb64.

📒 Files selected for processing (7)
  • .github/ISSUE_TEMPLATE/ddia-finding.yml
  • .github/ISSUE_TEMPLATE/dogfood-finding.yml
  • .github/ISSUE_TEMPLATE/oci-issue.yml
  • .github/PULL_REQUEST_TEMPLATE.md
  • backend/CLAUDE.md
  • frontend/CLAUDE.md
  • mcp-server/CLAUDE.md

Comment thread .github/PULL_REQUEST_TEMPLATE.md
Comment thread .github/PULL_REQUEST_TEMPLATE.md Outdated
Comment thread frontend/CLAUDE.md
- PR template line 47: wrap latency placeholders in backticks so MD037 does not
  parse `___` as emphasis.
- frontend/CLAUDE.md off-limits section: change `bun.lockb` to `bun.lock` to
  match the actual lockfile on disk and the rest of this file. Reviewer
  suggested the reverse, but verification against the working tree shows the
  text-format `bun.lock` is what Bun is using here.

Skipped review finding: convert bold labels under "What changed" to ATX
headings. Those labels are inline bold text, not Setext headings, so MD003
does not apply. Adding `###` headers per stack would add visual weight that
contradicts the "lighter, less generic" direction this template was built for.

Note: the root CLAUDE.md also has a `bun.lockb` reference inconsistency
(off-limits section). Leaving that for a separate follow-up since it is not
part of this PR.
@vercel

vercel Bot commented May 11, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
opencodeintel Ready Ready Preview, Comment May 11, 2026 3:23pm

@DevanshuNEU DevanshuNEU merged commit 106ff72 into OpenCodeIntel:main May 11, 2026
12 of 13 checks passed
DevanshuNEU added a commit that referenced this pull request May 15, 2026
Railway changed how startCommand is evaluated; the $PORT variable was
being passed as the literal string instead of being shell-expanded,
causing uvicorn to crash on every boot and the /health probe to time
out across 11 attempts. The Dockerfile's built-in CMD already binds
to the EXPOSE'd port with --proxy-headers, so removing the override
restores boot.

Same railway.json shipped fine for PR #293 two months ago, and no
runtime code, Dockerfile, or requirements changed between #293 and
the failing #302 deploy (only docs touched). Root cause is a Railway
platform behavior change.

Hotfix: skipped /oci-design gate (Phase 1F warn) because prod is
fully down. Backfilling an ADR or dogfood finding after recovery.
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