agentleFS
bestagentkitsbestagentkits/cloud-harness-mcp/AGENTS.md

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.

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
  1. Very specific:

    Start with README.md. Read the relevant document under docs/ before changing its boundary.

    line 10
  2. Common:

    Keep the credential-free ingress proxy as the only host-published Compose service, bound to loopback.

    line 32
  3. Common:

    Keep Docker authority, job/state mounts, and optional GitHub App credentials confined to the runner.

    line 35
  4. Very specific:

    Treat the schemas and result envelope in packages/contracts/src/ and the lifecycle, idempotency, restart, and truncation semantics in …

    line 54
  5. Very specific:

    Never commit .env files, tokens, keys, databases, runtime state, private repository URLs, or user data.

    line 61
  6. Distinctive:

    Treat bootstrap, deployment, rollback, production verification, and manual container or state recovery as live operations.

    line 64
  7. Distinctive:

    Keep changes narrow and preserve public contracts unless the accepted scope intentionally changes them.

    line 86
  8. Distinctive:

    Run the narrowest relevant test first, then the applicable repository gate:

    line 88
  9. Distinctive:

    Do not weaken security checks, cleanup assertions, timeouts, or tests to make a gate pass.

    line 101
  10. Distinctive:

    If you start watch processes or Compose services, check for an existing project process first, track what you start, and stop it when the …

    line 103
  11. Very specific:

    Use npm ci for a clean dependency install.

    line 106
  12. Very specific:

    Update .agents/skills/cloudharness/SKILL.md and the affected reference documents under .agents/skills/cloudharness/references/ to keep …

    line 122
  13. Very specific:

    Run npm run plugin:sync to ensure .agents/skills/cloudharness/ and plugins/cloud-harness/skills/cloudharness/ remain byte-identical.

    line 125
  14. Very specific:

    Verify skill contract compliance by running npm test packages/contracts/test/cloudharness-skill-contract.test.ts (or npm run verify).

    line 127
  15. Distinctive:

    Keep plans and reports out of evergreen guidance, and do not add release notes or governance files unless the repository contract requires …

    line 131

≈ “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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
AGENTS.md

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

ConcernRead firstExecutable authority and evidence
Trust model and isolationdocs/security-model.mdapps/api/src/request-security.ts, apps/runner/src/workspace-service.ts, test/integration/docker-sandbox.docker.test.ts
Public MCP contractdocs/mcp-api.mdpackages/contracts/src/, apps/api/src/mcp-server.ts, packages/contracts/test/, test/integration/
API/runner boundarydocs/system-architecture.mdapps/api/src/, apps/runner/src/, compose*.yaml, scripts/verify-compose-boundaries.mjs
Repository and executor behaviordocs/security-model.mdapps/runner/src/repository-policy.ts, worker/, runner and Docker tests
Configurationdocs/configuration.md.env.example, packages/contracts/src/config.ts, apps/api/src/config.ts, apps/runner/src/config.ts, compose*.yaml
Development and verificationdocs/development.mdpackage.json, .github/workflows/ci.yml, tests
Deployment and recoverydocs/deployment.md, docs/operations.md, docs/troubleshooting.mddeploy/, compose.production.yaml, scripts/verify-production.mjs, scripts/deploy-canary.mjs
Operator dashboard UIdocs/design-guidelines.mdapps/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 & guidesdocs-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_TOKEN or GITHUB_TOKEN), which is an explicit owner opt-in for authenticating the workspace gh CLI and is recorded in docs/security-model.md.
  • Preserve the executor restrictions and resource bounds owned by apps/runner/src/workspace-service.ts. dependency-access is the owner-approved shipped network default and network-none remains the isolation opt-out, per workspace or instance-wide; the executable owners and docs/security-model.md own the resolution order, the per-start attestation requirement, and the fail-closed DEPENDENCY_EGRESS_UNAVAILABLE behaviour. No raw bridge profile 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 in docs/mcp-api.md as 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 .env files, 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 production failure at deploy-canary.mjs with UND_ERR_CONNECT_TIMEOUT/ECONNREFUSED right after compose up is 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-free server/discover call on transport errors. Never read or print the canary credentials file while diagnosing.
  • The curl ... port 3100 lines before the canary are the expected readiness wait loop, not the failure.

Change workflow

  1. Inspect the relevant document, executable owner, nearby tests, and current working tree. Preserve unrelated edits.
  2. 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.
  3. 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 in test/deploy-release-runtime.test.ts and test/upgrade-nginx-routes.test.ts require a POSIX host and are verified in Linux CI.
    • Compose or network-boundary changes: npm run verify:compose and npm 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 run npm run test:docker and npm run test:e2e when Docker and network access are available.
  4. Do not weaken security checks, cleanup assertions, timeouts, or tests to make a gate pass. Report an unavailable prerequisite or pre-existing failure.
  5. 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.md and the affected reference documents under .agents/skills/cloudharness/references/ to keep agent tool usage guidance accurate and effective.
  • Run npm run plugin:sync to ensure .agents/skills/cloudharness/ and plugins/cloud-harness/skills/cloudharness/ remain byte-identical.
  • Verify skill contract compliance by running npm test packages/contracts/test/cloudharness-skill-contract.test.ts (or npm 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.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.