Claude opencode Skill

implement

Execute one bounded RED to GREEN experiment from bead or caller intent; return derived subject identity and check facts. Triggers: "implement", "implement this bead", "run the experiment". Full plan-to-validation requests route to rpi.

LLM Mart · 0 points · 6 views 0 listing impressions 0 install-command copies
Virus-scanned Reviewed automatically before listing.

Full trust report

Download boshu2-agentops-skills_implement-c3fe161.zip · 12 KB
boshu2/agentops 445 41 forks Apache-2.0 Updated 1d ago
Part of boshu2/agentops — 73 skills

Install

skills CLI npx skills add https://github.com/boshu2/agentops/tree/main/skills/implement
Claude Code claude plugin marketplace add https://llmmart.ai/marketplace.json && claude plugin install boshu2-agentops@llmmart
Git git clone https://github.com/boshu2/agentops.git

The skills CLI installs just this skill, for any of its supported agents. Claude Code installs the whole boshu2/agentops collection as a plugin from our marketplace. Git is the plain clone.

Skill manifest

Implement

Implement the accepted outcome. Repair ordinary known defects directly. Use the existing intent; no Plan, Recall or Learn worksheet is owed for a clear edit. Implement owns source changes and factual checks; the runtime derives identity and receipts.

For authorized service operations, selectively load operations methods for reliability, delivery, incident recovery, resilience or toil decisions. Use only the relevant procedure; ordinary edits owe no operations phase. That reference routes changed exposure to the existing Security owner and service test design to Test.

Workflow

  1. Read intent, acceptance, scope and repository boundaries before the first write; reuse loaded contracts. RPI boundaries apply when that workflow is explicitly selected. For caller-selected episode tracking, obtain permitted work/source references and return observed runtime/context identity at startup through the native recording channel. Keep unknowns and failures explicit; invent no parentage or second tracker. The session association reference supplies mechanics for that selected workflow.
  2. Carry the accepted behavior examples forward unchanged. Use repository domain names in symbols and tests; check observable outcomes through the relevant interface. Find actual consumers of edited paths or wording and their checks. For retirement, inspect live code, tests, schemas, instructions, installations and lookups as relevant; verify new guidance and old-name lookup behavior, preserving historical provenance. Keep exact check commands and the required integration recipe in the existing handoff. Run the smallest applicable check before and after editing. Behavioral changes preserve RED for the expected missing behavior; pure refactors, relocations or docs may have an honest green baseline. Prefer existing tests or small discriminating probes.
  3. Make the smallest in-scope change. When repairing discovery or checks, preserve the consumer's existing input selection; fixing an error path does not authorize a wider scan. Use a negative control when exclusion matters. Check a representative change against existing constraints before bulk propagation; check the authored source set before broad regeneration. Repair known failures directly and verify the exact result (such as a cited file, assertion or returned record) before another review. A disproved assumption may change the approach within scope; use Plan only for consequential uncertainty.
  4. Use targeted tests and applicable repository lint/static checks before broad integration. Read the repository's actual check recipe, including instrumentation and environment, rather than reconstructing it from memory. Run required full checks at integration. Reuse exact-input receipts only while source, tool and relevant environment match. Distinguish repository-mandated hook checks from discretionary repeats; neither bypass required hooks nor replay a check just to rename its receipt. A required CI job's known failure is actionable before the whole run ends. Inspect and repair it within scope; preserve the failed subject's evidence and rerun affected checks on the repair. Pending jobs do not imply success.
  5. Refactor while acceptance remains green. Inspect changed tests, fixtures, goldens, tolerances, suppressions and specification text against original intent. Mocks, placeholders or weakened oracles cannot substitute for the requested behavior.
  6. Have the runtime derive actual changed paths and content identity. A delegated increment awaiting integration returns an exact commit or runtime-derived content digests, author context ID and check facts in the existing handoff. The integrating caller derives subject-manifest.v1 over the complete final subject before judgment; an independently judged increment needs its own manifest. Do not generate both merely because work was delegated. At that boundary, when changed paths affect bound acceptance evidence, run ao provenance evidence-orphans --root <repo-root> with one --changed <path> per derived path and retain its actual output. Refresh affected bindings after repairs; never invent or suppress the orphan list.
  7. Return identity, check commands/results, useful failures and accessible evidence references through the native handoff, then stop. Keep full logs at their source, without duplicating inventories or status documents. Missing or truncated evidence stays explicit.

