Add gitignore-claude template and wire into registration flows
Introduce scripts/project_rules/gitignore-claude.template with the fleet pattern that tracks .claude/rules/ while ignoring machine-local Claude state. ensure_gitignore_claude_rules.py applies it during statehub register, register_project.sh, and update_agent_instruction_files fleet regen.
This commit is contained in:
parent
0d2fca5711
commit
638cdc4ee2
7 changed files with 128 additions and 0 deletions
|
|
@ -20,6 +20,8 @@ STATE_HUB_DIR = Path(__file__).resolve().parent
|
|||
API_BASE = os.environ.get("API_BASE", "http://127.0.0.1:8000")
|
||||
RULES_TEMPLATES_DIR = STATE_HUB_DIR / "scripts" / "project_rules"
|
||||
|
||||
from scripts.ensure_gitignore_claude_rules import ensure_claude_gitignore # noqa: E402
|
||||
|
||||
KEY_CONTEXT_FILES = [
|
||||
"INTENT.md",
|
||||
"README.md",
|
||||
|
|
@ -291,6 +293,10 @@ def write_registration_files(
|
|||
)
|
||||
written.append(brief_path)
|
||||
|
||||
gitignore_path = project_path / ".gitignore"
|
||||
if ensure_claude_gitignore(gitignore_path):
|
||||
written.append(gitignore_path)
|
||||
|
||||
return written
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue