Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,33 @@ jacs/ is the directory with the core library.
Look for examples in tests for how to use the library.
README.md and CHANGELOG.md may be useful to understand some future goals and what has been done.

## Feature Parity Enforcement

Cross-language feature parity is enforced through canonical JSON fixtures that serve as the single source of truth. When you add or remove a method, error kind, CLI command, MCP tool, or adapter, you must update the relevant fixture — snapshot tests in all languages will fail otherwise.

### Canonical fixtures

| Fixture | What it tracks | Consumed by |
|---------|---------------|-------------|
| `binding-core/tests/fixtures/method_parity.json` | 26 `SimpleAgentWrapper` public methods | Rust, Python, Node, Go |
| `binding-core/tests/fixtures/parity_inputs.json` | 13 `ErrorKind` variants + behavioral notes | Rust, Python, Node, Go |
| `binding-core/tests/fixtures/adapter_inventory.json` | Framework adapter modules and public functions | Rust, Python, Node |
| `binding-core/tests/fixtures/cli_mcp_alignment.json` | CLI-to-MCP tool mapping (aligned, CLI-only, MCP-only) | Rust |
| `jacs-cli/contract/cli_commands.json` | 29 CLI commands + 4 feature-gated | Rust (extracted from Clap tree) |
| `jacs-mcp/contract/jacs-mcp-contract.json` | 42 MCP tools with parameter schemas | Python, Node, Go |

### What to update when

| Change | Update these fixtures | Tests that will catch you |
|--------|----------------------|--------------------------|
| Add/remove a `SimpleAgentWrapper` method | `method_parity.json` | `method_parity.rs`, `test_method_parity.py`, `method-parity.test.js`, `method_parity_test.go` |
| Add/remove an `ErrorKind` variant | `parity_inputs.json` (error_kinds array) | `parity.rs`, `test_error_parity.py`, `error-parity.test.js`, `error_parity_test.go` |
| Add/remove a CLI command | `cli_commands.json` + `cli_mcp_alignment.json` | `cli_command_snapshot.rs`, `cli_mcp_alignment.rs` |
| Add/remove an MCP tool | `jacs-mcp-contract.json` + `cli_mcp_alignment.json` | `mcp_contract.test.js`, `test_mcp_contract.py`, `mcp_contract_drift_test.go`, `cli_mcp_alignment.rs` |
| Add/remove a framework adapter | `adapter_inventory.json` | `adapter_inventory.rs`, `test_adapter_inventory.py`, `adapter-inventory.test.js` |

Each language defines its own exclusions and name mappings (e.g., `to_yaml` is excluded from Python/Go because those bindings don't expose it). The fixture is always the source of truth.

## Releasing

See **[RELEASING.md](./RELEASING.md)** for the complete release process, including
Expand Down
32 changes: 32 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,35 @@
## 0.9.13

### Cross-Language Feature Parity Enforcement

Added an automated parity enforcement system that catches binding drift across Rust, Python, Node.js, and Go through canonical JSON fixtures and snapshot tests.

**New fixtures (single source of truth for all languages):**
- `binding-core/tests/fixtures/method_parity.json` — 26 `SimpleAgentWrapper` public methods
- `binding-core/tests/fixtures/parity_inputs.json` — added `error_kinds` array (13 `ErrorKind` variants) and `sign_message_invalid_json_behavior` behavioral note
- `binding-core/tests/fixtures/adapter_inventory.json` — framework adapter modules and exported functions
- `binding-core/tests/fixtures/cli_mcp_alignment.json` — CLI-to-MCP tool mapping (16 aligned, 15 CLI-only, 27 MCP-only)
- `jacs-cli/contract/cli_commands.json` — 29 CLI commands + 4 feature-gated, with `mcp_tool` and `mcp_excluded_reason` fields

**New tests:**
- Rust: `method_parity.rs` (3), `parity.rs` error kind tests (2), `adapter_inventory.rs` (5), `cli_command_snapshot.rs` (4), `cli_mcp_alignment.rs` (5) — 19 new tests
- Python: `test_method_parity.py` (4), `test_error_parity.py` (9 incl. runtime triggers), `test_adapter_inventory.py` (5+) — 18+ new tests
- Node.js: `method-parity.test.js` (5), `error-parity.test.js` (4), `adapter-inventory.test.js` (5) — 14 new tests
- Go: `method_parity_test.go` (3), `error_parity_test.go` (4), `mcp_contract_drift_test.go` (3) — 10 new tests

### CLI

- Re-enabled `task create` command handler (was commented out; may be used by a2a)
- Extracted `build_cli()` public function from `main()` so snapshot tests can walk the Clap tree programmatically

### Documentation

- Added `DEVELOPMENT.md` — full API reference for Rust, Python, Node.js, and Go with examples, feature flags, storage backends, security, and framework adapters
- Added "Feature Parity Enforcement" section to `AGENTS.md` with fixture inventory and what-to-update-when guide
- Added "Feature Parity" section to `DEVELOPMENT.md` linking to `AGENTS.md`
- Updated `README.md` with refreshed messaging and streamlined content
- Updated binding READMEs (`jacspy`, `jacsnpm`, `jacsgo`, `jacs-cli`, `jacs-mcp`) — consolidated to reference `DEVELOPMENT.md`

## 0.9.12

(unreleased)
Expand Down
Loading
Loading