# ultrahwe-ddc2/hw-ds-authoring architecture

> Architecture diagram of the GitHub repository ultrahwe-ddc2/hw-ds-authoring, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-27). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/ultrahwe-ddc2/hw-ds-authoring
- Repository: https://github.com/ultrahwe-ddc2/hw-ds-authoring

## Overview

hw-ds-authoring is a Claude skill for authoring, editing, and reviewing hardware design specifications—not verification plans or results. The main workflow starts with a user’s source material, follows the contract and source-priority rules, develops specification sections and calculations, tracks risks and TBDs, then reviews and optionally produces a DOCX deliverable. The README documents the main capabilities and tooling; SKILL.md and several templates are named but not sampled, so their internal links are not expanded.

Main entry points: [`SKILL.md`](https://github.com/ultrahwe-ddc2/hw-ds-authoring/blob/main/SKILL.md) (DS contract), [`scripts/build_docx.py`](https://github.com/ultrahwe-ddc2/hw-ds-authoring/blob/main/scripts/build_docx.py) (DOCX builder), [`scripts/scan_artifacts.py`](https://github.com/ultrahwe-ddc2/hw-ds-authoring/blob/main/scripts/scan_artifacts.py) (Artifact scanner), [`templates/source_priority_rules.md`](https://github.com/ultrahwe-ddc2/hw-ds-authoring/blob/main/templates/source_priority_rules.md) (Source priority)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_authoring["Specification authoring"]
  node_contract["DS contract<br/>[SKILL.md]"]
end

subgraph group_guidance["Authoring guidance"]
  node_source_rules["Source priority"]
  node_section_guide["Section structure"]
  node_calculation_guides["Calculation checks"]
  node_worked_examples["Worked examples"]
  node_sparse_example["Sparse-input example"]
  node_lessons["Lessons learned<br/>[lessons_learned.md]"]
  node_skeleton["DS skeleton<br/>[ds_skeleton.md]"]
  node_author_prompt["Authoring prompt"]
  node_review_checklist["Review checklist"]
  node_risk_register["Risk register"]
  node_open_items_template["Open-items register"]
end

subgraph group_tooling["Deliverable tooling"]
  node_open_item_checker["Open-item checker"]
  node_docx_builder["DOCX builder<br/>[build_docx.py]"]
  node_artifact_scanner["Artifact scanner<br/>[scan_artifacts.py]"]
end

node_engineer(("Hardware engineer"))
node_pandoc["Pandoc"]
node_word["Microsoft Word"]

node_engineer -->|"requests DS"| node_contract
node_contract -->|"prioritizes inputs"| node_source_rules
node_contract -->|"sets sections"| node_section_guide
node_contract -->|"checks calculations"| node_calculation_guides
node_contract -->|"demonstrates calculations"| node_worked_examples
node_contract -->|"illustrates sparse inputs"| node_sparse_example
node_contract -->|"informs practice"| node_lessons
node_contract -->|"structures specification"| node_skeleton
node_contract -->|"guides authoring"| node_author_prompt
node_contract -->|"supports review"| node_review_checklist
node_contract -->|"tracks risks"| node_risk_register
node_contract -->|"tracks TBDs"| node_open_items_template
node_engineer -->|"builds deliverable"| node_docx_builder
node_docx_builder -->|"converts Markdown"| node_pandoc
node_docx_builder -->|"runs scan"| node_artifact_scanner
node_engineer -->|"checks Markdown"| node_open_item_checker
node_engineer -->|"scans deliverable"| node_artifact_scanner
node_engineer -->|"updates fields"| node_word

click node_contract "https://github.com/ultrahwe-ddc2/hw-ds-authoring/blob/main/SKILL.md"
click node_source_rules "https://github.com/ultrahwe-ddc2/hw-ds-authoring/blob/main/templates/source_priority_rules.md"
click node_section_guide "https://github.com/ultrahwe-ddc2/hw-ds-authoring/blob/main/references/section_structure.md"
click node_calculation_guides "https://github.com/ultrahwe-ddc2/hw-ds-authoring/blob/main/references/calculation_checklists.md"
click node_worked_examples "https://github.com/ultrahwe-ddc2/hw-ds-authoring/blob/main/examples/calculation_examples.md"
click node_sparse_example "https://github.com/ultrahwe-ddc2/hw-ds-authoring/blob/main/examples/sparse_input_example.md"
click node_lessons "https://github.com/ultrahwe-ddc2/hw-ds-authoring/blob/main/examples/lessons_learned.md"
click node_skeleton "https://github.com/ultrahwe-ddc2/hw-ds-authoring/blob/main/templates/ds_skeleton.md"
click node_author_prompt "https://github.com/ultrahwe-ddc2/hw-ds-authoring/blob/main/templates/ds_authoring_prompt.md"
click node_review_checklist "https://github.com/ultrahwe-ddc2/hw-ds-authoring/blob/main/templates/ds_review_checklist.md"
click node_risk_register "https://github.com/ultrahwe-ddc2/hw-ds-authoring/blob/main/templates/risk_register_table.md"
click node_open_items_template "https://github.com/ultrahwe-ddc2/hw-ds-authoring/blob/main/templates/open_items_table.md"
click node_open_item_checker "https://github.com/ultrahwe-ddc2/hw-ds-authoring/blob/main/scripts/check_open_items.py"
click node_docx_builder "https://github.com/ultrahwe-ddc2/hw-ds-authoring/blob/main/scripts/build_docx.py"
click node_artifact_scanner "https://github.com/ultrahwe-ddc2/hw-ds-authoring/blob/main/scripts/scan_artifacts.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_contract toneBlue
class node_source_rules,node_section_guide,node_calculation_guides,node_worked_examples,node_sparse_example,node_lessons,node_skeleton,node_author_prompt,node_review_checklist,node_risk_register,node_open_items_template toneAmber
class node_open_item_checker,node_docx_builder,node_artifact_scanner toneMint
class node_engineer,node_pandoc,node_word toneIndigo
```

## Components

### Specification authoring

- [DS contract](https://github.com/ultrahwe-ddc2/hw-ds-authoring/blob/main/SKILL.md): `SKILL.md`

### Authoring guidance

- [Source priority](https://github.com/ultrahwe-ddc2/hw-ds-authoring/blob/main/templates/source_priority_rules.md): `templates/source_priority_rules.md`
- [Section structure](https://github.com/ultrahwe-ddc2/hw-ds-authoring/blob/main/references/section_structure.md): `references/section_structure.md`
- [Calculation checks](https://github.com/ultrahwe-ddc2/hw-ds-authoring/blob/main/references/calculation_checklists.md): `references/calculation_checklists.md`
- [Worked examples](https://github.com/ultrahwe-ddc2/hw-ds-authoring/blob/main/examples/calculation_examples.md): `examples/calculation_examples.md`
- [Sparse-input example](https://github.com/ultrahwe-ddc2/hw-ds-authoring/blob/main/examples/sparse_input_example.md): `examples/sparse_input_example.md`
- [Lessons learned](https://github.com/ultrahwe-ddc2/hw-ds-authoring/blob/main/examples/lessons_learned.md): `examples/lessons_learned.md`
- [DS skeleton](https://github.com/ultrahwe-ddc2/hw-ds-authoring/blob/main/templates/ds_skeleton.md): `templates/ds_skeleton.md`
- [Authoring prompt](https://github.com/ultrahwe-ddc2/hw-ds-authoring/blob/main/templates/ds_authoring_prompt.md): `templates/ds_authoring_prompt.md`
- [Review checklist](https://github.com/ultrahwe-ddc2/hw-ds-authoring/blob/main/templates/ds_review_checklist.md): `templates/ds_review_checklist.md`
- [Risk register](https://github.com/ultrahwe-ddc2/hw-ds-authoring/blob/main/templates/risk_register_table.md): `templates/risk_register_table.md`
- [Open-items register](https://github.com/ultrahwe-ddc2/hw-ds-authoring/blob/main/templates/open_items_table.md): `templates/open_items_table.md`

### Deliverable tooling

- [Open-item checker](https://github.com/ultrahwe-ddc2/hw-ds-authoring/blob/main/scripts/check_open_items.py): `scripts/check_open_items.py`
- [DOCX builder](https://github.com/ultrahwe-ddc2/hw-ds-authoring/blob/main/scripts/build_docx.py): `scripts/build_docx.py`
- [Artifact scanner](https://github.com/ultrahwe-ddc2/hw-ds-authoring/blob/main/scripts/scan_artifacts.py): `scripts/scan_artifacts.py`

### Other components

- **Hardware engineer**
- **Pandoc**
- **Microsoft Word**

## Connections

- Hardware engineer → DS contract: requests DS (evidence: `README.md`)
- DS contract → Source priority: prioritizes inputs (evidence: `README.md`)
- DS contract → Section structure: sets sections (evidence: `README.md`)
- DS contract → Calculation checks: checks calculations (evidence: `README.md`)
- DS contract → Worked examples: demonstrates calculations (evidence: `README.md`)
- DS contract → Sparse-input example: illustrates sparse inputs (evidence: `README.md`)
- DS contract → Lessons learned: informs practice (evidence: `README.md`)
- DS contract → DS skeleton: structures specification (evidence: `README.md`)
- DS contract → Authoring prompt: guides authoring (evidence: `README.md`)
- DS contract → Review checklist: supports review (evidence: `README.md`)
- DS contract → Risk register: tracks risks (evidence: `README.md`)
- DS contract → Open-items register: tracks TBDs (evidence: `README.md`)
- Hardware engineer → DOCX builder: builds deliverable (evidence: `README.md`)
- DOCX builder → Pandoc: converts Markdown (evidence: `scripts/build_docx.py`)
- DOCX builder → Artifact scanner: runs scan (evidence: `scripts/build_docx.py`)
- Hardware engineer → Open-item checker: checks Markdown (evidence: `README.md`)
- Hardware engineer → Artifact scanner: scans deliverable (evidence: `README.md`)
- Hardware engineer → Microsoft Word: updates fields
