Skip to main content

Golden Chain Pipeline

The 17-link Golden Chain development cycle — spec-driven, benchmark-gated, self-assessing.

pipeline

Execute the full Golden Chain development cycle.

Aliases: chain

tri pipeline run <task>        # Execute full 17-link cycle
tri pipeline status # Show current pipeline state
tri pipeline resume # Resume from checkpoint

Subcommands

SubcommandDescription
run [task]Execute full 17-link Golden Chain cycle
statusShow current pipeline state
resumeResume from last checkpoint

Links are numbered 0-16 (17 total). The CLI banner displays "16 Links" counting from Link 0.

#LinkDescriptionCritical
0TVC_GATESearch corpus, return cached or continueYes
1BASELINEAnalyze previous version v(n-1)
2METRICSCollect v(n-1) performance metrics
3PAS_ANALYZEResearch patterns and science
4TECH_TREEBuild technology dependency graph
5SPEC_CREATECreate .vibee specifications
6CODE_GENERATEGenerate code from specs (vibee gen)
7TEST_RUNRun test suite (zig build test)Yes
8BENCHMARK_PREVCompare to v(n-1) — regression gateYes
9BENCHMARK_EXTERNALCompare to llama.cpp / vLLM
10BENCHMARK_THEORETICALGap to theoretical maximum
11DELTA_REPORTGenerate improvement report
12OPTIMIZEFix if needed (optional)
13DOCSGenerate documentation + proofs
14TOXIC_VERDICTSelf-assessment (Russian)
15GITCommit + push changes
16LOOP_DECISIONDecide next iterationYes

Example output:

Golden Chain Pipeline - 16 Links
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Link 0: TVC_GATE [CRITICAL]
[OK] TVC_GATE (50ms)

Link 1: BASELINE
[OK] BASELINE (100ms)

...

Link 14: TOXIC_VERDICT [CRITICAL]
[OK] TOXIC_VERDICT (25ms)

================================================================
GOLDEN CHAIN CLOSED
================================================================

Completed: 15/17 links
Improvement: 1.23%
Threshold: 61.80% (phi^-1)

KOSCHEI IMMORTAL! Needle is sharp.

Needle Status (Immortality Check)

The pipeline uses the Koschei Needle metaphor. Improvement rate is measured against the golden threshold (phi^-1 = 0.618):

StatusConditionMessage
Immortalrate > 61.8%KOSCHEI BESSMERTEN! Igla ostra.
Mortal0 < rate < 61.8%Uluchshenie est', no Igla tupitsya.
Regressionrate <= 0REGRESSIYA! Igla slomana.

Improvement Rate Formula

Weighted across four dimensions:

DimensionWeightMetric
Performance40%current_tps / prev_tps - 1
Memory30%prev_mem / curr_mem - 1
Test Coverage20%curr_tests / prev_tests - 1
Accuracy10%curr_accuracy - prev_accuracy

decompose

Break a task into sub-tasks (Links 3-4 of the pipeline).

tri decompose <task description>
tri decompose "add user authentication"

Example output:

Task Decomposition (Links 3-4)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Task: add user authentication

Sub-tasks identified:
1. Analyze existing codebase
2. Create .vibee specification
3. Generate code from spec
4. Write tests
5. Run benchmarks
6. Document changes

Use 'tri pipeline run' to execute full cycle

plan

Generate .vibee specifications from sub-tasks (Link 5).

tri plan
tri plan --file tasks.json

spec-create

Create a .vibee specification template (Link 6).

Aliases: spec_create

tri spec-create <name>
tri spec-create my_module

Generates a template file at specs/tri/<name>.vibee with the standard VIBEE structure (name, version, language, module, types, behaviors).

loop-decide

Loop decision gate (Link 17) — determines whether to continue iterating or exit.

Aliases: loop_decide

tri loop-decide              # Auto mode (evaluate EXIT_SIGNAL)
tri loop-decide auto # Same as above
tri loop-decide continue # Force CONTINUE
tri loop-decide exit # Force EXIT

The loop decision evaluates the EXIT_SIGNAL criteria:

EXIT_SIGNAL = (
tests_pass AND
spec_complete AND
critical_assessment_written AND
tech_tree_options_proposed AND
achievement_documented AND
dashboard_widget_updated AND
committed
)
ConditionCheck
tests_passzig build test succeeds
spec_complete.vibee spec exists for all generated code
critical_assessment_writtenToxic verdict (Link 14) completed
tech_tree_options_proposed3 options for next iteration listed
achievement_documentedReport written in docsite/docs/research/
dashboard_widget_updatedCanvas mirror widget reflects new state
committedChanges committed to git

verify

Run tests + benchmarks (Links 7-11).

tri verify

Example output:

Verification (Links 7-11)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Link 7: Running Tests...
[OK] Tests passed

Link 8: Running Benchmarks...
[OK] Benchmark: 125us (1000 iterations)

Verification complete
Tests: PASS
Benchmarks: No regression detected

verdict

Generate a toxic self-assessment verdict (Link 14).

tri verdict

Produces a structured Russian-style self-critique:

Example output:

TOXIC VERDICT (Link 14)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

WHAT WAS DONE:
- Implemented VSA bind/unbind optimization
- Added 12 new test cases
- Benchmark: 1.4 Gops/s (↑23%)

WHAT FAILED:
- Memory usage still 2x theoretical minimum
- No WASM target coverage

TECH TREE OPTIONS:
A) Optimize memory layout (packed trits)
B) Add WASM compilation target
C) Implement GPU offload via Metal

NEEDLE STATUS:
Improvement: 23.4%
Threshold: 61.8% (phi^-1)
Status: Igla tupitsya (needle dulling)

Error Recovery

The pipeline handles errors with different strategies:

Error TypeStrategyExample
Critical link failureAbortTests fail, benchmark regression
Benchmark timeoutRetryExternal benchmark slow
Non-critical failureSkipExternal benchmark unavailable
Git conflictManualWait for user intervention

Constants

PHI           = 1.618033988749895
PHI_INVERSE = 0.618033988749895 (Needle threshold)
TRINITY = 3.0 (phi^2 + 1/phi^2)