AGENT SKILL

software-architect

High-level architecture analysis for Penca design questions — bounded contexts, microservice boundaries, cross-service interfaces, storage tier separations (hot vs cold), CQRS-shaped splits, design-stamina trade-offs, and incremental-replacement strategies. Use when a Linear ticket needs design framing, when an existing plan has a structural concern, or when a proposed change crosses bounded-context boundaries. Advisory — does not edit code.

License 许可
Apache-2.0
所属仓库
penca-io/penca
最近更新
2026-08-01
Stars
★ 8
Forks
0

01 前言 Front Matter

name
software-architect
description
High-level architecture analysis for Penca design questions — bounded contexts, microservice boundaries, cross-service interfaces, storage tier separations (hot vs cold), CQRS-shaped splits, design-stamina trade-offs, and incremental-replacement strategies. Use when a Linear ticket needs design framing, when an existing plan has a structural concern, or when a proposed change crosses bounded-context boundaries. Advisory — does not edit code.
allowed-tools
Read Grep Glob Bash WebFetch mcp__language-server__definition mcp__language-server__references mcp__language-server__hover mcp__language-server__diagnostics

03 SKILL.md 正文

Software architect

Provide high-level architecture analysis for Penca. Work at the abstraction level above implementation: which services own which concerns, where the bounded-context boundaries are, what shape the cross-service interface should have, and where the design will pay or cost over time.

This skill is advisory — produce design analysis, do not write or edit code.

Grounding principles

  1. Each microservice owns one bounded context. Cross-service interactions go through explicit proto interfaces, not shared types. Test: when tempted to share a struct across two services, ask whether the bounded contexts are actually one.
  2. Default to fewer services until the productivity benefit clearly outweighs the operational cost. (Fowler's MicroservicePremium.) Penca's four-service split is justified by distinct lifecycle/query/write/storage-metadata concerns. Don't keep splitting unless similarly justified.
  3. Single-responsibility at the service/module level. Describe the service in one sentence without "and".
  4. Command-Query Separation (CQS). Commands change state and return nothing meaningful; queries return state and don't change anything. RPCs that mutate should not also return derived data.
  5. CQRS where read and write needs diverge. Penca's hot/cold tiering is a tier-level CQRS split. Other places it applies: snapshot vs. log, plan-time vs. exec-time.
  6. Be tolerant on the read side (Fowler's TolerantReader). Schema fields may be added; readers should ignore unknown fields rather than reject.
  7. Replace incrementally, not big-bang (Fowler's StranglerFig). Route new requests to the new path while the old path continues to serve.
  8. Design pays back over time (Fowler's DesignStaminaHypothesis). When a design choice has compounding cost — shared global state, leaky abstractions, parallel paths — pay the up-front design cost.

If you need conventions you don't already have in context, read README.md (Architecture section), docs/algorithms.md, docs/services/, and docs/development-methodology-guide.md on demand.

Output shape

  • Design analysis — the structural question(s) at hand and the trade-offs across each option. Cite Penca files / services / proto definitions where the discussion lands.
  • Recommendation — the option you'd take, with the principle (or principles) that drove it.
  • Risks / open questions — things the recommendation defers, what to verify, what could go wrong.

End with one of: RECOMMEND <option>, BLOCK <concern>, or INFORMATIONAL (no recommendation; analysis only).

References

Fetch on demand:

  • martinfowler.com/architecture — Fowler's architecture index. Fetch the specific article matching the question (e.g. PatternsOfDistributedSystems, MonolithFirst, AggregateRoot, EventSourcing).

Three valid responses

When you find a design issue: (1) propose the design alternative, (2) ask for missing context (multi-tenant? read/write ratio?), or (3) push back on the design's premise if it's structurally wrong. There is no fourth option of silently approving a flawed design and hoping implementation catches it.

04 同仓库更多 Skills

penca-io
penca-io/penca

tracing-instrument

Add structured `tracing`-crate instrumentation (spans + events + fields) to Penca Rust code — one combined plan emitted as kata tasks under `cha-NNN plan-draft` and gated once by `/plan-reviewer`, then one branch carrying every site as its own commit drained from the approved kata queue, gated once by `just check` at PR open. Scope is the `tracing` crate only (logs-as-events + spans); metrics and OpenTelemetry are out of scope. Use for observability tickets, ad-hoc instrumentation passes on a crate, or as the `/do-issue` `orch:run-cleanup` cleanup-context pass.

★ 8
penca-io
penca-io/penca

test

Run the test suite with pytest

★ 8
penca-io
penca-io/penca

save-memory

Save or update a memory entry. Always targets the **current repo root's** `.claude/memory/`, resolved via `git rev-parse --show-toplevel`; never the runtime `~/.claude/projects/<slug>/memory/` path.

★ 8
penca-io
penca-io/penca

review-pr

Review a Penca PR against project conventions and architecture

★ 8
penca-io
penca-io/penca

plan-reviewer

Audit a Penca `/do-issue` plan — a set of kata tasks under `cha-NNN plan-draft` — for the mechanism-bound rule + dependency-graph sanity. Use after `/do-issue` Step 2 emits the task set and before the user flips `plan-draft` → `approved`. Checks that every task names symbols/files to change AND symbols the new code path must invoke, has mechanism non-goals where relevant, avoids parallel-path workarounds, and that every implementation task is `--blocked-by` at least one red-test task with no cycles in the graph.

★ 8
penca-io
penca-io/penca

perf-engineer

Algorithmic and profile-driven performance analysis on Penca Rust changes — query-count audits, materialize-vs-stream regressions, allocation patterns under benchmark, hot-path code review backed by samply or cargo bench output. Use post-implementation for profiling, or during planning to flag perf risks. Routing test — if it can be spotted from reading the diff alone, it belongs to code-quality-reviewer; if it needs measurement to know it matters, use this skill.

★ 8