@dna113p/machines 0.1.0 → 0.3.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.
- package/README.md +120 -4
- package/claude/statusline.mjs +244 -0
- package/dist/examples/agy.d.ts +1 -0
- package/dist/examples/agy.js +30 -0
- package/dist/examples/chatgpt-web.d.ts +1 -0
- package/dist/examples/chatgpt-web.js +36 -0
- package/dist/examples/claude.d.ts +1 -0
- package/dist/examples/claude.js +30 -0
- package/dist/examples/codex.d.ts +1 -0
- package/dist/examples/codex.js +30 -0
- package/dist/examples/decision.d.ts +1 -0
- package/dist/examples/decision.js +66 -0
- package/dist/examples/deepseek.d.ts +1 -0
- package/dist/examples/deepseek.js +27 -0
- package/dist/mcp/server.d.ts +1 -0
- package/dist/mcp/server.js +72 -10
- package/dist/pi-extension/index.js +16 -9
- package/dist/src/acp.js +4 -41
- package/dist/src/agent-bindings.d.ts +6 -0
- package/dist/src/agent-bindings.js +35 -5
- package/dist/src/agent-limit.d.ts +25 -0
- package/dist/src/agent-limit.js +34 -0
- package/dist/src/agent-limits.d.ts +37 -0
- package/dist/src/agent-limits.js +212 -0
- package/dist/src/agent-protocol.d.ts +6 -0
- package/dist/src/agent-protocol.js +40 -0
- package/dist/src/agy.d.ts +11 -0
- package/dist/src/agy.js +168 -0
- package/dist/src/catalog.d.ts +3 -0
- package/dist/src/catalog.js +94 -12
- package/dist/src/chatgpt-web.d.ts +143 -0
- package/dist/src/chatgpt-web.js +946 -0
- package/dist/src/claude.d.ts +35 -0
- package/dist/src/claude.js +294 -0
- package/dist/src/cli.js +194 -16
- package/dist/src/codex.d.ts +16 -0
- package/dist/src/codex.js +176 -0
- package/dist/src/conversation.d.ts +74 -0
- package/dist/src/conversation.js +46 -0
- package/dist/src/coordinator-guidance.d.ts +3 -0
- package/dist/src/coordinator-guidance.js +17 -0
- package/dist/src/decision.d.ts +29 -0
- package/dist/src/decision.js +67 -0
- package/dist/src/deepseek.d.ts +12 -0
- package/dist/src/deepseek.js +16 -0
- package/dist/src/host.d.ts +3 -0
- package/dist/src/host.js +68 -7
- package/dist/src/index.d.ts +39 -2
- package/dist/src/index.js +62 -5
- package/dist/src/jev.d.ts +15 -0
- package/dist/src/jev.js +90 -0
- package/dist/src/json.d.ts +6 -0
- package/dist/src/json.js +28 -0
- package/dist/src/launcher.d.ts +11 -1
- package/dist/src/launcher.js +72 -3
- package/dist/src/laya.d.ts +15 -0
- package/dist/src/laya.js +13 -0
- package/dist/src/openrouter.d.ts +16 -0
- package/dist/src/openrouter.js +97 -0
- package/dist/src/run-inbox.d.ts +49 -0
- package/dist/src/run-inbox.js +229 -0
- package/dist/src/run-status.d.ts +97 -0
- package/dist/src/run-status.js +285 -0
- package/dist/src/session.d.ts +13 -0
- package/dist/src/session.js +41 -3
- package/dist/src/system-one-http.d.ts +25 -0
- package/dist/src/system-one-http.js +146 -0
- package/dist/src/terminal-human.d.ts +8 -1
- package/dist/src/terminal-human.js +36 -8
- package/dist/src/von.d.ts +15 -0
- package/dist/src/von.js +13 -0
- package/docs/architecture.md +69 -2
- package/docs/authoring.md +849 -2
- package/docs/integrations.md +243 -3
- package/docs/local-decisions.md +212 -0
- package/package.json +23 -4
- package/services/laya/server.py +230 -0
- package/skills/machine-builder/SKILL.md +56 -6
- package/skills/machine-delegation/SKILL.md +123 -0
- package/skills/machine-delegation/references/delegation-machine.md +90 -0
- package/skills/machine-project-setup/SKILL.md +181 -0
- package/skills/machine-project-setup/references/project-workflows.md +50 -0
|
@@ -0,0 +1,181 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: machine-project-setup
|
|
3
|
+
description: Use proactively when acting as the project orchestrator to set up or refresh project-specific Machines for its major work. Inspect the project and the available Agents with their evidence, build and verify useful workflows, and establish delegation routes before distributing work. Use for project onboarding or meaningful coverage gaps, not every task or an already-assigned worker state.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Machine project setup
|
|
7
|
+
|
|
8
|
+
The project orchestrator owns this setup: the agent coordinating the project's
|
|
9
|
+
work and delegating assignments, not a particular model or a new runtime service.
|
|
10
|
+
Prepare the workflows that make delegation useful instead of asking each worker
|
|
11
|
+
to rediscover the process. Use this skill on project onboarding, when asked to set
|
|
12
|
+
up its workflows, or when a changed project or repeated task exposes a meaningful
|
|
13
|
+
gap. Read existing setup first; do not repeat a full setup on every task or session.
|
|
14
|
+
If already executing a Machine Agent state, complete that assignment directly,
|
|
15
|
+
unless the owner explicitly assigned this bounded setup itself.
|
|
16
|
+
|
|
17
|
+
This is an implementation skill, not a proposal-only checklist. Within the
|
|
18
|
+
requested project scope, choose, create, or adapt the Machines that support the
|
|
19
|
+
major work as you judge useful; the user need not enumerate them or approve each
|
|
20
|
+
local definition. Do not stop after listing opportunities when safe implementation
|
|
21
|
+
is possible. A good result is a small working set and a clear route into it, not
|
|
22
|
+
the largest catalog. Keep simple tasks direct.
|
|
23
|
+
|
|
24
|
+
## Understand the project before choosing workflows
|
|
25
|
+
|
|
26
|
+
Read its instruction files, architecture and entry points, package/build scripts,
|
|
27
|
+
tests, CI, and relevant current work. Identify its main responsibilities and task
|
|
28
|
+
types, quality gates, recurring failure modes, and decisions needing a Human.
|
|
29
|
+
Include domain-specific work, not just generic coding stages. Use only relevant,
|
|
30
|
+
available project context; distinguish observed needs from speculative ones.
|
|
31
|
+
|
|
32
|
+
Inspect the existing orchestrator instructions and any `.machines/README.md`.
|
|
33
|
+
Run `machine list` and `machine agents` in the actual work directories, or use
|
|
34
|
+
`machine_list` / `machine_agents` with the correct workspace. Read candidate
|
|
35
|
+
sources and their input, effects, results, and tests. Discovery imports trusted
|
|
36
|
+
code and `ready` means metadata/bindings, not a tested or authenticated harness.
|
|
37
|
+
Use [Integrations](../../docs/integrations.md) for a missing launcher; do not
|
|
38
|
+
invent preset names, installed tools, or model access.
|
|
39
|
+
|
|
40
|
+
Respect independent repository boundaries. The nearest `.machines/` directory
|
|
41
|
+
shadows ancestor project catalogs, so check each launch directory. A new child
|
|
42
|
+
catalog can hide inherited Machines; preserve needed routes with explicit paths
|
|
43
|
+
or existing project conventions. Put project policy with its owning project,
|
|
44
|
+
not automatically in the runtime, the umbrella, or a global installation.
|
|
45
|
+
|
|
46
|
+
## Survey the available Agents before designing workflows
|
|
47
|
+
|
|
48
|
+
Do this before choosing states, roles, or bindings. The orchestrator's own model
|
|
49
|
+
and harness are one candidate, not the default answer for every role. A setup
|
|
50
|
+
that binds each role to whatever is running it has skipped this step.
|
|
51
|
+
|
|
52
|
+
List every preset from `machine agents` in each launch directory, built in and
|
|
53
|
+
configured. For each, establish from its source and documentation, not its name:
|
|
54
|
+
the harness and provider, the model and effort it actually selects, whether it
|
|
55
|
+
can edit or is sandboxed read-only, how it handles permission prompts, whose
|
|
56
|
+
plan or credentials it spends, and whether it is installed and signed in here.
|
|
57
|
+
A cheap local probe such as `--version` or a login-status command is enough;
|
|
58
|
+
do not spend model calls to find out. Ask the user about subscriptions or
|
|
59
|
+
harnesses the listing cannot reveal instead of assuming only the visible ones.
|
|
60
|
+
|
|
61
|
+
Then look for evidence of what each candidate is good at. Search the project and
|
|
62
|
+
its workspace for evaluation results, ranking snapshots, research priors, and
|
|
63
|
+
routing notes: for example a Machine Wars checkout's exported rankings and its
|
|
64
|
+
`docs/` research files, or the project's own records of earlier runs. Read the
|
|
65
|
+
scores per task type (implementation, terminal work, frontend, architecture,
|
|
66
|
+
debugging, review, cheap bounded steps), not one overall number, and read each
|
|
67
|
+
file's own statement of what it measures. Rank the complete configuration of
|
|
68
|
+
model, harness, and effort: a score for one effort level or harness does not
|
|
69
|
+
transfer to another.
|
|
70
|
+
|
|
71
|
+
Weigh evidence by its kind and say which kind you used:
|
|
72
|
+
|
|
73
|
+
- Trials on this project's own tasks outrank everything else.
|
|
74
|
+
- Local ranking snapshots that pass their own freshness and coverage gates come next.
|
|
75
|
+
- Research priors and public benchmarks are starting hypotheses. Treat small gaps
|
|
76
|
+
and low-confidence entries as ties, and honor a file that marks itself
|
|
77
|
+
ineligible for automatic routing: it may inform a choice a person can review,
|
|
78
|
+
never an unattended selection.
|
|
79
|
+
- No evidence is a finding. Record the role as unranked and choose on capability
|
|
80
|
+
and cost; do not invent a score or cite a general reputation as measurement.
|
|
81
|
+
|
|
82
|
+
A candidate missing from the evidence is unrated, not weak, and a preset the
|
|
83
|
+
evidence favors but that is not installed or authorized is a recorded gap, not a
|
|
84
|
+
binding. Do not run paid evaluations to fill gaps unless the user asks for that.
|
|
85
|
+
|
|
86
|
+
Let the survey shape the workflows, not only the bindings. Put the strongest
|
|
87
|
+
available candidate for each task type in the matching role, keeping cost and
|
|
88
|
+
plan limits visible. Prefer a reviewer from a different provider or model family
|
|
89
|
+
than the author when one is available, and a truly sandboxed preset for read-only
|
|
90
|
+
roles. Where several strong, dissimilar candidates exist, consider independent
|
|
91
|
+
parallel review, a bounded challenge-and-rebuttal exchange, or escalation from a
|
|
92
|
+
cheap candidate to a stronger one on failure; the Machine, not a model, decides
|
|
93
|
+
when such an exchange ends. Where only one candidate exists, say so in the map
|
|
94
|
+
instead of presenting same-model review as independent.
|
|
95
|
+
|
|
96
|
+
## Build the smallest useful set
|
|
97
|
+
|
|
98
|
+
When the Machine Shop starter library is available, inspect its `docs/catalog.md`
|
|
99
|
+
and candidate `defaults/` sources before rebuilding a common software process.
|
|
100
|
+
Select or adapt relevant entries with the project-local installer; do not install
|
|
101
|
+
the entire catalog by default. Its check commands, Agent bindings, and task inputs
|
|
102
|
+
remain project-specific. Do not assume that library is globally installed.
|
|
103
|
+
|
|
104
|
+
Map the major work to existing or missing workflows. Favor frequent delegation,
|
|
105
|
+
important quality gates, and costly recurring mistakes. Reuse good definitions;
|
|
106
|
+
parameterize variants rather than creating one Machine per ticket or directory.
|
|
107
|
+
Possible sequences include implement -> check -> review, reproduce -> diagnose ->
|
|
108
|
+
repair -> regression check, domain artifact generation -> validation, or preparing
|
|
109
|
+
a release candidate -> checks -> Human decision. These are examples, not a fixed menu.
|
|
110
|
+
Do not install a generic suite unrelated to what this project actually does.
|
|
111
|
+
|
|
112
|
+
Use [machine-builder](../machine-builder/SKILL.md) and
|
|
113
|
+
[Authoring Machines](../../docs/authoring.md) to create or adapt project-local
|
|
114
|
+
`.machines/*.ts` definitions and focused tests. Choose the states and roles from
|
|
115
|
+
the work, including explicit failure/blocked outcomes and bounded repair loops.
|
|
116
|
+
Prefer Operations for mechanical checks and Agents for judgment. Required checks
|
|
117
|
+
must gate success; an Agent's completion claim is not verification. Preserve Human
|
|
118
|
+
approval boundaries and let the Machine own its transitions.
|
|
119
|
+
|
|
120
|
+
Give each workflow an input contract, launch directory, allowed effects, expected
|
|
121
|
+
final states, and useful JSON output or unique result artifacts. Workers need a
|
|
122
|
+
complete assignment, not this conversation. Use semantic roles and discovered
|
|
123
|
+
presets; keep harness/model selection separate from workflow policy. Do not mask
|
|
124
|
+
missing real bindings by installing fake presets into the project's live catalog.
|
|
125
|
+
Tests may inject fake runners in isolated fixtures. Prevent overlapping writes
|
|
126
|
+
when future delegation will run concurrently.
|
|
127
|
+
|
|
128
|
+
Creating definitions does not authorize executing the project's backlog, paid
|
|
129
|
+
model calls, commits, merges, publishing, production changes, service startup,
|
|
130
|
+
global installation, or expanded permissions. Preserve the user's actual scope
|
|
131
|
+
and budget. Add a Human decision where execution needs one; never manufacture its
|
|
132
|
+
answer. No usable harness or unsafe execution is a concrete blocker, not a reason
|
|
133
|
+
to pretend readiness. Implement and test the safe parts, then identify the gap.
|
|
134
|
+
|
|
135
|
+
## Give the orchestrator a delegation map
|
|
136
|
+
|
|
137
|
+
Maintain a compact `.machines/README.md` (or the project's existing equivalent)
|
|
138
|
+
using the [workflow map reference](references/project-workflows.md). Record which
|
|
139
|
+
major work uses which Machine, the exact launch directory and input, role bindings,
|
|
140
|
+
verification/results, and effects requiring approval. For each binding, record
|
|
141
|
+
the candidates considered, the evidence and its kind and date, and unrated or
|
|
142
|
+
unavailable alternatives, so a later setup can revisit the choice when evidence changes. Mark deliberately direct,
|
|
143
|
+
deferred, or blocked work with reasons rather than inventing placeholder Machines.
|
|
144
|
+
Keep durable routing facts here; keep private per-run evidence out of source control.
|
|
145
|
+
The map is documentation, not a runtime registry or a second workflow engine.
|
|
146
|
+
|
|
147
|
+
Add a short route to that map and this skill in the existing project orchestrator's
|
|
148
|
+
instructions. When there is no separate orchestrator prompt, add a role-specific
|
|
149
|
+
section to the project's `AGENTS.md` and reuse the existing host instruction entry
|
|
150
|
+
points. Preserve unrelated guidance and host configuration. Make the skill actually
|
|
151
|
+
reachable through the project's established skill-installation route; resolve
|
|
152
|
+
symlinked source directories before following relative documentation links. Do not
|
|
153
|
+
edit global agent settings or install duplicate extensions as incidental setup.
|
|
154
|
+
|
|
155
|
+
For normal assignments, the orchestrator consults the map, validates the selected
|
|
156
|
+
Machine's current contract, and uses
|
|
157
|
+
[machine-delegation](../machine-delegation/SKILL.md) to launch and supervise it.
|
|
158
|
+
Workers execute their bounded state; they do not bootstrap the project again.
|
|
159
|
+
If no route fits, the orchestrator may build a task-specific Machine and promote
|
|
160
|
+
it into the map once useful. Update only affected workflows when requirements or
|
|
161
|
+
checks change, instead of rescaffolding everything.
|
|
162
|
+
|
|
163
|
+
## Verify and hand off
|
|
164
|
+
|
|
165
|
+
Verify discovery from intended launch directories and resolve all packaged/linked
|
|
166
|
+
skill entry points. Run focused tests through the real runtime using fake runners,
|
|
167
|
+
injected Human responses, and temporary workspaces. Exercise success, failing
|
|
168
|
+
checks, blocked results, invalid input, and bounded retry/escalation where present;
|
|
169
|
+
prove a failed required check cannot become success. Confirm result retrieval.
|
|
170
|
+
Run a relevant no-model workflow for real when safe, and inspect its final state
|
|
171
|
+
and evidence. Never launch a paid agent solely to demonstrate setup.
|
|
172
|
+
|
|
173
|
+
Report created/reused workflows, the Agents surveyed and the evidence behind each
|
|
174
|
+
role binding, the routing-map location, verification commands and results, and
|
|
175
|
+
concrete unconfigured or untested paths. Distinguish authored,
|
|
176
|
+
discoverable/bound, fixture-tested, and live-verified; fixture tests are not live-agent proof.
|
|
177
|
+
Do not label a workflow ready for unattended execution just because it is listed.
|
|
178
|
+
On a second setup, preserve existing decisions and edits, update only demonstrated
|
|
179
|
+
gaps, and reuse passing checks; do not create duplicate definitions or instructions.
|
|
180
|
+
New Agent presets, harnesses, or evaluation evidence are such a gap: repeat the
|
|
181
|
+
survey and revisit the affected bindings.
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
# Project workflow map
|
|
2
|
+
|
|
3
|
+
Use this shape for `.machines/README.md`, adapting it to the project's actual
|
|
4
|
+
responsibilities. This is a routing guide, not a required set of Machines or a
|
|
5
|
+
runtime registry. See [machine-project-setup](../SKILL.md) and
|
|
6
|
+
[Authoring Machines](../../../docs/authoring.md).
|
|
7
|
+
|
|
8
|
+
## Routing information
|
|
9
|
+
|
|
10
|
+
Name the project scope and orchestrator owner. Describe the actual launcher
|
|
11
|
+
route and launch directories, including child catalogs that shadow their parent.
|
|
12
|
+
Use portable project-relative paths in committed documentation.
|
|
13
|
+
|
|
14
|
+
For each major task type, record:
|
|
15
|
+
|
|
16
|
+
- Exact Machine name/source, its trigger, input, launch directory, and role bindings.
|
|
17
|
+
- For each binding: the candidates surveyed, the evidence used (own trials, ranking
|
|
18
|
+
snapshot, research prior, or none), its date, and unrated or unavailable options.
|
|
19
|
+
- Expected final state, checks, result retrieval, and verification command.
|
|
20
|
+
- Allowed effects, Human decisions, retry limits, and untested prerequisites.
|
|
21
|
+
|
|
22
|
+
Mark deliberately direct, deferred, or blocked work with its reason. An existing
|
|
23
|
+
setup may need no new Machine. Do not generate placeholders to fill categories.
|
|
24
|
+
Include copyable invocations only for routes that exist. CLI positional input is
|
|
25
|
+
text; `--input-file <file|->` accepts JSON, as do MCP/Pi inputs. Resolve presets
|
|
26
|
+
from `machine agents`; discovery does not establish harness authentication.
|
|
27
|
+
A completed run ending in `blocked` is not a successful assignment.
|
|
28
|
+
|
|
29
|
+
Distinguish discovery, deterministic fixture proof, and live-agent execution.
|
|
30
|
+
Keep private receipts and transcripts out of Git. Record stable validation
|
|
31
|
+
commands and unresolved decisions without inventing approvals or successful runs.
|
|
32
|
+
|
|
33
|
+
## Orchestrator entry point
|
|
34
|
+
|
|
35
|
+
Add a short role-specific instruction to the existing orchestrator guidance:
|
|
36
|
+
read the map before delegation; use `machine-project-setup` for first setup or
|
|
37
|
+
meaningful gaps; use `machine-delegation` for normal assignments. Already-assigned
|
|
38
|
+
workers execute their bounded state instead of repeating project setup. Preserve
|
|
39
|
+
existing task scope, permissions, budgets, and Human decisions.
|
|
40
|
+
|
|
41
|
+
Use the project's existing skill-discovery route and verify that its source
|
|
42
|
+
resolves. Copied skills need their referenced sibling skills and documentation.
|
|
43
|
+
See [Integrations](../../../docs/integrations.md) for package/plugin routes.
|
|
44
|
+
|
|
45
|
+
## Maintenance
|
|
46
|
+
|
|
47
|
+
When a check, contract, or recurring task changes, update only the affected
|
|
48
|
+
Machine, tests, and route. Reuse good existing coverage instead of rebuilding a
|
|
49
|
+
suite each session. Check callers before retiring a route and preserve concurrent
|
|
50
|
+
work. Report implemented/reused workflows, validation evidence, and concrete gaps.
|