Skip to content

Implement CAP-460: capability metadata catalog, JSON discovery and CLI consumer - #2418

Merged
PeramatoG merged 4 commits into
mainfrom
codex/implement-cap-460-capability-metadata-layer
Oct 1, 2026
Merged

PeramatoG merged 4 commits into
mainfrom
codex/implement-cap-460-capability-metadata-layer

Conversation

@PeramatoG

Copy link
Copy Markdown
Owner

Motivation

  • Provide a single, GUI-independent authoritative catalog that describes the real existing semantic Command and Query operations (IDs, argument shapes, effects and truthful frontend exposure) so frontends and tools can discover capabilities without depending on GUI state or duplicating lists.
  • Allow lightweight structural request-shape validation (unknown id/arg, duplicates, wrong variant, unconditional required args) without moving semantic validation or execution into the catalog.
  • Offer a deterministic machine-readable representation (versioned JSON) and a development-only CLI consumer so the inventory is discoverable without creating any execution registry or dispatch surface.

Description

  • Added a focused capability boundary under core/capability/ with neutral descriptors and tokens in capability_catalog.h and capability_catalog.cpp, including operation kind, argument vocabulary, effect enum, and frontend exposure state.
  • Implemented deterministic JSON serialization in capability_json_serializer.{h,cpp} using schema version 1 and stable English field names, and provided stable token helpers for all vocab elements.
  • Added a read-only development CLI command perastage-cli capabilities [--json] implemented in cli/capabilities_command.* and wired into cli/cli_runner.cpp; the CLI reads the same catalog and explicitly does not execute semantics.
  • Added tests and guards: tests/capability_catalog_test.cpp (inventory, contract parity, classification, exposure, JSON stability) and tests/check_capability_core_boundary.sh (ensures Capability Core has no GUI/execution/transport dependencies), and updated CMake to expose the new targets and test registration; also added docs/developer/capability_api.md, updated architecture.md, repository_layout.md, and docs/release-notes-draft.md to document ownership and behavior.

Testing

  • Built and ran a lightweight catalog serializer: compiled capability_catalog.cpp and capability_json_serializer.cpp and executed a small harness that emits the JSON and validated it with python3 -m json.tool; this succeeded and JSON output is deterministic.
  • Ran the added unit/test harness: tests/capability_catalog_test.cpp structural checks (inventory size, sorted order, lookup, request parity via BuildRequest(...) for transform/selection/scene-tools), which passed in local compilation runs.
  • Ran repository and architecture guards: tests/check_capability_core_boundary.sh, tests/check_perastage_tree_modules.sh, tests/check_no_configmanager_get_in_gui.sh, python3 tests/check_source_file_size.py, and python3 tests/check_repository_hygiene.py; these checks passed locally.
  • Performed formatting and local compile checks for the new files and CLI integration; all local compile checks passed, but full CMake configuration with the project presets could not complete in the local environment due to missing system wxWidgets development libraries, so hosted CI (Windows/Linux/macOS Debug) remains authoritative for full-build verification.

Codex Task

@PeramatoG
PeramatoG merged commit 1f1c9e1 into main Oct 1, 2026
4 checks passed
@PeramatoG
PeramatoG deleted the codex/implement-cap-460-capability-metadata-layer branch October 2, 2026 08:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant