accrete-kit 0.0.0-stage → 0.1.0

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 (134) hide show
  1. package/CHANGELOG.md +43 -0
  2. package/LICENSE +21 -0
  3. package/README.md +148 -2
  4. package/bin/accrete-kit.mjs +4 -0
  5. package/dist/kernel/darwin-arm64/LICENSE +21 -0
  6. package/dist/kernel/darwin-arm64/THIRD-PARTY-NOTICES +5780 -0
  7. package/dist/kernel/darwin-arm64/accrete +0 -0
  8. package/dist/kernel/darwin-arm64/licenses/RUST-COPYRIGHT-library.html +7038 -0
  9. package/dist/kernel/darwin-arm64/licenses/musl-COPYRIGHT +193 -0
  10. package/dist/kernel/darwin-arm64/licenses/rust/Apache-2.0.txt +73 -0
  11. package/dist/kernel/darwin-arm64/licenses/rust/BSD-2-Clause.txt +9 -0
  12. package/dist/kernel/darwin-arm64/licenses/rust/CC-BY-SA-4.0.txt +427 -0
  13. package/dist/kernel/darwin-arm64/licenses/rust/GCC-exception-3.1.txt +30 -0
  14. package/dist/kernel/darwin-arm64/licenses/rust/GPL-2.0-only.txt +133 -0
  15. package/dist/kernel/darwin-arm64/licenses/rust/GPL-3.0-or-later.txt +202 -0
  16. package/dist/kernel/darwin-arm64/licenses/rust/ISC.txt +7 -0
  17. package/dist/kernel/darwin-arm64/licenses/rust/LLVM-exception.txt +15 -0
  18. package/dist/kernel/darwin-arm64/licenses/rust/MIT.txt +9 -0
  19. package/dist/kernel/darwin-arm64/licenses/rust/NCSA.txt +29 -0
  20. package/dist/kernel/darwin-arm64/licenses/rust/OFL-1.1.txt +43 -0
  21. package/dist/kernel/darwin-arm64/licenses/rust/Unicode-3.0.txt +39 -0
  22. package/dist/kernel/darwin-x64/LICENSE +21 -0
  23. package/dist/kernel/darwin-x64/THIRD-PARTY-NOTICES +5780 -0
  24. package/dist/kernel/darwin-x64/accrete +0 -0
  25. package/dist/kernel/darwin-x64/licenses/RUST-COPYRIGHT-library.html +7038 -0
  26. package/dist/kernel/darwin-x64/licenses/musl-COPYRIGHT +193 -0
  27. package/dist/kernel/darwin-x64/licenses/rust/Apache-2.0.txt +73 -0
  28. package/dist/kernel/darwin-x64/licenses/rust/BSD-2-Clause.txt +9 -0
  29. package/dist/kernel/darwin-x64/licenses/rust/CC-BY-SA-4.0.txt +427 -0
  30. package/dist/kernel/darwin-x64/licenses/rust/GCC-exception-3.1.txt +30 -0
  31. package/dist/kernel/darwin-x64/licenses/rust/GPL-2.0-only.txt +133 -0
  32. package/dist/kernel/darwin-x64/licenses/rust/GPL-3.0-or-later.txt +202 -0
  33. package/dist/kernel/darwin-x64/licenses/rust/ISC.txt +7 -0
  34. package/dist/kernel/darwin-x64/licenses/rust/LLVM-exception.txt +15 -0
  35. package/dist/kernel/darwin-x64/licenses/rust/MIT.txt +9 -0
  36. package/dist/kernel/darwin-x64/licenses/rust/NCSA.txt +29 -0
  37. package/dist/kernel/darwin-x64/licenses/rust/OFL-1.1.txt +43 -0
  38. package/dist/kernel/darwin-x64/licenses/rust/Unicode-3.0.txt +39 -0
  39. package/dist/kernel/kernel.json +17 -0
  40. package/dist/kernel/linux-arm64/LICENSE +21 -0
  41. package/dist/kernel/linux-arm64/THIRD-PARTY-NOTICES +5780 -0
  42. package/dist/kernel/linux-arm64/accrete +0 -0
  43. package/dist/kernel/linux-arm64/licenses/RUST-COPYRIGHT-library.html +7038 -0
  44. package/dist/kernel/linux-arm64/licenses/musl-COPYRIGHT +193 -0
  45. package/dist/kernel/linux-arm64/licenses/rust/Apache-2.0.txt +73 -0
  46. package/dist/kernel/linux-arm64/licenses/rust/BSD-2-Clause.txt +9 -0
  47. package/dist/kernel/linux-arm64/licenses/rust/CC-BY-SA-4.0.txt +427 -0
  48. package/dist/kernel/linux-arm64/licenses/rust/GCC-exception-3.1.txt +30 -0
  49. package/dist/kernel/linux-arm64/licenses/rust/GPL-2.0-only.txt +133 -0
  50. package/dist/kernel/linux-arm64/licenses/rust/GPL-3.0-or-later.txt +202 -0
  51. package/dist/kernel/linux-arm64/licenses/rust/ISC.txt +7 -0
  52. package/dist/kernel/linux-arm64/licenses/rust/LLVM-exception.txt +15 -0
  53. package/dist/kernel/linux-arm64/licenses/rust/MIT.txt +9 -0
  54. package/dist/kernel/linux-arm64/licenses/rust/NCSA.txt +29 -0
  55. package/dist/kernel/linux-arm64/licenses/rust/OFL-1.1.txt +43 -0
  56. package/dist/kernel/linux-arm64/licenses/rust/Unicode-3.0.txt +39 -0
  57. package/dist/kernel/linux-x64/LICENSE +21 -0
  58. package/dist/kernel/linux-x64/THIRD-PARTY-NOTICES +5780 -0
  59. package/dist/kernel/linux-x64/accrete +0 -0
  60. package/dist/kernel/linux-x64/licenses/RUST-COPYRIGHT-library.html +7038 -0
  61. package/dist/kernel/linux-x64/licenses/musl-COPYRIGHT +193 -0
  62. package/dist/kernel/linux-x64/licenses/rust/Apache-2.0.txt +73 -0
  63. package/dist/kernel/linux-x64/licenses/rust/BSD-2-Clause.txt +9 -0
  64. package/dist/kernel/linux-x64/licenses/rust/CC-BY-SA-4.0.txt +427 -0
  65. package/dist/kernel/linux-x64/licenses/rust/GCC-exception-3.1.txt +30 -0
  66. package/dist/kernel/linux-x64/licenses/rust/GPL-2.0-only.txt +133 -0
  67. package/dist/kernel/linux-x64/licenses/rust/GPL-3.0-or-later.txt +202 -0
  68. package/dist/kernel/linux-x64/licenses/rust/ISC.txt +7 -0
  69. package/dist/kernel/linux-x64/licenses/rust/LLVM-exception.txt +15 -0
  70. package/dist/kernel/linux-x64/licenses/rust/MIT.txt +9 -0
  71. package/dist/kernel/linux-x64/licenses/rust/NCSA.txt +29 -0
  72. package/dist/kernel/linux-x64/licenses/rust/OFL-1.1.txt +43 -0
  73. package/dist/kernel/linux-x64/licenses/rust/Unicode-3.0.txt +39 -0
  74. package/dist/scaffold/assets/contract/cli-v1.json +296 -0
  75. package/dist/scaffold/assets/contract/example-inputs.json +38 -0
  76. package/dist/scaffold/assets/contract/input-drafts.schema.json +654 -0
  77. package/dist/scaffold/assets/generated/cli-commands.md +288 -0
  78. package/dist/scaffold/assets/generated/release.json +11 -0
  79. package/dist/scaffold/assets/skills/accrete-data/SKILL.md +73 -0
  80. package/dist/scaffold/assets/skills/accrete-data/references/commands.md +193 -0
  81. package/dist/scaffold/assets/skills/accrete-data/references/objects-and-native-work.md +123 -0
  82. package/dist/scaffold/assets/skills/accrete-data/references/remote-and-retention.md +98 -0
  83. package/dist/scaffold/assets/skills/accrete-memory/SKILL.md +61 -0
  84. package/dist/scaffold/assets/skills/accrete-memory/references/commands.md +124 -0
  85. package/dist/scaffold/assets/skills/accrete-memory/references/handovers-and-remote-work.md +78 -0
  86. package/dist/scaffold/assets/skills/accrete-memory/references/writing-and-continuity.md +101 -0
  87. package/dist/scaffold/assets/skills/accrete-models/SKILL.md +46 -0
  88. package/dist/scaffold/assets/skills/accrete-models/references/cli.md +117 -0
  89. package/dist/scaffold/assets/skills/accrete-models/references/objects.md +67 -0
  90. package/dist/scaffold/assets/skills/accrete-models/references/working-practice.md +48 -0
  91. package/dist/scaffold/assets/skills/accrete-results/SKILL.md +69 -0
  92. package/dist/scaffold/assets/skills/accrete-results/references/activities-and-relations.md +116 -0
  93. package/dist/scaffold/assets/skills/accrete-results/references/commands.md +191 -0
  94. package/dist/scaffold/assets/skills/accrete-results/references/scientific-practice.md +89 -0
  95. package/dist/scaffold/assets/skills/accrete-tools/SKILL.md +51 -0
  96. package/dist/scaffold/assets/skills/accrete-tools/references/cli.md +87 -0
  97. package/dist/scaffold/assets/skills/accrete-tools/references/objects.md +66 -0
  98. package/dist/scaffold/assets/skills/accrete-tools/references/working-practice.md +51 -0
  99. package/dist/scaffold/assets/template/.accrete/PROJECT.md +31 -0
  100. package/dist/scaffold/assets/template/.accrete/config-examples/local-compute.toml.example +27 -0
  101. package/dist/scaffold/assets/template/.accrete/config-examples/local-workstation.toml.example +21 -0
  102. package/dist/scaffold/assets/template/.accrete/config-examples/project.toml.example +27 -0
  103. package/dist/scaffold/assets/template/.accrete/docs/cli-contract.md +393 -0
  104. package/dist/scaffold/assets/template/.accrete/docs/configuration.md +117 -0
  105. package/dist/scaffold/assets/template/.accrete/docs/coordinator.md +102 -0
  106. package/dist/scaffold/assets/template/.accrete/docs/long-term-work.md +108 -0
  107. package/dist/scaffold/assets/template/.accrete/docs/overview.md +118 -0
  108. package/dist/scaffold/assets/template/.accrete/docs/remote-work.md +125 -0
  109. package/dist/scaffold/assets/template/.accrete/docs/subagents.md +78 -0
  110. package/dist/scaffold/assets/template/.accrete/examples/README.md +78 -0
  111. package/dist/scaffold/assets/template/.accrete/examples/data-register.json +19 -0
  112. package/dist/scaffold/assets/template/.accrete/examples/iteration-close.json +5 -0
  113. package/dist/scaffold/assets/template/.accrete/examples/iteration-open.json +8 -0
  114. package/dist/scaffold/assets/template/.accrete/examples/memory-entry.md +10 -0
  115. package/dist/scaffold/assets/template/.accrete/examples/model-register.json +7 -0
  116. package/dist/scaffold/assets/template/.accrete/examples/observation.md +9 -0
  117. package/dist/scaffold/assets/template/.accrete/examples/result-amend.json +5 -0
  118. package/dist/scaffold/assets/template/.accrete/examples/result-record.json +11 -0
  119. package/dist/scaffold/assets/template/.accrete/examples/tool-admit.json +8 -0
  120. package/dist/scaffold/assets/template/.accrete/examples/tool-retire.json +3 -0
  121. package/dist/scaffold/assets/template/.accrete/examples/tool-update.json +3 -0
  122. package/dist/scaffold/assets/template/.gitattributes +17 -0
  123. package/dist/scaffold/assets/template/AGENTS.md +23 -0
  124. package/dist/scaffold/assets/template/CLAUDE.md +5 -0
  125. package/dist/scaffold/assets/template/_gitignore +12 -0
  126. package/dist/scaffold/config/defaults.toml +20 -0
  127. package/dist/scaffold/manifest.json +622 -0
  128. package/lib/cli.mjs +188 -0
  129. package/lib/fsutil.mjs +135 -0
  130. package/lib/install.mjs +439 -0
  131. package/lib/kernel.mjs +76 -0
  132. package/lib/scaffold.mjs +129 -0
  133. package/lib/workspace.mjs +278 -0
  134. package/package.json +18 -4
