From pharaoh
Drafts one activity diagram for procedure control flow with actions, decisions, forks/joins, and swimlanes. For ASPICE SWE.3 Software Detailed Design; renderer via pharaoh.toml (e.g., Mermaid/PlantUML).
How this skill is triggered — by the user, by Claude, or both
Slash command
/pharaoh:pharaoh-activity-diagram-draftThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
> **Status:** DESIGN ONLY. Implementation sentinel FAIL: `"pharaoh-activity-diagram-draft is planned but not implemented; see SKILL.md"`.
Status: DESIGN ONLY. Implementation sentinel FAIL:
"pharaoh-activity-diagram-draft is planned but not implemented; see SKILL.md".
Shared tailoring rules: see shared/diagram-tailoring.md. Reads [pharaoh.diagrams.activity].
Safe-label rules: see shared/diagram-safe-labels.md. Every emitted label / node id / edge label MUST be sanitised per that rule set before the block leaves this skill. sphinx-build does not validate diagram bodies — a parse failure becomes visible only at browser render time. Sanitisation is the first line of defence; the second is pharaoh-diagram-lint run as part of pharaoh-quality-gate.
One invocation → one activity diagram. Captures control flow within a single procedure: sequential actions, branching (decisions), forking (parallel activities), joining, and swimlanes (partitions) showing which actor/component performs which action.
Typical ASPICE context:
Does NOT capture ordered inter-component message exchange (→ pharaoh-sequence-diagram-draft). Does NOT capture state lifecycle (→ pharaoh-state-diagram-draft).
(a) One procedure in → one diagram out.
(b) Input: {view_title: str, actions: list[ActionSpec], decisions: list[DecisionSpec], forks: list[ForkSpec], edges: list[EdgeSpec], initial: str, finals: list[str], swimlanes?: list[SwimlaneSpec], project_root: str, renderer_override?, on_missing_config?, papyrus_workspace?, reporter_id: str} where ActionSpec = {id: str, label: str, swimlane?: str}, DecisionSpec = {id: str, label: str, swimlane?: str}, ForkSpec = {id: str, kind: "fork"|"join", swimlane?: str}, EdgeSpec = {from: str, to: str, guard?: str, label?: str}, SwimlaneSpec = {id: str, label: str}. Output: one RST directive block.
(c) Reward: fixture — procedure receive_can_frame with actions [parse, validate, dispatch], one decision (valid?), two finals (accepted, rejected). Scorer:
[*] or equivalent) pointing to initial.[...].subgraph; PlantUML: |SwimlaneX| partition).finals has an outgoing edge to [*].Pass = all 6.
(d) Reusable for any procedural spec: SW detailed design, system workflows, operator procedures.
(e) One diagram per call.
FAIL on edge endpoint not in actions ∪ decisions ∪ forks ∪ {initial}. An activity diagram with a transition to an undeclared action is an incomplete procedure.
PlantUML (preferred for swimlane support):
.. uml::
:caption: <view_title>
@startuml
|Driver|
start
:parse CAN frame;
if (valid?) then (yes)
|Dispatcher|
:dispatch to handler;
stop
else (no)
|Driver|
:log error;
end
endif
@enduml
Mermaid (limited — no native swimlanes):
.. mermaid::
:caption: <view_title>
flowchart TD
Start([Start]) --> Parse[parse CAN frame]
Parse --> Valid{valid?}
Valid -->|yes| Dispatch[dispatch to handler]
Valid -->|no| Log[log error]
Dispatch --> End([End])
Log --> End
pharaoh-activity-from-cfg could infer from control-flow graphs.npx claudepluginhub useblocks/pharaoh --plugin pharaohDrafts one sequence diagram for ordered interactions between participants (actors, components, external systems) over time. Renderer via pharaoh.toml; Mermaid/PlantUML syntax.
Generates visual models and diagrams (ERDs, UML, flowcharts, architecture diagrams) in Mermaid and PlantUML based on confirmed source facts.
Generates Mermaid diagrams from text descriptions by analyzing intent to select types like activity, sequence, deployment, architecture, class, ER, or state.