gunk-dev/the-valley

01-project-and-problem-map.md

sourceddc9a2fd850emain's published tip history
22.9 KiB · Rendered
1# 1. What the-valley is trying to make possible
2
3the-valley is an experiment in making software work portable, verifiable, and understandable across
4changes of host and author. Its immediate application is a developer working with coding agents. Its
5larger ambition is a system that turns requested outcomes into completed work while preserving the
6reasons, authority, and evidence behind each consequential action.
7
8This chapter reconstructs that ambition from the repository. The later chapters ask which parts have
9established solutions, which are engineering integration problems, and which remain research
10questions. The reconstruction describes commit `5bb3a7736fe49b0cc4914299b142c0c9bafb6870`. It is an
11interpretation for this report, not a replacement for the project's requirements.
12
13The engineering aim is to satisfy clear requirements using good existing solutions wherever they
14fit. The project's constraints determine which combinations are acceptable. Research helps clarify
15those requirements, discover reusable solutions, and test the complete system. A novel mechanism is
16one possible result of that work, never a prerequisite for success.
17
18## 1.1 Three connected capabilities
19
20The first capability is **durable, independently operated development infrastructure**. Code and
21project knowledge should survive the disappearance of a hosting provider. Normal development should
22remain recognizable. The scenario ladder therefore starts with hosting, replication, and
23demonstrated recovery, rather than with a new collaboration interface.
24
25The second is **integration that accepts evidence produced before submission**. A contributor should
26be able to establish that the required checks passed where the work was authored. The integrator
27should decide whether that evidence still applies to the state it will publish. This is more
28specific than making CI faster: it changes the relationship between execution, evidence, and
29admission.
30
31The third is **a persistent account of intent that can drive further work**. Outcomes, dependencies,
32decisions, and explanations become inputs to agents. The graph should help a fresh agent understand
33the project and choose useful work. Completion must eventually mean that the requested result
34exists, rather than that a worker has stopped or a status field has changed.
35
36These capabilities reinforce one another, and each can also be useful independently. Portable
37evidence could be useful with an ordinary forge. A well-maintained knowledge graph could help agents
38without an autonomous scheduler. Reliable self-hosting could be valuable even if the outcome engine
39never materializes. Those independent uses help diagnose and compare components. The primary
40evaluation still concerns the complete workflow: whether the same intent, evidence, and authority
41remain meaningful as work passes between them.
42
43The local basis is the [premise](../../README.md), [requirements](../../design/requirements.md),
44[scenario ladder](../../design/user-scenarios.md), and
45[outcome sketch](../../.the-valley/ideas/ida-eac723e-outcome-dag.md).
46
47## 1.2 Requirements as research questions
48
49The requirements mix desirable experiences with technical guarantees. Each needs an observable test.
50The following translation preserves their intent while making the questions more precise. These
51questions guide both the selection of existing tools and the evaluation of their composition.
52
53| Local goal | Question that can be investigated | Principal literatures | Report treatment |
54| ------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- |
55| S1: repositories cannot be lost | Which acknowledged states remain recoverable after which failures, and within what time? | Replication, backup consistency, local-first systems | [Chapter 4](04-events-trust-and-durability.md) |
56| S2: integration in seconds | Under which workload and trust assumptions can already-verified work be integrated in seconds? | Incremental computation, build systems, concurrency control | [Chapter 3](03-verification-and-integration.md) |
57| S3: attributable autonomous authors | What can the system establish about a run's origin, authority, actions, and checks? | Workload identity, capabilities, provenance, software agents | Chapters [4](04-events-trust-and-durability.md) and [5](05-knowledge-agents-and-outcomes.md) |
58| S4: one history explains effects | What facts must be retained to reconstruct an action and distinguish observation from explanation? | Distributed causality, event sourcing, workflow recovery, provenance | Chapter 4 |
59| S5: bounded and revocable trust | Which permissions are checked at each boundary, and when does withdrawal take effect? | Authorization, delegation, secure update systems | Chapters 3 and 4 |
60| S6: incidents are attributed and remembered | What evidence supports attribution, and how is uncertainty represented? | Causal reasoning, operational learning, knowledge maintenance | Chapters 4 and 5 |
61| Demand-shaped work | How are goals refined, prioritized, attempted, evaluated, and abandoned without losing the original intent? | Goal-oriented requirements, planning, scheduling, human automation | Chapter 5 |
62| Minimal, portable composition | Can an implementation be replaced without rewriting the project's authoritative state? | Modular design, protocols, interoperability | [Chapter 2](02-existing-systems.md) and [Chapter 6](06-synthesis-and-research-agenda.md) |
63
64This translation exposes a useful distinction. "Runs in seconds" is a performance target. "Cannot
65accept the wrong check" is a safety property. "Eventually processes every eligible request" is a
66liveness property. "Still works after the primary host is destroyed" is a recovery property. One
67successful demonstration cannot establish all four.
68
69### Keep requirements, constraints, and mechanisms separate
70
71A requirement states the behavior that must hold for an actor in a specified situation. A constraint
72limits the acceptable solutions. An architectural bet selects a way to meet the requirement within
73those constraints. An implementation supplies that mechanism. Keeping these statements separate
74makes it possible to adopt an existing tool without accidentally changing the intended result.
75
76For example, preserving the explanation for an accepted change is a requirement. Operator ownership
77of the retained record can be a constraint. Storing that record in Git is an architectural choice.
78The same requirement might be met by another store with suitable recovery and export behavior. A
79preference for Git should therefore be argued as a means of satisfying the chosen constraints.
80
81The premise already imposes open source, minimalism, Nix in the reference implementation, and
82decentralization where possible. Their exact consequences need interpretation. Minimalism could mean
83few components, little custom code, or low operating burden; those are different objectives. The
84report recommends judging it by the understanding and work needed to operate the complete system.
85
86### Questions that must be answered before choosing the composition
87
88The existing requirements leave several boundaries unsettled. These are proposed clarification
89questions, not silently adopted answers:
90
91- **Acknowledged durability.** If the primary host disappears immediately after a successful
92 integration, may that change be lost? "Integrated means replicated" and replication "within
93 minutes" describe different acknowledgment policies. Define the allowed loss window, independent
94 failure domains, and which record the durability promise covers.
95- **Latency and capacity.** What workload, percentile, resource budget, and evidence prerequisites
96 does "seconds" assume? Report author-side checking as well as submission-to-acceptance time. State
97 what happens when changes invalidate one another or arrive faster than they can be processed.
98- **Trust and attribution.** Is an authorized but dishonest author in scope? Which observer is
99 trusted to report execution and identify an agent run? Equal acceptance guarantees for humans and
100 agents need not imply equal permissions. These answers determine which existing verification and
101 identity mechanisms are sufficient.
102- **History and explanation.** Which accepted decisions, failed attempts, authority changes, and
103 external actions must remain explainable after losing the controller and bus? Distinguish observed
104 events from an incident's inferred cause. An uncertain external result needs an explicit state.
105- **The recoverable project.** Does recovery preserve only code and knowledge, or also the evidence,
106 policy snapshots, trust roots, artifact references, and outstanding obligations needed to
107 interpret and continue its work? Identify what can be discarded or reconstructed.
108- **Completion.** What observation establishes that the requested result exists, and who may accept
109 it or revise the criterion? A landed change, a cancelled prerequisite, and an attained outcome
110 need separate meanings. State how a continuing obligation is reassessed.
111- **Operating burden.** What does adding a project or collaborator require? Which credentials,
112 policy surfaces, upgrades, and recovery procedures must the operator understand? Test whether the
113 operator can resume safely after an absence and replace a component without redesigning its
114 neighbors.
115- **Execution equivalence.** Must local and remote checks use the same identified definition and
116 environment, or literally the same backend? Which results must be reproducible, and which are
117 observations with a freshness limit? State what a non-Nix consumer must understand or reproduce.
118
119The scenario ladder deliberately postpones detailed acceptance criteria for later rungs. Preserve
120that discipline. Clarify a boundary when the active workflow depends on it, while recording later
121questions as unresolved. The proposed constraints in
122[section 6.7](06-synthesis-and-research-agenda.md#67-an-opinionated-end-to-end-system) help organize
123those decisions without prematurely selecting their implementation.
124
125The report treats S7, public contribution by strangers, as a boundary condition. It does not
126recommend building a public federation or an abuse-management system before the solo and small-team
127cases are useful. However, mechanisms introduced at S2 and S3 should state their trust assumptions
128so that their limits remain visible at S5.
129
130## 1.3 What exists at the snapshot
131
132The repository contains considerably more implementation than its opening status paragraph alone
133suggests. It also contains proposed behavior that implementation comments sometimes describe in the
134present tense. A research report needs a separate inventory.
135
136| Area | Evidence in the repository | What this report can conclude |
137| -------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
138| Hosting and replication | [Host module](../../nix/valley-host.nix), [host schema](../../schema/valley.cue), scenario acceptance checkboxes | Configuration and test artifacts exist. The scenario document records a restore exercise. This study did not independently inspect the deployed host or repeat that restore. |
139| Knowledge convention | [Graph documentation](../../.the-valley/README.md), [node schema](../../schema/node.cue), [lint](../../nix/knowledge-lint.py) | Typed Markdown nodes and validation are implemented. Semantic adequacy of their contents is a separate question. |
140| Evidence production | [Attestation implementation](../../attest/), [schema](../../schema/attestation.cue), [conformance vectors](../../attest/conformance/) | Tree identification, statements, signed notes, and verification tooling exist. The existence of a signature does not establish the truth of every field. |
141| Integration | [Controller](../../integrator/main.go), [verdict](../../integrator/verdict/verdict.go), [detailed design](../../design/integration.md) | A polling controller evaluates requests and transfers evidence. It is not yet the event-subscribing controller suggested by the architecture overview. |
142| Identity | [Registry schema](../../schema/identity.cue), [compiler](../../identity/), [governance decision](../../.the-valley/decisions/dcr-b87f6e8-identity-is-a-governed-registry.md) | Registry compilation exists. This does not establish enforcement of every proposed delegation or human-presence rule. |
143| Events | [Event schema](../../schema/events.cue), [CLI](../../bin/valley), [integrator publication](../../integrator/bus.go) | Ref projections and integration notifications exist. Current-state reconstruction and complete historical recovery are different properties. |
144| Witnesses and transparency | [Verification design](../../design/verification.md), [roadmap](../../design/roadmap.md) | The full independent re-verification and transparency backstop remains a proposed layer in the inspected material. |
145| Outcome production | [Demand-pressure idea](../../.the-valley/ideas/ida-3145b7a-demand-pressure.md), [production-DAG idea](../../.the-valley/ideas/ida-b48bded-production-dags-and-events.md) | The conceptual model is developed. This study found no basis to call the complete general outcome engine implemented or evaluated. |
146| Recursive transparency | [Draft invariant](../../design/self-transparency.md), architecture bootstrap discussion | Governance induction has concrete design, but the claimed closure over every durable effect remains unresolved. |
147
148These are static observations. The report does not certify a deployment, claim a security audit, or
149claim benchmark results. Its experimental designs are proposals, clearly separated from findings.
150
151## 1.4 Six distinctions that organize the whole study
152
153### Identity, authority, and truth
154
155A signature can establish that a key signed some bytes. A policy can establish that the key was
156authorized to make a particular decision. Neither alone establishes that an asserted computation
157occurred, that the computation tested a useful property, or that the requested outcome was achieved.
158
159Consider a statement saying that a migration test passed. The signature might be valid. The signer
160might be an approved development host. The test might nevertheless contain no assertions. These are
161three separate questions, requiring three separate kinds of evidence.
162
163This distinction should govern both local checks and agent provenance. A host can attest that it
164launched a particular harness with particular inputs. That provides an accountable observation. It
165does not identify an independently acting model principal or expose all the causes of the model's
166output. Chapters 3 and 4 develop the relevant trust boundaries.
167
168### State, history, and explanation
169
170A checkout answers what the project currently contains. A durable operation record answers what
171happened to it. An explanation also needs the intent, policy, observations, and assumptions that
172made an action reasonable at the time.
173
174Suppose a branch is created, rejected twice, rewritten, integrated, and deleted. The final source
175tree may retain the result while losing most of that sequence. Conversely, retaining every event
176still does not explain why a requirement mattered. The report therefore evaluates state recovery,
177historical recovery, and explanation quality separately.
178
179### Valid computation and adequate judgment
180
181Reproducing a result establishes agreement about a computation under some assumptions. It does not
182establish that the computation was the right way to decide whether to act. The same separation
183applies to an LLM judge: a consistently repeated assessment can still use an inadequate rubric.
184
185This is especially important for the proposed progression from judgment by agents to deterministic
186checks. The useful question is which parts of a decision have become stable enough to encode. A
187mechanized proxy should retain a link to the requirement it approximates and to examples it gets
188wrong. Otherwise the system can improve the proxy while losing the purpose.
189
190### Availability and authority
191
192Many replicas can make an object easy to retrieve. They do not decide which object is the accepted
193project state. A designated integrator can supply that decision without being the only holder of the
194data. Federation can also replicate a proposal without requiring the receiving valley to accept its
195signer or policy.
196
197This makes decentralization a collection of choices: storage, discovery, identity, decision making,
198and recovery authority. Counting servers is an inadequate measure. Chapter 2 compares systems that
199make different choices along these dimensions.
200
201### Eligibility and attainment
202
203A task is eligible when its prerequisites permit an attempt. An outcome is attained when the desired
204condition holds. Closing blockers may establish eligibility. It cannot generally establish
205attainment, because the decomposition may be incomplete or a prerequisite may have been abandoned.
206
207The current graph's terminal-state convention is therefore an important boundary. It is useful for
208administrative traversal, but an autonomous scheduler needs to know whether "no longer blocking"
209means satisfied, waived, replaced, or impossible. Chapter 5 treats this as a central design problem.
210
211### Fast admission and safe consequences
212
213A change can become part of source history before every possible consequence is authorized. A
214low-risk documentation edit and an irreversible external action need not share one evidence
215threshold. This is a research recommendation, not a statement of current policy.
216
217Separating these decisions gives the latency ambition more room. Local evidence might justify
218integration while an independent check is still required for a particular deployment. The resulting
219system must make both decisions explicit so that "landed" never silently becomes "approved for every
220effect."
221
222## 1.5 The strongest case for the project
223
224An important engineering requirement is to make **the reason an action was accepted portable**.
225Source code already travels well. Approval context, check definitions, evidence, and authority often
226travel less well. the-valley can investigate a compact record that lets another implementation
227reconstruct a decision without consulting the original service.
228
229An important empirical question is how to make **project understanding testable across fresh
230authors**. The
231[theory-revival idea](../../.the-valley/ideas/ida-f83d7ba-theory-revival-accelerator.md) asks
232whether a well-maintained graph helps a new agent preserve a project's design. The
233[evaluation sketch](../../.the-valley/ideas/ida-99b87d9-theory-rebuild-as-evaluation.md) suggests
234why-questions, proposed changes, and violations as probes. Those are substantially better targets
235than measuring the amount of stored context.
236
237Their connection is central to the end-to-end system. An agent could use project knowledge to
238propose a change, attach evidence to it, and leave a durable record of what the system accepted.
239Subsequent agents could then distinguish accepted decisions from speculative notes and failed
240attempts. The interesting object is that entire learning cycle. Each component has extensive prior
241art; whether their composition improves sustained development remains an empirical question.
242
243## 1.6 The strongest case against it
244
245The project could recreate a forge, a workflow engine, an authorization service, a build
246coordinator, and an agent memory system under separate names. Small executables do not ensure a
247small operating burden. If every component needs custom recovery rules and tightly coordinated
248upgrades, the overall system may become harder to replace than a conventional platform.
249
250It could also obtain speed mainly by weakening the acceptance criterion. Accepting a trusted host's
251claim immediately is a legitimate policy for a personal project. It should be compared with another
252system given the same trust policy. Comparing that path only with a remote build that independently
253executes everything would confound trust and performance.
254
255Finally, it could confuse richer records with better judgment. More provenance, dependencies, and
256agent transcripts can increase both storage and attention cost without reducing mistakes. The right
257tests ask whether those records change decisions, shorten recovery, or improve subsequent work.
258
259These objections should shape a small end-to-end reference workflow assembled from the strongest
260available components. Tests of evidence transfer, recovery, and knowledge quality can then explain
261where that workflow succeeds or fails. The project need not demonstrate a separate innovation in
262each subsystem before evaluating their joint value. [Chapter 6](06-synthesis-and-research-agenda.md)
263sets out the composition constraints, adoption rule, and experiments for that evaluation.