Logo vun Arch Code Review

Arch Code Review

Communautéit
PriNova
arch-code-review

Architecture-aware review against canonical structured YAML artifacts. Read-only workflow; no legacy prose docs.

Iwwersiicht

EditeurPriNova
Repositorypi-agent-codebase-workflows
Skill-Nummarch-code-review
Stären
82
Forks
2
Matgeliwwert Fichieren
Nëmmen Instruktiounen
LizenzMIT
Linken
  • Instruktiounen am Markdown-Format

    Eng SKILL.md-Datei, déi de Modell bei Bedarf luet, soudatt nëmmen Token ufalen, wann eng Ufro tatsächlech dozou passt.

  • Funktionéiert mat all LLM

    KI-Skills si reng Markdown, keen ubidderspezifesche Code. Dofir funktionéiert dëse Skill mat GPT, Claude, Gemini, Grok oder engem lokale Modell.

  • Alles an den Instruktiounen

    Alles, wat de Modell brauch, steet an den Instruktiounen — keng zousätzlech Dateien ze synchroniséieren.

  • Open Source

    Vum PriNova op GitHub verëffentlecht. Liest de Quelltext, ier Dir de Skill installéiert.

Installatioun

Installéiert de KI-Skill Arch Code Review an TypingMind, fir e mat all LLM ze benotzen, oder füügt en an en anere KI-Agent an, deen SKILL.md liest.

1

An TypingMind installéieren

TypingMind installéiert e Skill direkt aus sengem GitHub-Dossier — dobäi gëtt SKILL.md gelies, d'Ressourcedateie gi gebëndelt an d'Resultat gëtt lokal gespäichert.

  1. Maacht d'App op a gitt op Plugins → Skills.
  2. Wielt „Vun GitHub installéieren“.
  3. Pecht d'URL vum Skill-Dossier hei drënner an a bestätegt.
    https://github.com/PriNova/pi-agent-codebase-workflows/tree/main/skills/arch-code-review
  4. Aktivéiert de Skill an all Chat, an deem Dir e benotze wëllt.
Plugins → Skills → Skill afügen → Vu GitHub-URL, pecht dann d'URL vum Dossier an a klickt op Weider.
2

An engem anere KI-Agent installéieren

All KI-Agent, deen d'Format Agent Skills liest, kann dëse Skill benotzen — kopéiert den Dossier an de Skill-Verzeechnes vun deem KI-Agent.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/PriNova/pi-agent-codebase-workflows.git /tmp/pi-agent-codebase-workflows
mkdir -p .claude/skills
cp -r /tmp/pi-agent-codebase-workflows/skills/arch-code-review .claude/skills/arch-code-review
Start Claude Code nom Kopéieren nei, fir datt den neie Skill erkannt gëtt.

An TypingMind benotzen

Aktivéiert Arch Code Review an engem Chat vun TypingMind, an de Modell iwwerhëlt de Rescht. Den Numm an d'Beschreiwung stinn am System-Prompt. Soubal eng Ufro dozou passt, luet de Modell déi komplett Instruktioune selwer — Dir musst de Skill ni manuell opruffen, an et fale keng Token un, bis en tatsächlech benotzt gëtt.

De Modell luet Arch Code Review automatesch, soubal eng Ufro dozou passt.

Funktionéiert mat all KI-Modell

KI-Skills si reng Markdown-Instruktiounen amplaz vun ubidderspezifeschem Code. Dofir ass Arch Code Review net un de Modell gebonnen, fir deen de Skill geschriwwe gouf. Installéiert en eemol an TypingMind a benotzt e mat GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama oder engem lokale Modell, deen Dir selwer bedreift — alles mat Ären eegenen API-Keys.

  • Gëtt nëmme gelueden, wann et néideg ass

    De System-Prompt enthält nëmmen den Numm an d'Beschreiwung. D'Instruktioune gi bei der éischter passender Ufro gelueden, soudatt en onbenotzte Skill näischt kascht.

  • De Modell am lafende Chat wiesselen

    Well de Skill aus Instruktiounen amplaz vu Code besteet, funktionéiert en och no engem Modellwiessel — den nächste Modell liest déi selwecht SKILL.md-Datei.

Skill-Instruktiounen

Dëst ass den Inhalt vu SKILL.md, deen de Modell luet. Liest e virun der Installatioun — e Skill besteet aus Instruktiounen, déi Äre Modell befollegt.

Architecture Code Review — Structured API Only

Goal: review diffs for correctness, drift, data consistency, side-effect boundaries, contract compatibility, and tests using YAML artifacts from the resolved structured docs root.

