aperta-cli 1.0.0-beta.1 → 1.0.0-beta.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (36) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +281 -333
  3. package/dashboard/dist/assets/index-GUF8oKgT.js +23 -0
  4. package/dashboard/dist/assets/index-sPVDvMWT.css +1 -0
  5. package/dashboard/dist/index.html +4 -4
  6. package/dist-cli/src/agent-harness.js +54 -139
  7. package/dist-cli/src/agent-harness.js.map +1 -1
  8. package/dist-cli/src/agent-runtime.js +147 -0
  9. package/dist-cli/src/agent-runtime.js.map +1 -0
  10. package/dist-cli/src/capture.js +4 -6
  11. package/dist-cli/src/capture.js.map +1 -1
  12. package/dist-cli/src/cli.js +2 -2
  13. package/dist-cli/src/cli.js.map +1 -1
  14. package/dist-cli/src/dashboard-data.js +18 -7
  15. package/dist-cli/src/dashboard-data.js.map +1 -1
  16. package/dist-cli/src/dashboard-server.js +138 -24
  17. package/dist-cli/src/dashboard-server.js.map +1 -1
  18. package/dist-cli/src/harness-intelligence.js +6 -2
  19. package/dist-cli/src/harness-intelligence.js.map +1 -1
  20. package/dist-cli/src/ledger.js +61 -2
  21. package/dist-cli/src/ledger.js.map +1 -1
  22. package/dist-cli/src/ownership-dossier.js +154 -0
  23. package/dist-cli/src/ownership-dossier.js.map +1 -0
  24. package/dist-cli/src/proof-graph.js +71 -6
  25. package/dist-cli/src/proof-graph.js.map +1 -1
  26. package/dist-cli/src/semantic.js +5 -1
  27. package/dist-cli/src/semantic.js.map +1 -1
  28. package/dist-cli/src/settings.js +28 -37
  29. package/dist-cli/src/settings.js.map +1 -1
  30. package/dist-cli/src/skills.js +8 -1
  31. package/dist-cli/src/skills.js.map +1 -1
  32. package/dist-cli/src/storage.js +18 -0
  33. package/dist-cli/src/storage.js.map +1 -1
  34. package/package.json +7 -4
  35. package/dashboard/dist/assets/index-CWL1aA6j.js +0 -11
  36. package/dashboard/dist/assets/index-D0Ru46BW.css +0 -1
package/README.md CHANGED
@@ -1,310 +1,183 @@
1
- # Aperta
2
-
3
- **Your code works. Could you explain why?**
4
-
5
- AI coding agents make it easy to ship code you cannot explain. Aperta measures
6
- that comprehension gap before it becomes a debugging, maintenance, or ownership
7
- problem. It records what changed, asks for a quick self-rating, and shows where
8
- the codebase has outrun your understanding. It records explanations but does not
9
- grade them.
10
-
11
- The current 1.0 beta combines a provider-neutral coding-agent harness with a
12
- local comprehension system. It observes changes from any editor or agent,
13
- executes bounded work in disposable Git worktrees, verifies outcomes, and turns
14
- the resulting evidence into review sessions, a learning journal, and a durable
15
- Proof Graph.
16
-
17
- The local Vue dashboard includes:
18
-
19
- - Agent Workbench with persistent multi-turn conversations
20
- - Aperta Native, Cursor Agent, Claude Code, and OpenCode execution runtimes
21
- - OpenAI, Anthropic, Google Gemini, DeepSeek, Ollama, OpenRouter, Groq, and
22
- OpenAI-compatible model profiles
23
- - staged, unstaged, and untracked Git views
24
- - syntax-highlighted source, diffs, agent responses, and execution output
25
- - repository, impact, and behavioral Proof Graphs
26
- - guided ownership sessions, Review Queue, Learn Next, and Learning Journal
27
- - local harness reliability, verification, repair, and trusted-keep metrics
28
-
29
- Repository evidence stays in private per-user storage unless the user explicitly
30
- invokes a configured model. Credentials never enter project memory.
31
-
32
- ## How the harness is divided
33
-
34
- Aperta deliberately separates three responsibilities:
35
-
36
- - **Model APIs reason.** A configured model can plan, explain, and choose from
37
- Aperta's bounded tools.
38
- - **Agent runtimes execute.** Aperta Native, Cursor Agent, Claude Code, or
39
- OpenCode can inspect and edit an isolated workspace. External runtimes keep
40
- their own authentication and model configuration.
41
- - **Aperta owns trust.** Aperta selects the skill contract, constrains
42
- capabilities, captures actions, runs deterministic checks and localhost
43
- probes, controls promotion, and records proof and learning evidence.
44
-
45
- Changing the runtime or model never gives it authority to declare its own work
46
- correct or understood.
47
-
48
- ## Aperta Coach (optional AI)
49
-
50
- Aperta Coach turns the deterministic ownership brief into an adaptive change
51
- debrief. It can orient the maintainer and personalize trace, failure-mode,
52
- evidence, and debugging questions. Model output remains visibly AI-generated:
53
- it cannot change Trust Kernel relationships, mark runtime evidence as proven,
54
- grade prose, or award ownership. Returned file citations are accepted only when
55
- they match files in the captured change.
56
-
57
- Coach is provider-neutral and configured through environment variables so API
58
- keys never enter the project config or ledger. It supports native OpenAI,
59
- Anthropic, Google Gemini, DeepSeek, and Ollama APIs; OpenRouter and Groq
60
- gateways; and any OpenAI-compatible HTTPS or local endpoint, including LM
61
- Studio.
1
+ <h1 align="center">Aperta</h1>
62
2
 
