Add contract CLI command#52
Merged
pengfei-threemoonslab merged 2 commits intomainfrom May 8, 2026
Merged
Conversation
pengfei-threemoonslab
added a commit
that referenced
this pull request
May 8, 2026
Resolves conflicts in three files: - docs/agent-contract-current.md: keeps main's new `agents-shipgate contract --json` verification block and `Runtime contract: 1` line on top of this branch's `Latest release: v0.10.0` bump. - skills/agents-shipgate/SKILL.md: keeps main's new `Installed CLI contract` bullet pointing at the local `agents-shipgate contract --json` command, alongside this branch's consolidated `Report JSON` bullet that links the long field enumeration into docs/agent-contract-current.md instead of restating it. - tests/test_public_surface_contract.py: takes main's broader `ANY_PACKET_SCHEMA_PATTERN` regex (`v\d+\.\d+`, future-proof past v0.x) and keeps this branch's three new patterns (LEGACY_PACKET_SCHEMA_PATTERN, PACKET_ANCHOR_PATTERN, plus the action/pip/version-input pin patterns). Auto-merged everything else cleanly, including .well-known (this branch's v0.10.0 bump + main's new `contract` and `contract_version` keys). Verification: pytest 677 passed, ruff clean. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
pengfei-threemoonslab
added a commit
that referenced
this pull request
May 8, 2026
Picks up: contract CLI command (#52), v0.10.0 release tag (#53), init --agent-instructions (#54), HITL evidence provenance (#50), agent autofix-boundary docs (#55), packet schema v0.3. Conflict resolution: kept v0.11 report-schema references on top of main's v0.10.0 release / packet-schema v0.3 / contract-command additions. AGENTS.md and SKILL.md adopt main's centralized "contract lives in agent-contract-current.md" pattern; the v0.11 provenance line lives there now. test_public_surface_contract.py adopts main's derive-from-model approach for the current schema constants and just adds v0.10 to the legacy-pattern list. Also fixes a SARIF regression flagged in review: ``_location()`` chose the structured branch whenever ``source.path`` was set, so a finding with ``path="foo.py"`` and legacy ``location="foo.py:10"`` emitted no ``region``. Hybrid / plugin findings now fall back to ``_split_location(source.location or source.ref)`` when ``start_line`` is absent. Adds a regression test. After merge: 805 passed (+3 skipped), ruff clean, ``agents-shipgate contract --json`` reports ``report_schema_version: "0.11"``. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds
agents-shipgate contract --jsonas a local runtime contract command for coding agents. The new payload is versioned withcontract_version: "1"and sources CLI/report/packet versions from the same runtime constants used by the package and schema/report generation.Changes
agents_shipgate.contractwithContractPayload, contract constants, andbuild_contract_payload().agents-shipgate contract --jsonin the Typer CLI and self-check surface probe..well-knownmetadata, prompts, skill/slash-command surfaces, and target-repo snippets to prefer local contract verification.manual_review_signals[]field-path resolution, self-check surface, and public-surface drift consistency against runtime model defaults.manual_review_signals[]dotted-path notation and old-install fallback behavior for prompts.Validation
python -m ruff check .python -m pytest(551 passed)git diff --check