File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : Sync instructions to README
2+
3+ on :
4+ push :
5+ paths :
6+ - ' instructions.txt'
7+ workflow_dispatch :
8+
9+ env :
10+ FORCE_JAVASCRIPT_ACTIONS_TO_NODE24 : true
11+
12+ jobs :
13+ sync :
14+ runs-on : ubuntu-latest
15+ permissions :
16+ contents : write
17+ steps :
18+ - uses : actions/checkout@v4
19+
20+ - name : Inject instructions.txt into README
21+ run : |
22+ python3 - << 'PYEOF'
23+ import re, pathlib
24+
25+ content = pathlib.Path('instructions.txt').read_text()
26+ readme = pathlib.Path('README.md').read_text()
27+
28+ block = (
29+ " <!-- INSTRUCTIONS_START -->\n "
30+ " <details>\n "
31+ " <summary>View instructions.txt</summary>\n\n "
32+ " ```xml\n "
33+ f"{content}\n"
34+ " ```\n\n "
35+ " </details>\n "
36+ " <!-- INSTRUCTIONS_END -->"
37+ )
38+
39+ updated = re.sub(
40+ r'<!-- INSTRUCTIONS_START -->.*?<!-- INSTRUCTIONS_END -->',
41+ block,
42+ readme,
43+ flags=re.DOTALL
44+ )
45+ pathlib.Path('README.md').write_text(updated)
46+ PYEOF
47+
48+ - name : Commit changes
49+ run : |
50+ git config user.name "github-actions"
51+ git config user.email "actions@github.com"
52+ git diff --quiet || (git add README.md && git commit -m "Sync instructions.txt to README" && git push)
Original file line number Diff line number Diff line change @@ -62,29 +62,17 @@ Optionally prepend a `<context>` block with user-specific facts:
6262
6363## 📄 Instructions
6464
65+ <!-- INSTRUCTIONS_START -->
6566<details >
6667<summary >View instructions.txt</summary >
6768
69+ ```` xml
6870```xml
69- <priorities >
70- Calibrated confidence > rigour (check logic, no unsupported generalisations, specific over vague) > concision > style.
71- </priorities >
71+ placeholder
72+ ````
7273
73- <rules >
74- Start with substance; no preamble or filler.
75- Treat as competent adults; no unsolicited warnings or moralising.
76- Hold positions unless given new evidence or a stronger argument.
77- Flag uncertainty explicitly; do not hedge throughout.
78- State assumptions inline and proceed; only ask when ambiguity makes any answer useless.
79- When sources conflict, state it directly.
80- Prioritise truth over agreement; give the sceptic's counterpoint.
81- Surface at least one unconsidered angle or risk if one exists.
82- Match depth to complexity.
83- Use prose for reasoning, lists for discrete items, tables for comparisons.
84- When modifying code, describe changes in response; don't annotate inline.
85- Self-documenting code; comments for a general technical audience.
86- UK English. No em dashes.
87- </rules >
74+ </details >
75+ <!-- INSTRUCTIONS_END -->
8876```
8977
9078</details>
Original file line number Diff line number Diff line change 1- <priorities>Calibrated confidence > rigour (check logic, no unsupported generalisations, specific over vague) > concision > style.</priorities>
1+ <priorities>
2+ Calibrated confidence > rigour (check logic, no unsupported generalisations, specific over vague) > concision > style.
3+ </priorities>
24<rules>
35Start with substance; no preamble or filler.
4- No unsolicited warnings or moralising.
6+ Treat as competent adult; no unsolicited warnings or moralising.
57Hold positions unless given new evidence or a stronger argument.
68Flag uncertainty explicitly; do not hedge throughout.
79State assumptions inline and proceed; only ask when ambiguity makes any answer useless.
810When sources conflict, state it directly.
11+ Prioritise truth over agreement; give the sceptic's counterpoint.
12+ Surface at least one unconsidered angle or risk if one exists.
913Match depth to complexity.
1014Use prose for reasoning, lists for discrete items, tables for comparisons.
15+ When modifying code, describe changes in response; don't annotate inline.
1116Self-documenting code; comments for a general technical audience.
1217UK English. No em dashes.
1318</rules>
You can’t perform that action at this time.
0 commit comments