mirror of
https://github.com/nexu-io/open-design.git
synced 2026-10-27 09:51:12 +01:00
Adds `tools/pr` as the maintainer-only control plane for PR-duty work on this repo. Thin `gh` wrapper that encodes repo-specific knowledge: review lanes, forbidden surfaces, lane-specific checklists, validation command derivation from touched packages. Subcommands: - `list` — triage open queue by lane and review-state bucket. - `view <num>` — agent-friendly review brief for a single PR. - `classify [num]` — emit script-level tags for one PR or the whole open queue; full-queue JSON output lands under `.tmp/tools-pr/classify/` with rate-limit telemetry per run. - `assignment` — assigner-perspective view of PR ownership, idle time, and blockers (derived from existing tags; no new judgments). Tag dictionary (13 tags) covers: bot-only-approval, needs-rebase, forbidden-surface, unlabeled, duplicate-title, non-ascii-slug, maintainer-edits-disabled, org-member, unresolved-changes-requested, stale-approval, and three awaiting-* timing tags. Each rule is expressible as one factual sentence over `gh` data + repo paths — see `tools/pr/AGENTS.md` for the full dictionary plus precision rules. Templates in `tools/pr/templates/*.md` are aesthetic references for recurring maintainer comments (duplicate-title ask, awaiting-author nudge, agent-review brief shape). `templates/examples/` holds frozen-in-time agent-review snapshots for three PR shapes. Infrastructure: - `gh()` wraps `execFile` with minimum-touch retry (2 attempts at 1s + 2s backoff) on transient 5xx / network errors. Persistent failures still surface — retry is anti-jitter, not an exponential-backoff resilience layer. - Heavy chunks (`reviews`, `comments`, `commits`, assignment timelines) use cursor-paginated `gh api graphql` via `fetchPaginatedPrList` to stay under GitHub's GraphQL server-side timeout. Light chunks stay on `gh pr list --json`. - `fetchOrgMembers` cached per process via `gh api orgs/<owner>/members --paginate`. Wiring: - Root `package.json` adds `pnpm tools-pr` to the allowed root entry points. - `scripts/postinstall.mjs` builds `tools/pr` alongside other workspace packages. - `scripts/guard.ts` allowlists `tools/pr/bin/tools-pr.mjs` and `tools/pr/esbuild.config.mjs`, and adds `pr/` to the `tools/` top-level layout allowlist. - Root `AGENTS.md` and `tools/AGENTS.md` document the new command surface, root-command-boundary update, and per-tool ownership.
45 lines
1.5 KiB
JSON
45 lines
1.5 KiB
JSON
{
|
|
"name": "open-design",
|
|
"version": "0.6.0",
|
|
"private": true,
|
|
"packageManager": "pnpm@10.33.2",
|
|
"type": "module",
|
|
"description": "Local-first design product: detects your installed code-agent CLI, runs design skills + design systems, streams artifacts into a sandboxed preview.",
|
|
"license": "Apache-2.0",
|
|
"bin": {
|
|
"od": "./apps/daemon/dist/cli.js"
|
|
},
|
|
"scripts": {
|
|
"postinstall": "node ./scripts/postinstall.mjs",
|
|
"tools-dev": "pnpm exec tools-dev",
|
|
"tools-pack": "pnpm exec tools-pack",
|
|
"tools-pr": "pnpm exec tools-pr",
|
|
"guard": "tsx ./scripts/guard.ts",
|
|
"i18n:check": "tsx ./scripts/i18n-check.ts",
|
|
"sync:community-pets": "node --experimental-strip-types scripts/sync-community-pets.ts",
|
|
"bake:community-pets": "node --experimental-strip-types scripts/bake-community-pets.ts",
|
|
"seed:test-projects": "node --experimental-strip-types scripts/seed-test-projects.ts",
|
|
"seed:curated-design-skills": "node --experimental-strip-types scripts/seed-curated-design-skills.ts",
|
|
"typecheck": "pnpm -r --workspace-concurrency=1 --if-present run typecheck && tsc -p scripts/tsconfig.json --noEmit"
|
|
},
|
|
"devDependencies": {
|
|
"@open-design/tools-dev": "workspace:*",
|
|
"@open-design/tools-pack": "workspace:*",
|
|
"@open-design/tools-pr": "workspace:*",
|
|
"@types/node": "^20.17.10",
|
|
"tsx": "4.21.0",
|
|
"typescript": "^5.6.3"
|
|
},
|
|
"engines": {
|
|
"node": "~24",
|
|
"pnpm": ">=10.33.2 <11"
|
|
},
|
|
"pnpm": {
|
|
"onlyBuiltDependencies": [
|
|
"better-sqlite3",
|
|
"electron",
|
|
"esbuild"
|
|
]
|
|
}
|
|
}
|