|
| 1 | +--- |
| 2 | +name: write-article |
| 3 | +description: Write a technical article about a ShiftingCodes pass or related topic |
| 4 | +--- |
| 5 | + |
| 6 | +Write a technical article about $ARGUMENTS and save it to `articles/` with a descriptive kebab-case filename. |
| 7 | + |
| 8 | +## Workflow |
| 9 | + |
| 10 | +### 1. Read before writing |
| 11 | +- Read the actual pass implementation(s) the article covers — never describe what code does from memory |
| 12 | +- Read the test files and `tests/conftest.py` helper functions to understand what "before" IR looks like |
| 13 | +- If the article covers IR examples, trace the exact instruction sequences the pass emits |
| 14 | + |
| 15 | +### 2. Frontmatter |
| 16 | +Every article starts with: |
| 17 | +```yaml |
| 18 | +--- |
| 19 | +title: "Title Here" |
| 20 | +date: "YYYY-MM-DD" |
| 21 | +description: "One sentence describing what the article covers and why it matters" |
| 22 | +tags: ["relevant", "tags", "here"] |
| 23 | +--- |
| 24 | +``` |
| 25 | + |
| 26 | +### 3. Structure |
| 27 | +1. **Hook** — one paragraph on the real-world problem (reverse engineering, protection, etc.) |
| 28 | +2. **What is X** — introduce the upstream project(s) with accurate history and maintenance status |
| 29 | +3. **The problem** — why the original doesn't work today (version freeze, API churn, etc.) |
| 30 | +4. **The solution** — introduce ShiftingCodes and llvm-nanobind; credit authors specifically |
| 31 | +5. **Before/after IR** — concrete examples grounded in actual pass output |
| 32 | +6. **How to use** — setup, Python driver script, selective obfuscation, UI |
| 33 | +7. **Credits** — name individuals, not just projects |
| 34 | + |
| 35 | +### 4. IR example rules |
| 36 | +- Add this note at the top of the before/after section: |
| 37 | + > *IR samples are lightly simplified for readability — actual output uses random constants and generated names — but the instruction sequences and structure match the Python implementation exactly.* |
| 38 | +- **Before IR**: must match what the `conftest.py` helper functions actually build |
| 39 | +- **After IR**: must reflect the real algorithm — read the pass source, trace the instruction sequence |
| 40 | +- Use `<placeholder>` for random constants (e.g. `<a>`, `<m>`, `<loop_state>`) rather than inventing specific numbers |
| 41 | +- Show real variable names from the pass (`bcf.var`, `cff.state`, `sub.ar`, etc.) |
| 42 | +- Comments in IR should explain the invariant, not just label blocks |
| 43 | +- If a block is dead/unreachable, say so explicitly in a comment |
| 44 | + |
| 45 | +### 5. Tone and accuracy |
| 46 | +- No superlatives ("brilliant", "amazing") — describe what things do, not how impressive they are |
| 47 | +- State clearly when upstream projects are unmaintained/archived |
| 48 | +- Legal disclaimer (end of article): |
| 49 | + > *[Project] is provided for legitimate use cases including software protection, security research, CTF challenge authoring, and compiler education. The authors make no representations regarding fitness for any particular purpose and accept no liability for any misuse or damages arising from the use of this software. Use is entirely at your own risk and responsibility.* |
| 50 | +- Credit individual contributors by name with GitHub links (e.g. mrexodia for llvm-nanobind) |
| 51 | +- Tease future articles for related projects rather than covering them inline |
| 52 | + |
| 53 | +### 6. Scope discipline |
| 54 | +- Be precise about what the article covers — if it's about Pluto, don't claim 17 passes when Pluto has 6 |
| 55 | +- Don't mention Polaris techniques as Pluto techniques |
| 56 | +- If an IR example uses a Polaris-era algorithm, describe the algorithm accurately, not the simpler Pluto version |
| 57 | + |
| 58 | +### 7. Verification checklist before finishing |
| 59 | +- [ ] All URLs match the canonical list in CLAUDE.md |
| 60 | +- [ ] Each "before" IR matches what conftest helpers actually build |
| 61 | +- [ ] Each "after" IR matches the actual pass algorithm (read the source) |
| 62 | +- [ ] Pass count / feature claims are accurate |
| 63 | +- [ ] Maintenance status of upstream projects is stated correctly |
| 64 | +- [ ] Article scoped to what it claims to cover |
| 65 | +- [ ] Frontmatter complete with today's date |
| 66 | +- [ ] Saved to `articles/<descriptive-kebab-name>.md` |
0 commit comments