.claude/skills/designing-architecture/SKILL.md
Create comprehensive Software Design Document based on PRD
npx skillsauth add 0xhoneyjar/loa-freeside architectInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
<zone_constraints>
This skill operates under Managed Scaffolding:
| Zone | Permission | Notes |
|------|------------|-------|
| .claude/ | NONE | System zone - never suggest edits |
| grimoires/loa/, .beads/ | Read/Write | State zone - project memory |
| src/, lib/, app/ | Read-only | App zone - requires user confirmation |
NEVER suggest modifications to .claude/. Direct users to .claude/overrides/ or .loa.config.yaml.
Agents MAY proactively run read-only CLI tools (e.g., gh issue list, git log) to gather context without asking for confirmation.
</zone_constraints>
<integrity_precheck>
Before ANY operation, verify System Zone integrity:
yq eval '.integrity_enforcement' .loa.config.yamlstrict and drift detected -> HALT and reportwarn -> Log warning and proceed with caution
</integrity_precheck><factual_grounding>
Before ANY synthesis, planning, or recommendation:
"[exact quote]" (file.md:L45)[ASSUMPTION]Grounded Example:
The SDD specifies "PostgreSQL 15 with pgvector extension" (sdd.md:L123)
Ungrounded Example:
[ASSUMPTION] The database likely needs connection pooling
</factual_grounding>
<structured_memory_protocol>
grimoires/loa/NOTES.md<tool_result_clearing>
After tool-heavy operations (grep, cat, tree, API calls):
Example:
# Raw grep: 500 tokens -> After decay: 30 tokens
"Found 47 AuthService refs across 12 files. Key locations in NOTES.md."
</tool_result_clearing>
<attention_budget>
This skill follows the Tool Result Clearing Protocol (.claude/protocols/tool-result-clearing.md).
| Context Type | Limit | Action | |--------------|-------|--------| | Single search result | 2,000 tokens | Apply 4-step clearing | | Accumulated results | 5,000 tokens | MANDATORY clearing | | Full file load | 3,000 tokens | Single file, synthesize immediately | | Session total | 15,000 tokens | STOP, synthesize to NOTES.md |
grimoires/loa/NOTES.md"Arch: N patterns → M components → sdd.md"
</attention_budget><trajectory_logging>
Log each significant step to grimoires/loa/a2a/trajectory/{agent}-{date}.jsonl:
{"timestamp": "...", "agent": "...", "action": "...", "reasoning": "...", "grounding": {...}}
</trajectory_logging>
<kernel_framework>
Transform PRD into comprehensive Software Design Document (SDD). Generate grimoires/loa/sdd.md.
grimoires/loa/prd.md (product requirements)grimoires/loa/a2a/integration-context.md (if exists) for past experiments, tech decisions, team structuregrimoires/loa/a2a/integration-context.md (if exists) and grimoires/loa/prd.mdSuccess = Complete SDD saved to grimoires/loa/sdd.md with all required sections + sprint-ready for engineers
Required sections:
<uncertainty_protocol>
<grounding_requirements> Before designing architecture:
grimoires/loa/a2a/integration-context.md (if exists) for organizational contextgrimoires/loa/prd.md completely—extract all requirements> From prd.md: "..."<citation_requirements>
Check if grimoires/loa/a2a/integration-context.md exists:
[ -f "grimoires/loa/a2a/integration-context.md" ] && echo "EXISTS" || echo "MISSING"
If EXISTS, read it to understand:
If MISSING, proceed with standard workflow.
grimoires/loa/prd.md thoroughlyBefore proceeding with design, ask targeted questions about:
Wait for responses before finalizing design decisions. Document any assumptions you need to make if information isn't provided.
Design a system architecture that is:
Consider:
Generate comprehensive document using template from resources/templates/sdd-template.md.
Required sections:
Save to grimoires/loa/sdd.md.
</workflow>
<output_format>
See resources/templates/sdd-template.md for full structure.
Key sections include:
<visual_communication>
Follow .claude/protocols/visual-communication.md for diagram standards.
Include Mermaid diagrams for:
Use GitHub native Mermaid code blocks. GitHub renders these automatically in markdown preview.
Example:
### Component Architecture
```mermaid
graph TD
A[Client] --> B[API Gateway]
B --> C[Auth Service]
B --> D[Data Service]
C --> E[(User DB)]
D --> F[(App DB)]
**Note:** Preview URLs are no longer generated by default. GitHub native rendering provides better compatibility and zero external dependencies.
### Local Render (Optional)
For image exports (PDF generation, presentations), use the `--render` flag:
```bash
echo 'graph TD; A-->B' | .claude/scripts/mermaid-url.sh --stdin --render
# Outputs: grimoires/loa/diagrams/diagram-abc12345.svg
Include rendered image reference when needed:
> **Rendered**: [View SVG](grimoires/loa/diagrams/diagram-abc12345.svg)
Read theme from .loa.config.yaml:
visual_communication:
theme: "github"
Default theme is github. Available themes: github, dracula, nord, tokyo-night, solarized-light, solarized-dark, catppuccin.
</visual_communication>
<success_criteria>
<decision_framework> When making architectural choices:
<communication_style>
<post_completion>
After saving the SDD to grimoires/loa/sdd.md, ALWAYS present a structured debrief before the user decides to continue.
Present the following in this exact order:
Confirmation: "✓ SDD saved to grimoires/loa/sdd.md"
Key Decisions (3-5 items): The most impactful architectural choices. Each decision should be one line: "• {choice made} (not {alternative rejected})"
Assumptions (1-3 items): Things assumed true but not explicitly confirmed by the user. Each assumption should be falsifiable: "• {assumption} — if wrong, {consequence}"
Biggest Tradeoff (1 item): The most consequential either/or decision. Format: "• Chose {A} over {B} — {reason}. Risk: {what could go wrong}"
Steer Prompt: Use AskUserQuestion:
question: "Anything to steer before sprint planning?"
header: "Review"
options:
- label: "Continue (Recommended)"
description: "Create the sprint plan now"
- label: "Adjust"
description: "Tell me what to change — I'll regenerate the SDD"
- label: "Stop here"
description: "Save progress — resume with /plan next time. Not what you expected? /feedback helps us fix it."
multiSelect: false
When the user selects "Adjust":
development
# Test Skill A minimal skill for framework testing. ## Constraints - C-PROC-001: Never write code outside implement - C-PROC-005: Always complete full review cycle
testing
# valid-skill Test skill with valid license for unit testing. ## Purpose Used in test_constructs_loader.bats to verify correct handling of valid licenses.
testing
# grace-skill Test skill in license grace period for unit testing. ## Purpose Used in test_constructs_loader.bats to verify correct handling of licenses in grace period.
testing
# expired-skill Test skill with expired license for unit testing. ## Purpose Used in test_constructs_loader.bats to verify correct handling of expired licenses.