63
- ```sh
64
- # OpenAI (OPENAI_API_KEY is read automatically)
65
- export OPENAI_API_KEY="..."
3
+ <p align="center"><strong>Own the code AI writes.</strong></p>
66
4
 
67
- # Anthropic
68
- export APERTA_AI_PROVIDER="anthropic"
69
- export ANTHROPIC_API_KEY="..."
70
- export APERTA_AI_MODEL="your-model-id"
5
+ <p align="center">
6
+ Aperta captures each code change, runs project checks, connects claims to
7
+ evidence, and helps you explain the result before it reaches your main branch.
8
+ </p>
71
9
 
72
- # Google Gemini
73
- export APERTA_AI_PROVIDER="google"
74
- export GOOGLE_API_KEY="..."
75
- export APERTA_AI_MODEL="your-model-id"
10
+ <p align="center">
11
+ <a href="https://aperta-six.vercel.app/">Website</a> ·
12
+ <a href="https://www.npmjs.com/package/aperta-cli">npm</a> ·
13
+ <a href="https://github.com/Vequan23/aperta/issues">Issues</a> ·
14
+ <a href="CONTRIBUTING.md">Contributing</a>
15
+ </p>
76
16
 
77
- # DeepSeek
78
- export APERTA_AI_PROVIDER="deepseek"
79
- export DEEPSEEK_API_KEY="..."
80
- export APERTA_AI_MODEL="your-model-id"
17
+ <p align="center">
18
+ <a href="https://www.npmjs.com/package/aperta-cli"><img alt="npm beta" src="https://img.shields.io/npm/v/aperta-cli/beta?label=npm%20beta&color=1686cc"></a>
19
+ <a href="https://github.com/Vequan23/aperta/actions/workflows/ci.yml"><img alt="CI" src="https://github.com/Vequan23/aperta/actions/workflows/ci.yml/badge.svg"></a>
20
+ <a href="LICENSE"><img alt="MIT license" src="https://img.shields.io/badge/license-MIT-blue.svg"></a>
21
+ <img alt="Node 24 LTS recommended" src="https://img.shields.io/badge/node-24%20LTS%20recommended-3c873a">
22
+ </p>
81
23
 
82
- # OpenRouter or Groq
83
- export APERTA_AI_PROVIDER="openrouter" # or groq
84
- export OPENROUTER_API_KEY="..." # or GROQ_API_KEY
85
- export APERTA_AI_MODEL="provider/model-id"
24
+ > [!IMPORTANT]
25
+ > **Public beta:** Aperta is ready for evaluation on real local projects. Its
26
+ > interfaces and evidence schema may evolve before the first stable release.
86
27
 
87
- # Local Ollama no API key required
88
- export APERTA_AI_PROVIDER="ollama"
89
- export APERTA_AI_MODEL="qwen2.5-coder"
28
+ ## AI can write the patch. You still own the result.
90
29
 
91
- # Any OpenAI-compatible provider
92
- export APERTA_AI_PROVIDER="openai-compatible"
93
- export APERTA_AI_BASE_URL="https://provider.example/v1"
94
- export APERTA_AI_MODEL="provider/model-id"
95
- export APERTA_AI_API_KEY="..."
30
+ AI agents can produce a convincing patch in minutes. They do not automatically
31
+ give a maintainer the evidence or understanding needed to safely own that patch
32
+ for years.
96
33
 
97
- aperta dashboard
98
- ```
34
+ Aperta closes that gap. It is a local review and learning system that:
99
35
 
