cloud-harness-mcp
AGENTS.md71 starsChanged 4 months agoMITView on GitHub
Cloud Harness MCP is intentionally a private, single-owner remote coding harness. Preserve that threat model: it permits arbitrary repository-controlled execution inside a constrained executor, but it is not a hostile multi-tenant sandbox. Start with README.md. Read the relevant document under docs/ before changing its boundary. Code, schemas, tests, manifests, and scripts own WHAT and HOW; documentation owns WHY and WHERE. Point docs to executable owners instead of copying behavior, defaults, command inventories, or configuration. - Keep the credential-free ingress proxy…
- Reads credentials
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about checking a change actually works.
Of the AGENTS.md files we read, the 11,773 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 repository3 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- site/llms.txtllms.txt
- cloudharnessSkill
The file
Show its rules and text
We split this AGENTS.md into the rules it gives an agent
15 rules. About 2 are common, 6 are distinctive, and 7 are very specific to this project.
≈2
Common · estimate
Many files like this have a rule of this kind.
≈6
Distinctive · estimate
This author's own choices. Worth a look.
7
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- could be automatic: a setting could enforce it
- Very specific: line 10
Start with README.md. Read the relevant document under docs/ before changing its boundary.
- Common: line 32
Keep the credential-free ingress proxy as the only host-published Compose service, bound to loopback.
- Common: line 35
Keep Docker authority, job/state mounts, and optional GitHub App credentials confined to the runner.
- Very specific: line 54
Treat the schemas and result envelope in packages/contracts/src/ and the lifecycle, idempotency, restart, and truncation semantics in …
- Very specific: line 61
Never commit .env files, tokens, keys, databases, runtime state, private repository URLs, or user data.
- Distinctive: line 64
Treat bootstrap, deployment, rollback, production verification, and manual container or state recovery as live operations.
- Distinctive: line 86
Keep changes narrow and preserve public contracts unless the accepted scope intentionally changes them.
- Distinctive: line 88
Run the narrowest relevant test first, then the applicable repository gate:
- Distinctive: line 101
Do not weaken security checks, cleanup assertions, timeouts, or tests to make a gate pass.
- Distinctive: line 103
If you start watch processes or Compose services, check for an existing project process first, track what you start, and stop it when the …
- Very specific: line 106
Use npm ci for a clean dependency install.
- Very specific: line 122
Update .agents/skills/cloudharness/SKILL.md and the affected reference documents under .agents/skills/cloudharness/references/ to keep …
- Very specific: line 125
Run npm run plugin:sync to ensure .agents/skills/cloudharness/ and plugins/cloud-harness/skills/cloudharness/ remain byte-identical.
- Very specific: line 127
Verify skill contract compliance by running npm test packages/contracts/test/cloudharness-skill-contract.test.ts (or npm run verify).
- Distinctive: line 131
Keep plans and reports out of evergreen guidance, and do not add release notes or governance files unless the repository contract requires …
≈ “Common” is an estimate: at least 1 in 5 of the 16,595 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
Cloud Harness MCP collaborator guide
Purpose and authority
Cloud Harness MCP is intentionally a private, single-owner remote coding harness. Preserve that threat model: it permits arbitrary repository-controlled execution inside a constrained executor, but it is not a hostile multi-tenant sandbox.
Start with README.md. Read the relevant document under docs/
before changing its boundary. Code, schemas, tests, manifests, and scripts own
WHAT and HOW; documentation owns WHY and WHERE. Point docs to executable owners
instead of copying behavior, defaults, command inventories, or configuration.
Navigation
| Concern | Read first | Executable authority and evidence |
| Trust model and isolation | docs/security-model.md | apps/api/src/request-security.ts, apps/runner/src/workspace-service.ts, test/integration/docker-sandbox.docker.test.ts |
| Public MCP contract | docs/mcp-api.md | packages/contracts/src/, apps/api/src/mcp-server.ts, packages/contracts/test/, test/integration/ |
| API/runner boundary | docs/system-architecture.md | apps/api/src/, apps/runner/src/, compose*.yaml, scripts/verify-compose-boundaries.mjs |
| Repository and executor behavior | docs/security-model.md | apps/runner/src/repository-policy.ts, worker/, runner and Docker tests |
| Configuration | docs/configuration.md | .env.example, packages/contracts/src/config.ts, apps/api/src/config.ts, apps/runner/src/config.ts, compose*.yaml |
| Development and verification | docs/development.md | package.json, .github/workflows/ci.yml, tests |
| Deployment and recovery | docs/deployment.md, docs/operations.md, docs/troubleshooting.md | deploy/, compose.production.yaml, scripts/verify-production.mjs, scripts/deploy-canary.mjs |
| Operator dashboard UI | docs/design-guidelines.md | apps/api/dashboard/, apps/api/src/dashboard-router.ts, apps/api/src/dashboard-assets.ts, apps/api/test/dashboard-ui-contract.test.ts |
| Official user docs & guides | docs-site/ | docs-site/, scripts/build-docs-reference.mjs, npm run docs:build |
| Agent skill & MCP tool guidance | .agents/skills/cloudharness/SKILL.md | .agents/skills/cloudharness/, plugins/cloud-harness/, packages/contracts/test/cloudharness-skill-contract.test.ts, npm run plugin:sync |
Safety-critical invariants
- Keep the credential-free ingress proxy as the only host-published Compose service, bound to loopback. The API and runner must not publish host ports; the ingress must not receive secrets or join the control network.
- Keep Docker authority, job/state mounts, and optional GitHub App credentials
confined to the runner. The API must not receive host mounts or the Docker
socket. Executors must not receive control-plane credentials, and the harness
must not push repository credentials into them. The single documented
exception is an operator-created GitHub runtime secret (
GH_TOKENorGITHUB_TOKEN), which is an explicit owner opt-in for authenticating the workspaceghCLI and is recorded indocs/security-model.md. - Preserve the executor restrictions and resource bounds owned by
apps/runner/src/workspace-service.ts.dependency-accessis the owner-approved shipped network default andnetwork-noneremains the isolation opt-out, per workspace or instance-wide; the executable owners anddocs/security-model.mdown the resolution order, the per-start attestation requirement, and the fail-closedDEPENDENCY_EGRESS_UNAVAILABLEbehaviour. No rawbridgeprofile is selectable, and egress is never a silent downgrade. - Preserve credential-free HTTPS repository URLs, host/address validation, and constrained cloning. Private-clone credentials stay in the trusted broker and must never persist in the checkout, remote URL, logs, fixtures, or command output; the executor-environment exception is the operator-injected GitHub runtime secret named above.
- Treat the schemas and result envelope in
packages/contracts/src/and the lifecycle, idempotency, restart, and truncation semantics indocs/mcp-api.mdas public contracts. Change their source, tests, and user guidance together. - Scope cleanup by the verified workspace identity, canonical job path, state record, and managed-container labels. Never recursively remove a jobs root or run broad Docker cleanup on a shared host.
- Never commit
.envfiles, tokens, keys, databases, runtime state, private repository URLs, or user data. Do not claim live private-clone or production verification without owner-authorized, sanitized evidence. - Treat bootstrap, deployment, rollback, production verification, and manual container or state recovery as live operations. Follow the owning runbook, resolve exact targets first, and do not perform them from an ordinary code task without explicit authorization.
Deploy failure lessons
- A
Deploy productionfailure atdeploy-canary.mjswithUND_ERR_CONNECT_TIMEOUT/ECONNREFUSEDright aftercompose upis usually a transient route gap in the freshly recreated container, not a release bug. Confirm from the host (docker exec cloud-harness-mcp-ingress-1 node -e ...TCP probe to the canary host) before changing code; the canary retries only its first side-effect-freeserver/discovercall on transport errors. Never read or print the canary credentials file while diagnosing. - The
curl ... port 3100lines before the canary are the expected readiness wait loop, not the failure.
Change workflow
- Inspect the relevant document, executable owner, nearby tests, and current working tree. Preserve unrelated edits.
- For defects, prove the failure and its boundary before changing behavior. Keep changes narrow and preserve public contracts unless the accepted scope intentionally changes them.
- Run the narrowest relevant test first, then the applicable repository gate:
- Normal code changes:
npm run verify. On Windows or non-POSIX hosts, use targeted suites (npm run test:unit,npm run test:integration,npm run lint,npm run typecheck) as your baseline; shell fixture tests intest/deploy-release-runtime.test.tsandtest/upgrade-nginx-routes.test.tsrequire a POSIX host and are verified in Linux CI. - Compose or network-boundary changes:
npm run verify:composeandnpm run verify. - Shell changes: run the syntax check owned by
.github/workflows/ci.yml. - Docker/executor changes: build with
docker compose --profile images build executor-image api runner, then runnpm run test:dockerandnpm run test:e2ewhen Docker and network access are available.
- Normal code changes:
- Do not weaken security checks, cleanup assertions, timeouts, or tests to make a gate pass. Report an unavailable prerequisite or pre-existing failure.
- If you start watch processes or Compose services, check for an existing project process first, track what you start, and stop it when the task ends.
Use npm ci for a clean dependency install. The root package.json remains the
command authority; do not duplicate its full script list here. Do not run
npm run verify:production casually: it targets a live MCP endpoint, requires
owner credentials, and creates a disposable workspace.
Whenever shipping changes with user or operational impact (new features,
workflows, configuration keys, public contracts, troubleshooting steps, or use
cases), evaluate and update both internal docs (docs/) and the official docs
site (docs-site/). Keep user and operator guides in sync (such as
docs-site/ai-tools/, docs-site/dashboard/, docs-site/reference/, and
docs-site/troubleshooting.md), and run npm run docs:reference or
npm run plugin:sync if tool or contract surfaces changed.
Whenever MCP tool surfaces, schemas, capabilities, options, execution behaviors, or workspace lifecycle features change or are added:
- Update
.agents/skills/cloudharness/SKILL.mdand the affected reference documents under.agents/skills/cloudharness/references/to keep agent tool usage guidance accurate and effective. - Run
npm run plugin:syncto ensure.agents/skills/cloudharness/andplugins/cloud-harness/skills/cloudharness/remain byte-identical. - Verify skill contract compliance by running
npm test packages/contracts/test/cloudharness-skill-contract.test.ts(ornpm run verify).
Keep plans and reports out of evergreen guidance, and do not add release notes or governance files unless the repository contract requires them.
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.

