generated from coulomb/repo-seed
Workplan terminology: templates, updater guard, add_progress_event alias
- project_rules templates: rename workstream->workplan in prose; registration guidance is now file-first + fix-consistency C-06 (manual create_workplan/ create_workstream calls create duplicates); progress examples use workplan_id; legacy field names (state_hub_workstream_id) annotated - update_agent_instruction_files: never overwrite filled-in stack-and-commands/repo-boundary/architecture rules (TODO-marker guard) - mcp_server: add_progress_event accepts workplan_id (preferred) with workstream_id kept as legacy alias, mirroring create_task Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -27,6 +27,10 @@ def fetch(path: str):
|
||||
|
||||
EXTENSION_MARKER = "<!-- REPO-AGENTS-EXTENSIONS -->"
|
||||
|
||||
# Rule files that repos fill in with local content; only (re)write them while
|
||||
# they still contain the template's TODO markers.
|
||||
PRESERVE_IF_CUSTOMIZED = {"stack-and-commands", "repo-boundary", "architecture"}
|
||||
|
||||
|
||||
def render(template: str, values: dict[str, str]) -> str:
|
||||
for key, value in values.items():
|
||||
@@ -188,7 +192,13 @@ def update_repo(
|
||||
rules_dir = path / ".claude" / "rules"
|
||||
rules_dir.mkdir(parents=True, exist_ok=True)
|
||||
for name, template in rule_templates.items():
|
||||
(rules_dir / f"{name}.md").write_text(render(template, values), encoding="utf-8")
|
||||
target = rules_dir / f"{name}.md"
|
||||
if name in PRESERVE_IF_CUSTOMIZED and target.exists():
|
||||
# These files start as TODO templates and get filled per repo;
|
||||
# never overwrite a filled-in version with the blank template.
|
||||
if "TODO" not in target.read_text(encoding="utf-8"):
|
||||
continue
|
||||
target.write_text(render(template, values), encoding="utf-8")
|
||||
|
||||
return f"{repo_slug}\t{path}\t{prefix}"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user