@@ -0,0 +1,98 @@
1
+ # Remote Data and retention
2
+
3
+ ## Separate meaning from placement
4
+
5
+ Shared project configuration names logical roots, locations, and useful
6
+ environment labels. `.accrete/local.toml` supplies the current host's physical
7
+ paths and native transfer bindings. Relative configured paths resolve against
8
+ the ACCRETE project root. A remote Model checkout, large payload, and Scratch
9
+ directory can all live outside that root.
10
+
11
+ Use the CLI's explicit `--project` selector from external working directories.
12
+ Do not infer the project from whichever Model repository happens to be the
13
+ current directory. Returned mutation paths identify the affected descriptor
14
+ and usable destination.
15
+
16
+ Credentials remain in native SSH, rclone, storage, or environment configuration.
17
+ Describe an endpoint by its configured alias and path. Avoid retaining tokens,
18
+ full credential-bearing URLs, or indiscriminate environment dumps in Results,
19
+ Memory, input drafts intended for Git, or shared TOML.
20
+
21
+ ## Remote production and local analysis
22
+
23
+ Use ordinary SSH, schedulers, domain launchers, and scientific programs for
24
+ remote execution. Register completed products where they exist and describe
25
+ the actual activity with Results. Exchange small descriptors and useful Memory
26
+ through the project's selected Git, or with `accrete export` and `accrete import`,
27
+ whose bundles carry descriptors and leave payloads where they are. Transfer only
28
+ the products required for the next analysis.
29
+
30
+ A locally received descriptor can correctly name a remote output that is not
31
+ downloaded. It can also retain an old availability observation when the remote
32
+ host is currently unavailable. For current process and storage state, consult
33
+ the owning host's tools. A copied Result saying `running` is historical prose,
34
+ not a current process observation.
35
+
36
+ Independent clones have separate local state. A host-local Kernel lock and
37
+ SQLite index do not coordinate simultaneous writers across compute nodes on
38
+ a network filesystem. Use one selected metadata-writing host or separate
39
+ metadata views and exchange documents afterward. Read-only payload sharing
40
+ can continue through the scientific storage system.
41
+
42
+ ## Materialization and large products
43
+
44
+ Prefer registering in place when bytes are already where they are needed.
45
+ Materialize when another managed usable copy has a purpose. The Kernel copies
46
+ locally or downloads through configured rclone, stages incomplete content separately,
47
+ then publishes the completed replica and its location association. The metadata lock
48
+ is held only for publication, not for the transfer duration.
49
+
50
+ Content identification should match the actual knowledge and cost:
51
+
52
+ | Existing information | Appropriate description |
53
+ | --- | --- |
54
+ | Producer SHA-256 for a selected file | Supply it as `content.sha256`. |
55
+ | Producer collection manifest | Retain the manifest and what it describes. |
56
+ | Immutable provider version | Describe it in `content.edition` and keep the selector on the location as an opaque token. `data materialize` refuses such a source, so use a version-specific exported locator or retrieve it with the provider's tool. |
57
+ | Closed directory with known provenance | Retain the producer's content description; omit an uncomputed digest. |
58
+ | Mutable external path | Identify it as live and describe the observation time. |
59
+
60
+ Hashing and archive creation are explicit choices. Avoid scanning terabytes
61
+ merely to assign an identity. Do not label backend completion as stronger
62
+ content checking than the transfer actually performed.
63
+
64
+ If a transfer stops, run `accrete recover` on that host. A lost acknowledgment can
65
+ leave a completed replica whose descriptor update remains pending, and recovery
66
+ finishes that from the receipt. An incomplete transfer is reported with its staging
67
+ path and left for explicit retry or cleanup. Inspect that specific outcome before
68
+ beginning another transfer; never rerun the producing simulation as metadata recovery.
69
+
70
+ Uploading to a remote is a native rclone operation followed by `data location add`.
71
+ Object storage can publish individual objects without atomically publishing an entire
72
+ directory collection, so upload to a fresh prefix and add the location only when the
73
+ upload finishes. Do not make an already-used complete prefix temporarily stand for a
74
+ different partially uploaded edition.
75
+
76
+ ## Evict a replica deliberately
77
+
78
+ Distinguish these changes:
79
+
80
+ - Evicting one managed replica removes that copy and updates its availability.
81
+ - Retiring current use with `accrete data retire` keeps the identity and earlier
82
+ Result associations, and removes no bytes.
83
+ - Deleting a borrowed source is an explicit action by its owner.
84
+
85
+ Registration does not grant the Kernel authority to delete a borrowed
86
+ scientific directory. A managed materialization can be evicted with `accrete data
87
+ evict` for that exact location. Other recorded locations help a
88
+ decision, but their availability may be stale; the project index cannot know
89
+ every external use or unpublished computation.
90
+
91
+ Keep symlink and hard-link behavior visible. A link to mutable producer bytes
92
+ does not make an independent closed copy. Materialization copies and never hard-links
93
+ a source, and it refuses symlinks, so package links deliberately when they matter.
94
+
95
+ Describe useful retention choices in Memory: why an edition matters, which
96
+ products were selected, what remains remote, and what the host may purge.
97
+ The word Scratch alone specifies no expiry duration. Site storage policies
98
+ govern the actual bytes; ACCRETE preserves the project's descriptions of them.
@@ -0,0 +1,61 @@
1
+ ---
2
+ name: accrete-memory
3
+ description: Preserve and recover ACCRETE project understanding across sessions and agents. Use when retaining reasoning, lessons, interpretations, rejected explanations, useful decisions, corrections, or next directions linked to Models, Tools, Data, Results, and earlier Memory. Use native search to read relevant entries and the Kernel to publish complete authored Markdown.
4
+ ---
5
+
6
+ # ACCRETE Memory
7
+
8
+ Preserve understanding that will help later work: what was learned, why a
9
+ choice was made, which explanation failed, what remains uncertain, and what
10
+ can be tried next. Write plain prose in the project's language. Memory belongs
11
+ to the project and remains useful beyond one host conversation.
12
+
13
+ ## Recover relevant understanding
14
+
15
+ Search the configured Memory root with `rg` and read the entries relevant to
16
+ the current question. Follow their Result, Model revision, Data, or Tool links
17
+ as needed. Loading the entire history at the beginning of every action is
18
+ unnecessary. Trust prior work within its recorded scope; repeat it when the
19
+ present task or a concrete changed condition calls for it.
20
+
21
+ Keep historical understanding distinct from present machine state. A note
22
+ about a running job or checkout describes its authored context. Use Git,
23
+ the scheduler, process tools, and current configuration for today's state.
24
+ Project summaries help navigation; the user's current instruction governs
25
+ the current task.
26
+
27
+ ## Publish a useful complete entry
28
+
29
+ Draft the complete Markdown text in Scratch or another ordinary working file.
30
+ Use `accrete memory append --from DRAFT_PATH` and supply known relations, such as
31
+ `--result RESULT_ID`. The Kernel allocates the stable entry ID, unless you supply
32
+ `--id` for retries, and publishes the complete entry at the next local date-based
33
+ path. Keep the returned ID and path in the handover where useful.
34
+
35
+ The default path is `memory/YYYY/MM/DD/NNN.md`; configuration can place Memory
36
+ elsewhere. The project timezone determines the publication day. The stable
37
+ frontmatter ID identifies the entry even if an import renumbers its filename.
38
+ Do not preallocate permanent empty entries or maintain numbering with a
39
+ separate script.
40
+
41
+ Write a later entry with `--supersedes EARLIER_ID` when an interpretation changes.
42
+ Explain what changed and which earlier understanding it supersedes, while retaining
43
+ the earlier prose. Use Results for activity descriptions and observations, and
44
+ Data for retained payloads. A Memory entry can synthesize several activities
45
+ without repeating all their detailed metadata.
46
+
47
+ ## Keep the process open
48
+
49
+ Write when the understanding is worth carrying forward. A worker may publish
50
+ delegated Memory through the same Kernel operation; a Coordinator may instead
51
+ combine several findings. There is no required diary frequency, fixed section
52
+ form, grading step, or universal exclusive writer.
53
+
54
+ - [Writing and continuity](references/writing-and-continuity.md): useful
55
+ content, corrections, topic summaries, and links between objects.
56
+ - [Command manual](references/commands.md): drafts, append operations,
57
+ native search, concurrent numbering, and operation outcomes.
58
+ - [Handovers and remote work](references/handovers-and-remote-work.md):
59
+ self-contained returns, imported entries, and durable project experience.
60
+
61
+ `accrete memory append --help` prints the flags.
@@ -0,0 +1,124 @@
1
+ # Memory command manual
2
+
3
+ ## Contents
4
+
5
+ - Interface and native reading
6
+ - Publish authored understanding
7
+ - Link objects and earlier understanding
8
+ - Identity, dates, and concurrent work
9
+ - Publication outcomes
10
+
11
+ ## Interface and native reading
12
+
13
+ This manual covers `memory append`. The full contract is at project-root path
14
+ `.accrete/docs/cli-contract.md`, and `accrete memory append --help` prints the flags.
15
+
16
+ Search and read Memory with ordinary tools. For the default configured root:
17
+
18
+ ```sh
19
+ rg -n 'routing|cold start|reuse' memory
20
+ rg -n 'RESULT_ID_OR_MEMORY_ID' memory
21
+ ```
22
+
23
+ Replace the search terms with those relevant to the task. Follow actual paths
24
+ returned by search or publication; configure other Memory roots normally.
25
+ Reading Markdown does not require an ACCRETE read command. SQL can query
26
+ the configured host-local projection, whose freshness is independent of the
27
+ durable files.
28
+
29
+ Global `--project DIRECTORY` selects the owning project. `ACCRETE_PROJECT` is the
30
+ fallback selection before ancestor-directory discovery. Use the explicit
31
+ selector when a worker operates in an external Model checkout or run directory.
32
+ Global `--json` returns a machine-readable receipt on stdout; diagnostics go
33
+ to stderr.
34
+
35
+ ## Publish authored understanding
36
+
37
+ Write a complete Markdown body in a normal working file. Choose its structure
38
+ according to the substance; no fixed headings are required. Submit it with:
39
+
40
+ ```sh
41
+ accrete --json memory append --from scratch/understanding.md
42
+ ```
43
+
44
+ The Kernel allocates the stable ID, date-based path, authored metadata, and
45
+ requested associations and publishes the complete entry. It returns the ID,
46
+ concrete path, and revision. The source draft remains ordinary working material.
47
+ Do not reserve an empty permanent entry by manually creating its target path.
48
+ `--title TITLE` names the entry, and `--authored-at` supplies an explicit RFC 3339
49
+ instant; the date directory still uses the current project-local day.
50
+
51
+ Input can be prepared anywhere that the selected host can read. Keep shared
52
+ project content free of native credentials and arbitrary environment dumps.
53
+ A useful interpretation can refer to a Tool or Result instead of embedding
54
+ its entire raw log.
55
+
56
+ ## Link objects and earlier understanding
57
+
58
+ Relation flags repeat:
59
+
60
+ ```sh
61
+ accrete --json memory append --from scratch/understanding.md \
62
+ --result "$RESULT_ID" --data "$DATA_ID" --model "$MODEL_ID"
63
+ ```
64
+
65
+ Use `--tool TOOL_ID` for relevant capabilities. Repeating a flag links several
66
+ objects of that kind. Relations may remain unresolved locally when the target
67
+ belongs to another working copy. Supply actual stable IDs and keep readable context
68
+ in the body.
69
+
70
+ For a correction, draft a later entry explaining the change and name the entry it
71
+ replaces:
72
+
73
+ ```sh
74
+ accrete --json memory append --from scratch/correction.md \
75
+ --supersedes "$EARLIER_MEMORY_ID" --result "$NEW_RESULT_ID"
76
+ ```
77
+
78
+ Omit a relation whose target does not exist. If there is no new Result, the
79
+ correction can still link earlier Memory and explain its basis in prose.
80
+ The relationship alone does not express the correction's meaning; write what
81
+ changed and why.
82
+
83
+ For a link `--supersedes` does not describe, such as a related earlier entry or a
84
+ link carrying a revision or role, use `--links-from FILE` with a JSON array:
85
+
86
+ ```json
87
+ [{ "kind": "memory", "id": "EARLIER_MEMORY_ID", "relation": "continues" }]
88
+ ```
89
+
90
+ ## Identity, dates, and concurrent work
91
+
92
+ The default published layout is `memory/YYYY/MM/DD/NNN.md`. The configured
93
+ project timezone determines the publication date. The entry's frontmatter ID
94
+ is stable across renaming; the authored instant remains distinct from the
95
+ date used for display. Simulation time belongs in the scientific description.
96
+
97
+ Local Kernel publication serializes sequence allocation so concurrent local
98
+ writers receive distinct paths. Each worker can submit a complete delegated
99
+ entry using the same operation. The Coordinator may synthesize entries when
100
+ that better preserves the understanding.
101
+
102
+ Independent hosts can choose the same date and display number. `accrete import`
103
+ preserves both IDs and authored instants and may renumber a filename. If Git produces
104
+ a path collision, preserve both complete entries and resolve the paths. Use IDs
105
+ for durable associations, and update human path links where necessary.
106
+
107
+ ## Publication outcomes
108
+
109
+ When retryability matters, supply `--id ID` from the first attempt: 1-180 ASCII
110
+ letters, digits, dots, underscores or hyphens, and not `.` or `..`. Retain it before
111
+ submission. Repeating with the same ID and unchanged content reconciles the same
112
+ publication; it does not allocate another numbered entry. Reusing an ID with
113
+ different content produces a conflict. Use a new entry for a new interpretation.
114
+
115
+ `committed: true` means the Markdown publication completed. When
116
+ `index_pending: true` accompanies it, run `accrete index refresh`; do not append
117
+ the entry a second time. If a destination is published but durability is
118
+ reported uncertain (exit 8), keep its path and run `accrete recover`.
119
+
120
+ Input rejection before publication leaves the draft available for correction.
121
+ Lost acknowledgments and partial publication require inspecting the specific
122
+ receipt or destination before retrying. Recovery concerns publication and
123
+ projection; it never reruns an experiment or rewrites the interpretation
124
+ on the agent's behalf.
@@ -0,0 +1,78 @@
1
+ # Handovers, remote work, and continuing experience
2
+
3
+ ## Give the next agent usable context
4
+
5
+ A handover tells the next participant what happened, where the material is,
6
+ what it suggests, and what remains open. Include the object IDs and concrete
7
+ paths needed for the next action. Name relevant revisions, the execution host,
8
+ and local bindings when they affect the work. Say which writes or transfers
9
+ remain incomplete instead of asking a new agent to reconstruct that state
10
+ from a large transcript.
11
+
12
+ Memory preserves the interpretation that will remain useful beyond that
13
+ handover. A returned task description need not automatically become a Memory
14
+ entry. A coordinator can synthesize several workers' findings into one entry,
15
+ or a worker can publish delegated understanding directly through the Kernel.
16
+
17
+ Neither arrangement needs a fixed permission token or universal exclusive
18
+ writer. Give workers a clear purpose, relevant objects, chosen working paths,
19
+ and the scope of their responsibility. Coordinate overlapping native edits
20
+ and scarce compute resources according to the actual task.
21
+
22
+ ## Maintain project context outside the project root
23
+
24
+ A worker may operate in a separate Model worktree or on a remote host. Supply
25
+ the ACCRETE project root and relevant guidance explicitly. The Model's Git
26
+ root may be a different repository from the project containing Memory.
27
+ Use `--project` for Kernel operations outside that root.
28
+
29
+ Do not assume a new agent session inherited every conversation or discovered
30
+ project instructions from a different directory. A brief should identify the
31
+ current objective and useful context in normal prose. The agent remains free
32
+ to investigate beyond the supplied paths when the task calls for it.
33
+
34
+ ## Exchange entries across hosts
35
+
36
+ Each host has its own local state and metadata view. Exchange durable Markdown
37
+ through the project's Git practice, or as a metadata bundle when no shared remote
38
+ exists:
39
+
40
+ ```sh
41
+ accrete export --to handoff.json --id MEMORY_ID --id RESULT_ID
42
+ accrete import --from handoff.json
43
+ ```
44
+
45
+ Omit `--id` to export every managed document. The bundle carries documents, not
46
+ scientific payloads, Git objects, Tool source, or machine bindings, so name what stays
47
+ behind in the handover. Import reports each object's outcome and is not atomic;
48
+ repeating the bundle completes what is missing. Host-local locks allocate filenames for local writes only. Two disconnected
49
+ hosts can both publish `memory/2026/11/03/001.md` with different stable IDs.
50
+
51
+ Preserve both entries when they meet. `accrete import` allocates a new display
52
+ number for one while retaining its ID and authored instant, and records the original
53
+ path as `origin_path`. If ordinary Git
54
+ reports a path collision, resolve the filenames with that same meaning. Do
55
+ not combine unrelated bodies merely because they selected the same number.
56
+
57
+ Machine-readable relations use stable IDs. The Kernel does not rewrite links in
58
+ authored prose. Update a human path link when necessary while preserving the
59
+ intended target identity.
60
+
61
+ A copied Memory entry can describe remote products that remain remote. Use
62
+ its Data and Result links to request the needed material. It does not imply
63
+ that the remote computation is still running or that an old locator remains
64
+ available. Present state comes from the owning host's native tools.
65
+
66
+ ## Let experience change the working environment
67
+
68
+ An explanation that repeatedly guides useful work can be developed into a
69
+ Tool: a diagnostic method, a domain reading guide, a launcher, or a reusable
70
+ analysis. Author its source with ordinary tools and admit it through the Tool
71
+ Skill when useful. Memory can explain why it exists and where its limits were
72
+ learned.
73
+
74
+ Similarly, findings can motivate a Model iteration or a different Data
75
+ selection. Carry those relations forward without requiring every Memory entry
76
+ to create a task, every lesson to become a Skill, or every exploration to follow
77
+ a fixed research cycle. The owner and agents choose how experience informs
78
+ subsequent work.
@@ -0,0 +1,101 @@
1
+ # Writing understanding that remains useful
2
+
3
+ ## Contents
4
+
5
+ - What to carry forward
6
+ - Relating Memory to other objects
7
+ - Corrections and uncertainty
8
+ - Reading and topic summaries
9
+ - Optional writing patterns
10
+
11
+ ## What to carry forward
12
+
13
+ Retain understanding whose value outlives the current exchange. Useful entries
14
+ explain a mechanism, an implementation decision, a diagnostic interpretation,
15
+ an unsuccessful direction, a practical constraint, or a promising continuation.
16
+ An entry can be brief when a short explanation preserves the essential point.
17
+
18
+ Write enough context for another agent to understand the claim without having
19
+ seen the conversation. Name relevant revisions, Result IDs, Data editions, or
20
+ Tool implementations when they materially delimit the lesson. Distinguish what
21
+ was observed from what is inferred, and describe the conditions under which
22
+ the understanding is useful.
23
+
24
+ Do not convert every transient terminal line into project Memory. Raw outputs,
25
+ long logs, arrays, and code already have suitable locations. Link them through
26
+ Results and Data when retained. Host transcripts and private agent context can
27
+ continue to exist separately; Memory is the authored project synthesis.
28
+
29
+ ## Relating Memory to other objects
30
+
31
+ | Subject of an entry | Useful relation |
32
+ | --- | --- |
33
+ | An observation from an experiment | Relevant Result and Model revision. |
34
+ | Why a numerical fix changed behavior | Result comparison, changed implementation, and any relevant Tool. |
35
+ | A useful analysis method | The retained Tool and Results demonstrating its use. |
36
+ | Data limitations or selection | Data ID/edition and the activity that exposed the limitation. |
37
+ | Revised explanation | Earlier Memory ID and the newer observations motivating the revision. |
38
+ | A next direction | Current question, relevant objects, and the reason for pursuing it. |
39
+
40
+ Use stable IDs for machine-readable links. Human Markdown links to paths can
41
+ make browsing convenient, but imported date-based filenames can change. Keep
42
+ both identity and an accessible path when useful; do not treat the filename as
43
+ the entry's durable identity.
44
+
45
+ The body remains prose. Associations help later discovery without requiring
46
+ a formal claim language or replacing the author's explanation. A single entry
47
+ can connect multiple objects and several rounds of experience.
48
+
49
+ ## Corrections and uncertainty
50
+
51
+ Write a later entry when a new observation changes an earlier interpretation.
52
+ Name the earlier entry with `--supersedes`, state the revised understanding, explain what changed,
53
+ and describe what still holds. Preserve the previous entry so the sequence of
54
+ reasoning remains intelligible.
55
+
56
+ A correction to execution metadata belongs in a Result amendment. A newly
57
+ observed outcome can be added as an observation. A changed explanation of
58
+ those outcomes belongs in Memory. An additional analysis can produce its own
59
+ Result and then a Memory interpretation. These actions can be taken in the
60
+ order useful to the work.
61
+
62
+ Preserve uncertainty with ordinary language. A hypothesis can be retained
63
+ without being promoted to an established conclusion. A failed explanation
64
+ can be valuable if the entry says why it was set aside and within what scope.
65
+ Avoid implying that every possibility was ruled out when only one mechanism
66
+ was investigated.
67
+
68
+ Present machine state can change without invalidating historical reasoning.
69
+ A note saying a particular environment or branch was selected describes its
70
+ authored context. Read current configuration and native state before using
71
+ that information for a new action. Scientific simulation time is a domain
72
+ coordinate; the date used to organize Memory is a publication convention.
73
+
74
+ ## Reading and topic summaries
75
+
76
+ Search by the current scientific question, a distinctive mechanism, a Result
77
+ ID, or a program component. Read relevant entries and their immediate context.
78
+ Follow links when needed instead of rereading every project entry.
79
+
80
+ Trust inherited work within the scope it documents. Additional checks belong
81
+ to the current task when a changed implementation, new observation, or owner
82
+ request gives them a purpose. Memory should help work continue rather than
83
+ require routine reenactment of earlier activities.
84
+
85
+ A topic summary can consolidate a growing line of work and link its detailed
86
+ entries. Treat it as an authored aid that can become outdated. Preserve the
87
+ details needed to understand changes of interpretation. A summary does not
88
+ override the owner's current instruction or determine present runtime state.
89
+
90
+ ## Optional writing patterns
91
+
92
+ Choose a form suited to the content. A mechanism note can explain the observed
93
+ behavior, the reason it occurs, and its implications. A decision note can state
94
+ the choice, rationale, practical consequences, and circumstances for revisiting
95
+ it. A correction can name the earlier interpretation and explain its revision.
96
+ A short handover synthesis can preserve completed understanding and next
97
+ directions while leaving operational details in the normal task handover.
98
+
99
+ These are writing options, not required headings. Use the project's ordinary
100
+ academic or engineering prose and retain only the context needed to make the
101
+ entry useful later.
@@ -0,0 +1,46 @@
1
+ ---
2
+ name: accrete-models
3
+ description: Develop and organize ACCRETE computational Models using native Git and the ACCRETE CLI. Use when registering or binding a model repository, opening or completing a retained development iteration, working across embedded programs, submodules or external checkouts, or associating scientific work with the implementation actually used.
4
+ ---
5
+
6
+ # ACCRETE Models
7
+
8
+ Treat a Model as the project's durable identity for a computational program. Use Git for its implementation, history, branches, worktrees, and integration. Use the Kernel to register, update or retire the identity, bind a checkout, retain the purpose and outcome of an iteration, or remove an iteration's worktree.
9
+
10
+ ## Orient to the program
11
+
12
+ Establish the owning ACCRETE project and the actual Model repository. Start from the task's supplied paths and object IDs; use ordinary file search and Git when they are incomplete. A Model can be embedded in the project, scoped to part of a larger repository, a submodule, or an external repository. A checkout is one place to work on that Model.
13
+
14
+ Keep these addresses distinct:
15
+
16
+ - The ACCRETE project root selects the objects and configuration to change.
17
+ - The Model ID identifies the program across hosts and checkouts.
18
+ - The repository commit identifies a historical implementation address.
19
+ - The source scope identifies relevant paths when several programs share one repository.
20
+ - The current checkout or worktree is a physical editing or execution location.
21
+
22
+ Use the project's explicit `--project` selector for Kernel calls made from external checkouts. Resolve shared relative paths from the project root. Follow machine-specific bindings for actual checkout and execution paths.
23
+
24
+ ## Develop through ordinary tools
25
+
26
+ Read and edit source, build, investigate, and commit using the existing language tools and Git. Choose the amount of retained organization that the work needs. An iteration is useful for a named line of development that later work should understand; it is optional for an ordinary edit.
27
+
28
+ Open an iteration around its actual Model repository and intended starting revision. An existing worktree can be attached after work has begun. Allocate independent editing locations when workers' changes can overlap. A host-created worktree of the outer project does not automatically isolate a Model in a different repository.
29
+
30
+ Integrate using the project's ordinary Git strategy. Close an iteration when its outcome is meaningful to retain. Author the outcome in the project's own terms; integrated, retained separately, and abandoned are useful examples. Closing records that outcome and relevant commits. Merging code is separate native Git work, and removing the worktree is the separate `model iteration remove-worktree` step.
31
+
32
+ ## Preserve the implementation used
33
+
34
+ Associate a Result with the revision actually used by its activity. A current checkout observation is useful only for the time it was observed. For earlier work, use the launcher's captured identity or an explicit historical revision; leave unknown execution identity unknown.
35
+
36
+ Allow uncommitted work. Describe its dirty state and any captured material without claiming a patch contains every dependency, untracked file, generated input, or runtime condition. `accrete result capture` writes a selected diff and untracked files; retain that as Data when the task needs it. A changed project commit can reflect only new Memory or documentation; source-scope identities can help explain that distinction without deciding scientific equivalence.
37
+
38
+ Keep earlier Results associated with their original revisions. Consult relevant Memory before repeating a settled investigation. Add a later interpretation when understanding changes; rerun work when the current scientific or engineering question calls for it.
39
+
40
+ ## Read only what the action needs
41
+
42
+ - [Object meaning and relationships](references/objects.md): choose repository arrangements, understand IDs, roles, iterations, source scope, and retained history.
43
+ - [Kernel operations](references/cli.md): register, bind, update, retire, open, close, and remove a worktree; prepare structured input and handle receipts.
44
+ - [Working across sessions and machines](references/working-practice.md): parallel development, dirty source, execution identity, Git transport, and continuity.
45
+
46
+ Read the installed `.accrete/docs/cli-contract.md` from the project root for the shared command contract and payload conventions. `accrete model COMMAND --help` prints the flags. On a host without the binary, keep draft input in Scratch and continue useful native work without fabricating an ACCRETE descriptor.
@@ -0,0 +1,117 @@
1
+ # Model Kernel operations
2
+
3
+ This manual covers the Model commands. `.accrete/docs/cli-contract.md` has the shared conventions and `accrete model COMMAND --help` prints the flags. Keep structured inputs in ordinary files under the configured Scratch root.
4
+
5
+ Contents: [operations](#operations-and-supplied-information), [inputs](#prepare-a-change), [receipts](#use-the-mutation-response), [native work](#native-reading-and-development).
6
+
7
+ ## Operations and supplied information
8
+
9
+ | Operation | Purpose | Information to prepare | Completion |
10
+ | --- | --- | --- | --- |
11
+ | `model register` | Establish the project's Model identity | Name, purpose, existing checkout or repository locator, optional source scope | Model ID, descriptor path and revision; local binding details |
12
+ | `model bind` | Locate an existing Model on this host | Model ID and concrete checkout path | Updated host-local binding; existing identity preserved |
13
+ | `model update` | Amend the descriptor | Merge patch and current revision | Updated descriptor and revision |
14
+ | `model retire` | End current use | Current revision, optional reason | Status changed; identity and earlier associations preserved |
15
+ | `model iteration open` | Retain a line of development | Model ID, purpose, starting revision, and the worktree to create or attach, if any | Iteration ID and descriptor; actual branch/worktree if created or attached |
16
+ | `model iteration close` | Retain the development outcome | Iteration ID, expected descriptor revision, outcome, relevant commits and explanation | Updated descriptor and revision; retained refs for each commit |
17
+ | `model iteration remove-worktree` | Remove the iteration's worktree | Iteration ID | The worktree is gone; the iteration descriptor is unchanged |
18
+
19
+ Registration describes an existing repository. Use ordinary Git for cloning, fetching, and inspecting it. Keep machine-specific checkout paths in local bindings. The portable description may carry a repository locator, but it must remain meaningful when a host has no checkout.
20
+
21
+ An iteration can attach an existing worktree. If the command creates Git resources, its receipt distinguishes resource creation from descriptor publication. A surviving worktree is useful material even when the metadata write needs recovery.
22
+
23
+ ## Prepare a change
24
+
25
+ Resolve the intended project, Model, and repository before drafting the input. Read a current descriptor with ordinary tools when its metadata or revision is needed. Use returned IDs rather than relying on names remaining unique after later renames or imports.
26
+
27
+ ```text
28
+ accrete --project PROJECT_ROOT model register --checkout CHECKOUT_PATH --name NAME [--source-scope PATH]
29
+ accrete --project PROJECT_ROOT model register --from INPUT_FILE
30
+ accrete --project PROJECT_ROOT model bind MODEL_ID --checkout CHECKOUT_PATH
31
+ accrete --project PROJECT_ROOT model update MODEL_ID --from PATCH_FILE --expect REVISION
32
+ accrete --project PROJECT_ROOT model retire MODEL_ID --expect REVISION [--from INPUT_FILE]
33
+ accrete --project PROJECT_ROOT model iteration open MODEL_ID --name NAME --purpose TEXT
34
+ accrete --project PROJECT_ROOT model iteration open MODEL_ID --from INPUT_FILE
35
+ accrete --project PROJECT_ROOT model iteration close ITERATION_ID --expect REVISION --from INPUT_FILE
36
+ accrete --project PROJECT_ROOT model iteration close ITERATION_ID --expect REVISION --outcome TEXT --commit COMMIT
37
+ accrete --project PROJECT_ROOT model iteration remove-worktree ITERATION_ID
38
+ ```
39
+
40
+ The capitalized terms are values to supply, not literal paths or IDs. `--project` selects the owning project; `ACCRETE_PROJECT` supplies the same context when no explicit selector is passed. Add global `--json` for machine-readable receipts. The Kernel allocates each managed document's envelope, and an ID unless you supply `--id`; the input files below are drafts for the operation.
41
+
42
+ A registration draft can describe an existing checkout and optional scope:
43
+
44
+ ```json
45
+ {
46
+ "name": "atmosphere",
47
+ "description": "Atmospheric model developed in this project.",
48
+ "repository": {
49
+ "checkout": "/work/climate/atmosphere"
50
+ },
51
+ "source_scope": ["src", "CMakeLists.txt"]
52
+ }
53
+ ```
54
+
55
+ Replace the example checkout and scope with real values. Omit `source_scope` when it has no useful defined meaning. `repository.checkout` means the same as `--checkout`, and `--checkout` wins if both are given: the Kernel stores it as a host-local binding and leaves it out of the portable descriptor, so the path is not the Model identity. To register without a local checkout, supply `repository.locator` instead and bind later. The Kernel never clones or fetches. Optional `aliases` provides additional project names. `--source-scope` can be repeated.
56
+
57
+ An iteration-open draft uses the same names as the flags, and flags override: `name`, `purpose`, `branch`, `worktree`, `start`, `existing`, `id`. The Model needs a checkout binding on this host.
58
+
59
+ ```json
60
+ {
61
+ "name": "transport-order",
62
+ "purpose": "Investigate the effect of evaluation order in transport.",
63
+ "branch": "transport-order",
64
+ "worktree": "/work/climate/iterations/transport-order",
65
+ "start": "HEAD"
66
+ }
67
+ ```
68
+
69
+ `worktree` creates that worktree from `start` (default `HEAD`). `branch` names a new branch; without it Git creates a detached worktree. `existing: true` attaches a worktree already there, which must belong to the same repository and supplies its own `HEAD`. Without `worktree`, no storage is allocated and the iteration only records the effort.
70
+
71
+ A close draft has `outcome`, `summary`, and `commits` containing the relevant commit IDs:
72
+
73
+ ```json
74
+ {
75
+ "outcome": "integrated",
76
+ "summary": "Merged after the comparison showed the expected reduction in drift.",
77
+ "commits": ["REPLACE_WITH_COMMIT"]
78
+ }
79
+ ```
80
+
81
+ `outcome` is a free authored string: `integrated`, `retained_separately`, and `abandoned` are illustrative values, not a fixed enumeration. It is required from the file or `--outcome`, and `--commit` can be repeated. Each commit is kept under a local retained ref. Submit the current descriptor `revision` with `--expect`; this token is not a commit ID.
82
+
83
+ For registration, explain what program the Model denotes and which repository already carries it. If it uses a source scope, say what that scope includes. For a host binding, use the actual checkout path. For an iteration, identify the intended start before allocating work; do not silently treat whichever branch happens to be checked out as the requested start.
84
+
85
+ For closing, describe what happened and include the relevant end or integration commits when known. Merge or otherwise integrate with Git before reporting that outcome. If the work is retained separately, name its usable branch or commit. If abandoned, preserve the reason when it will help subsequent work.
86
+
87
+ `remove-worktree` is separate from closing, so a closed iteration can keep its worktree. It removes the path bound to this iteration on this host through Git and keeps Git's refusal to remove changed work; `--force` explicitly asks for Git's destructive removal. Branches stay; delete those with Git.
88
+
89
+ `model update` takes a JSON Merge Patch. `model retire` takes an optional JSON document whose `reason` is stored on the descriptor. Retirement leaves the repository, checkouts and earlier Results alone.
90
+
91
+ ## Use the mutation response
92
+
93
+ The shared receipt contract includes `object_id`, `path`, `revision`, `committed`, and `index_pending`, with additional effects where a command changes Git resources or host bindings. Use the returned concrete paths for subsequent native work. The descriptor revision is an optimistic replacement token, distinct from a Git commit.
94
+
95
+ - A committed descriptor with `index_pending: true` is retained. Continue from its ID; refresh the disposable index when queries need it.
96
+ - A revision conflict means another change intervened. Read the latest descriptor and integrate the intended edit before resubmitting with its revision.
97
+ - A created worktree with incomplete descriptor publication calls for `accrete recover`, which attaches the surviving worktree without repeating development. Preserve the worktree and any edits; do not rerun creation against a different destination.
98
+ - A missing checkout is a binding problem. It does not erase the Model or make a remotely supplied reference meaningless. Repair it with `model bind`.
99
+ - A missing Git executable prevents the Git-dependent operation and exits 5. Restore that dependency or retain the draft for later; a Skill must not implement a replacement lifecycle script.
100
+
101
+ Read JSON output when automation needs stable fields and keep diagnostics separate from stdout. For retries of creates, supply a stable `--id` or `id` before the first attempt. A retry of object publication does not mean repeating the underlying scientific activity.
102
+
103
+ ## Native reading and development
104
+
105
+ Use concrete paths supplied by the task, configuration, or receipts:
106
+
107
+ ```sh
108
+ git -C "$model_checkout" status --short
109
+ git -C "$model_checkout" rev-parse HEAD
110
+ git -C "$model_checkout" log -5 --oneline
111
+ git -C "$model_checkout" diff
112
+ git -C "$model_checkout" worktree list
113
+ ```
114
+
115
+ `$model_checkout` is a shell variable set to the actual checkout. Quote it because a valid path may contain spaces. Use `git show`, `git diff`, and native file readers for implementation questions. Query the index with `sqlite3 -readonly` when an object join is useful, at the path in `.local_state.index` from `accrete config resolve --json`. A brief "database is locked" during a concurrent refresh means retry. The index describes retained documents and does not describe a current process or live checkout.
116
+
117
+ Read a descriptor rather than changing it with `jq` or an editor. Model code, project configuration, instructions, and drafts remain ordinary editable files. Use the Kernel when the intended effect changes Model or iteration organization.