agent-contracts 0.30.4 → 0.32.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -278,6 +278,8 @@ A **Guardrail Policy** defines enforcement strategy for guardrails:
278
278
 
279
279
  * rules — array of enforcement rules mapping guardrails to actions
280
280
  * Each rule specifies: severity (`critical`/`mandatory`/`warning`/`info`), action (`block`/`warn`/`shadow`/`info`), override permissions
281
+ * `action` supports a conditional form for state-dependent enforcement: `{ default: "block", when: { maintenance: "shadow" } }`
282
+ * Available states are declared system-wide via `system.states`
281
283
 
282
284
  ### Handoff Type
283
285
 
@@ -337,6 +339,7 @@ Design regressions become testable.
337
339
  * **Inheritance with merge operators via `extends`**
338
340
  * **Guardrail definitions** for cross-cutting process constraints
339
341
  * **Guardrail policies** with configurable enforcement (block/warn/shadow/info)
342
+ * **State-dependent guardrail action** — `action` accepts a conditional form `{ default, when }` keyed by `system.states` for workspace-mode-aware enforcement
340
343
  * **Software bindings** (DI) for tool-specific guardrail implementation (Cursor, Git, GitHub)
341
344
  * **Guardrail generation** from DSL + policy + bindings via `generate guardrails`
342
345
  * **Navigation index** — compile-time artifact-centric model mapping artifacts to operations, agent permissions, relations, and action routes
@@ -374,6 +377,7 @@ system:
374
377
  - audit
375
378
  - release
376
379
  - reflect
380
+ states: [] # optional — named workspace states for conditional guardrail action
377
381
 
378
382
  agents: {}
379
383
  tasks: {}
@@ -1536,6 +1540,12 @@ guardrail_policies:
1536
1540
  - guardrail: no-force-push
1537
1541
  severity: critical
1538
1542
  action: block
1543
+ - guardrail: branch-lock
1544
+ severity: critical
1545
+ action:
1546
+ default: block
1547
+ when:
1548
+ maintenance: shadow
1539
1549
  - guardrail: english-only-code
1540
1550
  severity: warning
1541
1551
  action: warn
package/cli-contract.yaml CHANGED
@@ -3,7 +3,7 @@ cli_contracts: 0.1.0
3
3
 
4
4
  info:
5
5
  title: agent-contracts CLI
6
- version: 0.30.2
6
+ version: 0.32.0
7
7
  description: >-
8
8
  Declarative YAML DSL toolkit for defining, validating, and rendering
9
9
  multi-agent development workflows. Provides static validation,