agent-contracts 0.14.1 → 0.15.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
@@ -916,6 +916,8 @@ npx agent-contracts
916
916
  The `[path]` argument defaults to `agent-contracts.yaml` in the current directory.
917
917
  If `-c` / `--config` is specified, the DSL path from the config file is used.
918
918
 
919
+ All commands also accept `--team <id>` to limit execution to a single team when using a [multi-team configuration](#multi-team-configuration).
920
+
919
921
  #### `resolve` options
920
922
 
921
923
  | Option | Description |
@@ -923,6 +925,7 @@ If `-c` / `--config` is specified, the DSL path from the config file is used.
923
925
  | `--format <text\|json>` | Output format (default: `text`) |
924
926
  | `--expand-defaults` | Expand all Zod default values in output. Fields like `required_validations: []`, `tags: []`, and `can_read_artifacts: []` are written explicitly instead of being silently applied by schema defaults. |
925
927
  | `-c, --config <path>` | Path to `agent-contracts.config.yaml` |
928
+ | `--team <id>` | Limit to one team (multi-team config only) |
926
929
 
927
930
  #### `score` options
928
931
 
@@ -931,6 +934,7 @@ If `-c` / `--config` is specified, the DSL path from the config file is used.
931
934
  | `--format <text\|json>` | Output format (default: `text`) |
932
935
  | `--threshold <number>` | Minimum score; exit 1 if below (for CI gates) |
933
936
  | `-c, --config <path>` | Path to `agent-contracts.config.yaml` |
937
+ | `--team <id>` | Limit to one team (multi-team config only) |
934
938
 
935
939
  The score command evaluates 7 dimensions:
936
940
 
@@ -994,6 +998,60 @@ This lets you generate static outputs for:
994
998
 
995
999
  all from the same resolved DSL.
996
1000
 
1001
+ ### Multi-team configuration
1002
+
1003
+ When several teams (for example backend, QA, infra) are managed from one workspace, you can list every team in a single config file instead of maintaining separate configs.
1004
+
1005
+ ````yaml
1006
+ teams:
1007
+ _defaults:
1008
+ bindings:
1009
+ - ./bindings/cursor.yaml
1010
+ vars:
1011
+ language: TypeScript
1012
+ paths:
1013
+ cursor_root: .cursor
1014
+ active_guardrail_policy: default-enforcement
1015
+
1016
+ backend:
1017
+ dsl: ./teams/backend/agent-contracts.yaml
1018
+ interface_output: ./teams/backend/team-interface.yaml
1019
+ bindings:
1020
+ - ./teams/backend/bindings/observability.yaml
1021
+ vars:
1022
+ team_name: backend
1023
+
1024
+ qa:
1025
+ dsl: ./teams/qa/agent-contracts.yaml
1026
+ vars:
1027
+ team_name: qa
1028
+ ````
1029
+
1030
+ **`_defaults`:** Reserved meta-entry in the `teams` map. It uses the same schema as team entries except `dsl` is not required. Values are inherited by all teams. The underscore prefix avoids colliding with real team IDs.
1031
+
1032
+ **Merge with `_defaults`:**
1033
+
1034
+ * `bindings` — `_defaults` bindings are prepended before team-specific bindings
1035
+ * `vars` — shallow merge; team values win
1036
+ * `paths` — shallow merge; team values win
1037
+ * `active_guardrail_policy` — team wins when present
1038
+
1039
+ All commands accept `--team <id>` to run against a single team:
1040
+
1041
+ ````bash
1042
+ agent-contracts validate -c config.yaml # all teams
1043
+ agent-contracts validate -c config.yaml --team backend # one team
1044
+ agent-contracts check -c config.yaml --team qa # one team
1045
+ ````
1046
+
1047
+ The `check` command also validates that imported interface files exist on disk (cross-team references).
1048
+
1049
+ **Design constraints:**
1050
+
1051
+ * `dsl` and `teams` are mutually exclusive at the config root
1052
+ * Every team except `_defaults` must specify `dsl`
1053
+ * Existing single-team configs (top-level `dsl` only) remain valid unchanged
1054
+
997
1055
  ### Render target options
998
1056
 
999
1057
  Each entry in `renders` supports these fields: