docs: require API grain proof before ship dispatch - #16
Merged
Merged
Conversation
Stop and report when the API cannot answer at the product grain instead of spawning.
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.
Intent
one shared rule in AGENTS.md: prove the API grain before spawn
What Changed
Risk Assessment
✅ Low: The change is a narrow, source-only policy update that now matches the accepted intent: third-party API grain must be proven before spawning, with a clear fail-closed outcome.
Testing
Two native Pi/Firstmate sessions exercised known-inadequate and entirely unproven third-party APIs against isolated registered projects. Both stopped, reported the required product-grain evidence, and created no spawn-related state or project mutation. The initial Codex attempt was excluded because its headless hook entered read-only mode, and Claude was unavailable due organization subscription policy.
Evidence: Live Firstmate API-grain validation transcript and no-spawn postconditions
Source: Live Firstmate API-grain validation transcript and no-spawn postconditions
Pipeline
Updates from git push no-mistakes
✅ **intent** - passed
✅ No issues found.
✅ **Rebase** - passed
✅ No issues found.
🔧 **Review** - 1 issue found → auto-fixed ✅
AGENTS.md:296- The intent requires “prove the API grain before spawn,” but this rule covers every “third-party source.” A ship using a non-API third-party artifact would now be blocked when that artifact cannot answer at product grain, although the intent does not require that broader behavior. Narrow the rule to the relevant third-party API unless the broader dispatch policy is explicitly desired.🔧 Fix applied.
✅ Re-checked - no issues remain.
✅ **Test** - passed
✅ No issues found.
git diff --name-status a27646c4eae5d807027c3ebcb783234e0d212958..d981c38f6a9fafb6fd617bc07b64e35fbd21a2caFM_HOME=.../known PI_CODING_AGENT=true pi -p --no-session --approve --provider openai-codex --model gpt-5.6-sol --thinking high ...FM_HOME=.../unproven PI_CODING_AGENT=true pi -p --no-session --approve --provider openai-codex --model gpt-5.6-sol --thinking high ...Inspected both isolated homes for task*.meta, task*.status, andbrief.mdartifactsRangit worktree listandgit status --shortagainst both isolated fixture repositoriesAttempted headlesscodex exec --ephemeral; discarded because its hook could not verify harness ancestry and entered read-only modeAttemptedclaude -p --no-session-persistence; unavailable because the organization disabled Claude subscription accessRemoved the transient.live-api-grain-testfixture and confirmed the worktree remained clean✅ **Document** - passed
✅ No issues found.
✅ **Push** - passed
✅ No issues found.