pro
AGENTS.md1 starsChanged 17 days agoApache-2.0View on GitHub
devctl maintains this block from [its template][devctl-agents-block] and overwrites changes to it. Instructions for this repository go in the section below. Where they differ from this block, they take precedence. [devctl-agents-block]: https://github.com/giantswarm/devctl/blob/main/pkg/gen/input/llm/internal/file/agents_block.md.template - Never put customer names or other customer information in code, commit messages, issues or pull requests. Most Giant Swarm repositories are public, and private ones are kept ready to become public. - Giant Swarm's style guides are in <https://github.com/giantswarm/fmt>, one directory per topic (go, helm, kubernetes, prometheus,…
- Installs packages
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about code style.
Of the AGENTS.md files we read, the 33,398 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repository2 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- .cursor/rules/mcp-tools-usage.mdcCursor rule
The file
We split this AGENTS.md into the rules it gives an agent
9 rules. About 0 are common, 3 are distinctive, and 6 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
Distinctive · estimate
This author's own choices. Worth a look.
6
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 12
Never put customer names or other customer information in code, commit messages, issues or pull requests.
- Distinctive: line 18
Use conventional commits for commit messages and pull request titles.
- Very specific: line 19
If .github/workflows/zz_generated.auto_release.yaml exists, GitHub Releases are written from pull request titles: do not edit CHANGELOG.md.
- Very specific: line 23
If .pre-commit-config.yaml exists, run pre-commit run --files <changed files> before committing.
- Distinctive: line 26
Do not add linters, formatters or other tooling unless asked.
- Very specific: line 28
Put documentation in docs/ rather than growing README.md, which gives an overview and links into docs/.
- Very specific: line 31
If the skills of the giantswarm/claude-code plugin marketplace are not available to you and the user works at Giant Swarm, tell them once …
- Very specific: line 69
No linters or formatters are configured.
- Very specific: line 119
Generic field filtering: No hardcoded field names. LLMs read the board's schema resource to discover fields, then pass field name/value …
≈ “Common” is an estimate: at least 1 in 5 of the 43,423 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
<!-- BEGIN devctl-managed: edits in this block are overwritten --><!-- markdownlint-disable-file MD041 -->Giant Swarm conventions
devctl maintains this block from its template and overwrites changes to it. Instructions for this repository go in the section below. Where they differ from this block, they take precedence.
- Never put customer names or other customer information in code, commit messages, issues or pull requests. Most Giant Swarm repositories are public, and private ones are kept ready to become public.
- Giant Swarm's style guides are in https://github.com/giantswarm/fmt, one directory per topic (go, helm, kubernetes, prometheus, …). Read the relevant guide before you write or review that kind of code.
- Use conventional commits for commit messages and pull request titles.
- If
.github/workflows/zz_generated.auto_release.yamlexists, GitHub Releases are written from pull request titles: do not edit CHANGELOG.md. Otherwise, add your change to CHANGELOG.md as described in https://github.com/giantswarm/fmt/blob/main/releases/changelog.md. - If
.pre-commit-config.yamlexists, runpre-commit run --files <changed files>before committing; not every clone has the hooks installed. - Do not add linters, formatters or other tooling unless asked; use what the repository already has.
- Put documentation in
docs/rather than growing README.md, which gives an overview and links intodocs/. When a change affects documented behaviour, update the documentation in the same pull request. - If the skills of the
giantswarm/claude-codeplugin marketplace are not available to you and the user works at Giant Swarm, tell them once that they can install thegs-base,gs-devandgs-appdevplugins from it.
<!-- END devctl-managed -->CLAUDE.md
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
What This Is
PRO (Portfolio Roadmap Organizer) is an MCP server that exposes Giant Swarm's GitHub Projects V2 boards to AI assistants. It manages two built-in boards:
- Roadmap Board (#273) — company quarterly goals, team/SIG/WG issues
- Customer Board (#345) — customer activities from private repos
An installation can add boards with PRO_EXTRA_BOARDS (docs/extra-boards.md).
Commands
# Install dependencies
npm install
# Run tests (Node.js built-in test runner)
npm test
# Run MCP server locally (stdio transport)
node bin/index.js
# Run with HTTP transport (port 8080)
node bin/index.js --transport=streamable-http
# Helm lint
helm lint helm/proNo linters or formatters are configured. Tests use the Node.js built-in test runner (node --test).
Architecture
Pure JavaScript (ES modules), no TypeScript. Node 20+.
Entry Point & Transport
bin/index.js parses --transport flag and starts either stdio (default, for local AI clients) or streamable HTTP (for K8s/Docker). HTTP transport (src/lib/mcp/http.js) serves /mcp, /healthz, /readyz on port 8080. When OAuth is configured, also serves /authorize, /token, /register, /github/callback, and /.well-known/*.
MCP Layer (src/lib/mcp/)
server.js— Creates MCP server, registers handlers forlist_tools,call_tool,list_resources,read_resource.call_toolvalidates every call's arguments against the tool's declaredinputSchema(validate.js) before the handler runsicon.js— The server's icon (serverInfo.icons):giantswarm.svg, a byte-identical copy of giantswarm/mcp-toolkitbrand/giantswarm.svg, as a base64 SVG data URIvalidate.js—validateToolArguments: refuses missing required, unknown top-level and mistyped arguments, naming each and listing the accepted arguments (a free-form map is always a declared object property such as list_issues'filters, never the top level); exact string spellings of numbers and booleans are converted, null optionals droppedtools.js— 11 tool definitions and handlers (list_issues, get_issue_details, update_issue_field, create_issue_in_project, add_existing_issue, archive_item, close_issue, reopen_issue, update_issue_labels, list_issue_comments, get_server_version), plus 6 more re-exported from sub-issues.js, 2 from timeline.js, 2 from board.js and 3 from relations.js (24 total)sub-issues.js— Sub-issue tools (list, add, remove, get_parent)board.js—get_board_schemaandget_item_by_issue(the board item of an issue of any repository, resolved withresource(url:): first among the issue's ownprojectItems, which show a new item at once but list only projects of the issue's owner, then by node id among the board items its repository and number narrow to, a search that lags a new item by minutes; never a board scan);findBoardItemByIssueis that lookup, shared withupdate_issue_field'sissueUrl)relations.js— Issue relation tools besides parent/child:list_issue_relations,add_issue_relation,remove_issue_relationfor "blocked by" / "blocking" dependencies and "relates to" links between issues of any repository (GraphQL only, by issue node ID; "blocking" is "blocked by" with the issues swapped).get_issue_detailsalso returns the three lists, andlist_issuesan item's open dependency counts (openBlockedBy/openBlocking);get_issue_detailsreads the relations in a request of its own (getItemRelations), because the lists are non-null in GitHub's schema and an error on one nulls the whole issue: a failure there isrelationsError(Issues only), never a failed call.list_issuesreads the open dependency counts the same way, by issue node ID (getDependencyCounts,DEPENDENCY_COUNTS_QUERY): after the list for a bounded read, page by page while the read goes on for a full one, sinceissueDependenciesSummaryis non-null too; a failure there isdependencyCountsError.withPartialData(api.js) is the one place that accepts GraphQL errors next to partial datatimeline.js—get_issue_timelinetool: compact activity timeline (labels, assignments, milestones, renames, cross-references, close reasons) for an issue, resolved from a board item;list_status_changestool: the board Status changes (from, to, board) of one repository's issues, read with GraphQLtimelineItemsbecause the REST timeline'sproject_v2_item_status_changedevents carry no Status valuesresources.js— Per-board schema and overview resources (e.g.roadmap://schema)
Auth Layer (src/lib/auth/)
provider.js— GitHub OAuth provider implementing MCP SDK'sOAuthServerProviderinterface. Handles dynamic client registration, URL client_ids (Client ID Metadata Documents, SEP-991: any HTTPS CIMD URL is fetched, validated and cached; the URL policy inisCimdUrlblocks SSRF targets), GitHub OAuth redirect flow, local PKCE validation, and token verification via GitHub API. All of this state is in memory: a restart drops dynamically registered client_ids, in-flight authorization sessions and unexchanged codes (those logins must be started over); CIMD clients such as muster and Claude Code are unaffected because their client_id is re-resolved from the URL.http.jsbuilds the RFC 8414 metadata itself (createOAuthMetadata+client_id_metadata_document_supported: true) and mounts it before the SDK'smcpAuthRouter, because the SDK offers no option for the flag. Clients only take the CIMD path when it is advertised.
GitHub App layer (src/lib/github-app/)
App mode (docs/app-mode.md): pro reads as the installation's workspace GitHub App for unattended runs. docs/github-lane.md is the contract with devctl serve in the same pod.
app-mode.js—AppMode(the App and one lane per installation;appModeConfigFromEnvrefuses a person's token next to it) andLaneCredential, what a tool call threads as itstokenin App mode:api.jsandrest-api.jsturn it into afetchfor Octokit, so every existing tool goes through the lane of the account it touches (GraphQL: the home account's)lane.js—Lane: one request in flight, priority classes (merge>write>continuing>starting>metrics), REST and GraphQL paced apart below a share of GitHub's secondary limits, the conditional cache (cache.js), refusals (LaneRefusal: saturated, paused after GitHub's rate limit, primary reserve, writes off, credential paths) andnextPollMsfrom the points one round of active observations costs.clock.jslets tests run it on a fake clockapp.js— the App's JWT, installations by account, tokens minted per installation (read-only with writes off)reads.js—list_issues(REST Projects API, the board filter asq) andget_issue_details(byissueUrl) in App mode, structured for runs;claims.jsreads claim markers (<!-- pro-claim {...} -->, App-written only, lowest comment ID wins)lane-server.js— the loopback lane endpoint devctl sends its GitHub requests to;callers.js— the OIDC check over HTTP: the calling organization comes only from a verified token for pro's audience (Dex:audpro's clientpro,azpone of the organization's principal clients, mapped to it by configuration, andsubthat client's own), and must matchPRO_APP_ORGANIZATION- Tests run against
fake-github.test.js, a fake GitHub with conditional answers; no test uses a person's token or writes to GitHub
Domain Layer (src/lib/)
project.js— Board registry (board name → project ID, number, name and owner; the built-in boards plus the onesparseExtraBoardsreads fromPRO_EXTRA_BOARDSwhen the module loads), all GraphQL queries and mutationsitems.js— Issue listing with server-side filtering (fieldTermturns afilters/excludeentry of any field type into a Projects query term; a full read walks item ids and reads them by id in parallel,readItemsInParallel), issue detail fetching, field updates, andresolveItemIssues— the single batched item→issue resolution helper (issue node ID, owner/repo/number, repo visibility) used by every tool that only needs the issue ref (close/reopen, labels, timeline, comments); andresolveBoardItem, which resolves one item by its project item ID and checks its board before a board write (update_issue_field, archive_item), naming a missing or misplaced itemfields.js— Field discovery and fuzzy matching (case-insensitive, emoji/special char normalization)api.js— Authenticated GraphQL client with cursor-based pagination:fetchBoundedreads only as many pages as a limit needs (each page sized to what is still missing) and hands back the cursor to continue;fetchPaginatedreads them allrest-api.js— Octokit REST client for sub-issues and timeline endpoints (not available via GraphQL)relations.js— Issue relations (listIssueRelations,addIssueRelation,removeIssueRelation),getItemRelationsandgetDependencyCountsforgetItemByIDandlistItems, andcompactRelation(truncatedfrompageInfo.hasNextPage;hiddencounts null nodes plus, on a last page, whattotalCountholds beyond the nodes)comments.js— Bulk comment fetching: resolves board items to issues viaresolveItemIssues, then REST comment fetching withsince/cap boundslogger.js— Structured logging to stderr (avoids polluting MCP stdio)
Key Design Decisions
- Generic field filtering: No hardcoded field names. LLMs read the board's schema resource to discover fields, then pass field name/value pairs under list_issues'
filtersmap, the only place for them (excludenegates them). - GraphQL variable names:
@octokit/graphqlrefuses variables named like its request options (url,query,method,headers,request,baseUrl,mediaType,operationName). The unit tests mock the client, sosrc/lib/graphql-variables.test.jsreads the sources instead: every operation's declared$variablesand the object literal passed to everygraphQLWithAuth,fetchBoundedandfetchPaginatedcall. Pass variables as an object literal so it can read them. - Board registry pattern:
resolveBoardId()maps board names ("roadmap", "customer", and the keys ofPRO_EXTRA_BOARDS) to GitHub project node IDs. Tool schemas take theirboardenum fromBOARD_NAMES, never a literal list. A short repository name resolves to the board'sowner(resolveBoardOwner()),giantswarmon the built-in boards. - Dual transport: stdio for local clients, HTTP for remote deployment — same server code.
- Four auth modes:
GITHUB_API_TOKENenv var for stdio/local use; OAuth 2.1 via GitHub for HTTP transport (whenGITHUB_OAUTH_CLIENT_IDis set); bearer-only for HTTP transport (OAUTH_BEARER_ONLY=true: GitHub tokens obtained elsewhere are verified and used per request, no authorization server); App mode (PRO_APP_ID: the workspace GitHub App throughsrc/lib/github-app/, the calling organization only from a verified token for pro's audience, never a person's token). Per-request tokens are threaded through the entire call chain.createGitHubTokenVerifier(provider.js) is the shared verifier: scoped tokens must coverrepo,project,read:org; GitHub App / fine-grained tokens carry no scopes header and are accepted, GitHub enforcing their permissions per call. WithGITHUB_APP_SLUGthe verifier accepts only user access tokens of that GitHub App (pro's owngiantswarm-pro, pinned in muster), so no write goes through another App's token. - Public repo safety: Creating issues in
giantswarm/roadmap(public) requires explicitconfirmPublicSafe=true. Posting a comment viaclose_issue/reopen_issueon an issue in any public repository requires the sameconfirmPublicSafe=trueguard; the close/reopen state change itself is ungated.
Environment Variables
GITHUB_API_TOKEN(required for stdio, optional fallback for HTTP) — PAT withproject:writeandrepo:writescopesHTTP_PORT(optional, default 8080) — for HTTP transportPRO_EXTRA_BOARDS(optional) — JSON object of board key →{ id, number, owner, name }: boards served next to the built-in ones. Read once at start; an invalid value fails the start. Seedocs/extra-boards.md.PRO_APP_ID,PRO_APP_PRIVATE_KEY_FILE,PRO_APP_OWNER,PRO_APP_ORGANIZATION(App mode),PRO_APP_CALLER_ISSUER/_AUDIENCE/_CLIENTS(App mode over HTTP),GITHUB_API_URL,PRO_REST_POINTS_PER_MINUTE,PRO_GRAPHQL_POINTS_PER_MINUTE,PRO_CACHE_MB,PRO_LANE_ADDRESS,PRO_WRITES— seedocs/app-mode.md.GITHUB_OAUTH_CLIENT_ID(optional) — GitHub OAuth App client ID. Enables OAuth 2.1 on HTTP transport.GITHUB_OAUTH_CLIENT_SECRET(required when OAuth enabled) — GitHub OAuth App client secretOAUTH_BEARER_ONLY(optional) —trueruns the HTTP transport as a plain resource server: every/mcprequest must carry a GitHub token as bearer (verified via the GitHub API, then used for that request's GitHub calls); no/authorize,/tokenor/registerare served, and RFC 9728 protected resource metadata at/.well-known/oauth-protected-resource[/mcp]nameshttps://github.com/login/oauthas the authorization server. For clients that hold the person's GitHub grant themselves (muster's GitHub connector). Ignored when a GitHub OAuth App is configured.GITHUB_APP_SLUG(optional, bearer-only mode) — Accept only user access tokens of this GitHub App (ghu_tokens whoseGET /user/installationslists only that App); anything else is answered 401.OAUTH_ISSUER_URL(optional) — Public URL of this server for OAuth metadata (defaults tohttp://localhost:{port})OAUTH_TRUSTED_CLIENT_IDS(optional) — Comma-separated CIMD URLs that bypass the outbound URL policy (e.g. a muster on a cluster-internal hostname) and may omitclient_idin their document. Public HTTPS CIMD URLs are accepted without an entry here.
CI/CD
- GitHub Actions: CI validates app loads + helm lint on PRs; auto-release creates semver tags on merge to main
- CircleCI: Builds Docker image → pushes to
gsoci.azurecr.io, publishes Helm chart togiantswarm-catalog(on version tags only)
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