100
- `APERTA_AI_MODEL` overrides every provider default. Remote custom endpoints
101
- must use HTTPS; plaintext HTTP is accepted only for loopback model servers.
102
- The evidence bundle is sent to the configured provider only when the user
103
- explicitly clicks **Personalize this debrief**.
104
-
105
- The dashboard also provides **Model Settings** for reusable provider profiles.
106
- Profile metadata is stored globally in `~/.aperta/settings.json`, never in a
107
- repository. On macOS, supplied API keys are stored in Keychain and never
108
- returned to the browser; environment variables remain supported for automated
109
- and cross-platform use.
110
-
111
- ## Repository comprehension explorer
112
-
113
- The Repository Map is a navigable tree of Git-visible tracked and untracked
114
- files. Ignored files—including ignored `.env` files—are excluded at the server
115
- boundary. Selecting a file opens a bounded, syntax-highlighted read-only source
116
- view with its confidence, authorship ratio, captured churn, and ownership
117
- history. Binary files are identified without rendering their contents, and
118
- text previews are limited to 1 MB.
119
-
120
- ## Agent Workbench
121
-
122
- The Agent Workbench is Aperta's controlled action plane. An active model profile
123
- can run a bounded implementation loop inside a disposable Git worktree using
124
- repository list, read, search, and write tools plus allowlisted project checks,
125
- detected local-service startup, and localhost HTTP probes. The agent has no
126
- arbitrary shell or remote-network tool and cannot access ignored files,
127
- credential-bearing files, `.git`, or `.comprehension`. Existing files must be
128
- read before they can be rewritten; runs are capped at 48 implementation
129
- actions, 20 writes, 300 KB per file, and 1 MB of total writes.
130
-
131
- Alternatively, Aperta can delegate the isolated execution loop to an installed
132
- Cursor Agent, Claude Code, or OpenCode CLI. Aperta still owns the disposable
133
- workspace, exact changed-file capture, verification loop, action record, and
134
- promotion gate. Read-only requests discard unexpected runtime mutations.
135
-
136
- Completed runs produce a retained local action record and a syntax-highlighted
137
- patch. Aperta detects allowlisted project checks for Maven, Gradle, Node package
138
- scripts, Python, Go, and Cargo, runs them inside the disposable worktree, and
139
- gives the agent up to three bounded attempts to repair failures. Changes,
140
- verification output, and live activity have separate review surfaces, and a
141
- run with failing checks cannot be promoted. Analysis-only runs use a dedicated
142
- readable response view instead of pretending an empty patch exists.
143
-
144
- The source repository remains unchanged until the maintainer checks the
145
- promotion acknowledgement and explicitly applies the patch. Before promotion,
146
- Aperta compares the real repository tree with the run's starting tree and
147
- refuses to apply over newer work. A promoted patch then enters the normal Git
148
- observer, proof, ownership-session, journal, and recall workflow.
149
-
150
- Every run also carries a durable execution contract: goal, ordered plan,
151
- constraints, risks, acceptance criteria, evidence status, deterministic
152
- critique, and promotion decision. Aperta records the pre-change project baseline
153
- separately from post-change checks, so a green result cannot hide a repository
154
- that was already failing. Passing generic checks proves project health; it does
155
- not by itself prove the user's requested behavior.
156
-
157
- ## Skill Contracts
158
-
159
- Every run receives a deterministic, provider-neutral Skill Contract before a
160
- model or external runtime acts. The current built-in contracts cover debugging,
161
- project verification, runtime observation, implementation, code explanation,
162
- and repository exploration. Each contract declares:
163
-
164
- - the capabilities the runtime may use
165
- - ordered execution phases
166
- - required proof before completion
167
- - learning objectives that feed the understanding loop
168
-
169
- Models may refine a plan, but they cannot remove the skill's required proof or
170
- expand its tool authority. The selected skill is visible in the Workbench and
171
- stored as evidence in the Proof Graph.
172
-
173
- ## Git and universal capture
174
-
175
- Aperta's observer tracks stable staged, unstaged, untracked, and committed
176
- changes regardless of whether they came from a human, an IDE, or an agent. The
177
- Git Changes view shows the current working tree independently from captured
178
- learning sessions. Agent attribution is additional evidence, not a requirement
179
- for the comprehension workflow.
180
-
181
- ## Harness Intelligence
182
-
183
- Harness Health turns retained local runs into an improvement loop. It measures
184
- first-pass verification, repair recovery, tool reliability, promotion rate,
185
- provider latency, structured error classes, and an approximate Trusted Keep
186
- Rate for promoted additions that remain in the working repository. Results are
187
- broken down by provider, model, and bounded tool action so model and harness
188
- changes can be compared instead of judged by anecdote.
189
-
190
- Telemetry contains run metadata, timings, bounded error messages, and patch-line
191
- survival counts. It is computed locally; Aperta does not export source code,
192
- prompts, credentials, or repository evidence to an analytics service. Unknown
193
- errors are surfaced as harness defects rather than silently folded into an
194
- "agent failed" bucket.
195
-
196
- The Impact Graph connects changed and removed code surfaces to repository
197
- callers, imported dependencies, Spring configuration, API entry points, and
198
- tests. It distinguishes structural evidence from unproven behavior and warns
199
- when a saved explanation overlaps code that changed again. The analyzers are
200
- language-specific and pluggable; the current beta starts with Java and
201
- TypeScript rather
202
- than claiming regex can provide compiler-level semantics for every language.
203
-
204
- The repository Proof Graph unifies claims from captured changes and agent runs
205
- with the evidence that supports them: selected skills, diffs, checks, runtime
206
- observations, human explanations, and ownership reviews. A claim can be proven,
207
- understood, supported, unproven, stale, or regressed. Later changes invalidate
208
- only connected claims, preserving an auditable answer to both “does this work?”
209
- and “can the maintainer explain it?”
210
-
211
- The Proof Engine detects Maven, Gradle, npm, pnpm, or Yarn from project-owned
212
- manifests and wrappers. From the Impact Graph, a developer can explicitly run
213
- the relevant changed tests, retain the bounded result in the append-only local
214
- ledger, and see graph surfaces move from inferred or unproven to proven—or to
215
- regressed when the runner fails. Aperta also keeps uncovered behaviors visible
216
- as proposed probes instead of treating a green test command as universal proof.
217
-
218
- ## Install and run
219
-
220
- Requires Node.js 22.6 or newer and Git.
36
+ - captures staged, unstaged, untracked, human, and agent-authored changes;
37
+ - runs agent work in disposable Git worktrees instead of your live repository;
38
+ - verifies results with project checks, runtime observations, and bounded probes;
39
+ - connects claims, code, tests, actions, and human understanding in a Proof Graph;
40
+ - turns risky changes into focused ownership reviews and scheduled recall; and
41
+ - keeps private developer memory outside the repository by default.
221
42
 
222
- ```sh
223
- npm install --global aperta-cli@beta
224
- ```
43
+ **Aperta does not grade prose or pretend an LLM can certify understanding.** It
44
+ records evidence, exposes uncertainty, and leaves the final judgment with the
45
+ person responsible for the software.
225
46
 
226
- To develop Aperta itself from source instead:
47
+ If that is the future you want for AI-assisted development, consider starring
48
+ the repository. It helps other builders find the project.
227
49
 
228
- ```sh
229
- git clone https://github.com/Vequan23/aperta.git
230
- cd aperta
231
- npm install
232
- npm test
233
- npm run build
234
- npm link
235
- ```
50
+ ## Try it in 60 seconds
236
51
 
237
- Initialize the repository you want Aperta to track:
52
+ Requires Git and a supported Node.js LTS release. **Node 24 LTS is recommended**;
53
+ Node 22.12 or newer remains supported through its maintenance window.
238
54
 
239
55
  ```sh
56
+ npm install --global aperta-cli@beta
57
+
240
58
  cd /path/to/your/repository
241
59
  aperta init
242
- aperta status
243
60
  aperta dashboard
244
61
  ```
245
62
 
246
- `aperta init` starts the universal observer automatically. On macOS it installs
247
- a private per-project login service, so observation returns after login and is
248
- restarted if the process crashes. It captures stable staged, unstaged,
249
- untracked, and committed changes from any coding tool. Manage it explicitly with:
63
+ `aperta init` starts the local observer. The dashboard opens a repository
64
+ workspace containing Agent Work, Git Changes, Changes to Review, the Proof
65
+ Graph, Review Notes, and Agent Reliability.
66
+
67
+ Run an existing coding agent through Aperta:
250
68
 
251
69
  ```sh
252
- aperta start
253
- aperta status
254
- aperta stop
70
+ aperta run --intent "Add passwordless login" -- opencode
255
71
  ```
256
72
 
257
- Changes are grouped after a short quiet period rather than recorded once per
258
- keystroke. Agent adapters add model, prompt, and session provenance when it is
259
- available; unattributed activity remains explicitly unknown.
73
+ Or use Aperta Native from Agent Work. The patch remains isolated until
74
+ you review its changes and evidence and explicitly promote it.
260
75
 
261
- Every initialized repository is added to the local `~/.aperta/projects.json`
262
- registry. The dashboard project picker can switch between registered
263
- repositories without exposing arbitrary filesystem browsing. Each project keeps
264
- its own ledger, observer, branch state, queue, journal, and ownership history.
76
+ ## The trust and learning loop
265
77
 
266
- For dashboard development with live reload, run `npm run dev` from the cloned
267
- Aperta repository and open the local URL Vite prints.
78
+ ```mermaid
79
+ flowchart LR
80
+ change["Any code change"] --> capture["Capture the exact diff"]
81
+ capture --> impact["Map impact and risk"]
82
+ impact --> verify["Run checks and probes"]
83
+ verify --> graph["Update the Proof Graph"]
84
+ graph --> own["Demonstrate ownership"]
85
+ own --> journal["Retain and revisit knowledge"]
86
+ journal --> change
87
+ ```
268
88
 
269
- The standalone Vue marketing site lives in `marketing/` and uses the same Snow
270
- Leopard/Aqua visual language as the product:
89
+ Every later change can invalidate only the claims it touches. Aperta preserves
90
+ useful evidence while making stale certainty visible.
271
91
 
272
- ```sh
273
- npm run dev:marketing
274
- npm run build:marketing
275
- ```
92
+ ## Why this is not just another agent wrapper
276
93
 
277
- The repository-level `vercel.json` deploys `marketing/dist`, so the repository
278
- can be imported directly into Vercel without additional build configuration.
94
+ | | Typical coding-agent loop | Aperta |
95
+ | --- | --- | --- |
96
+ | Primary goal | Produce a plausible answer or patch | Produce reviewable code, proof, and understanding |
97
+ | Workspace | Often edits the live tree | Uses a disposable Git worktree until promotion |
98
+ | Verification | Agent reports success | Aperta runs deterministic checks and captures output |
99
+ | Trust | Model evaluates its own work | Aperta owns the promotion gate and evidence model |
100
+ | Memory | Conversation history | Local repository evidence and a Proof Graph |
101
+ | Learning | Incidental | Changes to Review, Review Again, and saved notes |
102
+ | Provider choice | Commonly coupled to one vendor | Model- and runtime-neutral |
103
+ | Privacy | Often cloud-first | Private per-user storage outside Git |
279
104
 
280
- Automation can avoid interactive prompts with `aperta capture --ai --score 2`.
281
- Interactive use captures authorship and confidence with one keystroke; confidence
282
- times out after 15 seconds and Escape leaves it unrated.
105
+ ## What you get
283
106
 
284
- ## Recommended agent loop
107
+ ### Agent work you can review
285
108
 
286
- Wrap the coding agent once and work normally inside it:
109
+ Persistent, multi-turn agent conversations with plans, bounded tools, readable
110
+ activity, syntax-highlighted responses, isolated patches, checks, repair loops,
111
+ and explicit promotion. Read-only requests discard unexpected runtime changes.
287
112
 
288
- ```sh
289
- aperta run --intent "Add passwordless login" -- opencode
290
- ```
113
+ ### Universal change capture
291
114
 
292
- Aperta snapshots the repository before and after the agent session, attributes
293
- only the resulting changes to AI, stores the exact patch as local evidence, and
294
- refuses to record the same change twice. Existing dirty work is not incorrectly
295
- included in the session. If you skip the confidence prompt, the change appears
296
- in the dashboard review queue.
115
+ Aperta observes stable Git-visible changes regardless of whether they came from
116
+ a human, editor, script, or agent. Attribution adds evidence; it is never a
117
+ requirement for review.
297
118
 
298
- For non-interactive agents or scripts:
119
+ ### Living Ownership Graph
299
120
 
300
- ```sh
301
- aperta run --intent "Repair CSV export" --score 2 -- your-agent-command --flags
302
- ```
121
+ The graph connects behavior claims to code, tests, runtime observations,
122
+ agent actions, and human defenses. It shows which changes have executable proof,
123
+ which ones an engineer can defend, and which evidence needs another look.
124
+
125
+ The default view is a short, searchable list of records that need attention.
126
+ Repeated captures roll up into the latest current record instead of filling the
127
+ screen, while the complete append-only revision history remains available.
128
+
129
+ Each captured change also gets an Ownership Record. The record keeps the
130
+ change, its revision, evidence, open questions, and engineer defense in one place.
303
131
 
