Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 13 additions & 11 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ Use **pnpm**: `pnpm install`, `pnpm dev`, `pnpm test`, `pnpm typecheck`, `pnpm s
- Use `/commit` for commits, `/pr-writer` for pull requests, and `/skill-writer` for skill changes.
- For non-trivial changes: discover, implement the smallest vertical slice, verify, and summarize.
- Search every consumer before changing a shared signature, error contract, or name; use a hard cutover unless compatibility is explicitly required.
- When adding or renaming a shared export, search its exact name and the canonical domain terms a maintainer would use. The owner and consumers should be easy to distinguish without knowing the file path first.
- Let unexpected failures reach the owning boundary; retry only expected transient failures. Follow `policies/error-handling.md`.
- Exported functions need brief intent-focused JSDoc; follow `policies/code-comments.md`.
- Run applicable checks, move durable explanations beside the owning code, and delete completed plans.
Expand All @@ -42,20 +43,21 @@ Use **pnpm**: `pnpm install`, `pnpm dev`, `pnpm test`, `pnpm typecheck`, `pnpm s
- Read `packages/junior/src/chat/README.md` before changing shared chat runtime behavior; it owns flow, module boundaries, vocabulary, and invariants.
- Follow `policies/provider-boundaries.md`; provider modules do not import runtime orchestration, and shared modules do not expose provider SDK types.
- Group files by feature and import feature files directly; do not add feature-directory barrels.
- Code files may not exceed 1,000 lines unless `scripts/file-length-exceptions.mjs` names the file and explains why it should stay large.
- Do not add mutable runtime globals or test-only singleton mutation APIs.

## Where Rules Live

| Need | Source |
| ----------------------- | ------------------------------------------------------------------------------------------------------- |
| Repo-wide policy index | `policies/README.md` |
| Runtime vocabulary | `TERMINOLOGY.md` |
| Design and failures | `policies/interface-design.md`, `policies/correctness-complexity.md`, `policies/error-handling.md` |
| Provider boundaries | `policies/provider-boundaries.md` |
| Comments and telemetry | `policies/code-comments.md`, `policies/observability.md`, `TELEMETRY.md` |
| Chat architecture | `packages/junior/src/chat/README.md` |
| Testing and evals | `policies/testing.md`, `policies/evals.md`, `packages/junior/tests/README.md`, `packages/junior-evals/README.md` |
| Local agent validation | `packages/docs/src/content/docs/contribute/local-agent-validation.md` |
| Temporary plans | `openspec/changes/<slug>/` |
| Need | Source |
| ---------------------- | ---------------------------------------------------------------------------------------------------------------- |
| Repo-wide policy index | `policies/README.md` |
| Runtime vocabulary | `TERMINOLOGY.md` |
| Design and failures | `policies/interface-design.md`, `policies/correctness-complexity.md`, `policies/error-handling.md` |
| Provider boundaries | `policies/provider-boundaries.md` |
| Comments and telemetry | `policies/code-comments.md`, `policies/observability.md`, `TELEMETRY.md` |
| Chat architecture | `packages/junior/src/chat/README.md` |
| Testing and evals | `policies/testing.md`, `policies/evals.md`, `packages/junior/tests/README.md`, `packages/junior-evals/README.md` |
| Local agent validation | `packages/docs/src/content/docs/contribute/local-agent-validation.md` |
| Temporary plans | `openspec/changes/<slug>/` |

Feature architecture and non-obvious invariants belong in the owning package or module `README.md`. Code, schemas, exported types, and tests are authoritative. Plans cannot override policy; update the policy for an exception.
8 changes: 6 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,9 @@
"worktree:setup": "node scripts/worktree.mjs setup",
"cloudflare:token": "node scripts/refresh-cloudflare-tunnel-token.mjs",
"prepare": "simple-git-hooks",
"lint": "pnpm --filter @sentry/junior lint && pnpm --filter @sentry/junior-memory lint && pnpm --filter @sentry/junior-github lint && pnpm --filter @sentry/junior-vercel lint && pnpm ast-grep:lint && pnpm package:lint",
"lint": "pnpm file-length:check && pnpm --filter @sentry/junior lint && pnpm --filter @sentry/junior-memory lint && pnpm --filter @sentry/junior-github lint && pnpm --filter @sentry/junior-vercel lint && pnpm ast-grep:lint && pnpm package:lint",
"lint:fix": "pnpm --filter @sentry/junior lint:fix",
"file-length:check": "node --test scripts/check-file-length.test.mjs && node scripts/check-file-length.mjs",
"ast-grep:lint": "ast-grep scan",
"lint-staged": "lint-staged",
"build": "pnpm --filter @sentry/junior build && pnpm --filter @sentry/junior-memory build && pnpm --filter @sentry/junior-github build && pnpm --filter @sentry/junior-vercel build && pnpm --filter @sentry/junior-dashboard build",
Expand All @@ -38,7 +39,10 @@
},
"lint-staged": {
"packages/junior/**/*.{js,jsx,ts,tsx,mjs,cjs}": "pnpm --filter @sentry/junior exec oxlint --config .oxlintrc.json --deny-warnings --fix",
"*.{js,jsx,ts,tsx,mjs,cjs,json,md,mdx,yml,yaml}": "pnpm exec prettier --write --ignore-unknown"
"*.{js,jsx,ts,tsx,mjs,cjs,json,md,mdx,yml,yaml}": [
"pnpm file-length:check",
"pnpm exec prettier --write --ignore-unknown"
]
},
"devDependencies": {
"@ast-grep/cli": "^0.43.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
- `intercom/2x-skills@59213af`, `plugins/pr-tools/skills/attach-github-assets/SKILL.md` — upstream runtime intent and supported use cases; primary source; high confidence; MIT.
- `intercom/2x-skills@59213af`, `plugins/pr-tools/skills/attach-github-assets/scripts/upload.sh` — upstream endpoint, MIME mapping, and response contract; primary implementation source; high confidence; MIT.
- `intercom/2x-skills@59213af`, `plugins/pr-tools/LICENSE` — upstream copyright and license notice; authoritative legal source; high confidence.
- `packages/junior-github/src/index.ts` — local GitHub credential and egress boundary; authoritative local source; high confidence.
- `packages/junior-github/src/credential-support.ts` — local GitHub credential boundary; authoritative local source; high confidence.
- `packages/junior-github/src/plugin.ts` — local GitHub egress boundary; authoritative local source; high confidence.
- `packages/junior-github/skills/github-code/SKILL.md` — local repository targeting and credential guidance; authoritative local convention; high confidence.
- GitHub REST API documentation — no documented user-attachment upload operation found; official source; medium confidence for absence.

Expand Down
Loading
Loading