Diagnosis, scaffolding and delegated work

For an unexplained failure, first match the reported symptom and reduce the reproduction. State one causal prediction, test it with a discriminating check, and repair the cause supported by the result. Rerun the original scenario. Do not keep collecting hypotheses after the cause is understood. This compact diagnosis path is informed by Matt Pocock's engineering skills.

When scaffolding is the requested change, start from the repository's existing layout and a working vertical slice. See scaffold references only for the relevant tool shape. Avoid placeholder success paths and a new framework for a one-off operation.

Prefer current-session execution. If delegation is authorized and useful, partition independent writes in isolated workspaces; shared generators and integration serialize. Supply each lane its intent, acceptance, scope and review owner, then integrate its exact content and check facts. A selected wave ends with the caller-requested wave result; do not invent another wave. One fresh review of the integrated candidate can cover unjudged increments; when the integrator owns that review, workers return their handoff without commissioning another. Preserve any separately required lane judgments; a successful process exit is not semantic PASS. Agent Native supplies optional dispatch mechanics.

An explicitly requested one-shot adapter dispatches each supplied operation once, reports its output or error, and stops. Show dispatch count and failure reporting with a dry-run or fixture. It does not silently acquire a scheduler, retry controller or store. Factories require the caller's selection.

Scope and finish

Report an uncovered live consumer as file:line for a caller scope amendment; continue independent authorized work. Generated companions already included as scope require no new approval. Acceptance changes always require caller authority.

Specialists advise only. Known defects stay implementation work; a genuine causal stall permits at most one bounded fresh helper within caller authority. Respect remaining caller/native bounds and reserve finishing capacity; retries reset neither.

Return facts, not semantic PASS. An implement-only handoff does not authorize Git, tracker or delivery transitions; existing caller authority remains usable. A full outcome request continues through fresh independent final judgment; RPI is optional and explicitly selected. Success is working behavior with usable evidence, not volume of logs or process artifacts.

Generic scaffold examples are optional starting points when the repository has no suitable existing pattern.

