docs: sync documentation with implementation#1145
Open
nextlevelshit wants to merge 15 commits intomainfrom
Open
docs: sync documentation with implementation#1145nextlevelshit wants to merge 15 commits intomainfrom
nextlevelshit wants to merge 15 commits intomainfrom
Conversation
Introduce eight canonical JSON schemas under internal/contract/schemas/shared/ that become the lingua franca for cross-pipeline handover: issue_ref, pr_ref, branch_ref, spec_ref, findings_report, plan_ref, workspace_ref, scope_result. The schemas are embedded via go:embed and exposed through a small registry API (Lookup, Exists, Names). The sentinel "string" type is accepted as a no-schema free-text fallback so pre-existing untyped pipelines keep working. This is the foundation layer of the pipeline I/O protocol; consumers land in follow-up commits. See docs/adr/010-pipeline-io-protocol.md.
Extend the pipeline schema with optional type annotations:
- InputConfig.Type — declares the canonical I/O type of the pipeline's
input (issue_ref, pr_ref, ..., or "string").
- PipelineOutput.Type — declares the canonical type of a named output.
- Step.InputRef — typed wiring for composition steps, replacing the
ad-hoc string template form. Exactly one of
'from: <step>.<output>' or 'literal: <text>'.
All new fields are optional. Unset or empty == "string", preserving
backward compatibility with every existing pipeline. See
docs/adr/010-pipeline-io-protocol.md.
Wire the shared schema registry into YAMLPipelineLoader so malformed
pipelines fail at parse time rather than at runtime. Adds:
- ValidatePipelineIOTypes — catches unknown type names on input/outputs,
malformed or conflicting input_ref blocks, and pipeline_outputs that
point at non-existent steps.
- TypedWiringCheck — cross-pipeline compatibility check (producer output
type must match consumer input type). Invoked by higher layers that
have access to a sub-pipeline loader.
YAMLPipelineLoader.Unmarshal now runs ValidatePipelineIOTypes immediately
after defaulting, so every code path that loads a pipeline (CLI, TUI,
WebUI, composition executor) gets load-time type validation for free.
Tests cover known/unknown types, string sentinel behaviour, empty-type
legacy fallback, InputRef exclusivity and the loader's rejection path.
Teach CompositionExecutor.resolveStepInput about the new Step.InputRef block. Resolution order is now: 1. InputRef.From -> raw JSON from tmplCtx.StepOutputs[srcStep] 2. InputRef.Literal -> template-resolved string 3. Legacy SubInput -> template-resolved string 4. Parent input -> tmplCtx.Input Legacy string-templated sub-pipeline inputs keep working unchanged, so every existing composition pipeline continues to run.
Prove out the typed I/O protocol on four pipelines that exercise every
branch of the design:
- impl-issue — input: issue_ref, output: pr_ref.
- impl-speckit — input: string (natural-language feature description
is the right model), output: pr_ref.
- plan-scope — input: string (fetch-epic step parses it), adds a
new typed 'scope' output bound to scope_result.
- ops-epic-runner — shows scope -> iterate over child_issues -> impl-issue
wiring. Iterate binds each element as {{item}}; the
child's declared input.type (issue_ref) matches the
element schema of scope_result.child_issues.
Both the .agents/pipelines/ and internal/defaults/pipelines/ copies are
updated. Step-level prompts, artifacts, contracts, and retry policies are
unchanged. Remaining 53 pipelines keep their implicit 'string' typing —
see the ADR for the phase-2 migration TODO list.
Record the design of the typed pipeline I/O protocol: shared schema registry, typed inputs/outputs, typed composition wiring, load-time validation, and the phase-2 migration plan for the remaining pipelines.
Add explicit input.type and pipeline_outputs[*].type declarations to all audit-* pipelines per ADR-010. Inputs default to string (free-text audit scope hints); outputs mapped to findings_report. audit-dead-code-review declares input.type: pr_ref since it scans PR diffs. Load-validated via TestAllShippedPipelinesLoad. Live smoke skipped: audit-dead-code-issue and audit-doc create GitHub issues (destructive); audit-dead-code creates branches (destructive); remainder deferred to batch end.
Declare input.type and pipeline_outputs[*].type on all impl-* pipelines per ADR-010. Inputs: issue_ref for pipelines taking a GitHub issue/PR reference (impl-issue-core, impl-research, impl-review-loop, impl-smart-route); string for free-text feature/fix descriptions (impl-feature, impl-hotfix, impl-improve, impl-prototype, impl-recinq, impl-refactor, impl-speckit). Outputs: pr_ref where the artifact genuinely references a produced PR; findings_report where the artifact is an analysis/verdict/verification report (impl-hotfix.verdict, impl-improve.verification, impl-refactor.verification, impl-smart-route.assessment, impl-issue-core.assessment). Load-validated only. Live smoke skipped — all impl-* pipelines are destructive (open PRs, create branches, push code).
Declare input.type and pipeline_outputs[*].type on all plan-* pipelines per ADR-010. plan-research takes issue_ref; plan-adr, plan-approve-implement, plan-task take string. Outputs typed plan_ref except plan-scope.report (scope_report is a bespoke verification shape, left as string). plan-scope.scope already typed scope_result by prior migration. Load-validated only. Live smoke skipped — plan-scope creates issues (destructive); plan-research posts plans to issues (destructive); plan-adr writes ADR docs (could run locally but out of scope).
Declare input.type and pipeline_outputs[*].type on all ops-* pipelines per ADR-010. Inputs: pr_ref for PR-review pipelines (ops-pr-review, ops-pr-review-core, ops-pr-fix-review); issue_ref for issue-driven ops (ops-implement-epic, ops-refresh, ops-rewrite); string for the rest (ops-bootstrap, ops-debug, ops-issue-quality, ops-parallel-audit, ops-release-harden, ops-supervise, ops-hello-world, ops-epic-runner already string). Outputs: findings_report for review/audit/debug reports; pr_ref for ops-rewrite (enhancement_results retyped to findings_report since it is a verification report, not a PR); workspace_ref for ops-bootstrap; issue_ref for ops-refresh; scope_result for ops-epic-runner.scope (matches the plan-scope sub-pipeline output). Load-validated only. All ops-* pipelines either open PRs, post comments, or modify issues — destructive, live smoke skipped.
Declare input.type: string and pipeline_outputs[*].type: findings_report on doc-changelog, doc-explain, doc-fix, doc-onboard per ADR-010. All four accept free-text scope hints and produce finding-style reports about documentation drift or generated content. Load-validated only. doc-fix and doc-onboard may open PRs (destructive); doc-changelog and doc-explain are read-only but live smoke deferred to batch-end.
Declare input.type and pipeline_outputs[*].type on all wave-* pipelines per ADR-010. All wave-* inputs are string (free-text audit/smoke focus areas, PR refs as text, branch names). Outputs are findings_report for the self-evolution pipelines (wave-audit, wave-evolve, wave-review, wave-security-audit, wave-test-forge, wave-test-hardening, wave-validate, wave-smoke-test); pr_ref for wave-land (ships a PR); findings_report for wave-review, wave-scope-audit, wave-orchestrate (retyped from incorrect pr_ref default — classification/review/issues are analysis outputs, not PR references). wave-smoke-* and wave-ontology-* pipelines declare input.type: string and keep empty pipeline_outputs by design — they exercise executor paths and need free shape per ADR-010 phase 2 notes. Load-validated only. Live smoke on read-only wave-smoke variants deferred (depends on bubblewrap + mount state).
Declare input.type and pipeline_outputs[*].type on the remaining non-categorised pipelines per ADR-010: - bench-solve: input string (problem statement), output findings_report - test-gen: input string (target package), output findings_report - full-impl-cycle: input issue_ref (GitHub issue), output pr_ref (composes impl-issue-core → test-gen → audit-* → wave-land → ops-pr-review-core, all now typed) Load-validated only. full-impl-cycle opens PRs (destructive); test-gen may create PRs; bench-solve runs the SWE-bench-style loop and is safe to smoke but deferred pending BENCH_HOME state.
Add TestAllShippedPipelinesLoad as a regression guard for the typed I/O protocol. Walks .agents/pipelines and internal/defaults/pipelines, invokes YAMLPipelineLoader.Load (which runs ValidatePipelineIOTypes) on every *.yaml file. Any future pipeline with an unknown type name, broken step reference, or malformed input_ref now fails CI instead of breaking silently at runtime.
Fix 4 documentation inconsistencies found by doc-fix pipeline: - DOC-1: internal/ tree missing 8 packages (AGENTS.md) — added attention, classify, fileutil, humanize, ontology, testutil, timeouts, tools - DOC-2: .agents/ description outdated (AGENTS.md) — reflects runtime contents (workspaces, traces, state DB), not defaults - DOC-3: cmd/wave/ layout not specific (AGENTS.md) — split into main.go entry point and commands/ subpackage - DOC-4: Pipeline Selection table incomplete (AGENTS.md) — added note pointing to 'wave list pipelines' for full list Skipped 0 items.
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
Automated documentation sync to fix drift between
AGENTS.mdand the current codebase. 4 of 4 scan findings fixed, 0 skipped. Types addressed: INCOMPLETE (2), INACCURATE (1), MISSING_DOCS (1). No source code modified.Changes
AGENTS.mdinternal/(DOC-1): Added 8 missing package entries in alphabetical order:attention/,classify/,fileutil/,humanize/,ontology/,testutil/,timeouts/,tools/.internal/ontologyin particular was notably absent despite being documented in the Ontology Context Injection section..agents/comment (DOC-2): Replaced "Default personas, pipelines, contracts" with "Runtime artifacts: personas, pipelines, contracts, workspaces, traces, state DB" to reflect that.agents/is the runtime root (defaults live embedded ininternal/defaults/).cmd/wave/(DOC-3): Replaced the single generic line with two specific entries:cmd/wave/main.go(CLI entry point) andcmd/wave/commands/(Cobra subcommand implementations), so readers adding a new command know exactly where to look.wave list pipelinesas the authoritative source for the full installed-pipeline catalog, covering thedoc-*,plan-adr,plan-task,test-gen,audit-*,impl-*, andwave-smoke-*families that were not previously surfaced in the curated table.Findings Addressed
AGENTS.md.agents/tree description understates directory contentsAGENTS.mdcmd/tree entry hides commands subpackageAGENTS.mdwave-evolve/ undocumented pipelines in Pipeline Selection tableAGENTS.mdSkipped
None. All 4 findings were fixable via docs-only edits.
Test Plan
├──/└──connectors intactdocs/migrations.mduntouched