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.
In this repository8 other files it gives its agents.
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
- Distinctive: line 15
Inspect first: Search the repo's manifests, lockfiles, CI configs, framework configs, and existing docs to classify the full stack before …
- Distinctive: line 16
Read the matching stack guide based on detection results:
- Distinctive: line 20
If the repo uses a major framework, also read the matching framework guide:
- Distinctive: line 24
Ask whether the team wants GitHub Agentic Workflows enabled in this repository.
- Very specific: line 25
Ask whether deterministic checks should be enforced or advisory before configuring any checks.
- Very specific: line 26
If GitHub Agentic Workflows are enabled, read references/github-agentic-workflows.md before installing AI workflow tooling.
- Very specific: line 27
Read references/ai-tooling.md before initializing APM or installing package-backed skills.
- Very specific: line 28
Read references/mcp-servers.md before adding extra MCP servers to apm.yml.
- Very specific: line 29
Read references/openspec.md for change management setup.
- Very specific: line 30
Read references/deterministic-checks-core.md and the matching per-stack deterministic-scans.md together -- they form one phase.
- Very specific: line 31
Read references/dependabot.md when adding Dependabot configuration.
- Very specific: line 32
Read references/docs-bootstrap.md when creating the docs section that explains the workflow.
- Very specific: line 33
Read references/opencode.md when OpenCode or ocx support is requested.
- Distinctive: line 34
Verify is mandatory: After all setup steps finish, run the Verify step in Workflow Step 10 to audit the changeset against the harness …
- Distinctive: line 42
Run this step before making any changes.
- Distinctive: line 44
Search manifests, lockfiles, CI configs, framework configs, dependency declarations, and existing docs.
- Distinctive: line 45
Do not stop at top-level markers.
- Distinctive: line 46
Ask early whether the team wants GitHub Agentic Workflows enabled and whether deterministic checks should be enforced or advisory so the …
- Distinctive: line 52
Test runners (vitest, jest, pytest, junit, playwright)
- Distinctive: line 63
Monorepo detection: If the repo is a monorepo (workspace files, multiple packages, shared build tooling), note the workspace layout, which …
- Very specific: line 65
Look for frameworks and tools such as React, Next.js, Vite, Electron, LangChain, LangGraph, CopilotKit, FastAPI, Hono, Axum, Tauri, …
- Distinctive: line 66
When a framework is detected, load its framework-specific reference for use during the deterministic checks and skills phases.
- Very specific: line 70
Before creating any directories or files, verify that the paths this workflow will generate are not ignored by .gitignore:
- Very specific: line 76
If any of these paths are listed in .gitignore, warn the user and resolve the conflict before proceeding.
- Distinctive: line 84
Treat APM as the dependency and delivery foundation for skills, prompts, and related agent packages.
- Very specific: line 86
If apm.yml does not exist, initialize it before installing skills:
- Very specific: line 88
run apm init --yes from the repo root
- Very specific: line 89
If apm.yml already exists, inspect it before adding dependencies, then use apm install to sync the current dependency graph when needed.
- Very specific: line 90
Verify apm_modules/ is in .gitignore (apm init should add it automatically.
- Very specific: line 91
Use imperative apm install <package> commands for skill installation so the manifest and lockfile stay aligned with the actual installed …
- Very specific: line 92
Use references/ai-tooling.md for initialization, install order, discovery strategy, and verification.
- Distinctive: line 96
Ensure the repo has a spec-driven development system for managing non-trivial changes.
- Very specific: line 100
Document the existing system in the docs tree (Step 7), CONTRIBUTING.md, and AGENTS.md.
- Distinctive: line 102
If the system has no CLI or command surface, document the manual workflow contributors should follow.
- Very specific: line 106
Use references/openspec.md for the install sequence, openspec init, command surfacing, and verification flow.
- Distinctive: line 108
Add OpenSpec workflow commands to the AI IDE command surfaces (Step 8).
- Distinctive: line 114
Before configuring any deterministic checks, ask: "Do you want deterministic checks enforced or advisory?" Apply that one answer uniformly …
- Distinctive: line 124
Read the core baseline first, then the stack-specific guide, then act once.
- Distinctive: line 125
Use the package manager, type checker, linter, and test runner detected in step 1.
- Very specific: line 126
If the repo already has a tool fulfilling a check category (e.g., basedpyright for type checking), use it instead of recommending the …
- Distinctive: line 127
Keep per-language commands and setup instructions in separate reference files instead of bloating the main workflow.
- Very specific: line 131
Use workspace-aware commands when available (e.g., pnpm nx affected -t lint, uv run with workspace targeting).
- Distinctive: line 132
Document selective testing strategy if the repo has one (e.g., change detection scripts).
- Distinctive: line 143
Ensure the repo has a Dependabot configuration for automated dependency updates based on the ecosystems detected in Step 1.
- Very specific: line 145
Use references/dependabot.md for the guard-rails, ecosystem mapping, defaults, and monorepo handling.
- Very specific: line 146
If .github/dependabot.yml or .github/dependabot.yaml already exists, leave it untouched.
- Very specific: line 147
If neither exists, create .github/dependabot.yml with entries for each detected ecosystem.
- Distinctive: line 151
Ask whether GitHub Agentic Workflows should be enabled before changing AI tooling.
- Very specific: line 152
If the answer is yes, use references/github-agentic-workflows.md as the source of truth for gh aw installation, workflow import, generated …
- Very specific: line 153
If the answer is no, skip gh aw setup entirely.
- Distinctive: line 155
Use a package-first install flow.
- Distinctive: line 161
Use the detected IDE targets in every package install command and include protocol fallback:
- Very specific: line 177
Every stack-* package already pulls core transitively.
- Very specific: line 178
If no stack package matches (for example Go, Rust, plain Java, or another unpackaged backend), install core explicitly and then add only …
- Very specific: line 179
Use references/ai-tooling.md for the install mechanics, what-to-commit rules, and dynamic fallback workflow.
- Distinctive: line 182
Use the matching package as the default baseline when one exists, then add only the extra dynamic skills that cover real repo-specific gaps.
- Very specific: line 184
Use npx skills find <query> only as a search mechanism when the needed skill is not already available through repo-local or public curated …
- Distinctive: line 185
If no package matches (for example FastAPI, Django, plain Java, Go, Rust, LangGraph, or CopilotKit), keep that part of the stack dynamic.
- Very specific: line 189
Add MCP servers to apm.yml based on the detected tech stack.
- Very specific: line 191
Read references/mcp-servers.md for the package-backed defaults, discovery workflow, and APM dependency format.
- Distinctive: line 193
Treat package-provided MCP servers as already handled by the corresponding package install:
- Distinctive: line 195
Treat those package-provided MCP servers as the baseline, not the ceiling.
- Very specific: line 196
Use apm mcp search <term> only for extra servers not covered by a package, such as Postgres, Playwright, Sentry, Kubernetes, or Terraform.
- Very specific: line 197
All MCP servers are declared in the dependencies.mcp section of apm.yml and installed through apm install.
- Distinctive: line 202
Synthesis checkpoint: Before writing docs, consolidate all findings from steps 1-6.
- Very specific: line 204
Verify
docs/is not gitignored: Run git check-ignore docs/ before creating any files. - Distinctive: line 205
Research deeply before writing: Read source code, configs, CI pipelines, deployment configs, data models, API definitions, and integration …
- Very specific: line 206
Use references/docs-bootstrap.md for the full seed structure, research checklist, and authoring order.
- Distinctive: line 207
Create architecture docs first (system overview, services, data model, integrations) because they require the deepest research and inform …
- Distinctive: line 208
Create dev environment docs with real commands (setup, run, env vars).
- Distinctive: line 209
Create validation docs that reference the deterministic checks wired in step 4.
- Distinctive: line 210
Create deployment docs if the repo ships to production.
- Distinctive: line 211
Write the workflow overview last -- it synthesizes all other docs.
- Very specific: line 212
Create AGENTS.md as a lean routing file that points agents to docs/.
- Very specific: line 213
Update CONTRIBUTING.md to reference the docs tree.
- Distinctive: line 214
Every doc must contain real content derived from the repo.
- Distinctive: line 218
If the repo uses OpenCode, merge config instead of replacing it.
- Very specific: line 219
Use references/opencode.md for the file-level config, plugin, command, and verification details.
- Distinctive: line 221
Ensure the repo's OpenCode layer includes the required plugin packages and permission rules.
- Very specific: line 222
Add MCP server entries only when they match the detected stack.
- Distinctive: line 226
After all skills are installed and configuration is complete:
- Very specific: line 228
Run apm install to ensure apm_modules/, the lockfile, and all deployed files are fully in sync with apm.yml.
- Very specific: line 229
Verify apm_modules/ is in .gitignore.
- Very specific: line 233
All deployed files in .github/ (skills, prompts, instructions, agents, hooks)
- Very specific: line 234
All deployed files in .claude/ (if present)
- Very specific: line 242
Use references/verify-harness.md for the full verification procedure.
- Distinctive: line 253
Detect before prescribing: Always check what the repo already uses before recommending or installing tooling.
- Very specific: line 254
Keep apm.yml and apm.lock.yaml aligned with the actual installed packages.
- Distinctive: line 255
Never overwrite existing secrets or credential files.
- Distinctive: line 256
Never remove user-defined plugin, skill, or MCP entries unless the user asked for cleanup.
- Distinctive: line 257
Prefer idempotent edits so the setup can be re-run safely.
- Distinctive: line 258
Prefer repo-local commands over globally assumed tooling.
- Very specific: line 259
Document durable workflow rules in docs/, not only in the final chat response.
- Distinctive: line 260
When installing skills from external sources, install only those applicable to the repo.
≈ “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.
Files
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
- 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.
- Read the matching stack guide based on detection results:
references/stacks/javascript-typescript/stack.mdreferences/stacks/python/stack.mdreferences/stacks/java/stack.md
- If the repo uses a major framework, also read the matching framework guide:
references/stacks/javascript-typescript/framework-react.mdreferences/stacks/javascript-typescript/framework-angular.mdreferences/stacks/java/framework-spring-boot.md
- Ask whether the team wants GitHub Agentic Workflows enabled in this repository.
- Ask whether deterministic checks should be
enforcedoradvisorybefore configuring any checks. Carry that answer through all downstream local scripts, CI wiring, and git hooks. - If GitHub Agentic Workflows are enabled, read
references/github-agentic-workflows.mdbefore installing AI workflow tooling. - Read
references/ai-tooling.mdbefore initializing APM or installing package-backed skills. - Read
references/mcp-servers.mdbefore adding extra MCP servers toapm.yml. - Read
references/openspec.mdfor change management setup. - Read
references/deterministic-checks-core.mdand the matching per-stackdeterministic-scans.mdtogether -- they form one phase. - Read
references/dependabot.mdwhen adding Dependabot configuration. - Read
references/docs-bootstrap.mdwhen creating the docs section that explains the workflow. - Read
references/opencode.mdwhen OpenCode orocxsupport is requested. - 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/, SpecKitspecify/orspecs/, 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.ymldoes not exist, initialize it before installing skills:- run
apm --version - run
apm init --yesfrom the repo root
- run
- If
apm.ymlalready exists, inspect it before adding dependencies, then useapm installto sync the current dependency graph when needed. - Verify
apm_modules/is in.gitignore(apm initshould 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.mdfor 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, andAGENTS.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.mdfor the install sequence,openspec init, command surfacing, and verification flow. - Confirm
openspec/changes/andopenspec/specs/exist after initialization (with.gitkeepif 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.,
basedpyrightfor 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 runwith 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.mdfor 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.mdfor the guard-rails, ecosystem mapping, defaults, and monorepo handling. - If
.github/dependabot.ymlor.github/dependabot.yamlalready exists, leave it untouched. - If neither exists, create
.github/dependabot.ymlwith 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.mdas the source of truth forgh awinstallation, workflow import, generated files, and post-install token guidance. - If the answer is no, skip
gh awsetup 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 stack | Install |
| JavaScript/TypeScript, no framework | stack-javascript-typescript |
| Vue, Svelte, or other generic web UI | stack-frontend |
| React or Next.js | stack-react |
| Angular | stack-angular |
Python managed with uv | stack-python-uv |
| Java with Spring Boot | stack-spring-boot |
- Every
stack-*package already pullscoretransitively. Do not installcoreseparately when a stack package matches. - If no stack package matches (for example Go, Rust, plain Java, or another unpackaged backend), install
coreexplicitly and then add only the extra dynamic skills that the detected stack still needs. - Use
references/ai-tooling.mdfor 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.mdfor 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 intoapm.ymlso APM becomes the single source of truth. - Treat package-provided MCP servers as already handled by the corresponding package install:
stack-frontend,stack-react, andstack-angularprovide 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.mcpsection ofapm.ymland installed throughapm install. - Preserve any existing MCP entries in
apm.ymland 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. Rungit check-ignore docs/before creating any files. Ifdocs/is ignored, update.gitignorefirst -- 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.mdfor 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.mdas a lean routing file that points agents todocs/. Do not dump content intoAGENTS.mdthat belongs in focused docs. - Update
CONTRIBUTING.mdto 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.mdfor 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 copilotand 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.mdfor the baseline and discovery workflow, andreferences/opencode.mdfor OpenCode-specific MCP config.
9. Finalize APM State and Commit Deployed Files
After all skills are installed and configuration is complete:
- Run
apm installto ensureapm_modules/, the lockfile, and all deployed files are fully in sync withapm.yml. - Verify
apm_modules/is in.gitignore. - Stage and commit together:
apm.ymlapm.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)
- 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:
- Collecting the changeset (committed + staged files)
- Walking each harness step (1-9) against the changeset to confirm requirements are satisfied
- Cross-file consistency checks (validation commands, safety boundaries, tool names across all generated files)
- Fixing gaps immediately rather than logging them as tech debt
- 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.ymlandapm.lock.yamlaligned 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 bootstrapreferences/github-agentic-workflows.md- optionalgh awbootstrap and workflow import guidancereferences/deterministic-checks-core.md- language-agnostic deterministic baselinereferences/deterministic-scans.md- cross-language deterministic scan overviewreferences/dependabot.md- Dependabot configuration guard-rails, ecosystem mapping, and defaultsreferences/ai-tooling.md- APM initialization, package install mechanics, and dynamic fallback workflowreferences/mcp-servers.md- package-provided MCP defaults, extra MCP discovery, and APM dependency formatreferences/opencode.md- OpenCode and ocx config patternsreferences/docs-bootstrap.md- how to create the docs sectionreferences/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 Actionsreferences/stacks/javascript-typescript/stack.md- JS/TS-specific setupreferences/stacks/javascript-typescript/deterministic-scans.md- JS/TS deterministic commands and wiringreferences/stacks/javascript-typescript/framework-react.md- React and Next.js setup plus thestack-reactpackagereferences/stacks/javascript-typescript/framework-angular.md- Angular setup plus thestack-angularpackagereferences/stacks/python/stack.md- Python-specific setup plus thestack-python-uvpackagereferences/stacks/python/deterministic-scans.md- Python deterministic commands and wiringreferences/stacks/java/stack.md- Java-specific setupreferences/stacks/java/deterministic-scans.md- Java deterministic commands and wiringreferences/stacks/java/framework-spring-boot.md- Spring Boot setup plus thestack-spring-bootpackage
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.

