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,108 @@
1
+ # Accumulating useful work
2
+
3
+ ACCRETE is most useful when the next session can begin from the code, products,
4
+ capabilities, and understanding that earlier work made available. Retention is a
5
+ selective act of project judgment. It can happen during work or after its value
6
+ becomes apparent.
7
+
8
+ ## Preserve the right distinction
9
+
10
+ | What is changing | Suitable durable description | What stays native |
11
+ |---|---|---|
12
+ | A numerical program develops | Model identity and meaningful iteration outcomes | Repository commits, branches, builds, and execution |
13
+ | A diagnostic becomes worth reusing | Tool purpose, source, and exposure | Scripts, compiled code, examples, and domain explanation |
14
+ | A product is selected for future use | Data meaning, origin, content description, and locations | Native scientific files and storage |
15
+ | An activity produces observations | Result with the operands and context actually known | Detailed logs, traces, arrays, and external tracking systems |
16
+ | Understanding changes | Memory explaining the interpretation and its conditions | Authored reasoning and native text search |
17
+
18
+ These can occur at different times. An experiment can run before its Result is
19
+ recorded. A script may remain temporary until a later task reveals a recurring
20
+ purpose. A new interpretation can be written long after the original run. No
21
+ single object needs to carry all of those changes.
22
+
23
+ ## Continue from prior work
24
+
25
+ Read the relevant Result and Memory before deciding whether further execution is
26
+ useful. The observations describe the code, Tools, Data, and conditions they
27
+ name. Preserve them when a Model advances; their historical context remains
28
+ meaningful.
29
+
30
+ A changed project commit may concern documentation only. A changed comparator or
31
+ mapping can affect an interpretation even when the Model is unchanged. The
32
+ Agent and domain Tools decide what matters to reuse. ACCRETE has no universal
33
+ rule equating commit equality with scientific equivalence or commit difference
34
+ with a required rerun.
35
+
36
+ When further work is justified, name the uncertainty it resolves. It might be a
37
+ new mechanism question, a changed operand, a missing product, or a new computing
38
+ environment. The useful Result then explains the actual activity and its
39
+ observations without pretending it speaks for unrelated revisions or conditions.
40
+
41
+ ## Let capability grow through practice
42
+
43
+ Keep a one-off analysis script in ordinary source or Scratch while it is still
44
+ being developed. When it has a recurring purpose, retain the code and the
45
+ knowledge required to use it. The Tool may contain scripts, compiled programs,
46
+ reference material, or prose alone. Admit it through the Kernel when it should
47
+ have a project identity.
48
+
49
+ A Skill is one discovery interface for that capability. Expose it when automatic
50
+ discovery helps. It can also be used directly by path or by another program.
51
+ Keep the Tool's editable source distinct from generated host wrappers. Run `tool
52
+ refresh` when its description or binding changes; code edits still happen with
53
+ normal development tools.
54
+
55
+ Record the implementation used for a particular activity when known. An
56
+ admission-time commit on a live Tool does not automatically identify the code a
57
+ later run executed. Selecting a retained revision requires actual matching
58
+ material; a label alone cannot freeze a mutable directory.
59
+
60
+ ## Keep knowledge understandable
61
+
62
+ Useful Memory explains how an observation changed the understanding of a
63
+ problem, why a choice was made, which conditions limit it, and what could help
64
+ next. Write in normal prose. Do not turn every command, transcript, or transient
65
+ machine observation into a Memory entry.
66
+
67
+ If a later explanation changes, append a new entry linking the earlier one and
68
+ the relevant Results. Explain what changed and why. Preserve the earlier
69
+ interpretation in the conditions in which it was made. Dated Markdown and stable
70
+ IDs provide continuity without controlling the style of the explanation.
71
+
72
+ As a topic becomes difficult to navigate, author a useful synthesis and link its
73
+ supporting entries and Results. A Tool can contain a durable method distilled
74
+ from several such experiences. The project does not require an automatic
75
+ summarizer, embedding index, or scoring system before it can benefit from Memory.
76
+
77
+ ## Retain meaning without copying every byte
78
+
79
+ Data registration can describe a large remote product in place. Keep compact
80
+ diagnostics or reduced tables close to analysis while preserving the locations
81
+ of raw outputs or restart states that are worth retaining. Content digests,
82
+ provider versions, and manifests have their own scopes; use what is known and
83
+ worth computing for the task.
84
+
85
+ Two products with identical bytes can have different scientific roles. Preserve
86
+ both meanings. A corrected closed product normally receives a new Data ID, naming
87
+ the earlier one in `replaces`, so old Results continue to refer to the input or
88
+ output they actually used.
89
+
90
+ Retaining a descriptor does not ensure that a remote path will remain available.
91
+ Use the storage service's actual conditions and the owner's retention choices.
92
+ Before removing working storage, identify the selected material that subsequent
93
+ work needs and preserve it through ordinary source retention, Data locations,
94
+ or an explicitly chosen archive.
95
+
96
+ ## Separate project progress from software upgrades
97
+
98
+ The Kernel and foundational guidance are versioned releases; Models, Tools, Data, and
99
+ Memory evolve on the project's own schedule. `npx accrete-kit@latest upgrade` brings
100
+ newer foundational assets into this project and moves its Kernel binary.
101
+ `accrete migrate` changes managed document representation.
102
+ None of these advances a Model, revises an earlier interpretation, or declares a
103
+ scientific result obsolete.
104
+
105
+ Use [the configuration guide](configuration.md) to resolve the active host and
106
+ [the remote guide](remote-work.md) when computation and analysis happen in
107
+ different environments. Preserve the relationships that help the next action;
108
+ let the research continue in the form appropriate to its question.
@@ -0,0 +1,118 @@
1
+ # Working in an ACCRETE project
2
+
3
+ ACCRETE gives enduring identities and relationships to the products of ongoing
4
+ computational work. The Agent chooses the question, develops and runs programs,
5
+ interprets what happened, and decides what to retain. The native `accrete` Kernel
6
+ publishes the corresponding managed object changes.
7
+
8
+ ## Start with the current work
9
+
10
+ Read the owner's request and `.accrete/PROJECT.md`. Search the relevant existing
11
+ code, Results, and Memory with ordinary tools. Load the object Skill that helps
12
+ the next action. There is no required sequence through the five stores and no
13
+ requirement to register an activity before starting it.
14
+
15
+ Launch the main Claude Code or Codex session from the project root so its
16
+ instructions and Skills are discoverable. Model checkouts, Tool sources, data,
17
+ environments, and run directories may be elsewhere. Pass the owning project
18
+ explicitly to the CLI when operating there; a nested Git root does not establish
19
+ the intended ACCRETE project.
20
+
21
+ ## The object system
22
+
23
+ | Object | Why it is retained | What changes through the Kernel | Natural working interface |
24
+ |---|---|---|---|
25
+ | Model | A computational program that continues to evolve | Registration, host binding, update, retirement, opening and closing an iteration, removing its worktree | Git, editor, compiler, model runtime |
26
+ | Tool | An ability worth using again, including knowledge and executable work | Admission, host binding, metadata/revision selection, exposure, refresh, retirement, export | Its source directory, native language tools, Skill instructions |
27
+ | Data | An input or product selected for continued use | Registration, amendment, locations, managed materialization and eviction, retirement | Filesystem, storage tools, scientific format readers |
28
+ | Result | A retained account of an activity and its observations | Creation, amendment, appended observations | JSON readers and the local SQLite projection |
29
+ | Memory | Understanding, decisions, experience, and future direction | Publication of complete authored prose and associations | Markdown, file search, ordinary reading |
30
+
31
+ Scratch is ordinary ongoing work. It can contain scripts, drafts, logs, partial
32
+ outputs, or an entire investigation. Its contents become managed only through a
33
+ chosen object operation. A useful script may become a Tool; a finished output
34
+ may become Data; a completed or failed attempt may become a Result; its lesson
35
+ may become Memory. Each decision can be made independently and retrospectively.
36
+
37
+ ## Relationships that support continuation
38
+
39
+ A Result can name several Model revisions in different roles, the Tools used,
40
+ input and output Data, and execution conditions. Memory explains how to interpret
41
+ those observations and what they suggest next. A Tool can combine the programs
42
+ and understanding that have repeatedly proved useful in those activities.
43
+
44
+ Object identity is independent of physical location. A registered Data object
45
+ can exist while its bytes remain remote. A Model can use several worktrees of
46
+ one Git repository. A Tool can have two host discovery interfaces while remaining
47
+ one capability. A Memory filename can change during import while its stable ID
48
+ continues to identify the same entry.
49
+
50
+ Keep the revision actually used by an activity separate from the current revision
51
+ of its Model or Tool. Today's checkout is useful evidence about today's files;
52
+ it does not fill a missing historical execution revision. Preserve unknown
53
+ information as unknown and retain supplied context without fabricating it.
54
+
55
+ ## Where to work
56
+
57
+ The defaults place small object descriptors in `.accrete/objects/`, Results in
58
+ `results/`, dated Memory in `memory/`, Tool sources in `tools/`, managed Data
59
+ replicas in the ignored `.accrete/data/`, and ongoing work in the ignored
60
+ `scratch/`. Creating a Workspace writes only `.accrete/project.toml`, the installed
61
+ assets and the ignored Kernel binary at `.accrete/bin/accrete`; store directories appear on first use. Shared `.accrete/project.toml`
62
+ defines logical roots; ignored `.accrete/local.toml` binds this host's paths.
63
+ Configuration can place all of these elsewhere.
64
+
65
+ Foundational Skills are ordinary directories under `.agents/skills/` for Codex
66
+ and `.claude/skills/` for Claude Code. Each contains concise instructions and
67
+ references to load when needed. Read only the guidance relevant to the action:
68
+
69
+ | Need | Skill |
70
+ |---|---|
71
+ | Associate or develop a computational implementation | `accrete-models` |
72
+ | Retain, expose, or evolve a reusable capability | `accrete-tools` |
73
+ | Describe, locate, or materialize retained inputs/outputs | `accrete-data` |
74
+ | Preserve an activity, its operands, and observations | `accrete-results` |
75
+ | Carry understanding and decisions into later work | `accrete-memory` |
76
+
77
+ ## The write boundary in practice
78
+
79
+ Use ordinary tools to clone repositories, edit source, commit changes, run
80
+ simulations, inspect arrays, transfer unregistered working files, and draft
81
+ prose. Use the Kernel when the action establishes or changes ACCRETE identity,
82
+ associations, lifecycle, or a managed location. Scientific programs write their
83
+ own outputs directly. Source and configuration are edited normally; managed
84
+ descriptors, Result publication, and Memory allocation use the CLI.
85
+
86
+ Use `git`, `rg`, `jq`, `sqlite3 -readonly`, or domain readers for questions those
87
+ tools already answer. `accrete index refresh` repairs or updates the local query
88
+ projection. It does not rerun the activity. A mutation receipt with
89
+ `committed: true` and `index_pending: true` means the object already exists and
90
+ only indexing remains.
91
+
92
+ Open the index with `sqlite3 -readonly` at the path in `.local_state.index` from
93
+ `accrete config resolve --json`, and inspect `.schema` before assuming table or column
94
+ names. A brief "database is locked" during a concurrent refresh means retry. The projection describes
95
+ its last successful refresh of this metadata view, and does not establish live
96
+ process state or current remote availability.
97
+
98
+ Read [the CLI contract](cli-contract.md) and [command map](cli-commands.md) before
99
+ a new kind of managed write; `accrete COMMAND --help` prints the flags. When an
100
+ operation stops partway, `accrete recover` finishes it from its receipt. On a host
101
+ without the binary, continue native work and preserve drafts for later submission.
102
+ Do not recreate the Kernel with ad hoc descriptor-writing scripts.
103
+
104
+ ## Further guidance
105
+
106
+ - [Coordinator responsibilities](coordinator.md): maintain direction, delegate,
107
+ integrate, and decide what to retain.
108
+ - [Subagent work](subagents.md): concrete briefs, independent working locations,
109
+ and useful handovers.
110
+ - [Long-term work](long-term-work.md): relationships, reuse, capability growth,
111
+ and changing interpretations.
112
+ - [Configuration](configuration.md): project context, path bindings, and local
113
+ state.
114
+ - [Remote work](remote-work.md): computation and metadata exchange across hosts.
115
+
116
+ These manuals and Skills come from the npm generator `accrete-kit`;
117
+ `.accrete/release.json` names the version that installed them. Installing a different
118
+ Kernel does not rewrite this guidance or migrate project documents. `npx accrete-kit@latest upgrade` and `accrete migrate` handle those distinct changes.
@@ -0,0 +1,125 @@
1
+ # Working across machines
2
+
3
+ Use ordinary SSH, transfer tools, domain launchers, and site schedulers for remote
4
+ computation. The Kernel is needed on the host where managed metadata writes occur. It is
5
+ one native executable that runs without Node.js. ACCRETE does not need a remote coordinator
6
+ service.
7
+
8
+ ## Establish the working context
9
+
10
+ Share the project's small configuration and documents through its normal Git or
11
+ explicit transfer arrangement. A remote clone has the same project identity and
12
+ its own ignored `.accrete/local.toml`, local metadata-view index, and operation
13
+ state. Native Model repositories may be obtained separately and bound to the
14
+ appropriate Models with `accrete model bind` on that host; `accrete tool bind` does
15
+ the same for Tool source.
16
+
17
+ `.accrete/bin/` is ignored by Git, so each clone restores its own Kernel. With Node on the
18
+ host, run this at the Workspace root, using `template_version` from `.accrete/release.json`:
19
+
20
+ ```sh
21
+ npx accrete-kit@<version> install
22
+ ```
23
+
24
+ On a host without Node, take the archive for that host from the `accrete-cli` GitHub Release
25
+ at `kernel_version` from `.accrete/release.json`, and extract it into the Workspace:
26
+
27
+ ```sh
28
+ mkdir -p .accrete/bin
29
+ tar -xzf accrete-<version>-<target>.tar.gz --strip-components=1 -C .accrete/bin
30
+ ```
31
+
32
+ Name the actual Model revisions, input locations, execution directory, domain
33
+ Tool, and current resource constraints in the assignment. Supply the relevant
34
+ project guidance explicitly when a worker starts from an external Model checkout.
35
+ An environment and its import paths remain the concern of the Tool launching the
36
+ program.
37
+
38
+ ## Compute and retain at the useful boundaries
39
+
40
+ Scientific execution writes ordinary files in its working directory. A useful
41
+ activity can be recorded before, during, or after execution; that choice does not
42
+ authorize or schedule the computation. A Result may describe a failed launch,
43
+ one completed leg, a partial chain, or a full activity.
44
+
45
+ Register closed products when the producer has completed the relevant writes.
46
+ For a continuing campaign, a completed year's restart and diagnostics can be
47
+ retained while later years are still running. A preallocated history file or a
48
+ directory's presence does not establish that its scientific product is finished.
49
+ If a live source is intentionally registered, describe it as mutable.
50
+
51
+ Reduce large arrays near the computation when the question benefits from smaller
52
+ products. Retain raw outputs or restart states at the location chosen for them,
53
+ and give reduced products their own Data descriptions and origin associations.
54
+ Transfer only the material needed for the current analysis. Data registration
55
+ does not compel copying or hashing every member of a large remote tree.
56
+
57
+ ## Bring back portable descriptions
58
+
59
+ Exchange Result JSON, Data/Model/Tool descriptors, and selected Memory through
60
+ ordinary Git, or as a metadata bundle when no shared remote exists:
61
+
62
+ ```sh
63
+ accrete export --to handoff.json --id RESULT_ID --id MEMORY_ID
64
+ accrete import --from handoff.json
65
+ ```
66
+
67
+ Omit `--id` to export every managed document. A bundle carries documents, IDs,
68
+ revisions and Memory paths. It leaves out scientific payloads, Git objects, Tool
69
+ source and machine bindings. Preserve supplied IDs and historical revisions. Do not
70
+ copy the remote live SQLite database as the durable project description; refresh a
71
+ local projection from the received documents.
72
+
73
+ An unresolved relation is acceptable when the referenced repository or Data is
74
+ still remote. A Memory filename collision between independent hosts does not
75
+ mean the entries are the same; the stable IDs distinguish them and `import`
76
+ allocates the receiving path. Divergent content under one identity is reported as a
77
+ conflict and needs a deliberate merge, rather than last-writer-wins replacement. To
78
+ replace a predecessor on purpose, add its current byte revision as `expected_revision`
79
+ in that bundle entry.
80
+
81
+ Import reports each object's outcome and is not atomic. A partial batch exits 7 with
82
+ a nonzero `failed` count, and its successful entries stay committed. Repeating the
83
+ same bundle acknowledges those and completes the rest. A bundle from another project
84
+ needs `--allow-foreign`, which keeps its original project IDs.
85
+
86
+ ## Materialize what analysis needs
87
+
88
+ Read already available bytes with native readers. To create a managed replica,
89
+ use `data materialize` with a configured source and destination. The Kernel
90
+ handles the location association while a local copy or rclone download performs the
91
+ transfer. Uploads are native rclone work followed by `data location add`. A project
92
+ already using DVC, DataLad, or site transfer software can use that tool and add the
93
+ completed location the same way.
94
+
95
+ Publication of transferred bytes and publication of the location description are
96
+ separate completion points. If one completes without the other, run `accrete
97
+ recover` on that host: it finishes publication from the receipt and reports an
98
+ incomplete transfer with its paths for explicit retry. Do not restart the simulation
99
+ to repair metadata or transfer state.
100
+
101
+ A local analysis can then produce its own Result and Memory linked to the
102
+ original remote products. This retains the relationship between production,
103
+ reduction, and interpretation without demanding one universal campaign layout.
104
+
105
+ ## Current state comes from the system that owns it
106
+
107
+ A copied Result describes what its author observed. It does not establish that
108
+ a remote process is still running or that a path remains available now. Use the
109
+ scheduler, process table, logs, or domain launcher for current execution state.
110
+ Use native storage access for present availability when the task needs it.
111
+
112
+ Keep metadata writers on one host for a shared writable metadata view. Separate
113
+ host-local locks do not coordinate simultaneous writers to the same NFS tree.
114
+ Payload files can remain on shared storage under the scientific program's own
115
+ I/O conditions, while metadata travels through the chosen explicit arrangement.
116
+
117
+ ## Hand over enough to continue
118
+
119
+ Name the activities actually completed, relevant code revisions and runtime
120
+ context, Result and Data IDs, concrete retained paths, and outstanding work.
121
+ State what remains only on the remote host and which products are already
122
+ available for analysis. Preserve useful source or selected outputs before
123
+ removing their temporary worktree with `accrete model iteration remove-worktree` or
124
+ their execution directory with ordinary tools. Let the owner's task
125
+ determine the format and extent of the handover.
@@ -0,0 +1,78 @@
1
+ # Working as an ACCRETE subagent
2
+
3
+ Work on the delegated question using the host's normal tools. Your useful
4
+ contribution may be code, a diagnostic, a reduction, a capability, an explanation,
5
+ or a concrete unresolved observation. ACCRETE provides a way to retain selected
6
+ products; it does not prescribe how to investigate the question.
7
+
8
+ ## Reconstruct the necessary context
9
+
10
+ Identify the owning ACCRETE project and the actual editable checkout or path.
11
+ Read the instructions relevant to that location and the supplied Tool Skill.
12
+ If you start outside the project root, read its `AGENTS.md` and
13
+ `.accrete/PROJECT.md` explicitly; discovery in another Git repository may expose
14
+ a different instruction set.
15
+
16
+ Use the designated Model revision and environment when the assignment names
17
+ them. A shell working directory, Git HEAD, and an installed Python package can
18
+ point to different implementations. When execution identity matters, obtain it
19
+ from the domain launcher or actual runtime context. Keep an unavailable historical
20
+ revision unknown instead of substituting today's HEAD.
21
+
22
+ Search the relevant Memory rather than loading every entry. Use retained work
23
+ under its stated conditions. No general rule requires repeating earlier work
24
+ before you can use it.
25
+
26
+ ## Work within the assigned context
27
+
28
+ Keep overlapping edits in your assigned worktree or disjoint directory. Do not
29
+ switch a shared checkout's branch while another worker is using it. Read-only
30
+ input data can remain shared. Follow the current resource allocation and make
31
+ new resource needs visible to the Coordinator when they affect other work.
32
+
33
+ Use native Git, editors, scientific libraries, shell, SSH, and schedulers for
34
+ the substantive task. Temporary scripts and observations may remain in Scratch.
35
+ Do not promote every helper to a Tool or every intermediate array to Data.
36
+ Retain them when there is a continuing purpose.
37
+
38
+ An ACCRETE iteration belongs to the actual Model repository. A worktree supplied
39
+ by the agent host may instead isolate the project repository. Use the explicit
40
+ Model binding and paths in the brief; do not infer they are equivalent.
41
+
42
+ ## Publish when it is part of the assignment
43
+
44
+ Use `accrete` to publish managed objects. Draft structured input or Memory
45
+ prose in an ordinary working file, then submit it. You can record useful failed
46
+ or partial activity, retain external references, and admit work retrospectively.
47
+ Missing local payloads do not require fabricating a completed computation.
48
+
49
+ Keep the command's returned object IDs, revisions, paths, and any pending effects
50
+ in the handover. If only indexing remains, the object has already committed.
51
+ If a transfer, worktree or publication stopped partway, run `accrete recover` and
52
+ report what it finished. If an amendment conflicts with another writer, retain your
53
+ draft and reconcile the specific changes with the current document or Coordinator.
54
+
55
+ Do not edit shared managed descriptors or SQLite directly. On a host without the
56
+ binary, continue native work and hand over the prepared draft with the specific
57
+ command it needs.
58
+
59
+ ## Return a useful handover
60
+
61
+ Explain what happened and where the concrete material is. Include the actual
62
+ revisions, result/data IDs, relevant observations, and remaining questions that
63
+ matter to integration. Describe important behavior changes in a Tool so the next
64
+ action can load the updated source; a refresh of files does not erase already
65
+ loaded instructions from another session.
66
+
67
+ A handover can be a few sentences. For example:
68
+
69
+ > The reduction program is committed on the assigned branch at the revision
70
+ > below. It reads the completed first-year output without changing that tree.
71
+ > The reduced table is at the named remote path and its Data ID is attached.
72
+ > The second year's input is still being produced, so only the first year's
73
+ > observations are described in the Result. I left the draft interpretation
74
+ > beside the table for integration with the comparison worker's findings.
75
+
76
+ Fill the concrete references from your work. Do not create a task card or
77
+ administrative report merely to fit this example. Before removing a temporary
78
+ worktree, return or retain the selected source and products needed later.
@@ -0,0 +1,78 @@
1
+ # Input drafts
2
+
3
+ These files are reusable caller-input drafts for the `accrete` commands. They are
4
+ reference assets installed with the project guidance. **They are not existing
5
+ ACCRETE objects, initial store contents, or instructions to execute a research
6
+ workflow.** `npx accrete-kit@latest create` copies them as examples; it does not submit them.
7
+
8
+ Copy a useful draft into the configured Scratch directory, adapt it to the
9
+ actual work, and submit it only when the corresponding organizational action
10
+ is intended. Replace example descriptions and every `REPLACE_WITH_...` value.
11
+ Use IDs returned by earlier Kernel writes and actual Git revisions. Empty
12
+ association arrays mean no associations have been supplied; populate them only
13
+ with objects relevant to the activity. Omit fields that are unknown.
14
+
15
+ The installed [CLI contract](../docs/cli-contract.md) describes the fields, and the
16
+ [command map](../docs/cli-commands.md) lists every operation. Read the matching
17
+ Skill reference for the object's meaning.
18
+
19
+ ## Available drafts
20
+
21
+ | Draft | Submit with | Adapt before submission |
22
+ | --- | --- | --- |
23
+ | [model-register.json](model-register.json) | `model register --from FILE` | Choose the program name and existing checkout. `repository.checkout` is the same as `--checkout`. Add top-level `source_scope` only when it describes the program meaningfully. |
24
+ | [iteration-open.json](iteration-open.json) | `model iteration open MODEL_ID --from FILE` | Supply the question, starting revision, and intended worktree. `existing: false` creates that worktree; `true` attaches one already there; omitting `worktree` allocates no storage. Flags of the same names override these fields. |
25
+ | [iteration-close.json](iteration-close.json) | `model iteration close ITERATION_ID --from FILE --expect REVISION` | Describe the actual outcome and include relevant commits when known. Closing does not integrate or remove worktrees. |
26
+ | [tool-admit.json](tool-admit.json) | `tool admit --from FILE` | Name the useful capability and its existing editable source. |
27
+ | [tool-update.json](tool-update.json) | `tool update TOOL_ID --from FILE --expect REVISION` | Supply only the intended JSON Merge Patch fields. |
28
+ | [tool-retire.json](tool-retire.json) | `tool retire TOOL_ID --from FILE --expect REVISION` | Explain why the Tool should leave normal discovery. The same optional document works for `model retire` and `data retire`. |
29
+ | [data-register.json](data-register.json) | `data register --from FILE` | Describe the intended content and replace the borrowed location. Registration does not copy or hash its payload. |
30
+ | [result-record.json](result-record.json) | `result record --from FILE` | Describe the actual activity and supplied execution information; populate known associations. |
31
+ | [result-amend.json](result-amend.json) | `result amend RESULT_ID --from FILE --expect REVISION` | Express the actual correction against the current descriptor revision. |
32
+ | [observation.md](observation.md) | `result observe RESULT_ID --text-file FILE` | Write the independent observation and useful context. |
33
+ | [memory-entry.md](memory-entry.md) | `memory append --from FILE` | Write complete understanding in ordinary prose and supply relevant relation flags. |
34
+
35
+ The uppercase command terms represent values to supply. Prepend global
36
+ `--project DIRECTORY` when outside the intended project and `--json` when consuming
37
+ a mutation receipt. `ACCRETE_PROJECT` provides the project-selection fallback.
38
+
39
+ ## Association shapes
40
+
41
+ Result inputs accept these association shapes, populated with actual stable
42
+ IDs rather than aliases or paths:
43
+
44
+ | Field | Member shape |
45
+ | --- | --- |
46
+ | `models` | `{ "model_id": ID, "role": ROLE, "commit": COMMIT_OR_NULL, "dirty": BOOLEAN_OR_NULL }` |
47
+ | `tools` | `{ "tool_id": ID, "revision": REVISION_OR_NULL }` |
48
+ | `inputs`, `outputs` | `{ "data_id": ID, "role": ROLE }` |
49
+ | `related_results` | `{ "result_id": ID, "role": ROLE }` |
50
+ | `observations` | `{ "text": TEXT }`, with any further domain fields |
51
+
52
+ Roles are optional authored descriptions. Unknown execution revisions can be
53
+ omitted or null. A retrospective activity does not inherit the current checkout
54
+ HEAD. A Data origin can carry a known `result_id`, and `memory append` takes
55
+ repeatable `--model`, `--tool`, `--data`, `--result`, and `--supersedes` flags.
56
+ Objects referenced from another host can remain unresolved locally.
57
+
58
+ ## Drafts and managed publications
59
+
60
+ The Kernel supplies the persistent envelope, publication path, stable identity,
61
+ revision handling, and projection update. A caller-supplied `id` on a create draft
62
+ is an optional retry aid, not an instruction to fabricate earlier objects: 1-180
63
+ ASCII letters, digits, dots, underscores or hyphens, and not `.` or `..`. Memory
64
+ input is a Markdown body with no Kernel-owned frontmatter. The Kernel adds its ID,
65
+ authored metadata, and associations on publication.
66
+
67
+ `tool-update.json` and `result-amend.json` use JSON Merge Patch. Objects merge
68
+ recursively, arrays replace entire arrays, and null removes a key. Identity,
69
+ kind, and format fields cannot be changed through these ordinary patches.
70
+ Read current content before constructing a patch that replaces an array. Keep
71
+ the expected revision corresponding to that read.
72
+
73
+ `.accrete/contracts/input-drafts.schema.json` documents caller payload shapes, and
74
+ `.accrete/contracts/example-inputs.json` maps these files to its definitions. They
75
+ are not required at runtime. They do not describe the persisted document envelope,
76
+ allocate identities, prove that a checkout exists, establish scientific completeness,
77
+ or grade the research. Unknown project extension fields remain allowed. The CLI
78
+ supplies mechanical validation and actual publication behavior.
@@ -0,0 +1,19 @@
1
+ {
2
+ "name": "selected-output",
3
+ "description": "Describe the selected completed product and its intended use.",
4
+ "content": {
5
+ "kind": "directory",
6
+ "mode": "closed"
7
+ },
8
+ "origin": {
9
+ "description": "Describe the producer, extraction, or provider of this material."
10
+ },
11
+ "locations": [
12
+ {
13
+ "name": "producer-output",
14
+ "kind": "filesystem",
15
+ "path": "REPLACE_WITH_EXISTING_OUTPUT_PATH",
16
+ "managed": false
17
+ }
18
+ ]
19
+ }
@@ -0,0 +1,5 @@
1
+ {
2
+ "outcome": "retained_separately",
3
+ "summary": "Replace with the actual outcome and any useful reason for retaining this line of work.",
4
+ "commits": []
5
+ }
@@ -0,0 +1,8 @@
1
+ {
2
+ "name": "numerical-investigation",
3
+ "purpose": "Describe the question or implementation change this effort develops.",
4
+ "branch": "numerical-investigation",
5
+ "worktree": "REPLACE_WITH_NEW_WORKTREE_PATH",
6
+ "start": "HEAD",
7
+ "existing": false
8
+ }
@@ -0,0 +1,10 @@
1
+ # Understanding to retain
2
+
3
+ Replace this text with complete understanding that later work should use.
4
+ Explain the relevant observation or decision, why it matters, the scope of the
5
+ interpretation, and any useful continuation. Link the actual objects through
6
+ the append flags and readable prose where appropriate.
7
+
8
+ Choose the structure and language that fit the subject. A correction can name
9
+ the earlier interpretation and explain what changed. Do not add Kernel-owned
10
+ frontmatter or allocate a publication filename in this draft.
@@ -0,0 +1,7 @@
1
+ {
2
+ "name": "simulation-model",
3
+ "description": "Describe the computational program developed or used by this project.",
4
+ "repository": {
5
+ "checkout": "REPLACE_WITH_EXISTING_CHECKOUT"
6
+ }
7
+ }
@@ -0,0 +1,9 @@
1
+ # Observation
2
+
3
+ Replace this text with the independent observation to append. State what was
4
+ observed, when or under which conditions that matters, and the concrete material
5
+ needed to understand it. Include units or comparison definitions when useful.
6
+
7
+ Use ordinary prose suited to the activity. The observation can describe partial
8
+ progress, a failure, an additional measurement, or useful context; no fixed
9
+ outcome or section structure is required.
@@ -0,0 +1,5 @@
1
+ {
2
+ "execution": {
3
+ "description": "Replace with the intended corrected or additional execution description."
4
+ }
5
+ }
@@ -0,0 +1,11 @@
1
+ {
2
+ "name": "short-activity-label",
3
+ "activity": "Describe the actual activity to retain.",
4
+ "models": [],
5
+ "tools": [],
6
+ "inputs": [],
7
+ "outputs": [],
8
+ "execution": {},
9
+ "observations": [],
10
+ "related_results": []
11
+ }
@@ -0,0 +1,8 @@
1
+ {
2
+ "name": "diagnostic-method",
3
+ "description": "Describe the useful capability and the context in which to use it.",
4
+ "source": {
5
+ "path": "REPLACE_WITH_EXISTING_TOOL_SOURCE",
6
+ "mode": "live"
7
+ }
8
+ }
@@ -0,0 +1,3 @@
1
+ {
2
+ "reason": "Describe why this Tool should leave normal discovery."
3
+ }
@@ -0,0 +1,3 @@
1
+ {
2
+ "description": "Replace with the intended revised capability description."
3
+ }
@@ -0,0 +1,17 @@
1
+ # accrete:begin
2
+ AGENTS.md text eol=lf
3
+ CLAUDE.md text eol=lf
4
+ .accrete/*.md text eol=lf
5
+ .accrete/*.toml text eol=lf
6
+ .accrete/docs/** text eol=lf
7
+ .accrete/config-examples/** text eol=lf
8
+ .accrete/contracts/** text eol=lf
9
+ .accrete/examples/** text eol=lf
10
+ .accrete/release.json text eol=lf
11
+ .accrete/template-install.json text eol=lf
12
+ # Base and candidate digests cover their exact bytes on every checkout.
13
+ .accrete/template-bases/** -text
14
+ .accrete/template-upgrades/** -text
15
+ .agents/skills/accrete-*/** text eol=lf
16
+ .claude/skills/accrete-*/** text eol=lf
17
+ # accrete:end