Files
paperclip/AGENTS.md
T
Santhi Prakash 1e44e50360 docs: remove leaked fork-specific section from AGENTS.md (#9935)
## Thinking Path

> - Paperclip is the open source app people use to manage AI agents for
work
> - `AGENTS.md` is the contributor guide read by every human and AI
agent before making changes
> - Section "## 11. Fork-Specific: HenkDz/paperclip" describes a
downstream fork's own dev setup (custom ports, NTFS quirks, fork-only
QoL patches) but was accidentally left in the upstream
`paperclipai/paperclip` copy of AGENTS.md
> - This causes two concrete problems: (1) it duplicates the "## 11."
heading number with the preceding "Definition of Done" section, and (2)
it tells contributors/agents working on the real upstream repo to follow
fork-only instructions (e.g. "Fork runs on port 3101+ (auto-detects if
3100 is taken by upstream instance)") that don't apply here and could
cause confusion during setup
> - This PR removes the leaked fork-specific section entirely, which
also resolves the duplicate numbering as a side effect
> - The benefit is a cleaner, correct AGENTS.md with no duplicate
section numbers and no instructions that reference a different
repository

## Linked Issues or Issue Description

Refs #4188 — that issue's "Proposed behavior" section explicitly calls
out this same duplicate-`§11` numbering bug in AGENTS.md ("Definition of
Done and Fork-Specific HenkDz section both numbered §11") as one
incidental item inside a much larger proposal (issue templates, triage
labels, PR-link enforcement workflows). That issue is still open.

Related PRs (checked before opening this one):
- #4189 — closed, not merged. Would have addressed the broader
issue-templates work.
- #4260 — closed, not merged. Would have expanded CONTRIBUTING.md and
issue templates.
- #7522 — merged (2026-06-05). Added the search-first / linked-issue /
gates guidance to CONTRIBUTING.md, but did not touch AGENTS.md and did
not remove the leaked section.

None of these removed the leaked "## 11. Fork-Specific:
HenkDz/paperclip" section — it is still present verbatim on `master` as
of this PR. This PR intentionally scopes down to just the AGENTS.md fix
so it can land as a small, independent, easy-to-review change rather
than waiting on the larger issue-template proposal.

## What Changed

- Removed the entire "## 11. Fork-Specific: HenkDz/paperclip" section
from `AGENTS.md` (Branch Strategy, Hermes (built-in), Local Dev, Fork
QoL Patches, Plugin System subsections) — this content describes a
personal fork's dev environment, not the upstream repo, and does not
belong in the file every contributor and agent reads first.
- No other files touched.

## Verification

- `grep -n "^## " AGENTS.md` now shows a single "## 11. Definition of
Done" with no duplicate section number.
- `grep -rn "HenkDz\|Fork-Specific" --include="*.md" .` (outside
`releases/*.md` changelog credits, which are unrelated and untouched)
returns nothing — confirms no other file references the removed section.
- Checked `ROADMAP.md` — no planned work overlaps this change (the only
AGENTS.md-related roadmap item, "Easy AGENTS.md configurations", is
marked done and is a general feature, unrelated to this cleanup).
- Searched open/closed PRs touching AGENTS.md and open issues mentioning
"HenkDz"/"Fork-Specific" — no duplicate or in-flight PR does this
specific removal (see Linked Issues section above).
- No code, schema, or behavior changes — this is a docs-only removal, so
no typecheck/test/build impact.

## Risks

Low risk. Docs-only change, single file, pure deletion of inapplicable
content. No behavior, schema, or API impact.

## Model Used

Claude Sonnet 5 (claude-sonnet-5), via Claude Code CLI. Standard
reasoning, no extended thinking mode. Used for repo exploration (fork,
clone, issue/PR search, verifying the section was still present and
unresolved on current `master`) and to author this fix and PR
description. All commits authored by the human contributor (Santhi
Prakash); no AI co-authorship attribution on commits.

## Checklist

- [x] I have included a thinking path that traces from project context
to this change
- [x] I have specified the model used (with version and capability
details)
- [x] I have checked ROADMAP.md and confirmed this PR does not duplicate
planned core work
- [x] I have searched GitHub for duplicate or related PRs and linked
them above
- [x] I have either (a) linked existing issues with `Fixes: #` / `Closes
#` / `Refs #` OR (b) described the issue in-PR following the relevant
issue template
- [x] I have not referenced internal/instance-local Paperclip issues or
links (only public GitHub `#NNN` / `github.com/paperclipai/paperclip`
URLs)
- [x] My branch name describes the change
(`docs/remove-leaked-fork-section-agents-md`) and contains no internal
Paperclip ticket id or instance-derived details
- [ ] I have run tests locally and they pass — N/A, docs-only change
(see Verification)
- [ ] I have added or updated tests where applicable — N/A, docs-only
- [x] I have updated relevant documentation to reflect my changes
- [x] I have considered and documented any risks above
- [ ] All Paperclip CI gates are green — confirm after opening the PR
- [ ] Greptile is 5/5 with no open P2s, recommendations, or follow-ups —
confirm after opening the PR
- [x] I will address all Greptile and reviewer comments before
requesting merge
2026-08-04 22:40:27 -05:00

7.4 KiB

AGENTS.md

Guidance for human and AI contributors working in this repository.

1. Purpose

Paperclip is a control plane for AI-agent companies. The current implementation target is V1 and is defined in doc/SPEC-implementation.md.

2. Read This First

Before making changes, read in this order:

  1. doc/GOAL.md
  2. doc/PRODUCT.md
  3. doc/SPEC-implementation.md
  4. doc/DEVELOPING.md
  5. doc/DATABASE.md

doc/SPEC.md is long-horizon product context. doc/SPEC-implementation.md is the concrete V1 build contract.

3. Repo Map

  • server/: Express REST API and orchestration services
  • ui/: React + Vite board UI
  • packages/db/: Drizzle schema, migrations, DB clients
  • packages/shared/: shared types, constants, validators, API path constants
  • packages/adapters/: agent adapter implementations (Claude, Codex, Cursor, etc.)
  • packages/adapter-utils/: shared adapter utilities
  • packages/plugins/: plugin system packages
  • packages/skills-catalog/: app-shipped skills catalog (@paperclipai/skills-catalog)
  • packages/teams-catalog/: app-shipped teams catalog (@paperclipai/teams-catalog)
  • cli/: paperclipai CLI package (published bin, agent-facing commands)
  • skills/: Paperclip runtime/operational skills (not part of the app catalog)
  • doc/: operational and product docs

4. Dev Setup (Auto DB)

Use embedded PGlite in dev by leaving DATABASE_URL unset.

pnpm install
pnpm dev

This starts:

  • API: http://localhost:3100
  • UI: http://localhost:3100 (served by API server in dev middleware mode)

Quick checks:

curl http://localhost:3100/api/health
curl http://localhost:3100/api/companies

Reset local dev DB:

rm -rf data/pglite
pnpm dev

5. Core Engineering Rules

  1. Keep changes company-scoped. Every domain entity should be scoped to a company and company boundaries must be enforced in routes/services.

  2. Keep contracts synchronized. If you change schema/API behavior, update all impacted layers:

  • packages/db schema and exports
  • packages/shared types/constants/validators
  • server routes/services
  • ui API clients and pages
  1. Preserve control-plane invariants.
  • Single-assignee task model
  • Atomic issue checkout semantics
  • Approval gates for governed actions
  • Budget hard-stop auto-pause behavior
  • Activity logging for mutating actions
  1. Do not replace strategic docs wholesale unless asked. Prefer additive updates. Keep doc/SPEC.md and doc/SPEC-implementation.md aligned.

  2. Keep repo plan docs dated and centralized. When you are creating a plan file in the repository itself, new plan documents belong in doc/plans/ and should use YYYY-MM-DD-slug.md filenames. This does not replace Paperclip issue planning: if a Paperclip issue asks for a plan, update the issue plan document per the paperclip skill instead of creating a repo markdown file.

  3. Attach inspectable generated artifacts. When your task produces a user-inspectable deliverable file, follow the Paperclip skill's "Generated Artifacts and Work Products" workflow before final disposition. In this repo, prefer the self-contained skill helper at skills/paperclip/scripts/paperclip-upload-artifact.sh so the file is available through the Paperclip API, create/update an artifact work product when the file is the deliverable, link the uploaded artifact in the final issue comment, and then set status. Do not rely on local filesystem paths as the only access path. If an important file intentionally remains workspace-only, create/update a work product with metadata.resourceRef.kind: "workspace_file" and a workspace-relative path, then name that work product and path in the final comment. Treat browse/search as a fallback for recovering workspace files, not the preferred deliverable path. See doc/AGENT-ARTIFACTS.md for details and .mp4/.webm examples.

6. Database Change Workflow

When changing data model:

  1. Edit packages/db/src/schema/*.ts
  2. Ensure new tables are exported from packages/db/src/schema/index.ts
  3. Generate migration:
pnpm db:generate
  1. Validate compile:
pnpm -r typecheck

Notes:

  • packages/db/drizzle.config.ts reads compiled schema from dist/schema/*.js
  • pnpm db:generate compiles packages/db first

7. Verification Before Hand-off

Default local/agent test path:

pnpm test

This is the cheap default and only runs the Vitest suite. Browser suites stay opt-in:

pnpm test:e2e
pnpm test:release-smoke

Run the browser suites only when your change touches them or when you are explicitly verifying CI/release flows.

For normal issue work, run the smallest relevant verification first. Do not default to repo-wide typecheck/build/test on every heartbeat when a narrower check is enough to prove the change.

Run this full check before claiming repo work done in a PR-ready hand-off, or when the change scope is broad enough that targeted checks are not sufficient:

pnpm -r typecheck
pnpm test:run
pnpm build

If anything cannot be run, explicitly report what was not run and why.

8. API and Auth Expectations

  • Base path: /api
  • Board access is treated as full-control operator context
  • Agent access uses bearer API keys (agent_api_keys), hashed at rest
  • Agent keys must not access other companies

When adding endpoints:

  • apply company access checks
  • enforce actor permissions (board vs agent)
  • write activity log entries for mutations
  • return consistent HTTP errors (400/401/403/404/409/422/500)

9. UI Expectations

  • Keep routes and nav aligned with available API surface
  • Use company selection context for company-scoped pages
  • Surface failures clearly; do not silently ignore API errors

10. Pull Request Requirements

When creating a pull request (via gh pr create or any other method), you must read and fill in every section of .github/PULL_REQUEST_TEMPLATE.md. Do not craft ad-hoc PR bodies — use the template as the structure for your PR description. Required sections:

  • Thinking Path — trace reasoning from project context to this change (see CONTRIBUTING.md for examples)
  • What Changed — bullet list of concrete changes
  • Verification — how a reviewer can confirm it works
  • Risks — what could go wrong
  • Model Used — the AI model that produced or assisted with the change (provider, exact model ID, context window, capabilities). Write "None — human-authored" if no AI was used.
  • Checklist — all items checked

11. Definition of Done

A change is done when all are true:

  1. Behavior matches doc/SPEC-implementation.md
  2. Typecheck, tests, and build pass
  3. Contracts are synced across db/shared/server/ui
  4. Docs updated when behavior or commands change
  5. PR description follows the PR template with all sections filled in (including Model Used)

Design system

DESIGN.md at the repo root is the source of truth for UI design decisions. The token-only rule applies to all ui/ changes: every color, spacing, radius, type, shadow, and motion value in ui/src/components/** and ui/src/pages/** comes from the token layer in ui/src/index.css — no hex, raw px, arbitrary Tailwind bracket values, or raw font-size/fontSize declarations in components, outside the documented allowlist in ui/src/index.css. Run pnpm check:token-gates (scripts/check-token-gates.mjs) before committing UI changes — it fails on any violation not covered by that allowlist.