Skip to content

[codex] Add devkit scaffold#1

Merged
michaelmwu merged 9 commits into
mainfrom
codex/devkit-scaffold
Jun 2, 2026
Merged

[codex] Add devkit scaffold#1
michaelmwu merged 9 commits into
mainfrom
codex/devkit-scaffold

Conversation

@michaelmwu

@michaelmwu michaelmwu commented Jun 2, 2026

Copy link
Copy Markdown
Member

Summary

  • Add the initial 508 Devkit repository scaffold for Python, Bun/TypeScript, Compose, CI, docs, and agent instructions.
  • Include dependency cooldown settings and committed uv.lock/bun.lock lockfiles.
  • Add .worktreeinclude and .dockerignore templates with examples and guidance for local worktrees and Docker build contexts.

Validation

  • ./scripts/lint.sh
  • ./scripts/typecheck.sh
  • ./scripts/test.sh
  • ./scripts/check-all.sh

Summary by CodeRabbit

  • New Features

    • Added a repo template: Python/TypeScript conventions, local dev orchestration, deterministic per-worktree ports, migration and example service scaffolding, and CI/security workflows
  • Documentation

    • New contributor, development, deployment, observability, supply-chain, secrets, agent runbooks, and skills guides
  • Configuration

    • Added editor, lint/format/typecheck/test tooling, Docker Compose, env examples, workflow and issue/PR templates, and dependency safety policies
  • Tests

    • Added unit and integration tests for health checks and port tooling

@coderabbitai

coderabbitai Bot commented Jun 2, 2026

Copy link
Copy Markdown

Review Change Stack

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Free

Run ID: 40a33970-256a-4023-9c1e-b9938576e32e

📥 Commits

Reviewing files that changed from the base of the PR and between 1bb611e and b22babe.

📒 Files selected for processing (1)
  • scripts/docker-compose.sh

📝 Walkthrough

Walkthrough

Adds a full reference repository template: governance and decision documents, CI/security workflows, editor/packaging configs, local dev orchestration and deterministic worktree ports, example Python FastAPI and TypeScript web apps with migrations and tests, alternates, scripts, and agent-facing skills and docs.

Changes

Reference repository scaffold

