Skip to main content
PCD means Program Circuit Description. A PCD is not a general script; it is a circuit blueprint for bounded logic. This tutorial builds an order_risk circuit.

1. Start With A Bounded Requirement

Do not start from implementation. Start from behavior:

2. Declare Inputs And Output

3. Declare Fail-Closed Behavior

This is the circuit contract an agent must preserve.

4. Write The PCD

The structure matters:
  • every branch returns a defined value;
  • negative or zero inputs block;
  • the approval path is the final path;
  • no external state is required.

5. Generate The Starter Candidate

brik64 pcd generate order-risk is available only in generation-capable builds. For the current public CLI beta, create or review a .pcd file manually unless brik64 help lists the generation command. Review generated output before composing it into a Polymer. Generation is not a substitute for reviewing the declared inputs, outputs and fail-closed behavior.

6. Use Supported Numeric Monomers When The Operation Is Atomic

For public CLI Beta14.1 PCD files, direct monomer calls are limited to the numeric parser profile: MC_00.ADD8, MC_01.SUB8, MC_02.MUL8, MC_03.DIV8, and MC_04.MOD8.
String and extended monomer helpers remain SDK-level examples or roadmap syntax until the PCD parser exposes those operations publicly.

7. Agent Checklist

  • The requirement is restated in bounded form.
  • Inputs and output are named.
  • Fail-closed behavior is explicit.
  • Every branch returns a value.
  • Monomers are selected from the catalog.
  • Extended or external behavior is identified before composition.
  • The PCD can be reviewed without hidden source context.