Skip to content

Design Notes

Design notes explain the decisions and proposals behind PIG. Each note gives its date, status, scope, alternatives, and supporting evidence. Proposals describe directions under discussion; implemented and released records explain work that has reached those stages.

For command syntax and usage, use the PIG documentation. For changes in each version, use the release notes.

Design Notes
One Catalog Entry Count for the Website and CLI catalogextcli
One-command Xray Clients and Servers buildcliinstall
Install the Pigsty Repository Key Automatically reposty
Why PIG Builds Debug Packages by Default buildcli
Bootstrapping a Pigsty Controller as a Recoverable Transaction styrepoinstall
Catalog v2 Proposal: Immutable Typed Snapshots catalogrepoextcli
PIG 2.0 Product Direction clistycatalog
Let Patronictl Speak for Itself patronicli
A Bounded Grafana Client Instead of Dashboard Shell Scripts sty
Use the CMDB Pigsty Already Has inventorysty
Edit the Declaration, Preserve the Document: Lossless Pigsty Inventory inventorysty
One Grammar for Dangerous Work: PIG's Operations CLI Safety Contract clipostgrespgbackrestpitr
Why PIG Keeps the Cobra Command Layer Flat cli
The 70% Tuner: Defining the Boundary of pig pg tune postgres
Compile, Validate, Then Commit: The Native sty conf Pipeline styinventory
From Human-Friendly to Agent-Native: PIG's CLI Contract cli
  • One Catalog Entry Count for the Website and CLI

    By Ruohang Feng In Design

    Ruohang Fengcatalogextcli

    Featured Image for One Catalog Entry Count for the Website and CLI

    Decision date: 2026-10-16 Status: Implemented in the v1.10.0 candidate, not yet released. Current reference: pig ext catalog count Scope: Catalog totals and default listing membership; package installation and SQL activation rules remain defined by …

    Decision date: 2026-10-16 Status: Implemented in the v1.10.0 candidate, not yet released. Current reference: pig ext catalog count Scope: Catalog totals and default listing membership; package installation and SQL activation rules remain defined by …

  • One-command Xray Clients and Servers

    By Ruohang Feng In Design

    Ruohang Fengbuildcliinstall

    Featured Image for One-command Xray Clients and Servers

    Decision date: 2026-10-05 Status: Released in v1.9.0. The 2026-10-16 refinements below are Implemented in the v1.10.0 candidate, not yet released. Current reference: pig build, operations safety, and release history Scope: One-command Xray client …

    Decision date: 2026-10-05 Status: Released in v1.9.0. The 2026-10-16 refinements below are Implemented in the v1.10.0 candidate, not yet released. Current reference: pig build, operations safety, and release history Scope: One-command Xray client …

  • Install the Pigsty Repository Key Automatically

    By Ruohang Feng In Design

    Ruohang Fengreposty

    Featured Image for Install the Pigsty Repository Key Automatically

    Decision date: 2026-10-04 Status: Released in v1.9.0. Current reference: pig repo Scope: Installing the existing embedded Pigsty public key during repository configuration. Decision When a selected module contains an available pigsty-infra or …

    Decision date: 2026-10-04 Status: Released in v1.9.0. Current reference: pig repo Scope: Installing the existing embedded Pigsty public key during repository configuration. Decision When a selected module contains an available pigsty-infra or …

  • Why PIG Builds Debug Packages by Default

    By Ruohang Feng In Design

    Ruohang Fengbuildcli

    Featured Image for Why PIG Builds Debug Packages by Default

    Decision date: 2026-09-03 Status: Released in v1.8.1. Current reference: pig build Scope: Debug-package policy for pig build ext and pig build pkg; individual package recipes remain authoritative for their payload. Decision pig build ext and pig …

    Decision date: 2026-09-03 Status: Released in v1.8.1. Current reference: pig build Scope: Debug-package policy for pig build ext and pig build pkg; individual package recipes remain authoritative for their payload. Decision pig build ext and pig …

  • Bootstrapping a Pigsty Controller as a Recoverable Transaction

    By Ruohang Feng In Design

    Ruohang Fengstyrepoinstall

    Featured Image for Bootstrapping a Pigsty Controller as a Recoverable Transaction

    Decision date: 2026-08-14 Status: Implemented and released in pig v1.8.0. Current reference: pig sty boot Scope: Preparing a Pigsty controller and its package sources; not deploying a database cluster. Decision pig sty boot should be one native, …

    Decision date: 2026-08-14 Status: Implemented and released in pig v1.8.0. Current reference: pig sty boot Scope: Preparing a Pigsty controller and its package sources; not deploying a database cluster. Decision pig sty boot should be one native, …

  • Catalog v2 Proposal: Immutable Typed Snapshots

    By Ruohang Feng In Design

    Ruohang Fengcatalogrepoextcli

    Featured Image for Catalog v2 Proposal: Immutable Typed Snapshots

    Decision date: 2026-08-13 Status: Proposal; security mechanism, overlays, packaging, and path layout remain open. Current reference: pig ext and pig repo describe the v1 Catalog behavior. Scope: A candidate PIG 2.0 publication and consumption model …

    Decision date: 2026-08-13 Status: Proposal; security mechanism, overlays, packaging, and path layout remain open. Current reference: pig ext and pig repo describe the v1 Catalog behavior. Scope: A candidate PIG 2.0 publication and consumption model …

  • PIG 2.0 Product Direction

    By Ruohang Feng In Design

    Ruohang Fengclistycatalog

    Featured Image for PIG 2.0 Product Direction

    Decision date: 2026-08-13 Status: Proposal for review; not implemented. Current reference: PIG documentation and release history Scope: Candidate product boundaries and verification gates for a future PIG 2.0 / Pigsty 5.0 line. Decision The proposed …

    Decision date: 2026-08-13 Status: Proposal for review; not implemented. Current reference: PIG documentation and release history Scope: Candidate product boundaries and verification gates for a future PIG 2.0 / Pigsty 5.0 line. Decision The proposed …

  • Let Patronictl Speak for Itself

    By Ruohang Feng In Design

    Ruohang Fengpatronicli

    Featured Image for Let Patronictl Speak for Itself

    Decision date: 2026-07-21 Status: Implemented and released in pig v1.6.0. Current reference: pig pt Scope: Patronictl-backed cluster commands plus PIG-owned configuration selection, settings sugar, service, status, and log helpers. Decision pig pt …

    Decision date: 2026-07-21 Status: Implemented and released in pig v1.6.0. Current reference: pig pt Scope: Patronictl-backed cluster commands plus PIG-owned configuration selection, settings sugar, service, status, and log helpers. Decision pig pt …

  • A Bounded Grafana Client Instead of Dashboard Shell Scripts

    By Ruohang Feng In Design

    Ruohang Fengsty

    Featured Image for A Bounded Grafana Client Instead of Dashboard Shell Scripts

    Decision date: 2026-07-18 Status: Released in v1.6.0; dashboard schema v2 support followed in v1.6.2. Current reference: pig sty grafana Scope: Dashboard import, export, cleanup, and selected organization and user preferences. Decision PIG uses a …

    Decision date: 2026-07-18 Status: Released in v1.6.0; dashboard schema v2 support followed in v1.6.2. Current reference: pig sty grafana Scope: Dashboard import, export, cleanup, and selected organization and user preferences. Decision PIG uses a …

  • Use the CMDB Pigsty Already Has

    By Ruohang Feng In Design

    Ruohang Fenginventorysty

    Featured Image for Use the CMDB Pigsty Already Has

    Decision date: 2026-07-18 Status: Released in v1.6.0 as an experimental adapter. The earlier revision-store design is superseded. Current reference: pig inventory cmdb Scope: Exchanging declarations with Pigsty’s existing CMDB, not designing another …

    Decision date: 2026-07-18 Status: Released in v1.6.0 as an experimental adapter. The earlier revision-store design is superseded. Current reference: pig inventory cmdb Scope: Exchanging declarations with Pigsty’s existing CMDB, not designing another …

  • Edit the Declaration, Preserve the Document: Lossless Pigsty Inventory

    By Ruohang Feng In Design

    Ruohang Fenginventorysty

    Featured Image for Edit the Declaration, Preserve the Document: Lossless Pigsty Inventory

    Decision date: 2026-07-18 Status: Implemented and released in pig v1.6.0. The 2026-10-16 to 2026-10-17 refinements below are Implemented in the v1.10.0 candidate, not yet released. Current reference: pig inventory Scope: Static Pigsty Inventory …

    Decision date: 2026-07-18 Status: Implemented and released in pig v1.6.0. The 2026-10-16 to 2026-10-17 refinements below are Implemented in the v1.10.0 candidate, not yet released. Current reference: pig inventory Scope: Static Pigsty Inventory …

  • One Grammar for Dangerous Work: PIG's Operations CLI Safety Contract

    By Ruohang Feng In Design

    Ruohang Fengclipostgrespgbackrestpitr

    Featured Image for One Grammar for Dangerous Work: PIG's Operations CLI Safety Contract

    Decision date: 2026-07-02 Status: Released for pg, pb, pt, and pitr by v1.5.0; the 2026-08-29 do and build proxy refinements were released in v1.8.1. The acceptance refinements below are Implemented for v1.10.0; source evidence is listed under …

    Decision date: 2026-07-02 Status: Released for pg, pb, pt, and pitr by v1.5.0; the 2026-08-29 do and build proxy refinements were released in v1.8.1. The acceptance refinements below are Implemented for v1.10.0; source evidence is listed under …

  • Why PIG Keeps the Cobra Command Layer Flat

    By Ruohang Feng In Design

    Ruohang Fengcli

    Featured Image for Why PIG Keeps the Cobra Command Layer Flat

    Decision date: 2026-06-30 Status: Implemented; the repository uses this layout for new commands. Current reference: pig command overview and the source repository Scope: Go source ownership and command registration, not the public command taxonomy …

    Decision date: 2026-06-30 Status: Implemented; the repository uses this layout for new commands. Current reference: pig command overview and the source repository Scope: Go source ownership and command registration, not the public command taxonomy …

  • The 70% Tuner: Defining the Boundary of pig pg tune

    By Ruohang Feng In Design

    Ruohang Fengpostgres

    Featured Image for The 70% Tuner: Defining the Boundary of pig pg tune

    Decision date: 2026-03-21 Status: Released in pig v1.3.2, following implementation on 2026-03-23. Current reference: pig pg tune Scope: Generate a starting configuration from hardware, PostgreSQL version, and workload profile. Decision pig pg tune …

    Decision date: 2026-03-21 Status: Released in pig v1.3.2, following implementation on 2026-03-23. Current reference: pig pg tune Scope: Generate a starting configuration from hardware, PostgreSQL version, and workload profile. Decision pig pg tune …

  • Compile, Validate, Then Commit: The Native sty conf Pipeline

    By Ruohang Feng In Design

    Ruohang Fengstyinventory

    Featured Image for Compile, Validate, Then Commit: The Native sty conf Pipeline

    Decision date: 2026-02-18; the production contract was finalized on 2026-08-14. Status: Implemented and released in pig v1.8.0. Current reference: pig sty conf Scope: Generating one validated static Inventory from a trusted Pigsty template; not …

    Decision date: 2026-02-18; the production contract was finalized on 2026-08-14. Status: Implemented and released in pig v1.8.0. Current reference: pig sty conf Scope: Generating one validated static Inventory from a trusted Pigsty template; not …

  • From Human-Friendly to Agent-Native: PIG's CLI Contract

    By Ruohang Feng In Design

    Ruohang Fengcli

    Featured Image for From Human-Friendly to Agent-Native: PIG's CLI Contract

    Decision date: 2026-02-12 Status: Released in pig v1.1.0 and refined by later command-layer work. The 2026-10-16 refinements below are Implemented in the v1.10.0 candidate, not yet released. Current reference: pig command overview Scope: PIG-owned …

    Decision date: 2026-02-12 Status: Released in pig v1.1.0 and refined by later command-layer work. The 2026-10-16 refinements below are Implemented in the v1.10.0 candidate, not yet released. Current reference: pig command overview Scope: PIG-owned …