Layer / File(s) Summary
Scaffold: governance, docs, and agent guidance
DECISIONS.md, AGENTS.md, README.md, SECURITY.md, CONTRIBUTING.md, CLAUDE.md, .context/*
Repository purpose, decision policies, agent and contributor guidance, operational memory pages, runbooks, and summaries.
Workspace tooling and editor hygiene
.editorconfig, .gitignore, .dockerignore, .worktreeinclude, biome.json, bunfig.toml, renovate.json, .pre-commit-config.yaml, .cursor/rules/*
Editor settings, ignore lists, formatting/linting config, dependency cooldowns, Renovate policy, and pre-commit hooks.
GitHub automation and templates
.github/workflows/ci.yml, .github/workflows/security.yml, .github/PULL_REQUEST_TEMPLATE.md, .github/ISSUE_TEMPLATE/*, alternates/github/*
CI with path-filtered jobs for Python/web/compose, security scanning and dependency review, PR/issue templates, and discussion/CODEOWNERS alternates.
Local development orchestration
compose.yml, docker-compose.yml, scripts/dev.sh, scripts/docker-compose.sh, scripts/worktree-ports.py, alternates/dev-scripts/*, tests/test_worktree_ports.py
Docker Compose infra, shell/TS dev entrypoints, deterministic per-worktree port allocation utilities and tests.
Repository-level scripts
scripts/check-all.sh, scripts/lint.sh, scripts/format.sh, scripts/typecheck.sh, scripts/test.sh
Consolidated check, lint, format, typecheck, and test runners used by local dev and CI.
Shared Python package and helpers
packages/shared/pyproject.toml, packages/shared/src/example_shared/settings.py, packages/shared/src/example_shared/schemas.py, packages/shared/src/example_shared/observability.py
Shared Pydantic Settings, HealthResponse schema, and observability helpers used by Python services.
Python API service and migrations
apps/api/pyproject.toml, apps/api/src/example_api/main.py, apps/api/src/example_api/db.py, apps/api/migrations/*, apps/api/tests/*
Example FastAPI app with settings/logging, SQLAlchemy base, Alembic env/template, health endpoint, and tests (including optional Postgres integration).
TypeScript web workspace and schema
package.json (root), apps/web/package.json, apps/web/drizzle.config.ts, apps/web/src/db/schema.ts, apps/web/src/index.ts, apps/web/tsconfig.json, apps/web/vitest.config.ts, apps/web/tests/*
Bun-first web package, Drizzle schema, strict TS config, Vitest tests, and apiBaseUrl helper; root workspace and Biome formatting config included.
Alternates and examples
alternates/* (dev-scripts, devcontainer, dockerfiles, pnpm, todo-to-issue)
Optional alternate templates and example Dockerfiles, devcontainer, pnpm workspace, and automation examples.
Documentation and agent skills
docs/*, llms.txt, skills/*
Comprehensive docs: development, deployment, frontend, supply-chain, observability, secrets, pattern report, templates, agent walkthroughs, and reusable SKILL.md guidance.

Estimated code review effort:
🎯 3 (Moderate) | ⏱️ ~20 minutes

"🐰 A devkit crystalline, so fine,
Repos shall flourish by design—
Agents and humans, hand in hand,
Build on conventions, organized and grand!"

@michaelmwu michaelmwu marked this pull request as ready for review June 2, 2026 16:15
@michaelmwu michaelmwu requested a review from Copilot June 2, 2026 16:15

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 6646e0686e

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread .github/workflows/ci.yml

Copilot AI 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.

Pull request overview

Adds the initial 508 Devkit repository scaffold: a Bun/TypeScript + uv/Python workspace, local dev scripts (including deterministic worktree ports), Compose-based infra, CI/security workflows, and baseline docs/skills intended to be copied/adapted into target repos.

Changes:

  • Introduces deterministic per-worktree port allocation (scripts/worktree-ports.py) plus dev/compose wrappers that consume it.
  • Adds Python (uv workspace, Ruff/MyPy/Pytest) and TypeScript (Bun workspaces, Biome, Vitest, Drizzle) scaffolding with lockfiles and basic example code.
  • Adds documentation, skills, GitHub templates/workflows, and supply-chain/dependency cooldown policies.

Reviewed changes

Copilot reviewed 101 out of 104 changed files in this pull request and generated 10 comments.

Show a summary per file
File Description
tests/test_worktree_ports.py Unit tests for worktree port helper script
skills/triage-ci-failure/SKILL.md Agent skill: CI failure triage workflow
skills/promote-context/SKILL.md Agent skill: promote .context/ learnings
skills/add-service/SKILL.md Agent skill: add new service workflow
skills/add-migration/SKILL.md Agent skill: add DB migration workflow
skills/508-devkit/SKILL.md Agent skill: apply/normalize devkit in a target repo
SECURITY.md Security policy + dependency policy notes
scripts/worktree-ports.py Deterministic port allocation + env/exec helper
scripts/typecheck.sh Root typecheck wrapper (Python + web)
scripts/test.sh Root test wrapper (Python + web)
scripts/lint.sh Root lint wrapper (Python + web)
scripts/format.sh Root format wrapper (Python + web)
scripts/docker-compose.sh Compose wrapper that injects worktree ports
scripts/dev.sh Host-run dev orchestration + Compose infra boot
scripts/check-all.sh Aggregated lint/format/type/test/build checks
renovate.json Renovate defaults + release-age cooldown
README.md Devkit overview, quickstart, repo layout, policies
pyproject.toml Root Python workspace config for uv/ruff/mypy/pytest
pnpm-workspace.example.yaml pnpm fallback workspace example
packages/shared/src/example_shared/settings.py Shared Pydantic settings model
packages/shared/src/example_shared/schemas.py Shared Pydantic response schema(s)
packages/shared/src/example_shared/observability.py Minimal logging config + summary helper
packages/shared/src/example_shared/init.py Shared package marker
packages/shared/pyproject.toml Shared package metadata/deps
package.json Root Bun workspace + scripts
llms.txt Repo index for LLM/agent entrypoints
LICENSE MIT license text
docs/template-proposal.md Template rationale and default shape
docs/supply-chain.md Cooldowns + frozen installs policy
docs/secrets.md Secrets handling + optional SOPS guidance
docs/pattern-report.md Report of observed repo conventions (source inputs)
docs/observability.md Observability/env naming policy
docs/interfaces.md Template-vs-skill interface guidance
docs/github-workflows.md GitHub templates/workflow guidance
docs/frontend.md Framework-neutral frontend policy
docs/development.md Local dev workflow documentation
docs/deployment.md Deployment decision record template
docs/agent-walkthrough.md Example agent flow when applying devkit
docker-compose.yml Compatibility wrapper including compose.yml
DECISIONS.md Devkit “constitution” / decision authority
CONTRIBUTING.md Contribution principles + local checks
compose.yml Local infra services (Postgres/Redis/MinIO profile)
CLAUDE.md Claude pointer to AGENTS.md
bunfig.toml Bun install policy (cooldown + isolated linker)
bun.lock Bun lockfile
biome.json Biome formatter/linter configuration
apps/web/vitest.config.ts Vitest config for web workspace
apps/web/tsconfig.json TypeScript compiler configuration
apps/web/tests/index.test.ts Example Vitest unit test
apps/web/src/index.ts Minimal TS helper example (apiBaseUrl)
apps/web/src/db/schema.ts Drizzle schema placeholder
apps/web/package.json Web workspace scripts/deps
apps/web/drizzle.config.ts Drizzle-kit config
apps/api/tests/test_postgres_integration.py Example integration test (gated by env var)
apps/api/tests/test_health.py FastAPI health endpoint test
apps/api/src/example_api/main.py FastAPI app factory + entrypoint
apps/api/src/example_api/db.py SQLAlchemy base/metadata
apps/api/src/example_api/init.py API package marker
apps/api/pyproject.toml API package metadata/deps + console script
apps/api/migrations/script.py.mako Alembic migration template
apps/api/migrations/env.py Alembic env (settings-driven URL)
apps/api/alembic.ini Alembic config
alternates/todo-to-issue/todo-to-issue.yml.example Opt-in TODO-to-issue workflow example
alternates/todo-to-issue/README.md Opt-in TODO-to-issue documentation
alternates/pnpm/README.md pnpm alternate documentation
alternates/pnpm/pnpm-workspace.yaml pnpm workspace config (alternate)
alternates/pnpm/package.json pnpm-based root package.json (alternate)
alternates/pnpm/ci-web-job.yml CI web job fragment for pnpm alternate
alternates/github/README.md GitHub alternates overview
alternates/github/community/DISCUSSION_TEMPLATE/questions.yml Opt-in discussions template
alternates/github/CODEOWNERS.example Opt-in CODEOWNERS template
alternates/dockerfiles/README.md Deployment Dockerfile alternates overview
alternates/dockerfiles/Dockerfile.worker.example Example worker Dockerfile
alternates/dockerfiles/Dockerfile.web-typescript.example Example TS check/build Dockerfile
alternates/dockerfiles/Dockerfile.api.example Example API Dockerfile
alternates/devcontainer/README.md Devcontainer opt-in documentation
alternates/devcontainer/devcontainer.json.example Example devcontainer config
alternates/dev-scripts/worktree-ports.mjs JS-only alternate for worktree ports
alternates/dev-scripts/README.md Dev-script alternates overview
alternates/dev-scripts/dev.ts TS dev runner alternate
AGENTS.md Canonical agent operating instructions
.worktreeinclude Allowlist of files to copy into sibling worktrees
.sops.yaml.example Optional SOPS rules template
.pre-commit-config.yaml Pre-commit hooks (ruff + local wrappers)
.gitignore Ignore local env/venv/cache/build outputs + .context artifacts
.github/workflows/security.yml Secret scanning + dependency review workflow
.github/workflows/ci.yml CI with path filtering + python/web/compose jobs
.github/PULL_REQUEST_TEMPLATE.md PR template
.github/ISSUE_TEMPLATE/feature_request.yml Feature request issue form
.github/ISSUE_TEMPLATE/docs_request.yml Docs request issue form
.github/ISSUE_TEMPLATE/config.yml GitHub issue template config
.github/ISSUE_TEMPLATE/bug_report.yml Bug report issue form
.env.example Environment contract template
.editorconfig Formatting defaults
.dockerignore Docker build context exclusions (secrets/state/deps)
.cursor/rules/repo-conventions.mdc Cursor rules pointing to AGENTS.md
.context/summaries/README.md .context summaries guidance
.context/summaries/.gitkeep Keep empty summaries dir committed
.context/runbooks/local-dev.md Local dev runbook
.context/failures/README.md .context failures guidance
.context/failures/.gitkeep Keep empty failures dir committed
.context/decisions/tooling.md .context tooling decision record
.context/architecture/repository-layout.md .context repo layout note

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread CLAUDE.md Outdated
Comment thread .context/decisions/tooling.md Outdated
Comment thread scripts/lint.sh Outdated
Comment thread scripts/format.sh Outdated
Comment thread scripts/check-all.sh Outdated
Comment thread .github/workflows/ci.yml
Comment thread .github/workflows/ci.yml Outdated
Comment thread .github/workflows/ci.yml Outdated
Comment thread pyproject.toml
Comment thread apps/api/src/example_api/main.py Outdated

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 1bb611eeb5

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread scripts/docker-compose.sh Outdated
@michaelmwu michaelmwu merged commit fcac834 into main Jun 2, 2026
7 checks passed
@michaelmwu michaelmwu deleted the codex/devkit-scaffold branch June 2, 2026 16:48
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.

2 participants