Skip to content

Commit baee218

Browse files
author
Secure TDD Framework
committed
fix(sync): Update downstream README templates with canonical h3xar0n repo links
1 parent 4c672bc commit baee218

1 file changed

Lines changed: 79 additions & 1 deletion

File tree

‎scripts/sync_downstream.py‎

Lines changed: 79 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,44 @@ def sync_antigravity(target_repo: Path) -> int:
9090
if copy_file_if_changed(UPSTREAM_ROOT / doc, target_repo / doc):
9191
changes += 1
9292

93+
# 4. Generate dedicated Antigravity README.md
94+
antigravity_readme = """# Secure TDD for Antigravity
95+
96+
> **Secure Test-Driven Development (Secure TDD) agent skills, rules, and pre-push hooks for Antigravity AI coding agents.**
97+
98+
This repository is the dedicated Antigravity distribution of the **[Secure TDD Agent Framework](https://github.com/h3xar0n/secure-tdd-agent-framework)**.
99+
100+
## What's Included
101+
102+
- `.agents/rules/secure_tdd_workflow.md`: Always-on 4-phase workflow rule (`PLAN` -> `RED` -> `GREEN` -> `REFACTOR`).
103+
- `.agents/skills/`: Specialized agent skills for threat modeling, security test writing, defensive coding, local refactor scanning, and skill evolution.
104+
- `.agents/hooks.json` & `.agents/security_gate_hook.sh`: Local pre-push hook enforcing test-first verification before code reaches remote repositories.
105+
- `CONTEXT.md`: Living repository context, trust boundaries, and approved helpers.
106+
- `AGENTS.md`: Universal agent reference guide.
107+
108+
## Getting Started
109+
110+
1. Open this repository or copy `.agents/`, `AGENTS.md`, and `CONTEXT.md` into your Antigravity project root.
111+
2. The agent automatically discovers the workflow rules and skills.
112+
3. Test the local pre-push hook:
113+
```bash
114+
bash .agents/tests/run_tests.sh
115+
```
116+
117+
## Upstream Canonical Framework
118+
119+
All skills, rules, and threat models are maintained in the canonical upstream repository:
120+
🔗 **[h3xar0n/secure-tdd-agent-framework](https://github.com/h3xar0n/secure-tdd-agent-framework)**
121+
122+
## License
123+
124+
Licensed under the [Apache License, Version 2.0](LICENSE).
125+
"""
126+
ag_readme_path = target_repo / "README.md"
127+
if not ag_readme_path.exists() or ag_readme_path.read_text(encoding="utf-8") != antigravity_readme:
128+
ag_readme_path.write_text(antigravity_readme, encoding="utf-8")
129+
changes += 1
130+
93131
print(f" -> Antigravity sync complete ({changes} files updated).")
94132
return changes
95133

@@ -116,7 +154,47 @@ def sync_claude_code(target_repo: Path) -> int:
116154
if copy_file_if_changed(UPSTREAM_ROOT / doc, target_repo / doc):
117155
changes += 1
118156

119-
# 3. Sync modular hook & libraries
157+
# 3. Generate dedicated Claude Code README.md
158+
claude_readme = """# Secure TDD for Claude Code
159+
160+
> **Secure Test-Driven Development (Secure TDD) workflow instructions, skills, and pre-tool hooks for Claude Code CLI agents.**
161+
162+
This repository is the dedicated Claude Code distribution of the **[Secure TDD Agent Framework](https://github.com/h3xar0n/secure-tdd-agent-framework)**.
163+
164+
## What's Included
165+
166+
- `CLAUDE.md`: System prompt instructions loaded on Claude Code session start to enforce the 4-phase inner loop (`PLAN` -> `RED` -> `GREEN` -> `REFACTOR`).
167+
- `.claude/skills/`: Specialized kebab-case agent skills for threat modeling, security test writing, defensive coding, and refactor scanning.
168+
- `.claude/settings.json` & `.claude/hooks/security_gate_hook.sh`: PreToolUse bash hook enforcing test-first verification before `git push` runs.
169+
- `CONTEXT.md`: Living repository context, trust boundaries, and approved helpers.
170+
171+
## Getting Started
172+
173+
1. Open this repository in your terminal and launch Claude Code:
174+
```bash
175+
claude
176+
```
177+
2. Claude Code automatically ingests `CLAUDE.md` and discovers skills in `.claude/skills/`.
178+
3. Test the local pre-tool hook:
179+
```bash
180+
bash .claude/hooks/tests/run_tests.sh
181+
```
182+
183+
## Upstream Canonical Framework
184+
185+
All skills, rules, and threat models are maintained in the canonical upstream repository:
186+
🔗 **[h3xar0n/secure-tdd-agent-framework](https://github.com/h3xar0n/secure-tdd-agent-framework)**
187+
188+
## License
189+
190+
Licensed under the [Apache License, Version 2.0](LICENSE).
191+
"""
192+
cl_readme_path = target_repo / "README.md"
193+
if not cl_readme_path.exists() or cl_readme_path.read_text(encoding="utf-8") != claude_readme:
194+
cl_readme_path.write_text(claude_readme, encoding="utf-8")
195+
changes += 1
196+
197+
# 4. Sync modular hook & libraries
120198
claude_hooks_dst = target_repo / ".claude" / "hooks"
121199
if copy_file_if_changed(UPSTREAM_ROOT / ".agents" / "security_gate_hook.sh", claude_hooks_dst / "security_gate_hook.sh"):
122200
changes += 1

0 commit comments

Comments
 (0)