Skip to content

Add interactive skill permission setup to intent install #220

Description

@LadyBluenotes

Problem

intent install currently writes generic loading guidance by default, while intent install --map scans already permitted skills, or all discovered packages when no allowlist is set, and writes mappings. It does not help a consumer discover permission candidates, choose packages, or write intent.skills. The current policy is package-level; individual skill selection in this flow depends on #219.

User outcome

A human can run intent install, review discovered packages and skills, explicitly choose permissions, confirm the proposed configuration, and receive the existing guidance output in the same workflow.

In scope

  • Discover available package and skill candidates using the current discovery behavior.
  • Present packages for explicit human selection and, after Support reviewable per-skill permissions #219 defines the grammar, support individual skill selection.
  • Show the proposed intent.skills changes and destination file before writing.
  • Require explicit confirmation before changing package.json.
  • Write or update the selected configuration owner while preserving its formatting and unrelated fields.
  • Preserve existing intent.exclude values and unrelated intent fields.
  • Continue to create or update the existing managed guidance block.
  • Provide a cancellation path with no configuration or guidance write.
  • Make the package.json update atomic so a failed write cannot leave partial JSON.
  • Report configuration and guidance results separately if a later guidance write or verification fails.
  • Prevent accidental permission writes in noninteractive use.

Out of scope

  • Content locks, hashes, or byte-level verification.
  • Frozen CI or noninteractive trust enforcement.
  • Native skill placement or delivery synchronization.
  • Git sources.

Acceptance criteria

  • The command discovers available permission candidates before presenting selections.
  • The human can select packages and, when Support reviewable per-skill permissions #219 is complete, supported individual skills.
  • The command previews the exact permission changes and destination file before confirmation.
  • A documented deterministic rule chooses the package.json that owns the edited intent.skills declaration.
  • The command writes only after explicit confirmation.
  • The preview identifies newly permitted sources or skills as trust changes and preserves the acknowledged-risk notice for permit-all configuration.
  • Canceling leaves package.json and guidance files unchanged.
  • Discovery, validation, or configuration write failure does not leave a partial package.json update.
  • Existing package JSON formatting and unrelated fields are preserved.
  • Existing exclusions and unrelated intent configuration are preserved.
  • Existing guidance is created or updated as part of the confirmed flow.
  • A guidance failure after a successful configuration write reports both outcomes accurately and does not report full success.
  • Noninteractive use cannot trigger an unreviewed permission write.
  • The command reports whether permissions and guidance were changed, unchanged, canceled, or failed.

Dependencies

Open decisions

  • Decide how to evolve the current noninteractive default guidance behavior without silently breaking existing automation: keep it behind an explicit mode, make interactive setup TTY-only with a defined non-TTY behavior, or introduce a distinct action.
  • Decide the deterministic configuration owner rule for nested projects and inherited intent.skills declarations.
  • Decide whether a confirmed first run always creates explicit intent.skills or can retain the current absent-configuration migration mode.

Prior exploration

#204 explored interactive install together with content locking and managed delivery. This issue keeps only permission setup and the existing guidance output.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions