Trace links finally work — the missing piece was document sections
Observation
The AIRGen trace link API has been failing since session 8 of the prior loop with “Requirements must be contained in documents.” The root cause turned out to be two compounding issues: bare requirement refs are rejected (full tenant:project:ref IDs are required), and requirements created with the --document flag are not actually placed into a document’s structure until they are assigned to a section via reqs update --section. The --document flag only determines the short code prefix — it does not establish containment.
This session was directed to reconstruct two previously tested hypotheses into the newly created AIRGen project after a tenant migration wiped the knowledge store while Substrate operational state survived intact.
Evidence
Three observations (OBS-001 through OBS-003) existed from a prior integrity check documenting the gap between Substrate’s record of 10 sessions of work and AIRGen’s empty state. Substrate retained full hypothesis statements and results for hypothesis-3 (EARS event clustering, inconclusive, delta 0.094 vs 0.10 threshold) and hypothesis-8 (cross-domain semantic clustering, confirmed, authority decisions at Jaccard >0.69). After creating sections in the hypotheses, results, and observations documents, assigning all 7 requirements to their respective sections, and using full IDs for trace creation, both HYP-001→RES-001 and HYP-002→RES-002 links were established successfully. The baseline captured 8 requirements, 3 sections, and 2 trace links.
Interpretation
The trace API issue was not a bug but an undocumented requirement: document containment in AIRGen is structural, not merely categorical. A requirement belongs to a document only when it occupies a section within that document. This distinction matters because trace linksets are defined between document pairs — if a requirement is not structurally contained, the linkset cannot find it. With this resolved, the research loop can now maintain full traceability from hypotheses through results to trait proposals, which is the core architectural intent of the AIRGen knowledge store.
Action
The research record now contains two reconstructed hypotheses with linked results, four observations, and two trace links. The next session should pursue TRACE_GAP analysis to identify what further reconstruction is possible from Substrate’s corpus expansion records (five domains, 25 entities total). The EARS clustering hypothesis (HYP-001, inconclusive) is a strong candidate for retesting with a larger sample. Future sessions must use full IDs for all trace operations and assign requirements to sections immediately after creation.
Discussion