Skip to content

Development workflow ​

Branch, commit, PR ​

  1. Open (or claim) an issue.
  2. Branch from main: git checkout -b feat/short-description.
  3. Keep commits focused, with Conventional Commits prefixes (feat:, fix:, chore:, docs:); release notes are generated from them.
  4. Open a PR from the template; reference the issue with Closes #N.

Merging into main is the ship decision: the next nightly release picks it up.

Agents in the workflow ​

Agents (Claude Code, GitHub Copilot) do much of the work; humans decide at a few gates. The design and its rollout are in ADR-0001; the rules every agent follows are in AGENTS.md.

Labels carry the state (.github/labels.json, synced by the Labels workflow): status:* for the stage, risk:r0|r1|r2 for the gate, surface:* for the area, agent:* to opt an issue in to a hosted agent.

No secrets. Autonomous runs use only GitHub's native features: Actions for deterministic steps and Copilot for the ones that need a model. Sessions you start yourself use your own tools and accounts.

WhatWhenWhat it does
PR risk & docs impact (Actions)every PRsets risk:r0 (docs, website, tests), risk:r1 (application code) or risk:r2 (workflows, release, migrations, auth, telemetry, agent rules and skills, or a raise of the quality baseline) from the changed paths; comments when user-facing code changed without docs
Issue triage (Actions)new or edited issuesets surface:* from the form's Surface field and comments when other issues share most of the title's words. No model; it never changes a label a person set
Copilot code reviewevery PR, once enabled in the rulesetreviews the diff with the review skill; advisory, the merge stays a human decision
Issue status (Actions)status label added, issue assigned or unassigned, PR opened / ready / closedkeeps one status:* label; status:accepted clears needs-triage; assigning an accepted issue moves it to status:in-progress (Copilot as assignee adds runner:hosted); a PR with Closes #N moves it to status:in-review, back to status:accepted if closed unmerged
triage skill (your session)issues labelled needs-triageask Claude Code or Copilot to "triage issue 123": it adds type and risk labels, a summary and questions to what the Issue triage workflow found; it labels and comments only once you agree. A maintainer accepts with status:accepted
spec skill (your session)status:accepted issues (not R0)writes the spec as a comment and sets status:spec-draft; you approve with status:spec-approved
ship-change skill (your session)accepted or spec-approved issuesclaims the issue (assignee + runner:local), builds, adds a changelog fragment, opens the PR with Closes #N
review skill (your session)any PR"review PR 456" runs the same rules as Copilot code review
changelog skill (your session)from time to time on mainfolds changelog.d/ fragments into CHANGELOG.md (make changelog)

Setup and switches (repository settings):

  • Copilot code review: Settings → Rules → Rulesets → Automatically request Copilot code review on main.
  • Variable RELEASE_HOLD=true makes the nightly release publish nothing.

Database migrations ​

Alembic is the single source of truth for the schema; startup runs alembic upgrade head for dev and prod alike.

bash
make migration m="add foo to chats"   # autogenerate from the model change
# review precursor/backend/alembic/versions/<new>.py, then commit it
make migrate                          # optional: apply to your local DB now

One migration per change. Check column type changes, server defaults and data migrations by hand.

Continuous integration ​

.github/workflows/ci.yml runs on every PR and main push. All jobs must pass.

JobChecks
Lockfilesevery artifact pinned to a public registry with a strong hash
Quality ratchetcomplexity, size, duplication, untyped responses; API types up to date
Backenduv sync --locked, ruff, ruff format and mypy in one job; pytest -n 8 --dist loadgroup split over 2 shards
Backend on Windowsthe same pytest run, split over 4 shards
Fresh wheel installbuilds the wheel, installs it with the kanban extra without the lockfile (as uvx precursor-ai would), runs the release smoke gate and scripts/smoke_mcp.py kanban
Install on Windowsinstall.ps1, login item, service lifecycle, self-update
Frontendnpm ci, typecheck, Vitest, build
Docs sitenpm run docs:build for website/

Backend steps are skipped (but report success) when a PR only touches frontend/, website/ or Markdown. If a backend test reads a frontend file, add it to BACKEND_READS in scripts/ci_backend_scope.py (tests/test_ci_backend_scope.py enforces it). Tests sharing a fixed resource (e.g. a port) use pytest.mark.xdist_group.

The backend jobs are sharded: PRECURSOR_TEST_SHARD=k/n makes conftest.py keep one slice of the suite, split by a hash of each test id (an xdist_group stays in one shard). The check names above are small jobs that pass when every shard does, so adding shards never changes the required checks. Reproduce a CI shard locally with PRECURSOR_TEST_SHARD=2/4 uv run pytest -n 8 --dist loadgroup.

Lockfiles ​

uv.lock and both package-lock.json files pin public artifacts (files.pythonhosted.org, registry.npmjs.org) with strong hashes. Regenerating them is CI's job. Corporate mirrors weaken them (sha1 integrity, missing uv provenance), so never commit a locally re-resolved lockfile; revert it.

TaskCommand
Install from lockfilesmake sync (npm ci, UV_FROZEN=1)
Block bad lockfiles at commitmake hooks (once); make lockcheck on demand
Change a dependencyedit pyproject.toml / package.json, commit, then gh workflow run relock.yml --ref "$(git branch --show-current)"
Need the new package locally firstUV_FROZEN=0 uv lock && uv sync && git restore uv.lock
npm ci 404s on a mirrornpm --prefix website install --no-package-lock (leaves the lockfile untouched)

The Relock workflow regenerates the lockfiles, verifies install and build, and pushes to your branch (or opens a PR against main). Dependabot updates arrive the same way.

Adding a plugin ​

Plugins live in their own repositories and register via [project.entry-points."precursor.plugins"]. See the plugin reference and, to list one, Submitting a plugin.

Documentation ​

Docs ship in the same PR as the change. The decision checklist (feature page, landing grid, configuration reference, API reference, changelog fragment in changelog.d/, screenshots) is in .github/copilot-instructions.md.

WhereWhat
website/this VitePress site: GitHub Pages via pages.yml on main pushes, and in-app at /docs/
README.md, CONTRIBUTING.md, RELEASING.md, ARCHITECTURE.mdrepository front door and contributor rules
docs/in-repo design notes and JSON schemas
bash
cd website
npm ci
npm run docs:dev        # live reload (precursor --dev also serves it at /docs/)
npm run docs:build      # must pass before you open the PR

Screenshots ​

Screenshots in website/public/screenshots/ come in pairs (foo.png, foo-dark.png); retake both when a UI change alters one. Capture them from the seeded demo (scripts/seed_demo.py, scripts/demo_server.sh, scripts/capture_screenshots.js) so the persona reads "Guest / Not connected" and no config warnings show. The full loop is in .github/copilot-instructions.md.

Released under the MIT License.