Skip to content

docs(corpus): launchpad/docs/corpus/templates/component.md -- the component corpus template - #1551

Merged
tucktuck101 merged 1 commit into
launchpadfrom
task/1330-corpus-template-component
Aug 28, 2026
Merged

docs(corpus): launchpad/docs/corpus/templates/component.md -- the component corpus template#1551
tucktuck101 merged 1 commit into
launchpadfrom
task/1330-corpus-template-component

Conversation

@serina-mcfall

Copy link
Copy Markdown

Summary

Adds launchpad/docs/corpus/templates/component.md, the template for documenting one software component (a crate, or a cohesive module inside one) as a standalone knowledge artifact. It draws an explicit boundary against #1326's already-drafted architecture-component template and grounds its industry model in this repository's own rustdoc convention rather than reaching for C4/arc42 a second time.

Related issue

Closes #1330

Issue type

Task


Agent provenance

Field Value
Harness / provider Claude Code
Model claude-sonnet-5
Session reference N/A - harness does not expose a run id/URL for this session
Initiating human @serina-mcfall

Objective

Create launchpad/docs/corpus/templates/component.md as the corpus template a future component-scale node is written against.

Impacted components

  • launchpad/docs/corpus/templates/component.md

Approach and rejected alternatives

Read PR #1528's actual diff first (git show origin/task/1326-corpus-template-architecture-component:launchpad/docs/corpus/templates/architecture-component.md), since #1326 is the highest-overlap sibling in this batch. #1326 is titled "architecture-component" and is tightly scoped to the C4 model's Component diagram: one container's internal decomposition, a required Mermaid diagram, type: architecture, required part-of toward the container. #1330 is titled plainly "component" with no "architecture-" prefix — a real signal it is a different, broader node.

Checked this repository's own precedent before reaching for an external framework, per the batch brief's instruction:

  • 6 of 30 crates carry a README.md, each shaped as an install/usage guide (Install, Authentication, Usage, Configuration) — real precedent, but inconsistent coverage and not systematically responsibility/interface/dependency shaped.
  • Every crate's src/lib.rs carries a //! crate-level doc comment stating its responsibility, and 12 of 30 crates additionally enable #![warn(missing_docs)], enforcing doc coverage on public items — a much more widespread, tooling-adjacent convention.
  • Cargo.toml [dependencies] sections give real, structural, verifiable evidence for a component's dependency edges in both directions.

Chosen approach: ground the template in this repository's own rustdoc convention (crate-level //! docs, item-level /// docs, Cargo.toml dependency manifests), verified against doc.rust-lang.org primary sources, rather than C4/arc42 a second time. The unmerged research note (#1466) independently supports this: "arc42 is too heavy for a component. Twelve sections on a single crate produces ten empty ones." — naming a single crate as its own example of component scale.

Rejected alternative: reusing C4/arc42 again for component, the same way #1326/#1327/#1328 did for architecture-context/-container/-component. Rejected because it would be citing the same industry model for a second, narrower purpose it was not designed for, and because this repository already has a real, working, in-tree documentation convention for exactly this subject that the C4/arc42 approach would ignore.

Boundary drawn against #1326 (stated explicitly in the node's own Boundary section): a component node documents one component standing alone — no required diagram, no container decomposition — and its validity never depends on an architecture-component node existing. It may optionally declare part-of toward an architecture-component node if one exists and names this component in its building-block table, but that is optional, not the reason the node exists.

type: implementation, not architecture: node.schema.json's type enum has no finer-grained member than the 13 named surfaces; implementation fits a component's code-level responsibility/interface/dependency content better than architecture's decomposition-and-diagram content, which #1326 already claims.

Verification

Command run:

python3 launchpad/project-intelligence/corpus/validate.py

Raw output:

