Skip to content

Commit d2d7140

Browse files
committed
docs: add clarification about documentation diagrams vs output templates
User clarification: box-drawing characters for documentation diagrams in skills that do NOT output boxes to users (e.g., tdd-implementation state machine, architecture flowcharts) are acceptable. - Updated skill-builder M217 section with distinction - Updated A020 description with same clarification - Diagrams illustrate concepts for readers, not templates for agent output
1 parent d098a0d commit d2d7140

2 files changed

Lines changed: 81 additions & 1 deletion

File tree

.claude/cat/retrospectives/retrospectives.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -508,7 +508,7 @@
508508
{
509509
"id": "A020",
510510
"priority": "high",
511-
"description": "Enforce template precomputation: Any skill with structured display (boxes, scorecards, tables) MUST have a Python handler that precomputes the output. Skills should not contain raw ASCII art or box templates.",
511+
"description": "Enforce template precomputation: Any skill with structured display (boxes, scorecards, tables) MUST have a Python handler that precomputes the output. Skills should not contain raw ASCII art or box templates. NOTE: Documentation diagrams in skills that do NOT output boxes to users (e.g., state machines, flowcharts) are acceptable - the rule targets output templates, not illustrations.",
512512
"category": "protocol_violation",
513513
"pattern_id": "PATTERN-014",
514514
"status": "open",

plugin/skills/skill-builder/SKILL.md

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -853,6 +853,82 @@ Hand-writing approximate output without calculation causes alignment errors.
853853
[Uses the calculated values from Step 3]
854854
```
855855

856+
### No Embedded Box Drawings in Skills (M217)
857+
858+
**Critical rule**: Skills MUST NOT contain embedded box-drawing examples in their instructions or
859+
templates. Embedded boxes cause agents to manually render similar output instead of using handler
860+
functions.
861+
862+
**Important distinction**: This rule applies to skills that **output boxes to users**. Documentation
863+
diagrams in skills that **do not produce boxes** (e.g., state machine diagrams in tdd-implementation,
864+
architecture flowcharts) are acceptable because:
865+
- They illustrate concepts for human readers, not templates for agent output
866+
- The agent is not asked to recreate or render them
867+
- They don't trigger the "copy this pattern" failure mode
868+
869+
**The failure pattern:**
870+
1. Skill document shows example box output:
871+
```
872+
╭──────────────────────╮
873+
│ Example Header │
874+
├──────────────────────┤
875+
│ Content here │
876+
╰──────────────────────╯
877+
```
878+
2. Agent sees this pattern and attempts to recreate it manually
879+
3. Manual rendering produces misaligned, incorrect boxes
880+
4. Handler functions (which would produce correct output) go unused
881+
882+
**Correct approach for skills that produce boxes:**
883+
884+
1. **Reference handler functions, not visual examples:**
885+
```markdown
886+
# BAD - Embedded box causes manual rendering
887+
Display the result in this format:
888+
╭──────────────────────╮
889+
│ {content} │
890+
╰──────────────────────╯
891+
892+
# GOOD - References function without visual example
893+
Use `build_box(content)` to render the result.
894+
The function handles all alignment and border construction.
895+
```
896+
897+
2. **For circle/rating patterns, use lookup tables not examples:**
898+
```markdown
899+
# BAD - Embedded pattern causes manual typing
900+
Display ratings like: ●●●●○ (4/5) or ●●○○○ (2/5)
901+
902+
# GOOD - Lookup table with explicit "do not type manually"
903+
Rating circle patterns (do not hand-type, copy from table):
904+
- 5 → ●●●●●
905+
- 4 → ●●●●○
906+
- 3 → ●●●○○
907+
- 2 → ●●○○○
908+
- 1 → ●○○○○
909+
```
910+
911+
3. **For output format documentation, describe structure not rendering:**
912+
```markdown
913+
# BAD - Shows rendered output
914+
The status display looks like:
915+
╭────────────────────────────────╮
916+
│ 📊 Progress: [████░░░░] 40% │
917+
╰────────────────────────────────╯
918+
919+
# GOOD - Describes structure, references handler
920+
The status display contains:
921+
- Header with emoji and title
922+
- Progress bar showing percentage
923+
- All rendering via `build_status_box()` function
924+
```
925+
926+
**Verification during skill creation:**
927+
- [ ] No box-drawing characters (╭╮╰╯│├┤┬┴┼─) appear in instruction examples
928+
- [ ] No formatted table examples with borders appear in skill text
929+
- [ ] Visual patterns (circles, bars, etc.) use lookup tables with "do not hand-type" warning
930+
- [ ] All display rendering references handler functions by name
931+
856932
### Output Artifact Gates (M192 Prevention)
857933

858934
**Critical insight**: Calculation gates alone are insufficient. When a skill produces structured
@@ -1391,4 +1467,8 @@ For each function:
13911467
- [ ] Gates use MANDATORY and BLOCKING keywords
13921468
- [ ] Calculation gates require explicit numeric results before construction
13931469
- [ ] Artifact gates require explicit output strings before final assembly
1470+
- [ ] **No embedded box drawings in skill instructions or examples** (M217)
1471+
- [ ] Box-drawing characters only appear in handler code, not skill text
1472+
- [ ] Visual patterns use lookup tables with "do not hand-type" warnings
1473+
- [ ] Display rendering references handler functions by name
13941474
- [ ] Verification criteria exist for the goal

0 commit comments

Comments
 (0)