Skip to content

feat(app-control): add the drive affected action and --trusted-root #11384

Description

@kyle-sexton

Parent

Refs #8651. Evidence-verification plan: Brief and acceptance criteria at #11364 (comment); Design and Plan comments are on #11364.

Depends on

  • none

Outcome

/app-control:drive affected maps a diff to the features of the app's control skill, and --trusted-root limits control-skill discovery to a trusted checkout, proven by the script's tests and drive's evals.

Demo: run the script's test file; the glob-semantics and trusted-root cases pass.

Plan (phase S1)

Satisfies: AC3, AC4
Size Medium. Depends on: none. Plugin: app-control. Design: Module layout (app-control), Contracts C1, --trusted-root.

  • Identify consumers first: grep sources index parsing in plugins/testing, plugins/verification, plugins/app-control and record the parse paths.
  • Add plugins/app-control/scripts/affected_features.py (+ .test.sh, same shape as verify_pin.test.sh): reads a hub index and git diff --name-only <base>...<head>, writes affected.json.
  • plugins/app-control/skills/drive/SKILL.md: affected row in Actions; --trusted-root in "Find the control skill" steps 1-2; argument-hint. drive/reference/evidence.md: affected.json and trusted_root.
  • Update plugins/app-control/reference/control-skill.md:49-50: sources resolve against the project directory, or, for a plugin control skill, against the repository under verification; glob syntax fixed in the script (** crosses /, * does not), not fnmatch. A control skill present that matched nothing reports control skill present, <n> files unmatched.
  • Evals in drive/evals/evals.json: project skill match, plugin skill match (repo-root globs), no control skill → empty with note, PR-checkout control skill ignored under --trusted-root.
  • Blast radius: LOW-MEDIUM (additive action; drive's existing actions unchanged).
  • Sanity Check: bash plugins/app-control/scripts/affected_features.test.sh exits 0 with cases plugins/*/SKILL.md not matching plugins/a/b/SKILL.md and plugins/**/x matching nested paths; grep -n "affected" plugins/app-control/skills/drive/SKILL.md shows the Actions row; /skill-quality:check drive PASS.
  • Run budget: at most 2 runs per new eval case; stop on the first usage-limit error.

Design excerpt

  • app-control (owns finding and driving apps): drive gains affected (diff → features, backed
    by scripts/affected_features.py), --trusted-root <dir>, the mask post-check, the publishable
    list and redacted report.public.{json,md}; the control-skill contract (reference/control-skill.md)
    gains ## Mask and the <changed files> placeholder. Knows nothing about Claude Code.
components:
  schemas:
    AffectedJson:            # C1, written by /app-control:drive affected
      type: object
      required: [app, control_skill, source, base, head, features, unmatched_files]
      properties:
        app: {type: string}
        control_skill: {type: [string, "null"]}      # full name + source, as report.json
        source: {enum: [project, plugin, none]}
        trusted_root: {type: [string, "null"]}
        base: {type: string}
        head: {type: string}
        features:
          type: array
          items:
            type: object
            required: [id, title, entry_points, matched_files]
            properties:
              id: {type: string}                     # features/<id>/README.md
              title: {type: string}
              entry_points:
                type: array
                items: {type: object, properties: {text: {type: string}, driven: {type: boolean}, reason: {type: [string, "null"]}}}
              matched_files: {type: array, items: {type: string}}
        unmatched_files: {type: array, items: {type: string}}
        note: {type: [string, "null"]}               # e.g. "No control skill: nothing matched"
  • /app-control:drive affected [<app>] --base <ref> [--head <ref>] [--out <dir>] [--unattended] [--trusted-root <dir>]
    — discovery as bare drive (plugins/app-control/skills/drive/SKILL.md:40-100); launches nothing; empty features when
    nothing matches or no control skill. Glob root: the repository under verification, for project
    and plugin control skills alike.
  • --trusted-root <dir> on every drive action: control skills only from <dir> and plugins loaded
    from under it (a PR head cannot supply its own control skill, masks or driver).

Acceptance criteria

Brief criteria this slice satisfies:

  • AC3: Diff-to-feature matching lives only in app-control; confirm and run-e2e call it instead of parsing control skills.
  • AC4: With the app's control skill not installed, drive falls back to the generic recipe and the report says so; nothing errors.

Done when:

  • Sanity Check passes: bash plugins/app-control/scripts/affected_features.test.sh exits 0 with cases plugins/*/SKILL.md not matching plugins/a/b/SKILL.md and plugins/**/x matching nested paths; grep -n "affected" plugins/app-control/skills/drive/SKILL.md shows the Actions row; /skill-quality:check drive PASS.
  • Evals in drive/evals/evals.json cover: project skill match, plugin skill match (repo-root globs), no control skill (empty with note), PR-checkout control skill ignored under --trusted-root
  • The plugin's version and CHANGELOG are bumped per the repository's release convention
  • ci-status is green on the PR head

🤖 Generated with Claude Code

https://claude.ai/code/session_01UJUn7KoThXoYQoxfvdCVi7

Activity

  1. added
    priority: mediumReal value, no hard deadline; normal backlog flow.
    agent-readyFully specified and briefed; eligible for autonomous pickup from the frontier.
    work-class: scopedA briefed fix or small feature; blast radius bounded by the brief, tests exist.
    on Oct 30, 2026
  2. github-actions commented on Oct 30, 2026

    @github-actions
    Contributor

    Proposed work class: work-class: scoped
    Basis: automated intake triage; the lanes App applied this class.

    Size: Medium
    Complexity: Medium
    Uncertainty: Known
    Flags: none
    Blocked by: none

    Understood: add a drive affected action to app-control that maps a git diff to control-skill features (via affected_features.py and its test script), plus a --trusted-root option that limits control-skill discovery to a trusted checkout. The issue also covers the SKILL.md and reference doc updates, the four evals, the version and CHANGELOG bump, and a green ci-status.

    The scope and done-when items are exact, so nothing is missing. The open issues on making confirm and run-e2e consume affected are downstream consumers of this work, not duplicates.

    Automated triage, applied by the lanes App.

  3. github-actions commented on Oct 30, 2026

    @github-actions
    Contributor
    No description provided.
  4. github-actions commented on Oct 30, 2026

    @github-actions
    Contributor
    No description provided.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    agent-readyFully specified and briefed; eligible for autonomous pickup from the frontier.priority: mediumReal value, no hard deadline; normal backlog flow.status: readyTriaged, unblocked, and fully specified; eligible to pick up.work-class: scopedA briefed fix or small feature; blast radius bounded by the brief, tests exist.

    Fields

    No fields configured for Feature.

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions