agentleFS
cisco-opencisco-open/ai-harness-toolkit/skills/ai-harness-setup/SKILL.md

ai-harness-setup

Skill13 starsChanged 7 months agoApache-2.0View on GitHub

Build a step-by-step path from a plain repository to a full agent-driven engineering workflow. Inspects the repo first to detect the full tech stack, package managers, CI systems, and monorepo layout before making any changes. Then initializes APM, sets up spec-driven development (OpenSpec by default, or respects existing systems like SpecKit and BMAD), adds deterministic checks matched to the detected stack, installs applicable AI skills, creates workflow documentation, configures AI IDEs (Copilot, Cursor, Windsurf, Claude Code, OpenCode), and verifies the entire setup.

The file

Show its rules and text

We split this skill into the rules it gives an agent

94 rules. About 0 are common, 46 are distinctive, and 48 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈46

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 48

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Inspect first: Search the repo's manifests, lockfiles, CI configs, framework configs, and existing docs to classify the full stack before …

    line 15
  2. Distinctive:

    Read the matching stack guide based on detection results:

    line 16
  3. Distinctive:

    If the repo uses a major framework, also read the matching framework guide:

    line 20
  4. Distinctive:

    Ask whether the team wants GitHub Agentic Workflows enabled in this repository.

    line 24
  5. Very specific:

    Ask whether deterministic checks should be enforced or advisory before configuring any checks.

    line 25
  6. Very specific:

    If GitHub Agentic Workflows are enabled, read references/github-agentic-workflows.md before installing AI workflow tooling.

    line 26
  7. Very specific:

    Read references/ai-tooling.md before initializing APM or installing package-backed skills.

    line 27
  8. Very specific:

    Read references/mcp-servers.md before adding extra MCP servers to apm.yml.

    line 28
  9. Very specific:

    Read references/openspec.md for change management setup.

    line 29
  10. Very specific:

    Read references/deterministic-checks-core.md and the matching per-stack deterministic-scans.md together -- they form one phase.

    line 30
  11. Very specific:

    Read references/dependabot.md when adding Dependabot configuration.

    line 31
  12. Very specific:

    Read references/docs-bootstrap.md when creating the docs section that explains the workflow.

    line 32
  13. Very specific:

    Read references/opencode.md when OpenCode or ocx support is requested.

    line 33
  14. Distinctive:

    Verify is mandatory: After all setup steps finish, run the Verify step in Workflow Step 10 to audit the changeset against the harness …

    line 34
  15. Distinctive:

    Run this step before making any changes.

    line 42
  16. Distinctive:

    Search manifests, lockfiles, CI configs, framework configs, dependency declarations, and existing docs.

    line 44
  17. Distinctive:

    Do not stop at top-level markers.

    line 45
  18. Distinctive:

    Ask early whether the team wants GitHub Agentic Workflows enabled and whether deterministic checks should be enforced or advisory so the …

    line 46
  19. Distinctive:

    Test runners (vitest, jest, pytest, junit, playwright)

    line 52
  20. Distinctive:

    Monorepo detection: If the repo is a monorepo (workspace files, multiple packages, shared build tooling), note the workspace layout, which …

    line 63
  21. Very specific:

    Look for frameworks and tools such as React, Next.js, Vite, Electron, LangChain, LangGraph, CopilotKit, FastAPI, Hono, Axum, Tauri, …

    line 65
  22. Distinctive:

    When a framework is detected, load its framework-specific reference for use during the deterministic checks and skills phases.

    line 66
  23. Very specific:

    Before creating any directories or files, verify that the paths this workflow will generate are not ignored by .gitignore:

    line 70
  24. Very specific:

    If any of these paths are listed in .gitignore, warn the user and resolve the conflict before proceeding.

    line 76
  25. Distinctive:

    Treat APM as the dependency and delivery foundation for skills, prompts, and related agent packages.

    line 84
  26. Very specific:

    If apm.yml does not exist, initialize it before installing skills:

    line 86
  27. Very specific:

    run apm init --yes from the repo root

    line 88
  28. Very specific:

    If apm.yml already exists, inspect it before adding dependencies, then use apm install to sync the current dependency graph when needed.

    line 89
  29. Very specific:

    Verify apm_modules/ is in .gitignore (apm init should add it automatically.

    line 90
  30. Very specific:

    Use imperative apm install <package> commands for skill installation so the manifest and lockfile stay aligned with the actual installed …

    line 91
  31. Very specific:

    Use references/ai-tooling.md for initialization, install order, discovery strategy, and verification.

    line 92
  32. Distinctive:

    Ensure the repo has a spec-driven development system for managing non-trivial changes.

    line 96
  33. Very specific:

    Document the existing system in the docs tree (Step 7), CONTRIBUTING.md, and AGENTS.md.

    line 100
  34. Distinctive:

    If the system has no CLI or command surface, document the manual workflow contributors should follow.

    line 102
  35. Very specific:

    Use references/openspec.md for the install sequence, openspec init, command surfacing, and verification flow.

    line 106
  36. Distinctive:

    Add OpenSpec workflow commands to the AI IDE command surfaces (Step 8).

    line 108
  37. Distinctive:

    Before configuring any deterministic checks, ask: "Do you want deterministic checks enforced or advisory?" Apply that one answer uniformly …

    line 114
  38. Distinctive:

    Read the core baseline first, then the stack-specific guide, then act once.

    line 124
  39. Distinctive:

    Use the package manager, type checker, linter, and test runner detected in step 1.

    line 125
  40. Very specific:

    If the repo already has a tool fulfilling a check category (e.g., basedpyright for type checking), use it instead of recommending the …

    line 126
  41. Distinctive:

    Keep per-language commands and setup instructions in separate reference files instead of bloating the main workflow.

    line 127
  42. Very specific:

    Use workspace-aware commands when available (e.g., pnpm nx affected -t lint, uv run with workspace targeting).

    line 131
  43. Distinctive:

    Document selective testing strategy if the repo has one (e.g., change detection scripts).

    line 132
  44. Distinctive:

    Ensure the repo has a Dependabot configuration for automated dependency updates based on the ecosystems detected in Step 1.

    line 143
  45. Very specific:

    Use references/dependabot.md for the guard-rails, ecosystem mapping, defaults, and monorepo handling.

    line 145
  46. Very specific:

    If .github/dependabot.yml or .github/dependabot.yaml already exists, leave it untouched.

    line 146
  47. Very specific:

    If neither exists, create .github/dependabot.yml with entries for each detected ecosystem.

    line 147
  48. Distinctive:

    Ask whether GitHub Agentic Workflows should be enabled before changing AI tooling.

    line 151
  49. Very specific:

    If the answer is yes, use references/github-agentic-workflows.md as the source of truth for gh aw installation, workflow import, generated …

    line 152
  50. Very specific:

    If the answer is no, skip gh aw setup entirely.

    line 153
  51. Distinctive:

    Use a package-first install flow.

    line 155
  52. Distinctive:

    Use the detected IDE targets in every package install command and include protocol fallback:

    line 161
  53. Very specific:

    Every stack-* package already pulls core transitively.

    line 177
  54. Very specific:

    If no stack package matches (for example Go, Rust, plain Java, or another unpackaged backend), install core explicitly and then add only …

    line 178
  55. Very specific:

    Use references/ai-tooling.md for the install mechanics, what-to-commit rules, and dynamic fallback workflow.

    line 179
  56. Distinctive:

    Use the matching package as the default baseline when one exists, then add only the extra dynamic skills that cover real repo-specific gaps.

    line 182
  57. Very specific:

    Use npx skills find <query> only as a search mechanism when the needed skill is not already available through repo-local or public curated …

    line 184
  58. Distinctive:

    If no package matches (for example FastAPI, Django, plain Java, Go, Rust, LangGraph, or CopilotKit), keep that part of the stack dynamic.

    line 185
  59. Very specific:

    Add MCP servers to apm.yml based on the detected tech stack.

    line 189
  60. Very specific:

    Read references/mcp-servers.md for the package-backed defaults, discovery workflow, and APM dependency format.

    line 191
  61. Distinctive:

    Treat package-provided MCP servers as already handled by the corresponding package install:

    line 193
  62. Distinctive:

    Treat those package-provided MCP servers as the baseline, not the ceiling.

    line 195
  63. Very specific:

    Use apm mcp search <term> only for extra servers not covered by a package, such as Postgres, Playwright, Sentry, Kubernetes, or Terraform.

    line 196
  64. Very specific:

    All MCP servers are declared in the dependencies.mcp section of apm.yml and installed through apm install.

    line 197
  65. Distinctive:

    Synthesis checkpoint: Before writing docs, consolidate all findings from steps 1-6.

    line 202
  66. Very specific:

    Verify docs/ is not gitignored: Run git check-ignore docs/ before creating any files.

    line 204
  67. Distinctive:

    Research deeply before writing: Read source code, configs, CI pipelines, deployment configs, data models, API definitions, and integration …

    line 205
  68. Very specific:

    Use references/docs-bootstrap.md for the full seed structure, research checklist, and authoring order.

    line 206
  69. Distinctive:

    Create architecture docs first (system overview, services, data model, integrations) because they require the deepest research and inform …

    line 207
  70. Distinctive:

    Create dev environment docs with real commands (setup, run, env vars).

    line 208
  71. Distinctive:

    Create validation docs that reference the deterministic checks wired in step 4.

    line 209
  72. Distinctive:

    Create deployment docs if the repo ships to production.

    line 210
  73. Distinctive:

    Write the workflow overview last -- it synthesizes all other docs.

    line 211
  74. Very specific:

    Create AGENTS.md as a lean routing file that points agents to docs/.

    line 212
  75. Very specific:

    Update CONTRIBUTING.md to reference the docs tree.

    line 213
  76. Distinctive:

    Every doc must contain real content derived from the repo.

    line 214
  77. Distinctive:

    If the repo uses OpenCode, merge config instead of replacing it.

    line 218
  78. Very specific:

    Use references/opencode.md for the file-level config, plugin, command, and verification details.

    line 219
  79. Distinctive:

    Ensure the repo's OpenCode layer includes the required plugin packages and permission rules.

    line 221
  80. Very specific:

    Add MCP server entries only when they match the detected stack.

    line 222
  81. Distinctive:

    After all skills are installed and configuration is complete:

    line 226
  82. Very specific:

    Run apm install to ensure apm_modules/, the lockfile, and all deployed files are fully in sync with apm.yml.

    line 228
  83. Very specific:

    Verify apm_modules/ is in .gitignore.

    line 229
  84. Very specific:

    All deployed files in .github/ (skills, prompts, instructions, agents, hooks)

    line 233
  85. Very specific:

    All deployed files in .claude/ (if present)

    line 234
  86. Very specific:

    Use references/verify-harness.md for the full verification procedure.

    line 242
  87. Distinctive:

    Detect before prescribing: Always check what the repo already uses before recommending or installing tooling.

    line 253
  88. Very specific:

    Keep apm.yml and apm.lock.yaml aligned with the actual installed packages.

    line 254
  89. Distinctive:

    Never overwrite existing secrets or credential files.

    line 255
  90. Distinctive:

    Never remove user-defined plugin, skill, or MCP entries unless the user asked for cleanup.

    line 256
  91. Distinctive:

    Prefer idempotent edits so the setup can be re-run safely.

    line 257
  92. Distinctive:

    Prefer repo-local commands over globally assumed tooling.

    line 258
  93. Very specific:

    Document durable workflow rules in docs/, not only in the final chat response.

    line 259
  94. Distinctive:

    When installing skills from external sources, install only those applicable to the repo.

    line 260

≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill 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
SKILL.md

AI Harness Setup

Use this skill to bootstrap a repository toward a durable agent-driven workflow: deep inspection first, then APM as the dependency and skill delivery layer, spec-driven development for change management (OpenSpec by default, or the repo's existing system), deterministic checks matched to the detected stack, AI skills for review and delivery, a docs tree that explains the whole system, and AI IDE configuration for every IDE the team uses.

Quick Start

  1. Inspect first. Search the repo's manifests, lockfiles, CI configs, framework configs, and existing docs to classify the full stack before changing anything. Record: languages, package managers, type checkers, test runners, linters, CI system, monorepo layout, and existing tooling.
  2. Read the matching stack guide based on detection results:
    • references/stacks/javascript-typescript/stack.md
    • references/stacks/python/stack.md
    • references/stacks/java/stack.md
  3. If the repo uses a major framework, also read the matching framework guide:
    • references/stacks/javascript-typescript/framework-react.md
    • references/stacks/javascript-typescript/framework-angular.md
    • references/stacks/java/framework-spring-boot.md
  4. Ask whether the team wants GitHub Agentic Workflows enabled in this repository.
  5. Ask whether deterministic checks should be enforced or advisory before configuring any checks. Carry that answer through all downstream local scripts, CI wiring, and git hooks.
  6. If GitHub Agentic Workflows are enabled, read references/github-agentic-workflows.md before installing AI workflow tooling.
  7. Read references/ai-tooling.md before initializing APM or installing package-backed skills.
  8. Read references/mcp-servers.md before adding extra MCP servers to apm.yml.
  9. Read references/openspec.md for change management setup.
  10. Read references/deterministic-checks-core.md and the matching per-stack deterministic-scans.md together -- they form one phase.
  11. Read references/dependabot.md when adding Dependabot configuration.
  12. Read references/docs-bootstrap.md when creating the docs section that explains the workflow.
  13. Read references/opencode.md when OpenCode or ocx support is requested.
  14. Verify is mandatory. After all setup steps finish, run the Verify step in Workflow Step 10 to audit the changeset against the harness instructions, fix every gap found, and produce a verify report. Never skip this step.

For non-trivial setup work, use subagents to split independent exploration or authoring tasks across stack, tooling, validation, and documentation domains, then merge the results in one final coordinating pass.

Workflow

1. Inspect the Repo and Detect the Full Stack

Run this step before making any changes. The results drive every decision in later steps.

  • Search manifests, lockfiles, CI configs, framework configs, dependency declarations, and existing docs.
  • Do not stop at top-level markers. Search deeply for framework configs, nested package files, and CI pipeline definitions.
  • Ask early whether the team wants GitHub Agentic Workflows enabled and whether deterministic checks should be enforced or advisory so the setup path can either include or skip that layer intentionally and wire checks correctly.
  • Detect and record:
    • Languages and their versions
    • Package managers (npm, pnpm, bun, yarn, uv, poetry, pip, Maven, Gradle)
    • Type checkers already in use (TypeScript, mypy, basedpyright, pyright, pytype)
    • Linters already in use (ESLint, ruff, checkstyle, spotbugs)
    • Test runners (vitest, jest, pytest, junit, playwright)
    • Security scanners already present (bandit, Semgrep, npm audit, pip-audit, OWASP dependency-check)
    • CI system (Jenkins, GitHub Actions, GitLab CI) and its config files
    • Monorepo layout (uv workspaces, pnpm workspaces, Nx, Turborepo, Gradle multi-module, Maven multi-module)
    • Frameworks (React, Next.js, Angular, FastAPI, LangGraph, Spring Boot, etc.)
    • Existing docs, AGENTS.md, CONTRIBUTING.md
    • Existing skills, spec-driven development artifacts (OpenSpec openspec/, SpecKit specify/ or specs/, BMAD, or other structured planning systems)
    • AI IDE configs already present: Cursor (.cursor/, .cursorrules), GitHub Copilot (.github/copilot-instructions.md, .github/copilot-*), Windsurf (.windsurf/, .windsurfrules), Claude Code (.claude/, CLAUDE.md), OpenCode (opencode.jsonc, .opencode/)
    • MCP surfaces and automation entry points
  • Record all findings. This detection output drives steps 2-10.

Monorepo detection: If the repo is a monorepo (workspace files, multiple packages, shared build tooling), note the workspace layout, which packages have their own tooling configs, and whether checks should run at workspace level vs. per-package level. Adapt all later steps accordingly.

  • Look for frameworks and tools such as React, Next.js, Vite, Electron, LangChain, LangGraph, CopilotKit, FastAPI, Hono, Axum, Tauri, Playwright, Docker, Jenkins, and GitHub Actions.
  • When a framework is detected, load its framework-specific reference for use during the deterministic checks and skills phases.

1b. Preflight: Check .gitignore for Path Conflicts

Before creating any directories or files, verify that the paths this workflow will generate are not ignored by .gitignore:

git check-ignore docs/ openspec/ .opencode/ .opencode/skills/ .github/skills/ .github/prompts/ .github/instructions/ .github/agents/ .github/hooks/ .claude/ .claude/skills/

If any of these paths are listed in .gitignore, warn the user and resolve the conflict before proceeding. Content created under ignored paths will not appear in git status and will silently fail to commit.

APM deployed files should be committed. Files that APM places in .github/ (prompts, skills, instructions, agents, hooks) and .claude/ are intended to be version-controlled so that every contributor and Copilot on github.com gets agent context without running apm install. Only apm_modules/ should be gitignored (APM handles this automatically).

To catch drift between apm.yml and deployed files, use a CI drift check rather than gitignore. See references/ai-tooling.md for the drift check pattern.

2. Initialize APM

  • Treat APM as the dependency and delivery foundation for skills, prompts, and related agent packages.
  • Detect whether the repo already has apm.yml, apm.lock.yaml, apm_modules/, or APM-managed .github/skills/, .claude/skills/, .cursor/skills/, or .opencode/skills/ directories.
  • If apm.yml does not exist, initialize it before installing skills:
    • run apm --version
    • run apm init --yes from the repo root
  • If apm.yml already exists, inspect it before adding dependencies, then use apm install to sync the current dependency graph when needed.
  • Verify apm_modules/ is in .gitignore (apm init should add it automatically; if not, add it manually).
  • Use imperative apm install <package> commands for skill installation so the manifest and lockfile stay aligned with the actual installed set.
  • Use references/ai-tooling.md for initialization, install order, discovery strategy, and verification.

3. Set Up Spec-Driven Development

Ensure the repo has a spec-driven development system for managing non-trivial changes. Use the detection results from Step 1 to determine what already exists.

If a spec-driven development system already exists (SpecKit via specify/ or specs/, BMAD, or any structured planning system with real artifacts):

  • Respect it. DO NOT replace it with OpenSpec.
  • Document the existing system in the docs tree (Step 7), CONTRIBUTING.md, and AGENTS.md.
  • Wire its workflow commands into the AI IDE configs (Step 8) if it has a CLI or command surface.
  • If the system has no CLI or command surface, document the manual workflow contributors should follow.

If no spec-driven development system exists:

  • Install OpenSpec as the default.
  • Use references/openspec.md for the install sequence, openspec init, command surfacing, and verification flow.
  • Confirm openspec/changes/ and openspec/specs/ exist after initialization (with .gitkeep if empty).
  • Add OpenSpec workflow commands to the AI IDE command surfaces (Step 8).

4. Add Deterministic Checks

Combine the language-agnostic baseline with stack-specific checks in a single pass, informed by the detection results from step 1.

Before configuring any deterministic checks, ask: "Do you want deterministic checks enforced or advisory?" Apply that one answer uniformly to all deterministic checks, CI steps, and git hooks that this workflow wires in.

Language-agnostic baseline (use references/deterministic-checks-core.md):

  • dependency or vulnerability audit
  • SAST or Semgrep-style scanning
  • tests
  • build or packaging verification
  • CI parity with local commands

Stack-specific checks (use references/deterministic-scans.md as the overview, then the matching per-stack file):

  • Read the core baseline first, then the stack-specific guide, then act once.
  • Use the package manager, type checker, linter, and test runner detected in step 1. Do not override existing tooling with defaults.
  • If the repo already has a tool fulfilling a check category (e.g., basedpyright for type checking), use it instead of recommending the default.
  • Keep per-language commands and setup instructions in separate reference files instead of bloating the main workflow.

Monorepo considerations:

  • Determine whether checks run at the workspace root or per-package.
  • Use workspace-aware commands when available (e.g., pnpm nx affected -t lint, uv run with workspace targeting).
  • Document selective testing strategy if the repo has one (e.g., change detection scripts).

CI wiring:

  • Match every deterministic check added locally with a corresponding CI stage or step.
  • Detect the CI system from step 1 and wire checks into the appropriate config format.
  • For Jenkins repos, add checks as stages in the Jenkinsfile or as calls to existing shared library functions. See references/ci-wiring.md for patterns.
  • For GitHub Actions repos, add checks as workflow steps.
  • Reuse existing CI scripts if the repo already encodes the right invariant.

5. Add Dependabot Configuration

Ensure the repo has a Dependabot configuration for automated dependency updates based on the ecosystems detected in Step 1.

  • Use references/dependabot.md for the guard-rails, ecosystem mapping, defaults, and monorepo handling.
  • If .github/dependabot.yml or .github/dependabot.yaml already exists, leave it untouched.
  • If neither exists, create .github/dependabot.yml with entries for each detected ecosystem.

6. Install AI Tooling and Skills

  • Ask whether GitHub Agentic Workflows should be enabled before changing AI tooling.
  • If the answer is yes, use references/github-agentic-workflows.md as the source of truth for gh aw installation, workflow import, generated files, and post-install token guidance.
  • If the answer is no, skip gh aw setup entirely.

Use a package-first install flow. The curated APM packages are the default delivery path for skills and any MCP servers they already bundle.

  • Start with apm --version.
  • Audit repo-local skill directories and existing APM dependencies before installing duplicates.
  • Initialize APM first if the repo does not already have apm.yml.
  • Resolve the latest published package tag at install time. Use git ls-remote --tags https://github.com/cisco-open/ai-harness-toolkit "<name>-v*", sort the returned tags by semver, and install the newest matching tag. Do not hardcode package versions in this skill.
  • Use the detected IDE targets in every package install command and include protocol fallback:
apm install --target <ide-1> --target <ide-2> --allow-protocol-fallback cisco-open/ai-harness-toolkit/packages/<name>#<name>-v<latest>
  • Choose the default package from the detection results in step 1:
Detected stackInstall
JavaScript/TypeScript, no frameworkstack-javascript-typescript
Vue, Svelte, or other generic web UIstack-frontend
React or Next.jsstack-react
Angularstack-angular
Python managed with uvstack-python-uv
Java with Spring Bootstack-spring-boot
  • Every stack-* package already pulls core transitively. Do not install core separately when a stack package matches.
  • If no stack package matches (for example Go, Rust, plain Java, or another unpackaged backend), install core explicitly and then add only the extra dynamic skills that the detected stack still needs.
  • Use references/ai-tooling.md for the install mechanics, what-to-commit rules, and dynamic fallback workflow.

Dynamic fallback and add-ons:

  • Use the matching package as the default baseline when one exists, then add only the extra dynamic skills that cover real repo-specific gaps.
  • Browse repo-local and public curated sources first for Cisco-curated skills that match the detected stack.
  • Use npx skills find <query> only as a search mechanism when the needed skill is not already available through repo-local or public curated sources.
  • If no package matches (for example FastAPI, Django, plain Java, Go, Rust, LangGraph, or CopilotKit), keep that part of the stack dynamic.

6b. Add MCP Servers

Add MCP servers to apm.yml based on the detected tech stack. MCP servers give agents runtime access to external tools and services.

  • Read references/mcp-servers.md for the package-backed defaults, discovery workflow, and APM dependency format.
  • Inspect the repo for existing MCP declarations in opencode.jsonc, .opencode/, Cursor, Claude, and similar config files, then migrate those definitions into apm.yml so APM becomes the single source of truth.
  • Treat package-provided MCP servers as already handled by the corresponding package install:
    • stack-frontend, stack-react, and stack-angular provide Chrome DevTools.
  • Treat those package-provided MCP servers as the baseline, not the ceiling. Add extra MCP servers when the detected stack still justifies them.
  • Use apm mcp search <term> only for extra servers not covered by a package, such as Postgres, Playwright, Sentry, Kubernetes, or Terraform. Only add servers that provide clear value for the repo's actual workflow.
  • All MCP servers are declared in the dependencies.mcp section of apm.yml and installed through apm install.
  • Preserve any existing MCP entries in apm.yml and carry forward any repo-local MCP config that should remain supported.

7. Create the Docs Section That Explains the Workflow

Synthesis checkpoint: Before writing docs, consolidate all findings from steps 1-6. The docs must accurately reflect everything that was detected, installed, and configured.

  • Verify docs/ is not gitignored. Run git check-ignore docs/ before creating any files. If docs/ is ignored, update .gitignore first -- otherwise the entire docs tree will be invisible to git.
  • Research deeply before writing. Read source code, configs, CI pipelines, deployment configs, data models, API definitions, and integration points. Every doc should contain material that could only come from actually reading this repo.
  • Use references/docs-bootstrap.md for the full seed structure, research checklist, and authoring order.
  • Create architecture docs first (system overview, services, data model, integrations) because they require the deepest research and inform everything else.
  • Create dev environment docs with real commands (setup, run, env vars).
  • Create validation docs that reference the deterministic checks wired in step 4.
  • Create deployment docs if the repo ships to production.
  • Write the workflow overview last -- it synthesizes all other docs.
  • Create AGENTS.md as a lean routing file that points agents to docs/. Do not dump content into AGENTS.md that belongs in focused docs.
  • Update CONTRIBUTING.md to reference the docs tree.
  • Every doc must contain real content derived from the repo. No empty scaffolds or placeholder text.

8. Configure OpenCode and ocx When Present

  • If the repo uses OpenCode, merge config instead of replacing it.
  • Use references/opencode.md for the file-level config, plugin, command, and verification details.
  • For repos that also use Cursor or GitHub Copilot, install reusable skills with apm install <package> -t opencode -t cursor -t copilot and let the CLI materialize the repo-local layout.
  • Ensure the repo's OpenCode layer includes the required plugin packages and permission rules.
  • Add MCP server entries only when they match the detected stack. See references/mcp-servers.md for the baseline and discovery workflow, and references/opencode.md for OpenCode-specific MCP config.

9. Finalize APM State and Commit Deployed Files

After all skills are installed and configuration is complete:

  1. Run apm install to ensure apm_modules/, the lockfile, and all deployed files are fully in sync with apm.yml.
  2. Verify apm_modules/ is in .gitignore.
  3. Stage and commit together:
    • apm.yml
    • apm.lock.yaml
    • All deployed files in .github/ (skills, prompts, instructions, agents, hooks)
    • All deployed files in .claude/ (if present)
    • All deployed files in .opencode/skills/ (if present)
  4. These files are version-controlled so every contributor and Copilot on github.com gets agent context without running apm install.

10. Verify the Harness

This step is mandatory. Run it only after steps 1-9 are complete and all changes have been staged or committed.

Use references/verify-harness.md for the full verification procedure. It covers:

  1. Collecting the changeset (committed + staged files)
  2. Walking each harness step (1-9) against the changeset to confirm requirements are satisfied
  3. Cross-file consistency checks (validation commands, safety boundaries, tool names across all generated files)
  4. Fixing gaps immediately rather than logging them as tech debt
  5. Producing a structured verify report

Guardrails

  • Never run deterministic checks. This skill adds and configures deterministic commands (linters, type checkers, security audits, test runners, SAST tools, dependency audits, builds, scans, etc.) but must never execute them. Running these checks is the responsibility of the developer or CI pipeline, not this setup skill.
  • Detect before prescribing. Always check what the repo already uses before recommending or installing tooling. Never override an existing tool with a default.
  • Keep apm.yml and apm.lock.yaml aligned with the actual installed packages.
  • Never overwrite existing secrets or credential files.
  • Never remove user-defined plugin, skill, or MCP entries unless the user asked for cleanup.
  • Prefer idempotent edits so the setup can be re-run safely.
  • Prefer repo-local commands over globally assumed tooling.
  • Document durable workflow rules in docs/, not only in the final chat response.
  • When installing skills from external sources, install only those applicable to the repo. Do not bulk-install everything from a source.

Reference Map

  • references/openspec.md - step-by-step OpenSpec bootstrap
  • references/github-agentic-workflows.md - optional gh aw bootstrap and workflow import guidance
  • references/deterministic-checks-core.md - language-agnostic deterministic baseline
  • references/deterministic-scans.md - cross-language deterministic scan overview
  • references/dependabot.md - Dependabot configuration guard-rails, ecosystem mapping, and defaults
  • references/ai-tooling.md - APM initialization, package install mechanics, and dynamic fallback workflow
  • references/mcp-servers.md - package-provided MCP defaults, extra MCP discovery, and APM dependency format
  • references/opencode.md - OpenCode and ocx config patterns
  • references/docs-bootstrap.md - how to create the docs section
  • references/verify-harness.md - full verification procedure for Step 10 (changeset audit, per-step checks, consistency, gap fixing, report)
  • references/ci-wiring.md - CI integration patterns for Jenkins and GitHub Actions
  • references/stacks/javascript-typescript/stack.md - JS/TS-specific setup
  • references/stacks/javascript-typescript/deterministic-scans.md - JS/TS deterministic commands and wiring
  • references/stacks/javascript-typescript/framework-react.md - React and Next.js setup plus the stack-react package
  • references/stacks/javascript-typescript/framework-angular.md - Angular setup plus the stack-angular package
  • references/stacks/python/stack.md - Python-specific setup plus the stack-python-uv package
  • references/stacks/python/deterministic-scans.md - Python deterministic commands and wiring
  • references/stacks/java/stack.md - Java-specific setup
  • references/stacks/java/deterministic-scans.md - Java deterministic commands and wiring
  • references/stacks/java/framework-spring-boot.md - Spring Boot setup plus the stack-spring-boot package

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.