Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Add worktree-local Intent policy overlays

オープン
#228 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
42/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
活発
技術スタック
typescript

調査の方向性

まず、既存の package.json ポリシーパスと、issue で指定されている effective-policy のコンシューマーを追跡します: list、load、stale、サポート診断、install --map、hooks。Git の追跡と完全な無視チェック、検証、セレクターのコンパイル、除外、移行動作、共有ポリシーの優先順位が受け入れ基準に一致するように、保護された .intent/config.local.json リゾルバーを実装して検証します。

索引モデルが issue の本文から書いたものです。

説明

enhancement

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.json discovery beside the nearest owning package.json as the sole local policy source. Keep package.json as 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/exclude contains the path.
  • Support a top-level JSON object with optional skills and exclude fields, 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.skills is absent and local skills is omitted or []. A non-empty local skills, 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.json beside the nearest owning package.json is 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/hooks remains 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 skills and exclude, 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.skills is absent, omitted or empty local skills preserves current migration behavior. A non-empty local skills, 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.

主要言語
TypeScript
スター
331
フォーク
22
平均マージ
12時間 17分
マージ済み PR(30日)
51

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

TanStack/intent のほかの issue

TanStack/intent の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。