UNVERIFIED  corpus-agents: evidence entry 1, citation 1: is a commit reference, which names no openable file
UNVERIFIED  corpus-agents: evidence entry 20, citation 1: is a graph-edge or tool-result citation, which names no openable file
UNVERIFIED  corpus-readme: evidence entry 1, citation 1: is a commit reference, which names no openable file
UNVERIFIED  corpus-standard-confidence: evidence entry 1, citation 1: is a commit reference, which names no openable file
UNVERIFIED  corpus-standard-decision-references: evidence entry 1, citation 1: is a commit reference, which names no openable file
UNVERIFIED  corpus-template-component: evidence entry 1, citation 1: is a commit reference, which names no openable file
UNVERIFIED  corpus-template-component: evidence entry 5, citation 1: is a graph-edge or tool-result citation, which names no openable file
UNVERIFIED  corpus-template-component: evidence entry 6, citation 1: is a graph-edge or tool-result citation, which names no openable file
UNVERIFIED  corpus-template-component: evidence entry 7, citation 1: is a graph-edge or tool-result citation, which names no openable file
UNVERIFIED  corpus-template-component: evidence entry 9, citation 1: is a graph-edge or tool-result citation, which names no openable file
UNVERIFIED  corpus-template-component: evidence entry 10, citation 1: is an external URL this validator can neither pin nor open
UNVERIFIED  corpus-template-component: evidence entry 11, citation 1: is an external URL this validator can neither pin nor open
UNVERIFIED  corpus-template-component: evidence entry 12, citation 1: is a graph-edge or tool-result citation, which names no openable file
UNVERIFIED  corpus-template-component: evidence entry 15, citation 1: is a graph-edge or tool-result citation, which names no openable file
UNVERIFIED  corpus-template-component: evidence entry 17, citation 2: is an external URL this validator can neither pin nor open
UNVERIFIED  corpus-template-component: evidence entry 18, citation 2: is a graph-edge or tool-result citation, which names no openable file
PASS  corpus validation found no errors; 16 item(s) reported unverified

Command run:

python3 -m unittest discover -s launchpad/docs/corpus/schema/tests -p "test_*.py" -v

Raw output:

test_duplicate_audiences_rejected (test_schema.InvalidFixtureTest.test_duplicate_audiences_rejected) ... ok
test_fact_with_forbidden_fields_rejected (test_schema.InvalidFixtureTest.test_fact_with_forbidden_fields_rejected) ... ok
test_inference_missing_confidence_rejected (test_schema.InvalidFixtureTest.test_inference_missing_confidence_rejected) ... ok
test_malformed_id_rejected (test_schema.InvalidFixtureTest.test_malformed_id_rejected) ... ok
test_missing_audiences_rejected (test_schema.InvalidFixtureTest.test_missing_audiences_rejected) ... ok
test_missing_evidence_field_rejected (test_schema.InvalidFixtureTest.test_missing_evidence_field_rejected) ... ok
test_missing_evidence_for_fact_rejected (test_schema.InvalidFixtureTest.test_missing_evidence_for_fact_rejected) ... ok
test_missing_evidence_for_inference_rejected (test_schema.InvalidFixtureTest.test_missing_evidence_for_inference_rejected) ... ok
test_missing_identity_rejected (test_schema.InvalidFixtureTest.test_missing_identity_rejected) ... ok
test_missing_origin_rejected (test_schema.InvalidFixtureTest.test_missing_origin_rejected) ... ok
test_missing_status_rejected (test_schema.InvalidFixtureTest.test_missing_status_rejected) ... ok
test_missing_type_rejected (test_schema.InvalidFixtureTest.test_missing_type_rejected) ... ok
test_team_knowledge_missing_provided_by_rejected (test_schema.InvalidFixtureTest.test_team_knowledge_missing_provided_by_rejected) ... ok
test_unknown_audience_value_rejected (test_schema.InvalidFixtureTest.test_unknown_audience_value_rejected) ... ok
test_unknown_origin_rejected (test_schema.InvalidFixtureTest.test_unknown_origin_rejected) ... ok
test_unknown_relationship_type_rejected (test_schema.InvalidFixtureTest.test_unknown_relationship_type_rejected) ... ok
test_unknown_status_rejected (test_schema.InvalidFixtureTest.test_unknown_status_rejected) ... ok
test_unknown_type_rejected (test_schema.InvalidFixtureTest.test_unknown_type_rejected) ... ok
test_unrecognized_field_rejected (test_schema.InvalidFixtureTest.test_unrecognized_field_rejected) ... ok
test_wrong_direction_relationship_rejected (test_schema.InvalidFixtureTest.test_wrong_direction_relationship_rejected) ... ok
test_every_enum_member_has_metadata (test_schema.RelationshipEnumMetadataTest.test_every_enum_member_has_metadata) ... ok
test_every_metadata_entry_has_directionality_and_inverse (test_schema.RelationshipEnumMetadataTest.test_every_metadata_entry_has_directionality_and_inverse) ... ok
test_relationship_enum_matches_node_schemas_inlined_copy (test_schema.RelationshipEnumMetadataTest.test_relationship_enum_matches_node_schemas_inlined_copy) ... ok
test_node_schema_is_valid_json_schema (test_schema.SchemaMetaValidityTest.test_node_schema_is_valid_json_schema) ... ok
test_relationships_schema_is_valid_json_schema (test_schema.SchemaMetaValidityTest.test_relationships_schema_is_valid_json_schema) ... ok
test_full_fixture_passes (test_schema.ValidFixtureTest.test_full_fixture_passes) ... ok
test_minimal_fixture_passes (test_schema.ValidFixtureTest.test_minimal_fixture_passes) ... ok