Structured Artifact API Contract

Legacy prose artifacts are deprecated. Do not create, update, or rely on docs/agent/*.md, scoped prose docs, or generated human-readable Markdown views. Use structured YAML for canonical artifacts. Root AGENTS.md remains a harness interoperability file and may be generated/updated only by workflows that explicitly say so.

Resolved structured docs root:

Treat docs/agent/api as a logical layout rooted at a resolved structured docs root, not a fixed repo path.

Resolution rules:

  1. Resolve workspace_root with git rev-parse --show-toplevel 2>/dev/null or fallback to pwd.
  2. Canonicalize workspace_root before fingerprinting when possible (realpath, pwd -P, Path(...).resolve(), or equivalent).
  3. safe-start always creates and uses the initial repo-local root: <workspace_root>/docs/agent/api.
  4. Review reads repo-local only when <workspace_root>/docs/agent/api already exists.
  5. Otherwise read the global overlay root: ~/.pi/agent/workspaces/<workspace-fingerprint>/docs/agent/api.
  6. Compute <workspace-fingerprint> exactly from canonical workspace_root: strip one leading slash/backslash, replace every slash, backslash, and colon with -, then wrap with --. This keeps the same workspace stable.
  7. Example: /data/data/com.termux/files/home/CodeProjects/pi-mono -> --data-data-com.termux-files-home-CodeProjects-pi-mono--.
  8. Do not create new repo-local structured docs in unadopted repos unless the user explicitly asks for repo-local adoption there.

Logical structured layout under the resolved docs root:

text
repo/
  scopes.yaml
  repo-inventory.yaml
  project-intent.yaml
  architecture.yaml
  data-flow.yaml
  data-model.yaml
  invariants.yaml
  dependency-rules.yaml
  design-issues.yaml
  risk-register.yaml
  change-guide.yaml
  testing-strategy.yaml
  validation-baseline.yaml
  contracts.yaml
  adr.yaml
  agent-operating-guide.yaml
scopes/
  by-path/<repo-relative-path>/...
  by-domain/<slug>/...

Every structured artifact must conform to ../_shared/references/schemas/common.schema.json plus its artifact-specific schema. Do not inline, invent, or vary envelope fields.

Stable IDs required: scope:*, component:*, entity:*, invariant:*, risk:*, contract:*, flow:*, command:*, issue:*, adr:*, testplan:*.

Ownership rules:

  • scopes: scope routing, ownership, cross-scope discovery only.
  • repo-inventory: file tree, commands index, entry points, external boundaries, configs.
  • validation-baseline: command status, blockers, recommended validation order.
  • project-intent: goals, users, journeys, non-goals, constraints, assumptions.
  • architecture: components, architecture style, side-effect boundaries, high-level flow refs.
  • data-flow: typed flow graph/steps, inputs, outputs, error states.
  • data-model: entities, IDs, schemas, relationships, lifecycles, serialized formats.
  • invariants: rules, forbidden states, enforcement locations, invariant-test refs.
  • dependency-rules: layers, allowed/forbidden dependencies, violations, coupling hotspots.
  • design-issues: structural drift, deferred decisions, ambiguity, ownership gaps.
  • risk-register: failure modes, severity/confidence, affected refs, suggested tests/fixes.
  • contracts: cross-scope APIs, schemas, events, generated clients, DB/file/deployment/env contracts.
  • testing-strategy: test topology, coverage gaps, risk-to-test priorities.
  • change-guide: workflow routing and checklists; references owner artifacts, duplicates no facts.
  • adr: structured decision records with bounded prose fields.
  • agent-operating-guide: structured source for agent operating rules. Root AGENTS.md may mirror this in compact harness-readable Markdown when produced by safe-start or codebase-recon Pass 6.

Redundancy rule: define each fact in its owner artifact exactly once. Other artifacts reference IDs. Prose rule: bounded prose allowed only in summary, notes, rationale, context, decision, recommended_action, and similar scalar fields. Scope rule: if focus is path-like, read under <docs-root>/scopes/by-path/<focus>/; otherwise under <docs-root>/scopes/by-domain/<slug>/. Always resolve scope from <docs-root>/repo/scopes.yaml when present.

Runtime Schema Loading

When a workflow creates, updates, migrates, or validates structured artifacts, read ../_shared/references/artifact-api.md first. Then read only the shared skill package schemas needed for the artifacts being written:

  • ../_shared/references/schemas/common.schema.json
  • ../_shared/references/schemas/<artifact-file-base>.schema.json

Do not read all schemas. Do not use templates. Schemas are runtime API contracts; project docs outside the shared runtime refs are maintainer aids unless the user asks about this package itself.

Structured Artifact Write/Update Protocol

Use this protocol whenever creating or updating YAML artifacts.

1. Scope and owner resolution

  1. Resolve scope first from task/focus and <docs-root>/repo/scopes.yaml when present.
  2. Path focus uses longest prefix match; domain focus requires explicit domain/contract/task evidence.
  3. Select the single owner artifact for each fact using the ownership rules above.
  4. Never duplicate owner facts in router/checklist artifacts; reference stable IDs instead.

2. Read-before-write

  1. Read the existing target YAML if it exists.
  2. Read directly referenced owner artifacts needed to preserve refs and avoid duplication.
  3. If target YAML is absent, create it with the common envelope and artifact-specific top-level keys.
  4. Preserve unknown fields unless they conflict with this protocol; do not silently drop agent/user-added structured data.

3. Stable ID generation

  1. Reuse existing IDs whenever the semantic object is the same, even if name/path changed.
  2. New IDs use deterministic slugs from owner scope + semantic name: risk:<slug>, entity:<slug>, component:<slug>, etc.
  3. If two objects slug-collide, append shortest stable discriminator from path/component/contract, not a random suffix.
  4. Never renumber IDs because order changed.

4. Upsert semantics

For each discovered fact/object:

  1. Match existing record by ID first.
  2. If no ID match, match by stable source-of-truth fields: path+symbol, contract source path, command string+cwd, entity name+owner scope, rule owner+kind.
  3. If matched, update only changed fields, append/refresh evidence, and preserve unrelated fields.
  4. If unmatched, insert new record in deterministic order by ID or explicit order field.
  5. If an existing observed record is no longer supported, do not delete it by default. Mark status: stale or deprecated, add evidence/unknown explaining why, and link replacement ID when known.
  6. Delete only records known to be accidental duplicates or malformed, and mention deletion in final response.

5. Evidence and confidence

  1. Every observed record needs at least one evidence ref with file/symbol/command/doc/diff observation.
  2. Planned records may use evidence_mode: planned and confidence low or medium.
  3. Mixed records must separate observed fields from planned/assumed fields via evidence refs or unknowns.
  4. Do not upgrade status: current or confidence high without source or command evidence.

6. Reference integrity

Before writing final artifacts:

  1. Check every *_ref, *_refs, and depends_on ID points to a record in the same artifact set or is explicitly listed as external/unknown.
  2. Prefer adding missing owner records as compact stubs over leaving dangling refs.
  3. For cross-scope refs, ensure scopes.yaml and contracts.yaml identify owner/consumer relationship.
  4. If ownership is ambiguous, create/update design-issues.yaml with kind: ownership_gap and reference it.

7. Status transitions

Allowed transitions:

  • planned -> partial -> current
  • current -> stale -> current
  • current|stale|partial -> deprecated

Rules:

  • current requires sufficient observed evidence for the represented scope.
  • partial means useful but incomplete evidence.
  • stale means contradicted by newer source evidence or missing source path.
  • deprecated means superseded; include replacement_ref when known.

8. Deterministic formatting

  1. Use YAML with two-space indentation.
  2. Use stable top-level key order: envelope keys first, artifact-specific keys next.
  3. Sort unordered arrays by id; keep ordered flow/checklist arrays by order.
  4. Use null, [], or {} consistently rather than omitting required envelope fields.
  5. Keep prose scalar fields concise; no long narrative blocks.

9. Validation before completion

Perform best-effort validation after writing:

  1. Re-read changed YAML for parse/syntax sanity when practical.
  2. Validate against the shared schemas by inspection/re-read: envelope keys, artifact-specific top-level keys, required arrays/items, stable ID prefixes, and obvious dangling refs.
  3. Verify no legacy Markdown artifacts were created or updated by the workflow, except root AGENTS.md when explicitly produced for harness interoperability.
  4. Report changed YAML files, validation performed, unresolved unknowns, and any intentionally stale/deprecated records.

Invocation

Use this skill directly or use /review-arch as the prompt-template shortcut for architecture-aware diff review.

Rules

  • Read-only. Do not edit code or artifacts.
  • Review current diff unless user specifies target.
  • Do not read legacy prose Markdown docs.
  • Read repo/scopes.yaml first if present; match changed paths by longest prefix; then read relevant owner YAML artifacts.
  • Every finding needs severity, location, evidence, owner artifact refs, why it matters, suggested fix.
  • Prioritize correctness, invariants, contracts, dependency rules, side-effect boundaries, known risks, and tests.

Review Checklist

  • Diff matches architecture.yaml components/boundaries.
  • Diff respects dependency-rules.yaml.
  • Data/schema changes update data-model.yaml and contracts.yaml as owner artifacts.
  • Flow/error-state changes update data-flow.yaml.
  • Invariants in invariants.yaml remain enforced/tested.
  • Known risks in risk-register.yaml are not worsened.
  • Design drift in design-issues.yaml is addressed or not worsened.
  • Tests align with testing-strategy.yaml and validation-baseline.yaml commands.
  • Scope ownership and contract owner/consumer refs remain valid in scopes.yaml and contracts.yaml.

Output

  1. Verdict: approve | approve with comments | request changes
  2. Findings: severity, location, problem, evidence, owner refs, impact, suggested fix
  3. Missing tests
  4. Structured artifact updates needed
  5. Architecture drift risk
  6. Final recommendation

Heefeg gestallte Froen

Wat mécht de KI-Skill Arch Code Review?

Architecture-aware review against canonical structured YAML artifacts. Read-only workflow; no legacy prose docs.

Firwat Arch Code Review op TypingMind benotzen?

Well Dir en eemol installéiert a mat all Modell benotze kënnt. Arch Code Review besteet aus einfachem Markdown amplaz vun ubidderspezifeschem Code. Dee selwechte Skill funktionéiert also mat GPT-5, Claude, Gemini, Grok oder engem lokale Modell – an Dir kënnt de Modell matzen am Chat wiesselen, ouni datt de Skill ophält ze funktionéieren. TypingMind benotzt Är eegen API-Schlësselen, sou datt Dir d'Ubidder direkt bezuelt amplaz vun engem Abonnement pro Benotzerplaz. Är Skills a Chats bleiwen an Ärem eegene Späicher.

Wéi installéieren ech Arch Code Review an TypingMind?

Maacht an TypingMind Plugins → Skills → Vu GitHub installéieren op a setzt https://github.com/PriNova/pi-agent-codebase-workflows/tree/main/skills/arch-code-review an. TypingMind liest d'Datei SKILL.md an installéiert de Skill, deen Dir pro Chat aktivéiere kënnt.

Wéi eng KI-Modeller kënnen Arch Code Review benotzen?

All Modell, deen Dir an TypingMind verbënnt. KI-Skills sinn einfach Markdown-Instruktiounen an net ubidderspezifesche Code. Dofir kënne GPT, Claude, Gemini, Grok a lokal Modeller dëse Skill lueden, wann eng Ufro dozou passt.

Wéi vill KI-Modeller kann ech mat Arch Code Review benotzen?

Esou vill Dir wëllt. Soulaang e Modell Skills ënnerstëtzt, kënnt Dir Arch Code Review domat benotzen – GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama a méi – alles op TypingMind mat Ären eegenen API-Schlësselen.

Ass de KI-Skill Arch Code Review gratis?

Jo. De Skill gëtt vum PriNova ënner der Lizenz MIT op GitHub publizéiert. Dir bezuelt nëmmen Ären eegene KI-Ubidder fir d'Token, déi Dir benotzt.

Wat si KI-Skills?

E KI-Skill ass e weiderverwendbaart Pak vun Instruktiounen, dat engem KI-Modell bäibréngt, wéi en eng bestëmmt Aufgab erfëllt. E follegt dem oppenen Agent Skills-Format: eng Datei SKILL.md mat engem Numm an enger Beschreiwung, plus all Scripten, Virlagen oder Referenzdateien, déi de Modell eventuell brauch. De Modell liest d'Instruktiounen eréischt, wann Är Ufro zum Skill passt. En installéierte Skill kascht also näischt, bis e benotzt gëtt.

Wéi ënnerscheede sech KI-Skills vu Plugins oder MCP-Serveren?

E Plugin oder MCP-Server gëtt engem Modell nei Tools, déi en opruffe kann – Code, deen iergendwou leeft an e Resultat zeréckgëtt. E KI-Skill gëtt dem Modell dogéint Wëssen an eng Virgoensweis: wéi en eng Aufgab ugeet, wéi eng Schrëtt en nokënnt a wéi eng gutt Ausgab ausgesäit. Skills bestinn aus einfachem Markdown, brauche kee Server, keen API-Schlëssel a keng Lafzäitëmfeld a funktionéiere mat all Modell.

All weisen

Elo Ären eegene KI-Workspace ariichten

Abonnéiert Iech op eisen Newsletter, fir iwwer nei Funktiounen an zukünfteg Gewënnspiller informéiert ze ginn 👇