"Author the architectural-spike-author/-audit pair - the missing ADR input artefact (architectural-spike@1)"
TASK-SKILL-117: architectural-spike-author / -audit
§1 - Description
A spike is the time-boxed investigation that turns "we have 2+ plausible architectures" into evidence an ADR can cite. The ADR skill already demands spike output; nothing can produce it. This task authors the pair and its artefact contract.
Normative clauses:
- A new artefact type
architectural-spike@1MUST be defined with frontmatter:spike_id(SPIKE-<task-ID>-<n>),task_id,question(the single decision under investigation),timebox_hours(int, recorded up front),options(array, each{name, hypothesis, evidence[], cost_estimate, risks[]}),recommendation(names exactly one option),confidence(low|medium|high),discarded(array of{name, reason}),created. Body sections:## Question,## Options probed,## Evidence log,## Recommendation,## Discard log. architectural-spike-authorMUST: take an audited task + repo-context-map as inputs (input envelope), declare its trigger conditions (an ADR is pending AND >= 2 viable options exist, or the task introduces a dependency the repo has never used), enforce the timebox by recording planned vs actual hours, and HALT for the operator when actual exceeds planned by more than 50%.- Every
evidence[]entry MUST cite something checkable: a file path in the repo, a command + its observed output, or an external URL. Unsupported assertions ("X is faster") without a citation MUST NOT count as evidence. architectural-spike-auditMUST score /10 against a RUBRIC.md with at least these rule families: SPK-STRUCT (frontmatter + sections complete, recommendation names exactly one probed option), SPK-EVID (>= 2 options probed, every option has >= 1 checkable evidence entry, recommendation cites evidence), SPK-BOX (timebox recorded, overrun HALT honored), SPK-DISC (discard log non-empty whenever options were rejected). Only 10/10 passes; the audit report format mirrors REPORT_FORMAT.md conventions of the existing full pairs.architecture-decision-record-author/SKILL.mdMUST be updated to namearchitectural-spike@1as its spike input (replacing the dangling prose reference), and to state the fallback when no spike exists (lean profile: ADR options table carries the evidence inline).- Both skills MUST carry acceptance
TRIGGER_TESTS.mdwith >= 6 cases each (>= 3 positive, >= 3 negative), following the conventions of the existing trigger-test files (TASK-SKILL-112 lineage). - File layout MUST match the full-pair convention exactly as listed in
new_files, so the TASK-SKILL-118 parity checker passes over this pair with zero exemptions.
§2 - Why this design
The artefact is deliberately evidence-first: the rubric makes uncited claims worthless, which is what separates a spike from an opinion. Timebox recording (plan vs actual, HALT on 1.5x) encodes the whole point of a spike - bounded spend - as a checkable invariant rather than advice. Reusing the full-pair file layout means no new tooling: parity checks, chain-coverage checks, and the plugin build all treat the pair like the existing ten.
§3 - Contract
Input envelope (author): {task_path, repo_context_map_path, question, timebox_hours, output_dir}. Output envelope: {spike_path, spike_id, recommendation, confidence, halted}. Audit input: {spike_path}; audit output: {verdict: pass|fail|needs_human, score, findings[]}. Envelope JSONs are normative in envelopes/.
§4 - Acceptance criteria
- Artefact contract is complete (§1 #1) - SKILL.md's artefact section defines every frontmatter field with types and the five body sections; a sample spike in the acceptance fixtures parses against it.
- Trigger conditions are declared and tested (§1 #2, #6) - author TRIGGER_TESTS.md contains >= 6 cases including "ADR pending with 2 options" (fire) and "single obvious option" (no fire).
- Timebox HALT is normative (§1 #2) - PIPELINE.md contains the plan/actual recording step and the > 1.5x HALT with operator wording; INVARIANTS.md lists it as an invariant.
- Evidence rule is enforceable (§1 #3, #4) - RUBRIC.md's SPK-EVID rules reject a fixture spike whose option carries only an uncited claim; the fixture and expected finding appear in audit acceptance tests.
- Rubric families complete, 10/10 gate (§1 #4) - RUBRIC.md defines SPK-STRUCT/EVID/BOX/DISC with rule IDs and states the 10/10 pass bar.
- ADR input is wired (§1 #5) - architecture-decision-record-author/SKILL.md names architectural-spike@1 and the lean-profile fallback; the dangling prose is gone.
- Layout parity (§1 #7) - every file in
new_filesexists; the TASK-SKILL-118 parity check (or, before it lands, a manuallsagainst the task pair layout) shows no missing file class.
§5 - Verification
Acceptance-driven (skills are contracts, not code):
modules/skill/architectural-spike-author/acceptance/TRIGGER_TESTS.md- AC 2 cases (>= 6).modules/skill/architectural-spike-audit/acceptance/TRIGGER_TESTS.md- AC 4 fixture + expected SPK-EVID finding; plus a 10/10 clean fixture.- Structural check for AC 1, 3, 5, 6, 7:
bash tools/install/check-chain-coverage.shpair rule (from TASK-SKILL-116) plusgrepassertions listed inline in the two TRIGGER_TESTS.md preambles (each acceptance file opens with its own "how to verify this pair" block, executable line by line).
§6 - Implementation skeleton
Author SKILL.md follows the section order of implementation-plan-author (description, triggers, inputs, artefact spec, pipeline pointer, HALT semantics). RUBRIC.md follows task-audit/RUBRIC.md's family/rule-ID formatting. Envelope JSONs mirror the existing pairs' shape (json-schema-lite objects with required arrays).
§7 - Dependencies
None upstream (authoring is self-contained). Blocks TASK-CUO-209 (the pair joins the vendored set there). TASK-SKILL-118's parity checker adopts this pair automatically once both land.
§8 - Example payloads
# spike frontmatter (fixture)
spike_id: SPIKE-TASK-MEMORY-130-1
task_id: TASK-MEMORY-130
question: "MMR chain vs plain hash chain for audit checkpoints?"
timebox_hours: 6
options:
- name: mmr
hypothesis: "O(log n) inclusion proofs justify complexity"
evidence: ["bench: scripts/bench_mmr.sh output 2026-07-12", "modules/memory/cyberos/data/AGENTS.md §6.4"]
cost_estimate: "3-4 days"
risks: ["new dependency surface"]
recommendation: mmr
confidence: medium
discarded: [{name: plain-hash, reason: "linear proof size fails NFR-PERF-012"}]
§9 - Open questions
None blocking. Whether ship-tasks gains an optional spike step between steps 2 and 3 is TASK-CUO-209 territory (workflow change), not this pair's.
§10 - Failure modes inventory
- Spike becomes a design doc (unbounded) - SPK-BOX fails the audit when actual hours are absent or the HALT was skipped; the timebox is data, not vibes.
- Evidence rot (cited file later deleted) - audit checks citations resolve AT AUDIT TIME; later rot is caught by TASK-SKILL-119's anchor checker class, out of scope here.
- Recommendation names an unprobed option - SPK-STRUCT explicit rule; fixture covers it.
- Author invoked with no real alternatives - negative trigger tests pin "single obvious option -> do not fire"; the ADR proceeds without a spike per §1 #5 fallback.
- Confidence inflation - confidence is an enum the audit cross-checks:
highwith a single evidence entry per option triggers a SPK-EVID finding.
§11 - Implementation notes
Keep artefact version pinned at @1 in both SKILL.md files; version bumps follow the contracts CHANGELOG discipline. The pair is NOT added to build.sh here - vendoring is TASK-CUO-209's single expansion, kept out of this task to avoid two writers on build.sh:28.
End of TASK-SKILL-117.
Audit
TASK-SKILL-117 audit
§1 - Verdict summary
Audited for artefact-contract completeness (every field typed), rubric enforceability (rules an auditor can apply without judgment calls), and layout parity with the four full pairs. The evidence rule and the timebox both moved from aspiration to checkable invariants during revision. Verification is acceptance-driven per skill-contract conventions; both TRIGGER_TESTS.md files are in new_files (TRACE-003 closed).
§2 - Findings (all resolved)
ISS-001 evidence was subjective
"Options with evidence" invited opinion-spikes. Resolved: §1 #3 checkable-citation rule (file path, command+output, or URL); SPK-EVID rejects uncited claims, AC 4 pins the fixture.
ISS-002 timebox had no mechanism
A timebox nobody records is prose. Resolved: §1 #2 plan-vs-actual recording + HALT at >1.5x; AC 3 requires it in PIPELINE.md and INVARIANTS.md.
ISS-003 recommendation could name an unprobed option
Structural hole in the artefact contract. Resolved: SPK-STRUCT rule (recommendation must name exactly one probed option), §10 #3.
ISS-004 no-spike fallback undefined
ADR-author consumes spike output; repos without spikes would stall. Resolved: §1 #5 lean-profile fallback (evidence inline in the ADR options table), AC 6.
ISS-005 layout parity incomplete
First cut omitted the audit-side AUDIT_LOOP.md/REPORT_FORMAT.md from new_files, which would fail TASK-SKILL-118's parity checker on arrival. Resolved: new_files completed to the full-pair file classes, AC 7.
ISS-006 confidence inflation unchecked
confidence: high cost nothing. Resolved: rubric cross-check (high with single-evidence options -> SPK-EVID finding), §10 #5.
§3 - Resolution
All six findings addressed as cited. The pair lands vendorable (TASK-CUO-209) and parity-clean (TASK-SKILL-118) by construction. Score = 10/10.
End of TASK-SKILL-117 audit.
§10 - Post-implementation gates (2026-07-12, ship run)
- §10.4 verification: PASS - 12/12 executable preamble assertions green on rerun; trigger suites 9 + 8 cases; ADR wiring grep green. Report: .workflow/TASK-SKILL-117/coverage-and-review.md.
- awh/caf: N/A (contract work; declared). Floor: fresh build + chain-coverage + sync checks green.
- HITL gate 1: APPROVED by Stephen Cheng 2026-07-12. HITL gate 2: ACCEPTED same date via explicit operator pre-authorization at the review gate; gates stayed green.
TASK-SKILL-117 shipped 2026-07-12. TASK-CUO-209 unblocked.