Files (agentops)
  • references
    • scaffold
      • agent-facing-tool-scaffolds.md 1.3 KB
        # Agent-Facing Tool Scaffolds
        
        Use this reference when the scaffold output will be consumed by agents, installed by shell scripts, or exposed as a tool server.
        
        ## Installer Workmanship
        
        Installer scripts must be boring and reversible:
        
        - Detect platform and shell before mutation.
        - Print what will change before changing it.
        - Use idempotent directory creation and file writes.
        - Avoid `curl | sh` in generated docs unless the repo explicitly accepts it.
        - Leave an uninstall or rollback path.
        - Verify the installed command after mutation.
        
        ## Agent-Facing Tool Server Rules
        
        For MCP or similar tool servers:
        
        - Tool names should describe user intent, not implementation internals.
        - Inputs should be structured and narrow.
        - Errors should explain what the agent can try next.
        - Dangerous tools need dry-run or confirmation flows.
        - Every tool should have at least one fixture-backed smoke test.
        
        ## Rust CLI With Local State
        
        When scaffolding a Rust CLI that stores local state:
        
        - Prefer SQLite for transactional state and JSONL for inspectable event logs.
        - Keep migrations explicit and tested.
        - Expose `--json` for agent-readable output.
        - Separate command parsing from storage logic.
        
        ---
        
        **Source:** Adapted from an external skill corpus / `installer-workmanship`, `mcp-server-design`, and `rust-cli-with-sqlite`. Pattern-only, no verbatim text.
        
      • generic-templates.md 8.5 KB
        # Generic scaffolding templates (project · component · CI)
        
        > **Provenance:** This content was **moved verbatim** out of the historical
        > `skills/scaffold/SKILL.md` (generic-craft trim). It is now maintained under
        > Implement. A frontier model produces
        > standard project trees, best-practice config, and GitHub-Actions / GitLab-CI YAML
        > correctly **with no template** — so this file is a fallback reference, not the skill's
        > durable value. Reach for this file only when the caller wants one of the
        > historical shapes the skill stamped; otherwise produce an idiomatic scaffold
        > directly.
        
        The three generic modes share a four-step spine: **gather requirements → generate
        structure → verify → report**. Every generated file must have real, functional
        content — not placeholder comments.
        
        ## Step 1: Gather Requirements
        
        Collect these inputs (use defaults when not specified):
        
        | Input | Default | Notes |
        |-------|---------|-------|
        | Language/framework | (required) | go, python, node, rust, react |
        | Project type | CLI (Go), package (Python), app (Node) | CLI, library, web-service, API, package |
        | Testing framework | Language default | go test, pytest, vitest, cargo test |
        | CI platform | GitHub Actions | github, gitlab |
        | Project name | (required) | kebab-case, validated |
        
        Validate the project name is kebab-case. Reject names with spaces, uppercase, or special characters.
        
        ## Step 2: Generate Project Structure
        
        Create the directory tree and all files.
        
        ### Go CLI
        
        ```
        <name>/
          cmd/<name>/main.go        # cobra or bare main with version flag
          internal/config/config.go  # configuration loading
          internal/config/config_test.go
          go.mod
          go.sum
          Makefile                   # build, test, lint, clean targets
          .goreleaser.yml            # cross-compile config
          .gitignore
          .editorconfig
          CLAUDE.md
        ```
        
        ### Go Library
        
        ```
        <name>/
          pkg/<name>.go              # primary exported API
          pkg/<name>_test.go
          examples/basic/main.go     # runnable example
          go.mod
          go.sum
          Makefile
          .gitignore
          .editorconfig
          CLAUDE.md
        ```
        
        ### Python Package
        
        ```
        <name>/
          src/<name>/__init__.py     # version and public API
          src/<name>/core.py         # primary module
          tests/__init__.py
          tests/test_core.py         # real behavioral test
          pyproject.toml             # black, ruff, mypy config included
          .github/workflows/ci.yml
          .gitignore
          .editorconfig
          CLAUDE.md
        ```
        
        ### Node/TypeScript
        
        ```
        <name>/
          src/index.ts               # entry point with exports
          src/core.ts                # primary module
          test/core.test.ts          # vitest test
          package.json               # scripts: build, test, lint, format
          tsconfig.json
          .gitignore
          .editorconfig
          CLAUDE.md
        ```
        
        ### Rust
        
        ```
        <name>/
          src/lib.rs                 # library root (or main.rs for CLI)
          src/core.rs                # primary module
          benches/benchmark.rs       # criterion bench stub
          Cargo.toml                 # with clippy, rustfmt config
          .gitignore
          .editorconfig
          CLAUDE.md
        ```
        
        ## Step 3: Apply Best Practices
        
        After generating the structure, layer on cross-cutting concerns:
        
        For installer scripts, agent-facing tool servers, MCP surfaces, or Rust CLI storage scaffolds, apply [agent-facing-tool-scaffolds.md](agent-facing-tool-scaffolds.md) before writing files.
        
        ### .gitignore
        
        Use the language-appropriate template. Include IDE files (`.vscode/`, `.idea/`), OS files (`.DS_Store`, `Thumbs.db`), and build artifacts.
        
        ### .editorconfig
        
        ```ini
        root = true
        
        [*]
        end_of_line = lf
        insert_final_newline = true
        trim_trailing_whitespace = true
        charset = utf-8
        
        [*.{go,rs}]
        indent_style = tab
        indent_size = 4
        
        [*.{py,ts,js,json,yml,yaml,toml}]
        indent_style = space
        indent_size = 4
        
        [Makefile]
        indent_style = tab
        ```
        
        ### Pre-commit Hooks
        
        Generate a `.pre-commit-config.yaml` with language-appropriate hooks:
        
        - **Go:** gofmt, go vet, golangci-lint
        - **Python:** black, ruff, mypy
        - **Node/TS:** eslint, prettier
        - **Rust:** rustfmt, clippy
        
        ### Testing Setup
        
        Every scaffold includes at least one real test that:
        - Tests actual behavior (not just `!= nil`)
        - Uses the language's idiomatic test patterns
        - Passes on first run
        
        ### CI Pipeline
        
        Generate CI config unless the user explicitly opts out. Default: GitHub Actions.
        
        ### CLAUDE.md
        
        Generate a project-specific `CLAUDE.md` containing:
        - Build commands
        - Test commands
        - Lint commands
        - Project structure overview
        - Key conventions for the language (loaded from `/standards`)
        
        ## Step 4: Verify Scaffold Works
        
        Run these checks in order. Stop and fix if any fail.
        
        ```
        1. Build passes        →  language-specific build command
        2. Tests pass          →  language-specific test command
        3. Lint passes         →  language-specific lint command (warn-only if tools not installed)
        ```
        
        ### Verification Commands by Language
        
        | Language | Build | Test | Lint |
        |----------|-------|------|------|
        | Go | `go build ./...` | `go test ./...` | `go vet ./...` |
        | Python | `python -m py_compile src/**/*.py` | `python -m pytest` | `ruff check .` |
        | Node/TS | `npx tsc --noEmit` | `npx vitest run` | `npx eslint .` |
        | Rust | `cargo build` | `cargo test` | `cargo clippy` |
        
        If a tool is not installed (e.g., `ruff`, `golangci-lint`), note it as a warning but do not fail the scaffold.
        
        Report the generated files and the command results, then stop. Version control,
        revision, and delivery stay with the caller; this scaffold writes files only and
        takes no source-control or continuation action.
        
        ## Component Mode
        
        When invoked as `/scaffold component <type> <name>`:
        
        ### Go Component
        
        ```
        internal/<name>/<name>.go       # package with exported API
        internal/<name>/<name>_test.go  # behavioral tests
        ```
        
        Register the new package in relevant imports. Run `go build ./...` and `go test ./...` to verify.
        
        ### Python Component
        
        ```
        src/<project>/modules/<name>/__init__.py
        src/<project>/modules/<name>/core.py
        tests/test_<name>.py
        ```
        
        ### Node/TS Component
        
        ```
        src/<name>/index.ts
        src/<name>/types.ts
        test/<name>.test.ts
        ```
        
        ### React Component
        
        ```
        src/components/<Name>/<Name>.tsx
        src/components/<Name>/<Name>.test.tsx
        src/components/<Name>/<Name>.stories.tsx  # Storybook story
        src/components/<Name>/index.ts            # barrel export
        ```
        
        After generating, run the project's test suite to verify the new component integrates cleanly.
        
        ## CI Mode
        
        When invoked as `/scaffold ci <platform>`:
        
        ### GitHub Actions
        
        Generate `.github/workflows/ci.yml`:
        
        **This is a skeleton — expand steps using the detected language's actual commands.**
        
        ```yaml
        name: CI
        on:
          push:
            branches: [main]
          pull_request:
            branches: [main]
        
        jobs:
          lint:
            runs-on: ubuntu-latest
            steps:
              - uses: actions/checkout@v4
              - name: Setup # use actions/setup-go, setup-node, setup-python as detected
                uses: actions/setup-go@v5  # example for Go
                with:
                  go-version-file: go.mod
              - name: Lint
                run: golangci-lint run  # replace with detected linter
        
          test:
            runs-on: ubuntu-latest
            strategy:
              matrix:
                os: [ubuntu-latest, macos-latest]
            steps:
              - uses: actions/checkout@v4
              - name: Setup
                uses: actions/setup-go@v5
                with:
                  go-version-file: go.mod
              - name: Test
                run: go test ./...  # replace with detected test command
        
          build:
            runs-on: ubuntu-latest
            needs: [lint, test]
            steps:
              - uses: actions/checkout@v4
              - name: Setup
                uses: actions/setup-go@v5
                with:
                  go-version-file: go.mod
              - name: Build
                run: go build ./...  # replace with detected build command
        ```
        
        Include language-appropriate caching (`actions/cache` for Go modules, pip, node_modules, cargo registry). Replace Go-specific steps with the detected language's toolchain.
        
        ### GitLab CI
        
        Generate `.gitlab-ci.yml`:
        
        ```yaml
        stages:
          - lint
          - test
          - build
        
        variables:
          # language-specific cache paths
        
        lint:
          stage: lint
          script: [lint command]
        
        test:
          stage: test
          script: [test command]
          parallel:
            matrix:
              - IMAGE: [language versions]
        
        build:
          stage: build
          script: [build command]
          needs: [lint, test]
        ```
        
        Include caching directives and artifact definitions.
        
        ## Error Recovery
        
        | Problem | Action |
        |---------|--------|
        | Directory already exists | Ask user: overwrite, merge, or abort |
        | Build tool not installed | Note missing tool, generate files anyway, warn user |
        | Test fails on generated code | Fix the generated code (this is a scaffold bug) |
        
        ## Output Summary
        
        After completion, print a summary:
        
        ```
        Scaffold complete: <name> (<language> <type>)
          Files created: <count>
          Build: PASS
          Tests: PASS (<count> tests)
          Lint:  PASS | WARN (tool not installed)
        ```
        
      • scaffold.feature 1.1 KB · in bundle
    • implement.feature 735 B · in bundle
    • operations.md 5.7 KB
      # Service operations
      
      Use the relevant procedure for an authorized operational change or investigation.
      Start from the caller's service promises, affected users, environment, accepted
      outcomes and action authority. Existing SLOs, observation windows, rollout rules
      and recovery limits remain caller-owned. If a missing promise or permission
      blocks a decision, report that gap; do not invent a target or authorize an action.
      Safe read-only investigation can continue within scope.
      
      Return observations, actions, failures and limits in the existing handoff.
      Persist additional evidence only for a request or declared consumer at the
      explicitly selected destination. Preserve necessary evidence before cleanup or
      replacement, including unsuccessful attempts. These procedures create no
      automatic knowledge capture, report, controller or required skill sequence.
      
      ## Reliability: observe the user outcome
      
      Translate the service promise into a result observable through its public
      interface: completion, correctness, freshness or latency as relevant. Reproduce
      the reported harm with representative inputs and compare with the caller's
      accepted outcome. Healthy processes, low CPU or backend success counters are
      diagnostic signals; they cannot establish that the user received the right
      result. Trace the failing boundary after observing the discrepancy.
      
      State which users or request classes were exercised, the observation window,
      eligible attempts and failures. Preserve partial or unknown coverage. A sampled
      success cannot establish an unmeasured SLO or health of unexercised paths. When
      new tests are needed, [Test](../../test/SKILL.md) owns test design; its
      [real-service reference](../../test/references/real-service-e2e.md) covers checks
      whose failure crosses a service boundary.
      
      ## Delivery: use representative evidence before expanding
      
      Confirm the candidate, target environment and permitted rollout extent against
      the caller's delivery policy. Exercise the relevant user journeys and failure
      paths against baseline and candidate under comparable conditions, using the
      same accepted criteria. An idle canary with no eligible requests provides no
      delivery evidence. Missing representative traffic, required checks or an
      observation window leaves delivery unestablished; do not call absence of errors
      a successful rollout.
      
      Expand only when both the evidence and existing authority permit it. If a check
      fails, stop expansion and use only authorized containment or recovery actions.
      Before proposing rollback as recovery, inspect data, schema, configuration and
      dependency compatibility and available restore evidence. A prior version alone
      does not prove rollback is safe or that lost data can be restored.
      
      If the change alters exposure, identities, permissions, data access or a trust
      boundary, use the existing [Security](../../security/SKILL.md) owner for the
      authorized assessment. Carry findings and gaps into the delivery decision;
      a clean scan neither accepts risk nor grants deployment permission.
      
      ## Incident: mitigate, then verify recovery
      
      Establish the user impact and capture the current symptom and relevant state
      without delaying authorized urgent containment. Choose mitigation within the
      caller's incident authority and available evidence; if the required action is
      outside that authority, hand it to the responsible operator. Observe whether
      mitigation actually reduces harm. Reduced harm or a healthy backend alone is
      not verified recovery.
      
      Test recovery through the affected user interface against the original service
      promise and permitted observation window. Check residual work or state, such
      as pending requests or incomplete writes, when relevant to that promise. Keep
      each failed recovery attempt with its action, observed result and remaining
      impact before making another change. Report partial recovery explicitly. Declare
      user-visible recovery only for the outcomes actually verified, preserving the
      failed attempts and any unresolved data or coverage limits.
      
      ## Resilience: bound the fault and prove restoration
      
      Select one failure hypothesis and an authorized, isolated target. Before fault
      injection, establish affected resources, maximum duration or attempts, stop
      conditions and a restoration approach within the same authority. Unknown blast
      radius or missing restoration authority blocks injection. Do not extend the
      fault merely to obtain a passing result.
      
      Observe the promised user behavior during the fault and stop at the agreed
      bound or earlier stop condition. Remove the fault and verify both resource
      restoration and the affected user outcomes, including deferred work when it
      matters. A successful fault command or cleanup exit does not prove restoration.
      If restoration fails, preserve the fault and recovery evidence, report the
      remaining impact and use the incident procedure within existing authority.
      One bounded experiment supports only the failure conditions it exercised.
      
      ## Toil: compare the full cost with leaving the process alone
      
      Measure the existing process for the same workload and decision horizon as the
      proposed change. Include human effort and machine cost where they matter, plus
      the consequence of errors. Compare leaving it alone, a simpler change and the
      proposed automation against that baseline.
      
      Count creation and validation, ongoing operation and maintenance, failed runs,
      repair and recovery work, including the effort of this trial. Separate shared
      work from costs attributable to each option. Report measured units and workload
      counts; label unavailable costs and assumptions instead of treating them as
      zero. Faster subprocess time is not demonstrated labor or net cost savings.
      Retain, revise or decline the change according to the caller's accepted outcome
      and this comparison. A useful helper can be retained without claiming a saving
      that the evidence does not establish.
      
  • scripts
    • validate.sh 504 B
      #!/usr/bin/env bash
      set -euo pipefail
      skill_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
      grep -q '^name: implement$' "$skill_dir/SKILL.md"
      # test_runtime_derives_subject
      grep -Fq 'ordinary known defects directly.' "$skill_dir/SKILL.md"
      grep -Fq 'runtime derive actual changed paths' "$skill_dir/SKILL.md"
      if grep -Fq 'candidate-packet.v1' "$skill_dir/SKILL.md"; then
        echo 'implement contract references a model-authored candidate packet' >&2
        exit 1
      fi
      echo 'implement skill contract: PASS'
      
  • SKILL.md 8.2 KB
    ---
    name: implement
    description: 'Implement changes, repairs or waves; return per-lane evidence. Use when: coding, service operations, reliability, delivery, incident recovery, resilience or toil is authorized.'
    practices:
    - tdd
    - refactoring
    - small-batch-flow
    hexagonal_role: driving-adapter
    consumes: []
    produces:
    - subject-manifest.v1
    output_contract: 'content identity, author context ID and check facts through the native handoff; subject-manifest.v1 at the judgment boundary'
    context_rel:
    - kind: customer-of
      with: plan
    skill_api_version: 1
    user-invocable: true
    metadata:
      graph_root: true
      tier: execution
      dependencies: []
      capabilities: [execute_one_experiment, collect_factual_evidence]
      effects: [modify_declared_subject, derive_subject_manifest]
      canonical_status: canonical
      disposition: keep
    ---
    
    # Implement
    
    Implement the accepted outcome. Repair ordinary known defects directly. Use the existing
    intent; no Plan, Recall or Learn worksheet is owed for a clear edit. Implement
    owns source changes and factual checks; the runtime derives identity and receipts.
    
    For authorized service operations, selectively load
    [operations methods](references/operations.md) for reliability, delivery,
    incident recovery, resilience or toil decisions. Use only the relevant procedure;
    ordinary edits owe no operations phase. That reference routes changed exposure
    to the existing Security owner and service test design to Test.
    
    ## Workflow
    
    1. Read intent, acceptance, scope and repository boundaries before the first
       write; reuse loaded contracts. RPI [boundaries](../rpi/references/boundaries.md)
       apply when that workflow is explicitly selected.
       For caller-selected episode tracking, obtain permitted work/source references
       and return observed runtime/context identity at startup through the native
       recording channel. Keep unknowns and failures explicit; invent no parentage
       or second tracker. The
       [session association reference](../cass/references/SESSION_FORMATS.md#work-to-session-associations)
       supplies mechanics for that selected workflow.
    2. Carry the accepted behavior examples forward unchanged. Use repository
       domain names in symbols and tests; check observable outcomes through the
       relevant interface. Find actual consumers of edited paths or wording and
       their checks. For retirement, inspect live code, tests, schemas, instructions,
       installations and lookups as relevant; verify new guidance and old-name
       lookup behavior, preserving historical provenance. Keep exact check commands
       and the required integration recipe in the existing handoff. Run the smallest
       applicable check before and after editing. Behavioral changes preserve RED
       for the expected missing behavior; pure refactors, relocations or docs may
       have an honest green baseline. Prefer existing tests or small discriminating probes.
    3. Make the smallest in-scope change. When repairing discovery or checks,
       preserve the consumer's existing input selection; fixing an error path does
       not authorize a wider scan. Use a negative control when exclusion matters.
       Check a representative change against existing constraints before bulk
       propagation; check the authored source set before broad regeneration.
       Repair known failures directly and verify the exact result (such as a cited
       file, assertion or returned record) before another review. A disproved assumption
       may change the approach within scope; use Plan only for consequential uncertainty.
    4. Use targeted tests and applicable repository lint/static checks before
       broad integration. Read the repository's actual check recipe, including
       instrumentation and environment, rather than reconstructing it from memory.
       Run required full checks at integration. Reuse
       exact-input receipts only while source, tool and relevant environment match.
       Distinguish repository-mandated hook checks from discretionary repeats;
       neither bypass required hooks nor replay a check just to rename its receipt.
       A required CI job's known failure is actionable before the whole run ends.
       Inspect and repair it within scope; preserve the failed subject's evidence
       and rerun affected checks on the repair. Pending jobs do not imply success.
    5. Refactor while acceptance remains green. Inspect changed tests, fixtures,
       goldens, tolerances, suppressions and specification text against original
       intent. Mocks, placeholders or weakened oracles cannot substitute for the
       requested behavior.
    6. Have the runtime derive actual changed paths and content identity. A delegated
       increment awaiting integration returns an exact commit or runtime-derived
       content digests, author context ID and check facts in the existing handoff.
       The integrating caller derives `subject-manifest.v1` over the complete final
       subject before judgment; an independently judged increment needs its own
       manifest. Do not generate both merely because work was delegated.
       At that boundary, when changed paths affect bound acceptance evidence, run
       `ao provenance evidence-orphans --root <repo-root>` with one `--changed
       <path>` per derived path and retain its actual output. Refresh affected
       bindings after repairs; never invent or suppress the orphan list.
    7. Return identity, check commands/results, useful failures and accessible
       evidence references through the native handoff, then stop. Keep full logs
       at their source, without duplicating inventories or status documents.
       Missing or truncated evidence stays explicit.
    
    ## Diagnosis, scaffolding and delegated work
    
    For an unexplained failure, first match the reported symptom and reduce the
    reproduction. State one causal prediction, test it with a discriminating check,
    and repair the cause supported by the result. Rerun the original scenario.
    Do not keep collecting hypotheses after the cause is understood. This compact
    diagnosis path is informed by
    [Matt Pocock's engineering skills](https://github.com/mattpocock/skills).
    
    When scaffolding is the requested change, start from the repository's existing
    layout and a working vertical slice. See [scaffold references](references/scaffold/agent-facing-tool-scaffolds.md)
    only for the relevant tool shape. Avoid placeholder success paths and a new
    framework for a one-off operation.
    
    Prefer current-session execution. If delegation is authorized and useful,
    partition independent writes in isolated workspaces; shared generators and
    integration serialize. Supply each lane its intent, acceptance, scope and review
    owner, then integrate its exact content and check facts. A selected wave ends with the
    caller-requested wave result; do not invent another wave. One fresh review of
    the integrated candidate can cover unjudged increments; when the integrator
    owns that review, workers return their handoff without commissioning another.
    Preserve any separately required lane judgments; a successful process exit is
    not semantic PASS.
    [Agent Native](../agent-native/SKILL.md) supplies optional dispatch mechanics.
    
    An explicitly requested one-shot adapter dispatches each supplied operation
    once, reports its output or error, and stops. Show dispatch count and failure
    reporting with a dry-run or fixture. It does not silently acquire a scheduler,
    retry controller or store. Factories require the caller's selection.
    
    ## Scope and finish
    
    Report an uncovered live consumer as `file:line` for a caller scope amendment;
    continue independent authorized work. Generated companions already included as
    scope require no new approval. Acceptance changes always require caller authority.
    
    Specialists advise only. Known defects stay implementation work; a genuine
    causal stall permits at most one bounded fresh helper within caller authority.
    Respect remaining caller/native bounds and reserve finishing capacity; retries reset neither.
    
    Return facts, not semantic PASS. An implement-only handoff does not authorize
    Git, tracker or delivery transitions; existing caller authority remains usable.
    A full outcome request continues through fresh independent final judgment;
    RPI is optional and explicitly selected. Success is working behavior with usable
    evidence, not volume of logs or process artifacts.
    
    [Generic scaffold examples](references/scaffold/generic-templates.md) are
    optional starting points when the repository has no suitable existing pattern.
    

Comments (0)

Sign in to join the conversation.

No comments yet.

Reviews (0)

No reviews yet.

Related