----------------------------------------------------------------------
Ran 27 tests in 0.074s

OK
  • Tests or checks were run and the raw output is pasted above
  • The diff is confined to the scope of the linked issue
  • No secrets, keys, tokens or hostnames were added to tracked files

Not verified

  • No node has yet been authored from this template. Every claim in the node about what a component node needs is grounded in this repository's own rustdoc/Cargo.toml precedent and in #1326's already-reviewed shape, not in a worked instance.
  • Whether this template's rustdoc-grounded shape transfers cleanly to a non-Rust component (desktop TypeScript, mobile Dart) was not checked — desktop/ and mobile/ have their own module conventions this node did not inspect.
  • Whether the six existing crate READMEs contain responsibility/interface content this template's Evidence expectations section would accept as a citation, versus only install/usage prose, was not checked file-by-file — the node's Boundary section characterizes all six by heading shape from a headline read, not a full body read of each file.
  • Codex is down (task: the mandatory cross-model review gate has a single provider, and it is unavailable #1467); same-model (Claude) adversarial self-review substituted for cross-model review in this batch's pipeline.

Security implications

None. This is a documentation-only change to a corpus template file; it adds no code, no dependencies, and no runtime behavior change.

Escalations

None. The #1326 boundary and the type: implementation choice are judgment calls, but each is stated and reasoned explicitly in the node's own front-matter INFERENCE entries and Boundary section rather than left silent, per the batch brief's guidance to make a real call and show the reasoning rather than escalate an intentional design decision. If a reviewer disagrees with either call, that is a request for revision on this PR, not a separate issue.

…ponent corpus template (#1330)

Adds the component corpus template: how to document one software
component (a crate, or a cohesive module inside one) as a standalone
knowledge artifact -- responsibility, public interface, and real
dependency edges -- distinct from #1326's architecture-component
template, which decomposes one container with a required diagram.

Grounds its industry model in this repository's own rustdoc
crate-level/item-level doc-comment convention (verified against
doc.rust-lang.org primary sources) rather than reaching for C4/arc42
again, since the unmerged research note independently calls arc42 too
heavy for a single crate.

Closes #1330

Signed-off-by: Serina Mcfall <serina.mcfall@gmail.com>
@serina-mcfall serina-mcfall added the by:agent Filed or authored by an AI agent, not a human label Aug 27, 2026
@serina-mcfall
serina-mcfall marked this pull request as ready for review August 27, 2026 06:18
@tucktuck101 tucktuck101 self-assigned this Aug 27, 2026

@tucktuck101 tucktuck101 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review — component corpus template

On the duplication question first, unhedged: component.md is NOT a duplicate of
architecture-component.md.
They own different granularities — one node per component at
implementation altitude here, one node per container at architecture altitude there — and this
node's Boundary section addresses the collision head-on and by name. What is missing is a
link-don't-restate rule, below. One false claim about this repository.

High — the "30/30 crates" claim that justifies the rustdoc model is false

:140-142 states the rustdoc convention is one "this repository's own source already follows for
every one of its 30 crates at some level. A crate-level //! doc comment at the top of
lib.rs
states the crate's responsibility", and later "30/30 crates carry crate-level docs at
some level, 12/30 enforce coverage on public items".

Measured on launchpad: ls -d crates/*/ is 30, but only 26 contain src/lib.rs
buzz-admin, buzz-backend-kubernetes, buzz-pairing-cli and sprig have none. The weaker
reading also fails: crates/sprig/src/main.rs begins fn main() { and contains zero //!
lines. True figure is 29 of 30; the lib.rs mechanism holds for 26 of 30.

This is the entire stated reason for grounding the template in rustdoc rather than C4/arc42, and the
premise of its strictest rule — "A responsibility claim is a FACT or nothing. Cite the component's
crate-level doc comment" — so an author writing a sprig node follows a template asserting such a
comment always exists. No evidence entry supports the count, unlike the frontmatter's other crate
censuses (READMEs at :41-47, missing_docs at :55-61), both of which I verified as exactly
correct. Say 29 of 30, drop "at the top of lib.rs" as universal, and add an evidence entry — the
design decision survives intact.

Medium — nothing tells the container-level row to link rather than restate

architecture-component.md:239-243 requires, per building-block row, "name, responsibility (one
sentence), its interface/contract, and the evidence citation for its existence". This node's
required sections 2 and 3 require Responsibility and Public interface with citations for the same
object. For any component with both nodes, the same three facts are mandatory content in two places
with no precedence rule. :184-186 gestures at it ("may optionally be the deeper detail behind one
row") but neither template says the row links rather than restates.

The corpus AGENTS.md says a second copy "drifts silently", create-step 2 is "Check nothing already
covers it", and #1330's DoD requires linking neighbours "without duplicating their canonical
content". Ownership: architecture-component owns the container-scoped decomposition; component owns
the per-component node. The missing instruction belongs here.

Low — the Boundary section never separates the two senses of "component"

This node uses "component" to mean "a crate, or a cohesive module inside one" (:104-105, :141),
while its three C4-grounded siblings use C4's sense — under which "a Java JAR, C# assembly, DLL,
module, package, namespace, folder etc" is "Perhaps but, again, typically not" a component
(c4model.com/abstractions/component FAQ, which I read in full). One sentence naming the two senses
apart removes the residual pick-wrong risk.

Low — an unmerged sibling path is presented as resolvable

The "For / Read" table routes readers to
launchpad/docs/corpus/templates/architecture-component.md as a resolvable path. This PR adds
exactly one file, and that path exists neither here nor on the integration branch. You do disclose
#1326's unmerged status in three other places, so this is internal presentation inconsistency, and
it self-resolves if #1528 merges.

Not findings, ruled out on evidence

  • Index registration: the corpus AGENTS.md and README.md both state that indexes are
    generated derived views, never hand-authored, and the ten-step "Creating a node" procedure has
    no registration step. All 26 template PRs leaving AGENTS.md untouched is correct.
  • CI green at head (latest run per check); node validates clean.

Reviewed by tucktuck101's review lane. Every failing claim reported above was reproduced by me against this PR head before posting.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

by:agent Filed or authored by an AI agent, not a human

Projects

None yet

Development

Successfully merging this pull request may close these issues.

task: define the component corpus template

2 participants