Repository navigation
Add interactive skill permission setup to intent install #220
Description
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.skillschanges 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.excludevalues and unrelatedintentfields. - Continue to create or update the existing managed guidance block.
- Provide a cancellation path with no configuration or guidance write.
- Make the
package.jsonupdate 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.jsonthat owns the editedintent.skillsdeclaration. - 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.jsonand guidance files unchanged. - Discovery, validation, or configuration write failure does not leave a partial
package.jsonupdate. - Existing package JSON formatting and unrelated fields are preserved.
- Existing exclusions and unrelated
intentconfiguration 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
- Support reviewable per-skill permissions #219 for individual skill selection. The package-level setup flow can ship independently.
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.skillsdeclarations. - Decide whether a confirmed first run always creates explicit
intent.skillsor 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.
Activity