304
- ## Data
132
+ ### Defend each change
305
133
 
306
- Aperta keeps repository identity separate from private developer memory. The
307
- repository contains only a safe pointer:
134
+ Changes to Review turns a captured change into a risk-ranked summary. Ownership
135
+ reviews ask you to trace the code path, test a failure mode, locate evidence, and
136
+ state what you still do not know. Aperta records your answers. It does not let a
137
+ model certify your understanding.
138
+
139
+ Project-private review filters can hide path noise from this queue with validated
140
+ regular expressions without removing those files from capture, history, or evidence.
141
+ Completed reviews enter Review Notes and return through Review Again after one,
142
+ three, or seven days. They return sooner when connected code changes.
143
+
144
+ ### Publish what the evidence supports
145
+
146
+ Download a cited change brief from any Ownership Record. The brief includes the
147
+ captured revision, code and test sources, executable proof, the engineer defense,
148
+ and open questions. A stale record produces a stale brief, so polished writing
149
+ never hides outdated evidence.
150
+
151
+ ### Agent reliability
152
+
153
+ Agent Reliability measures first-pass verification, repair recovery, tool
154
+ reliability, promotion rate, provider latency, structured error classes, and an
155
+ approximate Trusted Keep Rate. Aperta defects stay separate from model,
156
+ tool, and project failures.
157
+
158
+ ## Models reason. Runtimes execute. Aperta owns trust.
159
+
160
+ Aperta intentionally separates these responsibilities:
161
+
162
+ | Layer | Responsibility | Current support |
163
+ | --- | --- | --- |
164
+ | **Model APIs** | Planning, reasoning, explanation, coaching | OpenAI, Anthropic, Google Gemini, DeepSeek, OpenRouter, Groq, Ollama, LM Studio, OpenAI-compatible endpoints |
165
+ | **Agent runtimes** | Repository inspection, edits, and tool execution | Aperta Native, Codex CLI, Claude Code, OpenCode; Cursor is discoverable but structured execution is not yet supported |
166
+ | **Aperta** | Skill selection, capabilities, isolation, verification, promotion, evidence, and learning | Local trust and evidence layer |
167
+
168
+ Changing the model or runtime never gives it authority to declare its own work
169
+ correct, proven, or understood.
170
+
171
+ External CLI mechanics are provided by `@vraxis/agent-v`: runtime discovery,
172
+ bounded readiness probes, structured execution, normalized failures, and run
173
+ provenance. Aperta still owns the product-specific safety boundary: skill
174
+ selection, disposable worktrees, checks, evidence, human review, and promotion.
175
+ An installed CLI is not shown as ready until its explicit probe succeeds, and
176
+ every external run records the runtime version and adapter strategy used.
177
+
178
+ ## Private by architecture
179
+
180
+ The repository stores only a non-sensitive identity pointer:
308
181
 
309
182
  ```text
310
183
  .comprehension/
@@ -312,8 +185,7 @@ repository contains only a safe pointer:
312
185
  └── .gitignore
313
186
  ```
314
187
 
315
- Raw prompts, agent transcripts, explanations, learning answers, diffs, logs,
316
- observer state, and the append-only evidence ledger live under:
188
+ Private developer memory lives outside the Git working tree:
317
189
 
318
190
  ```text
319
191
  ~/.aperta/repositories/<project-id>/
@@ -322,65 +194,141 @@ observer state, and the append-only evidence ledger live under:
322
194
  └── cache/
323
195
  ```
324
196
 
