Add worktree-local Intent policy overlays
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Aptitud para principiantes
- 42/100
- Tipo de issue
- Nueva funcionalidad
- Claridad
- Bastante claro
- Estado de actividad
- Activo
- Stack tecnológico
- typescript
- Área
- authorization, cli, security
Línea de trabajo
Comienza rastreando la ruta de políticas existente de package.json y los consumidores de effective-policy mencionados en el issue: list, load, stale, diagnósticos de soporte, install --map y hooks. Implementa y verifica el resolvedor protegido de .intent/config.local.json para que el seguimiento de Git y las comprobaciones de ignoración exacta, la validación, la compilación de selectores, las exclusiones, el comportamiento de migración y la precedencia de políticas compartidas coincidan con los criterios de aceptación.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Problem
Intent policy is currently shared through package.json. A user cannot add worktree-local grants or denials without changing committed repository policy. Local state also needs strict Git safety rules so it cannot be silently tracked or hide .intent/hooks.
User outcome
A user can manually create a valid .intent/config.local.json beside the nearest owning package.json. Intent applies it automatically as personal worktree state: local skills can broaden shared defaults, local excludes can add denials, and shared excludes remain final.
Example:
{
"skills": [
"@acme/private-skill"
],
"exclude": [
"@acme/unsafe-skill"
]
}
In scope
- Add
.intent/config.local.jsondiscovery beside the nearest owningpackage.jsonas the sole local policy source. Keeppackage.jsonas the sole shared committed source. - Provide reusable guarded local resolver and storage behavior that future installer or review work may consume.
- Require local policy operations to run in a Git worktree. Use only the exact sidecar path in
$GIT_COMMON_DIR/info/exclude; do not ignore.intent/, and preserve.intent/hooks. - Check that the exact local path is untracked on every local read and write. Reject tracked paths even when
info/excludecontains the path. - Support a top-level JSON object with optional
skillsandexcludefields, where at least one field is present. Parse present fields strictly as arrays of valid strings under the existing selector and exclusion grammars. - Activate a manually created valid local file automatically. Fail closed when a present local file is tracked, unreadable, malformed, or not exactly ignored.
- Compile shared and local skill selectors independently. For declared shared policy, grant a candidate when either predicate matches. Preserve existing package, exact-skill, wildcard, npm, and workspace semantics.
- Preserve migration behavior when shared
intent.skillsis absent and localskillsis omitted or[]. A non-empty localskills, including["*"], ends that migration mode. - Apply shared and local exclusions as final additive denials. Local policy must never restore a skill denied by shared policy.
- Make all policy consumers use the same effective-policy resolver: list, load, stale, support diagnostics, install
--map, and hooks.
Acceptance criteria
- A valid manual
.intent/config.local.jsonbeside the nearest owningpackage.jsonis discovered and applied automatically in a Git worktree. - The local file is accepted only when the exact path is untracked and exactly ignored through
$GIT_COMMON_DIR/info/exclude; the check applies to both reads and writes. .intent/hooksremains usable, and the implementation never ignores.intent/as a whole directory.- A tracked, unreadable, malformed, or not-exactly-ignored present local file fails closed with actionable diagnostics.
- The local object rejects unknown top-level fields, accepts only optional
skillsandexclude, requires at least one of them, and validates each present array under existing selector or exclusion rules. - Shared and local selector sets are compiled independently. For declared shared policy, a candidate is granted when either set matches without changing package, exact-skill, wildcard, npm, or workspace semantics.
- Shared and local exclusions both deny matching candidates after grant selection. A shared exclusion cannot be bypassed locally.
- When shared
intent.skillsis absent, omitted or empty localskillspreserves current migration behavior. A non-empty localskills, including["*"], ends it. list,load,stale, support diagnostics, install--map, and hooks resolve the same effective policy and report local-source provenance where they already report policy diagnostics.- The work introduces no
.intent/config.json, global local-policy store, new dependency, destination-selection UI, preview, confirmation, package writing, content delivery, locks, hashes, or Git skill-source support.
Related work
Blocked by: None. #219 is completed prior behavior. #220 and #221 may integrate local policy when available but can proceed independently with package.json-only behavior. #222 independent.
#220 owns interactive destination selection if and when it integrates local configuration. #221 owns repeat review if and when it integrates local configuration.
- Lenguaje dominante
- TypeScript
- Estrellas
- 331
- Forks
- 22
- Merge medio
- 12 h 17 min
- PR fusionados (30 d)
- 51
Guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de TanStack/intent
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
-
Dificultad 5/5 Más de una semana Aptitud para principiantes 45/100
-
Dificultad 4/5 3-5 días Aptitud para principiantes 48/100
-
Dificultad 5/5 Más de una semana Aptitud para principiantes 35/100
-
Dificultad 5/5 Más de una semana Aptitud para principiantes 45/100
Todos los issues de TanStack/intent
Issues similares
-
VerificationGate: ATTRIBUTION quote guard never matches a normal quotation (\b around the quote) Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
danielmiessler/LifeOS#2234 ·
-
T: Bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 85/100
-
Mend: dependency security vulnerability untriaged
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100