mirror of
https://github.com/wassname/draw_diag.git
synced 2026-06-27 17:00:48 +08:00
init
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
{
|
||||
"permissions": {
|
||||
"allow": [
|
||||
"Bash(chmod:*)",
|
||||
"Bash(curl:*)",
|
||||
"Bash(sh)",
|
||||
"Bash(./render_diagram.sh:*)",
|
||||
"Bash(typst:*)",
|
||||
"WebFetch(domain:cetz-package.github.io)",
|
||||
"Bash(tree:*)"
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
*.png
|
||||
diagrams/
|
||||
!diagrams/examples/
|
||||
!diagrams/TEMPLATE.typ
|
||||
@@ -0,0 +1,36 @@
|
||||
# draw_diag
|
||||
|
||||
CeTZ/Typst diagrams with Claude Code iteration loop.
|
||||
|
||||
## Setup
|
||||
|
||||
```bash
|
||||
sudo snap install typst
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
```bash
|
||||
./render_diagram.sh diagrams/example/my_diagram.typ
|
||||
```
|
||||
|
||||
## Claude Code iteration workflow
|
||||
|
||||
1. Read source code, create `.typ` file with source docs in comments
|
||||
2. Render: `./render_diagram.sh diagram.typ`
|
||||
3. **Use a sub-agent to review the PNG** (critical - avoids confirmation bias):
|
||||
```
|
||||
Task tool, subagent_type: general-purpose
|
||||
"Look at this PNG and explain what concept it conveys. No context - just describe what you see. Maybe give constructive criticism and describe any issues you have with the task"
|
||||
```
|
||||
4. Fix issues based on sub-agent feedback
|
||||
1. Each time make a new file: `diagram_v2.typ`, `diagram_v3.typ`, etc. So we can visualize the changes over time.
|
||||
5. Repeat until sub-agent correctly understands the diagram without hints
|
||||
|
||||
## References
|
||||
|
||||
- [CeTZ docs](https://cetz-package.github.io/docs/)
|
||||
- [CeTZ gallery](https://github.com/typst/packages/tree/main/packages/preview/cetz/0.4.2/gallery)
|
||||
|
||||
|
||||

|
||||
Reference in New Issue
Block a user