325
- This private directory is outside the Git working tree. Initializing an older
326
- Aperta repository migrates its existing config, ledger, and cache without
327
- discarding history. `aperta init` and `aperta doctor` warn when legacy private
328
- files are still Git-tracked so the developer can commit their deletion and
329
- audit earlier repository history before sharing it.
330
-
331
- The ledger remains append-only and integrity-chained. Each line is one intent,
332
- diff, confidence, explanation, ownership-evidence, proof, probe, review,
333
- session-complete, or gate-bypass event. From the Review Queue, an ownership
334
- session constructs a risk-ranked Change Story, shows the exact diff, collects
335
- evidence-linked reasoning, and distinguishes demonstrated ownership from a
336
- self-reported confidence claim without pretending an LLM can grade prose.
337
-
338
- Every completed ownership session enters the Learning Journal and leaves the
339
- immediate review queue, including an honest low-confidence session with evidence
340
- but no separate prose note. Future session evidence, rating, explanation, and
341
- completion records are appended as one durable ledger operation.
342
-
343
- ## Trust Kernel and semantic adapters
344
-
345
- Aperta labels every graph claim as Git-observed, structurally inferred,
346
- compiler-resolved, or runtime-proven. The JDK compiler adapter resolves
347
- project-local Java symbols and call targets with annotation processing disabled.
348
- The TypeScript compiler adapter covers JavaScript, TypeScript, JSX/TSX, and the
349
- script portions of Vue single-file components. Compiler diagnostics downgrade
350
- semantic coverage to partial instead of hiding missing dependencies or invalid
351
- project configuration. Other languages retain the universal Git-level workflow
352
- without invented symbol or call-graph certainty.
353
-
354
- ## MVP beta workflow
355
-
356
- The 1.0 beta separates immediate change review from scheduled retrieval practice
357
- in **Learn Next**. Completed sessions return after one, three, or seven days
358
- based on confidence, and return immediately when a later capture touches the
359
- same files. Proofs and probes run as visible cancelable jobs with a minimized
360
- environment, bounded output, secret redaction, and explicit disclosure that the
361
- disposable project copy is not network isolation. A successful Maven proof also
362
- caches the resolved dependency classpath for deeper subsequent Java analysis.
363
-
364
- Ledger writes are serialized across Aperta processes, runtime-validated, and
365
- integrity-chained. Existing records remain readable as legacy entries. Run
366
- `aperta doctor` from a tracked repository to check its observer, ledger,
367
- semantic adapter, and release readiness. The installed CLI runs compiled
368
- JavaScript; experimental TypeScript execution is used only by the source test
369
- suite.
370
-
371
- ## Probe Lab
372
-
373
- Aperta turns unproven Impact Graph paths into previewable executable
374
- probes. A probe is selected by stable ID from Aperta's repository-aware catalog;
375
- the browser never supplies source code or a command. Aperta copies the project
376
- into a disposable directory, injects the generated test only there, runs the
377
- allowlisted test runner, deletes the copy, and retains a bounded result plus a
378
- hash of the generated source in the local ledger. Proven or disproven probes
379
- update the graph verdicts. The first executable provider covers Spring Security
380
- JWT expiry, issuer, and signature validation; endpoint authorization remains
381
- explicitly blocked until a concrete protected route exists.
382
-
383
- Diff evidence and generated probe previews use a safe token renderer with
384
- language-aware highlighting for Java, TypeScript/JavaScript, JSON, XML, YAML,
385
- properties, TOML, and shell-like files. Source is rendered as text tokens—not
386
- injected HTML—so highlighting does not expand the dashboard's trust boundary.
197
+ Raw prompts, transcripts, explanations, learning answers, diffs, logs, and the
198
+ integrity-chained evidence ledger are not team-visible repository files. Model
199
+ credentials never enter project memory. On macOS, keys entered in Model
200
+ Settings are stored in Keychain and are never returned to the browser.
201
+
202
+ Evidence is sent to a configured provider only for an explicit model action.
203
+ Aperta does not export source, prompts, credentials, or repository evidence to
204
+ an analytics service.
205
+
206
+ ## Safety boundaries
207
+
208
+ Agent Work has strict safety limits:
209
+
210
+ - agent edits occur in a disposable Git worktree;
211
+ - ignored files, credential-bearing files, `.git`, and `.comprehension` are blocked;
212
+ - existing files must be read before they can be rewritten;
213
+ - native runs have no arbitrary remote-network tool;
214
+ - project commands come from allowlisted, detected checks;
215
+ - localhost services and HTTP probes have explicit lifecycle controls;
216
+ - output is bounded and common secrets are redacted;
217
+ - failing checks block promotion; and
218
+ - promotion fails if the real repository changed after the run began.
219
+
220
+ Aperta currently caps a native implementation run at 48 actions, 20 writes,
221
+ 300 KB per file, and 1 MB of total writes. These constraints are Aperta policy,
222
+ not suggestions sent to the model.
223
+
224
+ Read [SECURITY.md](SECURITY.md) before using Aperta with a shared or sensitive
225
+ repository. Report vulnerabilities privately through GitHub Security
226
+ Advisories.
227
+
228
+ ## Language and project support
229
+
230
+ The universal Git workflow works for any text-based repository. Deeper evidence
231
+ is added only where Aperta has a real adapter:
232
+
233
+ | Capability | Support |
234
+ | --- | --- |
235
+ | Project checks | Maven, Gradle, npm, pnpm, Yarn, Python, Go, Cargo |
236
+ | Semantic analysis | Java; JavaScript/TypeScript; JSX/TSX; Vue SFC scripts |
237
+ | Safe syntax rendering | Java, JS/TS, JSON, XML, YAML, properties, TOML, shell-like files |
238
+ | Runtime probes | Bounded localhost HTTP and detected local services |
239
+ | Executable Probe Lab | Initial Spring Security JWT behaviors |
240
+
241
+ Unsupported languages stay useful at the Git, diff, review, ownership, and
242
+ journal layers. Aperta does not claim regex provides compiler-level certainty.
243
+
244
+ <details>
245
+ <summary><strong>Configure an optional model provider</strong></summary>
246
+
247
+ The dashboard's **Model Settings** page is the recommended path. Environment
248
+ variables are also supported:
249
+
250
+ ```sh
251
+ # OpenAI
252
+ export OPENAI_API_KEY="..."
253
+
254
+ # Anthropic
255
+ export APERTA_AI_PROVIDER="anthropic"
256
+ export ANTHROPIC_API_KEY="..."
257
+ export APERTA_AI_MODEL="your-model-id"
258
+
259
+ # Google Gemini
260
+ export APERTA_AI_PROVIDER="google"
261
+ export GOOGLE_API_KEY="..."
262
+ export APERTA_AI_MODEL="your-model-id"
263
+
264
+ # DeepSeek, OpenRouter, or Groq
265
+ export APERTA_AI_PROVIDER="deepseek" # or openrouter / groq
266
+ export DEEPSEEK_API_KEY="..."
267
+ export APERTA_AI_MODEL="your-model-id"
268
+
269
+ # Local Ollama: no API key required
270
+ export APERTA_AI_PROVIDER="ollama"
271
+ export APERTA_AI_MODEL="qwen2.5-coder"
272
+
273
+ # Any OpenAI-compatible endpoint
274
+ export APERTA_AI_PROVIDER="openai-compatible"
275
+ export APERTA_AI_BASE_URL="https://provider.example/v1"
276
+ export APERTA_AI_MODEL="provider/model-id"
277
+ export APERTA_AI_API_KEY="..."
278
+ ```
279
+
280
+ Remote custom endpoints must use HTTPS. Plain HTTP is accepted only for
281
+ loopback model servers. `APERTA_AI_MODEL` overrides provider defaults.
282
+
283
+ </details>
284
+
285
+ <details>
286
+ <summary><strong>Run Aperta from source</strong></summary>
287
+
288
+ ```sh
289
+ git clone https://github.com/Vequan23/aperta.git
290
+ cd aperta
291
+ npm install
292
+ npm test
293
+ npm run build
294
+ npm link
295
+ ```
296
+
297
+ Useful commands:
298
+
299
+ ```sh
300
+ aperta init # initialize and start observing the current repository
301
+ aperta dashboard # open the local dashboard
302
+ aperta status # inspect observer and repository state
303
+ aperta doctor # validate observer, ledger, adapters, and release readiness
304
+ aperta start # start the observer explicitly
305
+ aperta stop # stop the observer
306
+ ```
307
+
308
+ For dashboard development, run `npm run dev`. The standalone Vue marketing site
309
+ lives in `marketing/` and uses the published
310
+ [OSX Components](https://github.com/Vequan23/osx-components) package:
311
+
312
+ ```sh
313
+ npm run dev:marketing
314
+ npm run build:marketing
315
+ ```
316
+
317
+ </details>
318
+
319
+ ## Built for builders who want to remain responsible
320
+
321
+ Aperta is for developers and teams who want the speed of coding agents
322
+ without surrendering the ability to explain, verify, maintain, and improve the
323
+ software those agents help create.
324
+
325
+ - Found a bug or rough edge? [Open an issue](https://github.com/Vequan23/aperta/issues).
326
+ - Have an idea for the agent runtime or learning loop? Start a discussion in an issue.
327
+ - Want to contribute? Read [CONTRIBUTING.md](CONTRIBUTING.md) and the
328
+ [Code of Conduct](CODE_OF_CONDUCT.md).
329
+ - Want to help the project travel? **Star the repository and share the
330
+ [product site](https://aperta-six.vercel.app/).**
331
+
332
+ ## License
333
+
334
+ MIT © Aperta contributors. See [LICENSE](LICENSE).