@orchestraworks/cli 0.5.2 → 0.5.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/cli/api/compute-provider-check.d.ts +29 -0
- package/dist/cli/api/compute-provider-check.js +207 -0
- package/dist/cli/api/tail.d.ts +66 -0
- package/dist/cli/api/tail.js +564 -0
- package/dist/cli/main.d.ts +5 -1
- package/dist/cli/main.js +22 -0
- package/dist/constructs/agent.d.ts +10 -0
- package/dist/constructs/agent.js +39 -4
- package/dist/constructs/environment.d.ts +29 -1
- package/dist/constructs/environment.js +28 -1
- package/dist/constructs/skill.d.ts +6 -1
- package/dist/constructs/skill.js +21 -2
- package/dist/engine/reconcile.js +15 -1
- package/dist/generated/cli-commands.json +842 -0
- package/dist/generated/managed-skills.d.ts +2 -0
- package/dist/generated/managed-skills.js +13 -0
- package/dist/index.d.ts +1 -1
- package/docs/REFERENCE.md +21 -1
- package/node_modules/@orchestraworks/client/dist/esm/models/ComputeProvider.d.ts +3 -3
- package/node_modules/@orchestraworks/client/dist/esm/models/CreateEnvironmentRequest.d.ts +13 -0
- package/node_modules/@orchestraworks/client/dist/esm/models/CreateEnvironmentRequest.js +5 -0
- package/node_modules/@orchestraworks/client/dist/esm/models/Environment.d.ts +13 -0
- package/node_modules/@orchestraworks/client/dist/esm/models/Environment.js +5 -0
- package/node_modules/@orchestraworks/client/dist/esm/models/EnvironmentHook.d.ts +38 -0
- package/node_modules/@orchestraworks/client/dist/esm/models/EnvironmentHook.js +45 -0
- package/node_modules/@orchestraworks/client/dist/esm/models/EnvironmentHooks.d.ts +39 -0
- package/node_modules/@orchestraworks/client/dist/esm/models/EnvironmentHooks.js +44 -0
- package/node_modules/@orchestraworks/client/dist/esm/models/EnvironmentHooksRequest.d.ts +39 -0
- package/node_modules/@orchestraworks/client/dist/esm/models/EnvironmentHooksRequest.js +44 -0
- package/node_modules/@orchestraworks/client/dist/esm/models/EnvironmentProvisionSpec.d.ts +2 -1
- package/node_modules/@orchestraworks/client/dist/esm/models/EnvironmentProvisionSpecRequest.d.ts +2 -1
- package/node_modules/@orchestraworks/client/dist/esm/models/EnvironmentSnapshot.d.ts +19 -0
- package/node_modules/@orchestraworks/client/dist/esm/models/EnvironmentSnapshot.js +7 -0
- package/node_modules/@orchestraworks/client/dist/esm/models/Machine.d.ts +7 -1
- package/node_modules/@orchestraworks/client/dist/esm/models/Machine.js +2 -0
- package/node_modules/@orchestraworks/client/dist/esm/models/UpdateEnvironmentRequest.d.ts +13 -0
- package/node_modules/@orchestraworks/client/dist/esm/models/UpdateEnvironmentRequest.js +5 -0
- package/node_modules/@orchestraworks/client/dist/esm/models/index.d.ts +3 -0
- package/node_modules/@orchestraworks/client/dist/esm/models/index.js +3 -0
- package/node_modules/@orchestraworks/client/dist/models/ComputeProvider.d.ts +3 -3
- package/node_modules/@orchestraworks/client/dist/models/CreateEnvironmentRequest.d.ts +13 -0
- package/node_modules/@orchestraworks/client/dist/models/CreateEnvironmentRequest.js +5 -0
- package/node_modules/@orchestraworks/client/dist/models/Environment.d.ts +13 -0
- package/node_modules/@orchestraworks/client/dist/models/Environment.js +5 -0
- package/node_modules/@orchestraworks/client/dist/models/EnvironmentHook.d.ts +38 -0
- package/node_modules/@orchestraworks/client/dist/models/EnvironmentHook.js +52 -0
- package/node_modules/@orchestraworks/client/dist/models/EnvironmentHooks.d.ts +39 -0
- package/node_modules/@orchestraworks/client/dist/models/EnvironmentHooks.js +51 -0
- package/node_modules/@orchestraworks/client/dist/models/EnvironmentHooksRequest.d.ts +39 -0
- package/node_modules/@orchestraworks/client/dist/models/EnvironmentHooksRequest.js +51 -0
- package/node_modules/@orchestraworks/client/dist/models/EnvironmentProvisionSpec.d.ts +2 -1
- package/node_modules/@orchestraworks/client/dist/models/EnvironmentProvisionSpecRequest.d.ts +2 -1
- package/node_modules/@orchestraworks/client/dist/models/EnvironmentSnapshot.d.ts +19 -0
- package/node_modules/@orchestraworks/client/dist/models/EnvironmentSnapshot.js +7 -0
- package/node_modules/@orchestraworks/client/dist/models/Machine.d.ts +7 -1
- package/node_modules/@orchestraworks/client/dist/models/Machine.js +2 -0
- package/node_modules/@orchestraworks/client/dist/models/UpdateEnvironmentRequest.d.ts +13 -0
- package/node_modules/@orchestraworks/client/dist/models/UpdateEnvironmentRequest.js +5 -0
- package/node_modules/@orchestraworks/client/dist/models/index.d.ts +3 -0
- package/node_modules/@orchestraworks/client/dist/models/index.js +3 -0
- package/node_modules/@orchestraworks/client/package.json +1 -1
- package/package.json +4 -4
- package/skills/orchestra/SKILL.md +167 -42
- package/skills/orchestra-fdk/SKILL.md +112 -545
- package/skills/orchestra-fdk/references/authoring.md +29 -2
- package/skills/orchestra-fdk/references/environment.md +295 -41
- package/skills/orchestra-fdk/references/integrations/analytics.md +18 -0
- package/skills/orchestra-fdk/references/integrations/ci-cd.md +20 -0
- package/skills/orchestra-fdk/references/integrations/cloud.md +19 -0
- package/skills/orchestra-fdk/references/integrations/code-repo.md +76 -0
- package/skills/orchestra-fdk/references/integrations/databases.md +22 -0
- package/skills/orchestra-fdk/references/integrations/dependencies.md +29 -0
- package/skills/orchestra-fdk/references/integrations/design.md +18 -0
- package/skills/orchestra-fdk/references/integrations/feature-flags.md +19 -0
- package/skills/orchestra-fdk/references/integrations/incident.md +29 -0
- package/skills/orchestra-fdk/references/integrations/issue-tracker.md +65 -0
- package/skills/orchestra-fdk/references/integrations/knowledge-base.md +43 -0
- package/skills/orchestra-fdk/references/integrations/messaging.md +38 -0
- package/skills/orchestra-fdk/references/integrations/observability.md +36 -0
- package/skills/orchestra-fdk/references/integrations/secrets-managers.md +25 -0
- package/skills/orchestra-fdk/references/integrations/support-desk.md +31 -0
- package/skills/orchestra-fdk/references/phases/0-start.md +62 -0
- package/skills/orchestra-fdk/references/phases/1-discover.md +111 -0
- package/skills/orchestra-fdk/references/phases/2-plan.md +157 -0
- package/skills/orchestra-fdk/references/phases/3-connect.md +99 -0
- package/skills/orchestra-fdk/references/phases/4-build.md +159 -0
- package/skills/orchestra-fdk/references/phases/5-prove.md +107 -0
- package/skills/orchestra-fdk/references/phases/6-handover.md +42 -0
- package/skills/orchestra-fdk/references/troubleshooting.md +128 -0
- package/templates/bug-fix/agents/bugfix.md +1 -1
- package/templates/bug-fix/main.ts +1 -1
- package/templates/engineering-team/README.md +45 -181
- package/templates/engineering-team/agents/engineer-agent.md +10 -7
- package/templates/engineering-team/agents/manager-agent.md +23 -120
- package/templates/engineering-team/inputs.json +1 -3
- package/templates/engineering-team/lib/environment.ts +10 -90
- package/templates/engineering-team/lib/inputs.ts +5 -97
- package/templates/engineering-team/main.ts +22 -69
- package/templates/todo-factory/agents/bugfix.md +1 -1
- package/templates/todo-factory/main.ts +1 -1
- package/templates/engineering-team/agents/engineer-bare.md +0 -22
- package/templates/engineering-team/onboarding/create-score-metrics.sh +0 -33
|
@@ -1,561 +1,128 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: orchestra-fdk
|
|
3
|
-
description: Use when building and applying an Orchestra factory with the factory development kit for a developer's codebase -
|
|
3
|
+
description: Use when building and applying an Orchestra factory with the factory development kit for a developer's codebase - a playbook of seven phases (start, discover, plan, connect, build, prove, hand over), each with a goal, its steps and an exit check, plus one file per integration category (code host, tracker, knowledge base, chat, package registries, CI, observability, support desk, design, cloud, databases, secrets managers, incidents, analytics, feature flags) that says how to give the agents access. Reads the orchestra skill for the platform's ideas, references/environment.md for the machines and references/troubleshooting.md when a check fails.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Build and apply an Orchestra factory
|
|
7
7
|
|
|
8
|
-
You build and apply an Orchestra factory for the developer you
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
**
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
- Globally, with `npm install -g @orchestraworks/cli`. Update it with `npm update -g @orchestraworks/cli`.
|
|
108
|
-
Then `orchestra` runs in any folder.
|
|
109
|
-
- In the factory folder, with `npm install @orchestraworks/cli` there. Update it with
|
|
110
|
-
`npm update @orchestraworks/cli`, run in that folder. Run the command there as `npx orchestra`.
|
|
111
|
-
|
|
112
|
-
Use one way to run the command in each place:
|
|
113
|
-
|
|
114
|
-
- Where no factory folder with the kit exists yet (steps 2 to 4), run
|
|
115
|
-
`npx --package @orchestraworks/cli orchestra`. With a global install, plain `orchestra` works too.
|
|
116
|
-
- In a factory folder after its `npm install`, run `npx orchestra`.
|
|
117
|
-
|
|
118
|
-
1. Find the developer's codebase folder. Call it `<codebase>`.
|
|
119
|
-
2. Run `npx --package @orchestraworks/cli orchestra --help`.
|
|
120
|
-
|
|
121
|
-
**Check:** the help prints the command list, and `fdk init --help` lists `--template`. Node 22 or later is
|
|
122
|
-
needed.
|
|
123
|
-
|
|
124
|
-
The kit's full authoring reference is `references/authoring.md` in this skill's folder. Read it when you need
|
|
125
|
-
a building block this skill does not cover.
|
|
126
|
-
|
|
127
|
-
### 2. Sign in
|
|
128
|
-
|
|
129
|
-
1. Tell the developer: "A browser window will open. Sign in to Orchestra there and confirm."
|
|
130
|
-
2. Run `npx --package @orchestraworks/cli orchestra auth login`, with a command timeout of at least five
|
|
131
|
-
minutes. The CLI opens the browser
|
|
132
|
-
and waits for the answer on a local port of this computer, so the browser must run on this same
|
|
133
|
-
computer. When the developer belongs to one organization, the login selects it. When they belong to
|
|
134
|
-
several, the login stops and asks you to name one. Ask the developer which, then run:
|
|
135
|
-
|
|
136
|
-
```bash
|
|
137
|
-
npx --package @orchestraworks/cli orchestra auth login --org <organization>
|
|
138
|
-
```
|
|
139
|
-
|
|
140
|
-
This sign-in renews itself, so a long run stays signed in. The address it signs in to is its first line.
|
|
141
|
-
3. Use this browser sign-in. `orchestra auth login --no-browser` asks for a token at a hidden prompt
|
|
142
|
-
instead, and a typed token cannot renew itself: it stops working when it expires. Use it only for a short
|
|
143
|
-
run, with a token someone hands the developer. Users cannot create their own API keys in the console
|
|
144
|
-
yet; that is coming. If no browser can open on this computer, tell the developer, and ask them to run
|
|
145
|
-
you on a computer where one can.
|
|
146
|
-
4. Read the two lines the login prints: `Signed in as <email>.` and
|
|
147
|
-
`Logged in to organization <id> (<slug>).` Tell the developer both. Note the organization id.
|
|
148
|
-
|
|
149
|
-
**Check:** the login printed the developer's email and the organization the developer named.
|
|
150
|
-
|
|
151
|
-
### 3. Look before you ask: a new factory or a new environment
|
|
152
|
-
|
|
153
|
-
An organization usually holds one factory, or none yet. Read what it holds before you ask the developer
|
|
154
|
-
anything. These commands only read. `--all-pages` follows every page, and prints the rows as one array:
|
|
8
|
+
You build and apply an Orchestra factory for the developer you work with, with the factory development kit.
|
|
9
|
+
A *factory* is a team of AI agents, the machines they work on, the keys they use, and the pipelines their
|
|
10
|
+
work moves through. You run every command. The developer answers questions and approves changes.
|
|
11
|
+
|
|
12
|
+
The work has seven phases. Do them in order, apart from phase 3 on a first run (below). Each phase has a
|
|
13
|
+
file in `references/phases/` with its full steps. Read the file before you start the phase. A phase ends with
|
|
14
|
+
an exit check. Do not start the next phase until the check passes.
|
|
15
|
+
|
|
16
|
+
The first run needs no optional integration. The starter applies and runs with only the model route, and you
|
|
17
|
+
create the first work by hand. So on a first run, phase 3 connects only what the build needs, such as a
|
|
18
|
+
private package feed: phase 5 cannot install the code without it. When the build needs nothing private, skip
|
|
19
|
+
phase 3. The code host, the tracker and the other services wait until phase 5 passes.
|
|
20
|
+
|
|
21
|
+
The `orchestra` skill explains every idea named here and what the platform cannot do yet. When a phase file
|
|
22
|
+
says "orchestra skill, section N", read that section of `orchestra/SKILL.md` in your skill folder. The CLI's
|
|
23
|
+
own help lists every command and flag: `orchestra --help` and `orchestra <noun> <verb> --help`.
|
|
24
|
+
|
|
25
|
+
## Rules
|
|
26
|
+
|
|
27
|
+
- **Look before you ask, and ask once.** Read the account, the codebase and the files first. Then ask the
|
|
28
|
+
developer only what they cannot answer, in one question with your question tool (`AskUserQuestion` in
|
|
29
|
+
Claude Code, its counterpart in Codex). Put your inference first, marked as the recommendation.
|
|
30
|
+
- **State each change with its reason before every apply.** Say what changes on the platform and why, in
|
|
31
|
+
plain words.
|
|
32
|
+
- **Never take a token through chat. Tokens come from files.** The developer writes each token into a
|
|
33
|
+
private file. You load the file into the command's shell and never print it.
|
|
34
|
+
- **Stop at a failed exit check.** Go to `references/troubleshooting.md`, find the cause, and fix it before
|
|
35
|
+
you go on.
|
|
36
|
+
- **No apply without a reviewed diff and the developer's yes.** Show `fdk diff` first. Only after the
|
|
37
|
+
developer approves that change list, run the apply with `--require-approval never`. Never use that flag, or
|
|
38
|
+
any other flag that skips the approval, before the yes.
|
|
39
|
+
|
|
40
|
+
## The phases
|
|
41
|
+
|
|
42
|
+
### 0. Start
|
|
43
|
+
|
|
44
|
+
**Goal:** the kit is installed, you are signed in, and you know the platform.
|
|
45
|
+
**Steps:** install or update the kit, sign in through the browser, confirm the organization, and read the
|
|
46
|
+
`orchestra` skill in full.
|
|
47
|
+
**Exit:** `orchestra me get --output json` shows the developer's email, the saved profile names the
|
|
48
|
+
confirmed organization id, and you have read the `orchestra` skill.
|
|
49
|
+
**File:** `references/phases/0-start.md`.
|
|
50
|
+
|
|
51
|
+
### 1. Discover
|
|
52
|
+
|
|
53
|
+
**Goal:** you know what to build.
|
|
54
|
+
**Steps:** read the account (a new factory, or a new environment for an existing one), read the repository,
|
|
55
|
+
and name the integration category and the provider of each service it needs.
|
|
56
|
+
**Exit:** a written finding in `orchestra-factory-notes.md`.
|
|
57
|
+
**File:** `references/phases/1-discover.md`.
|
|
58
|
+
|
|
59
|
+
### 2. Plan
|
|
60
|
+
|
|
61
|
+
**Goal:** the developer approves what you will build.
|
|
62
|
+
**Steps:** adapt the starter to the finding, the environment first, and choose the model route. Show the
|
|
63
|
+
agents table and the working environment table, each change with its reason.
|
|
64
|
+
**Exit:** the developer said yes.
|
|
65
|
+
**File:** `references/phases/2-plan.md`.
|
|
66
|
+
|
|
67
|
+
### 3. Connect (the build's feeds first, the rest after the first run)
|
|
68
|
+
|
|
69
|
+
**Goal:** the agents can reach each service the developer chose to connect. On a first run, that is only what
|
|
70
|
+
the build needs, such as a private package feed.
|
|
71
|
+
**Steps:** give access to the code host, the tracker and each other service found in phase 1, from its file
|
|
72
|
+
in `references/integrations/`: the access rule, and a trigger where events should make work.
|
|
73
|
+
**Exit:** every service the developer chose to connect has its access (a Secret, an env value or a platform
|
|
74
|
+
connection), and egress is open. On a first run, each feed's token is in the token file, and phase 4 checks
|
|
75
|
+
the access after its apply.
|
|
76
|
+
**File:** `references/phases/3-connect.md`.
|
|
77
|
+
|
|
78
|
+
### 4. Build
|
|
79
|
+
|
|
80
|
+
**Goal:** the platform matches the plan.
|
|
81
|
+
**Steps:** `fdk init`, edit, `fdk synth`, prove the machine locally, `fdk synth` again, `fdk diff`, the
|
|
82
|
+
developer's yes, then `fdk apply`. On a first run, the apply carries only the model route and
|
|
83
|
+
any private package feed the build needs.
|
|
84
|
+
**Exit:** a clean apply, and the platform lists every agent and environment.
|
|
85
|
+
**File:** `references/phases/4-build.md`.
|
|
86
|
+
|
|
87
|
+
### 5. Prove
|
|
88
|
+
|
|
89
|
+
**Goal:** the customer's app runs on an agent's machine, and one real item goes end to end.
|
|
90
|
+
**Steps:** a machine starts, gets the code from a git bundle or a public clone, and installs it. The app
|
|
91
|
+
builds, runs and is reachable at a machine endpoint or a machine view. Then one small real item, created by
|
|
92
|
+
hand, goes end to end.
|
|
93
|
+
**Exit:** the app is reachable, and the first item's report page exists.
|
|
94
|
+
**File:** `references/phases/5-prove.md`.
|
|
95
|
+
|
|
96
|
+
### 6. Hand over
|
|
97
|
+
|
|
98
|
+
**Goal:** the developer can run the factory without you.
|
|
99
|
+
**Steps:** show how to send work, where to watch it, where cost is shown, and what to do next.
|
|
100
|
+
**Exit:** the developer has sent, or knows how to send, the next item.
|
|
101
|
+
**File:** `references/phases/6-handover.md`.
|
|
102
|
+
|
|
103
|
+
## Look first
|
|
104
|
+
|
|
105
|
+
Phase 1 starts with these reads. They change nothing:
|
|
155
106
|
|
|
156
107
|
```bash
|
|
157
108
|
npx --package @orchestraworks/cli orchestra agents list --all-pages --output json
|
|
158
109
|
npx --package @orchestraworks/cli orchestra environments list --all-pages --output json
|
|
159
|
-
npx --package @orchestraworks/cli orchestra pipelines list --all-pages --output json
|
|
160
|
-
npx --package @orchestraworks/cli orchestra workflows list --all-pages --output json
|
|
161
110
|
```
|
|
162
111
|
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
1. Infer what the developer most likely wants:
|
|
166
|
-
- *No agents and no pipelines:* the account is empty. Infer **a new factory**.
|
|
167
|
-
- *Rows labeled with a factory name:* a factory exists. Infer **a new environment for that factory**,
|
|
168
|
-
such as another repository, a bigger machine, or a machine of the team's own.
|
|
169
|
-
- *Rows with no label:* someone made them by hand or with the CLI. Infer a new factory. If a row's slug
|
|
170
|
-
is one the starter declares, such as `manager-agent`, the apply updates that row: say so before step 7.
|
|
171
|
-
2. Tell the developer what you found, in one or two sentences, for example: "This organization already has
|
|
172
|
-
the factory `factory`, with the agents Manager Agent, Engineer Agent lg, md, sm and bare."
|
|
173
|
-
3. Ask once, with your question tool, with the inferred choice first and marked as the recommendation.
|
|
174
|
-
Then follow the branch below for the answer.
|
|
175
|
-
|
|
176
|
-
**A new factory.** Go on with step 4, or with the bug-fix fast path.
|
|
177
|
-
|
|
178
|
-
The starters build one factory per organization. When the organization already holds a factory and the
|
|
179
|
-
developer wants another one, make a separate organization for it:
|
|
180
|
-
|
|
181
|
-
1. Create it: `npx --package @orchestraworks/cli orchestra organizations create --name "<name>"`. Read
|
|
182
|
-
`organizations create --help` for its other flags. When the command refuses, the developer creates the
|
|
183
|
-
organization in the console at `https://app.orchestraworks.ai`.
|
|
184
|
-
2. Sign in to it as step 2 says, with `--org <the new organization>`.
|
|
185
|
-
3. Start again at step 3, in the new organization.
|
|
186
|
-
|
|
187
|
-
**A new environment for the existing factory.** Do not run `orchestra fdk init`. Edit the factory that
|
|
188
|
-
exists instead:
|
|
189
|
-
|
|
190
|
-
1. Find the existing factory's folder: the folder with `fdk.json` and `main.ts`. Ask the developer where it
|
|
191
|
-
is when it is not on this computer.
|
|
192
|
-
2. Load the factory's inputs, the same way every earlier apply loaded them. The engineering-team starter
|
|
193
|
-
reads `~/.config/orchestra/tokens.env`; the bug-fix starter reads `~/.config/orchestra/fdk-inputs.env`.
|
|
194
|
-
Load the file with `set -a; . <file>; set +a`, and never print it. Ask the developer when the file is
|
|
195
|
-
not there. An apply without these inputs removes the token rules the factory has now.
|
|
196
|
-
3. With the inputs loaded, run `npm install` and `npx orchestra fdk diff` in that folder. It must be a clean
|
|
197
|
-
diff before you edit anything. If it is not, show the changes to the developer and ask what to keep.
|
|
198
|
-
4. Add the environment, and the agent that works on it:
|
|
199
|
-
- Engineering-team starter: call `declareEnvironment` in `main.ts`, as the existing agents do.
|
|
200
|
-
- Bug-fix starter: add a `new Environment(factory, "<name>", …)` beside `runtime` in `main.ts`, and an
|
|
201
|
-
`Agent` on it.
|
|
202
|
-
5. Prove the new environment with `references/environment.md`, sections 1 to 6, then come back here. Prove
|
|
203
|
-
the environment and the agent you added, not the existing ones.
|
|
204
|
-
6. Apply as step 12 says, with the inputs loaded: diff, explain, approve, apply. The diff after it is clean.
|
|
205
|
-
7. Give the new agent its first work, and wait for it. Engineering-team starter: create an item in the
|
|
206
|
-
right pipeline and assign it to the new agent, as step 10 does, then wait as step 10 says. Bug-fix
|
|
207
|
-
starter: start a session with the new agent and wait, as the fast path's points 7 to 9 say.
|
|
208
|
-
|
|
209
|
-
**Check:** the developer confirmed one of the two choices.
|
|
210
|
-
|
|
211
|
-
### 4. Write the factory
|
|
212
|
-
|
|
213
|
-
Ask one question, with these three choices:
|
|
214
|
-
|
|
215
|
-
- **A todo app sample.** A small public app, for a quick first success.
|
|
216
|
-
- **An engineering team (your real repository).** Recommended.
|
|
217
|
-
- **I already have a factory.ts.**
|
|
218
|
-
|
|
219
|
-
What each answer does:
|
|
220
|
-
|
|
221
|
-
- *Engineering team:* go on below. This starter connects Bitbucket and Jira only. For a GitHub repository,
|
|
222
|
-
take the bug-fix fast path instead.
|
|
223
|
-
- *Todo app sample:* write it as below, with `--template todo-factory` in point 2. It works on the public
|
|
224
|
-
`orchestraworks/todo-app`. Then go on with step 5.
|
|
225
|
-
- *I already have a factory.ts:* copy their folder into `<factory>` (below). It needs `fdk.json` and a
|
|
226
|
-
`"type": "module"` package. Install the kit in it as in point 3, then go on with step 5, using their
|
|
227
|
-
own inputs.
|
|
228
|
-
|
|
229
|
-
For the engineering team:
|
|
230
|
-
|
|
231
|
-
1. Make a new, empty folder beside the codebase: `<codebase>/../orchestra-factory`. Call it `<factory>`.
|
|
232
|
-
Do not install the kit in it before point 2.
|
|
233
|
-
2. In `<factory>`, write the starter:
|
|
234
|
-
|
|
235
|
-
```bash
|
|
236
|
-
npx --package @orchestraworks/cli orchestra fdk init --template engineering-team
|
|
237
|
-
```
|
|
238
|
-
|
|
239
|
-
Run it in the new, empty folder, with no kit installed there: the starter brings its own
|
|
240
|
-
`package.json`.
|
|
241
|
-
|
|
242
|
-
It writes `README.md`, `main.ts`, `inputs.json`, `package.json`, `fdk.json`, `tsconfig.json`,
|
|
243
|
-
`agents/`, `lib/` and `onboarding/`. It overwrites nothing. If a file is in the way, it writes nothing
|
|
244
|
-
and names it.
|
|
245
|
-
3. In `<factory>`, install what the starter's `package.json` names, the kit among them:
|
|
246
|
-
|
|
247
|
-
```bash
|
|
248
|
-
npm install
|
|
249
|
-
```
|
|
250
|
-
|
|
251
|
-
From now on, run `npx orchestra` in `<factory>`.
|
|
252
|
-
4. Read `<factory>/README.md` whole. It says what the starter declares, and why.
|
|
253
|
-
5. Leave `inputs.json` empty for now. Step 11 fills it in.
|
|
254
|
-
|
|
255
|
-
**Check:** `npm run typecheck` passes in `<factory>`.
|
|
256
|
-
|
|
257
|
-
### 5. Read the plan and explain it
|
|
258
|
-
|
|
259
|
-
Before anything reaches the platform, show the developer what the factory is. Explain it from what the
|
|
260
|
-
code produced, not from memory.
|
|
261
|
-
|
|
262
|
-
1. In `<factory>`, run `npx orchestra fdk synth`. It works offline and changes nothing.
|
|
263
|
-
2. Read `<factory>/fdk.out/plan.json`. Each entry in `resources` has a `kind` (`agent`, `environment`,
|
|
264
|
-
`gateway-key`, `secret`, `pipeline`), a `slug` and a `payload`.
|
|
265
|
-
3. Read `<factory>/fdk.out/warnings.json`.
|
|
266
|
-
4. Explain it to the developer. Explain each idea from its section in the orchestra skill: what it is for
|
|
267
|
-
first, then what it is. Use short, plain sentences. Name no file, no class and no field. Cover the four
|
|
268
|
-
parts below, in this order.
|
|
269
|
-
|
|
270
|
-
**What each kind of thing is, and why it is there.**
|
|
271
|
-
|
|
272
|
-
- *Agents* do the work: orchestra skill, section 2. There are five. The Manager Agent sets up the factory
|
|
273
|
-
and grades the others. The three Engineer Agents (lg, md and sm) fix bugs and build features. Engineer
|
|
274
|
-
Agent bare takes only the Bootstrap's baseline replays, to show what the study adds. Say which AI model
|
|
275
|
-
each one uses.
|
|
276
|
-
- *Environments* are the machines the agents work on: sections 4 and 5. There are four: Engineer Agent bare
|
|
277
|
-
uses the same one as Engineer Agent lg. Say each one's size and its network rules.
|
|
278
|
-
- *Pipelines* are where work items live: sections 9 and 10.
|
|
279
|
-
- *The warning* says the repository and the tracker are not connected yet. Part four explains it.
|
|
280
|
-
|
|
281
|
-
**The gateway key.** The starter's code as written sends every agent's model calls through the model
|
|
282
|
-
gateway, with one gateway key: orchestra skill, section 7. The key is a key to `models.orchestraworks.ai`,
|
|
283
|
-
stored as a secret. Our network edge adds it to each model call, so no agent and no person sees it.
|
|
112
|
+
## Apply
|
|
284
113
|
|
|
285
|
-
|
|
114
|
+
Phase 4 ends with these two, in the factory folder. Run the second only after the developer approved the
|
|
115
|
+
change list the first one printed:
|
|
286
116
|
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|---|---|---|---|
|
|
292
|
-
| Onboarding | `onbd` | Todo, In progress, Needs review, Done | Setting up the factory: Set up, the Bootstrap and every Replay item. It goes away at commissioning. |
|
|
293
|
-
| Bugs | `bug` | Triage, Parked, In progress, In review, Done, Won't fix | Bugs. Parked holds a bug that waits until the Bootstrap passes, or one a person set aside. |
|
|
294
|
-
| Features | `feat` | Backlog, Todo, In progress, In review, Done | New features. |
|
|
295
|
-
| Support | `supp` | Triage, Answering, Waiting on requester, Resolved, Closed | Questions from the team's users. |
|
|
296
|
-
|
|
297
|
-
If the plan differs from this table, show the plan. Say that, for now, an item can move from any stage to
|
|
298
|
-
any other. A person or an agent moves it to where the work stands.
|
|
299
|
-
|
|
300
|
-
**What the warning means.** The repository and the tracker are not connected yet. So this first apply
|
|
301
|
-
adds no Bitbucket or Jira token, and the Manager Agent cannot reach them. It asks for them in Needs review
|
|
302
|
-
until they are connected. A later apply, after the machines are set up and the tokens and inputs are in,
|
|
303
|
-
connects them and the warning goes away.
|
|
304
|
-
|
|
305
|
-
5. Ask the developer, with your question tool, whether they have questions. Answer each one. Then go on.
|
|
306
|
-
|
|
307
|
-
**Check:** the developer has no more questions about the plan.
|
|
308
|
-
|
|
309
|
-
### 6. Choose how the agents reach a model
|
|
310
|
-
|
|
311
|
-
Each agent needs a way to reach its AI model. There are three options, and the developer uses the one that
|
|
312
|
-
matches what they already have. Ask which they have, with your question tool, or infer it from what is set
|
|
313
|
-
up, such as an existing factory's model Secret or `ModelProviderKey`. Then follow that option. For plan
|
|
314
|
-
questions, send the developer to **Settings › Plan & usage** in the console.
|
|
315
|
-
|
|
316
|
-
**A Claude or Codex subscription.** The developer signs in a real terminal on their own computer. Run from
|
|
317
|
-
your shell, its browser step hangs. You never read or copy the value.
|
|
318
|
-
|
|
319
|
-
- *Claude.* `claude setup-token` prints a long-lived token. The developer saves it in the private file
|
|
320
|
-
below, as `ORCHESTRA_FDK_CLAUDE_CODE_OAUTH_TOKEN`. The factory stores it as a Secret, and the network edge
|
|
321
|
-
adds it to calls to `api.anthropic.com`. The machine holds only a placeholder token and an empty API key.
|
|
322
|
-
Declare the Claude sign-in recipe from `references/authoring.md`, "Secrets are recipes, never values".
|
|
323
|
-
Never put the token in the environment's settings: they are stored and shown in plain text.
|
|
324
|
-
- *Codex.* A personal access token, which begins `at-`. A ChatGPT Business or Enterprise member makes it
|
|
325
|
-
at `chatgpt.com/admin/access-tokens`, when the workspace owner allows it. Or a separate ChatGPT sign-in:
|
|
326
|
-
`CODEX_HOME=<dir> codex login`, never a copy of the developer's own `~/.codex` sign-in. A separate
|
|
327
|
-
sign-in must live on a `/home` volume that every machine using it shares, because each renewal
|
|
328
|
-
replaces the sign-in. After the copy, a new `codex login` in `~/.codex` signs the cloud copy out.
|
|
329
|
-
Keep a Codex sign-in off the model gateway: the gateway refuses its requests with `model_not_found`.
|
|
330
|
-
Not released yet: the worker settings that put a Codex sign-in on a machine. Until they are, use the
|
|
331
|
-
model gateway or an OpenAI API key for a `codex` agent.
|
|
332
|
-
|
|
333
|
-
An agent on a subscription turns the model gateway off: remove `enableModelGateway: true` from its model
|
|
334
|
-
settings.
|
|
335
|
-
|
|
336
|
-
**An Orchestra account, through the model gateway.** One endpoint reaches OpenAI, Anthropic and open
|
|
337
|
-
models. The organization can also route models: `orchestra model-configs` sets which providers serve a
|
|
338
|
-
model and in which order, so a call falls back to the next provider, and `orchestra model-aliases` gives a
|
|
339
|
-
model the organization's own name. The organization can add its own provider key to the gateway as a
|
|
340
|
-
`ModelProviderKey` (orchestra skill, section 7). The starter's code as written uses this option, so it
|
|
341
|
-
needs no edit.
|
|
342
|
-
|
|
343
|
-
**Their own provider API key.** The key is a Secret that the network edge adds to calls straight to the
|
|
344
|
-
provider, with no gateway in between. For Anthropic, add `x-api-key: ${secret}` on `api.anthropic.com`;
|
|
345
|
-
for OpenAI, add `authorization: Bearer ${secret}` on `api.openai.com`. Read the key from a shell variable
|
|
346
|
-
such as `ORCHESTRA_FDK_ANTHROPIC_API_KEY`, and turn `enableModelGateway` off for the agent.
|
|
347
|
-
`references/authoring.md` shows the Secret and the rule.
|
|
348
|
-
|
|
349
|
-
For a subscription or an own key, the apply reads the token or key from the shell, so it must be saved
|
|
350
|
-
before step 7:
|
|
351
|
-
|
|
352
|
-
1. Ask the developer to make a file only they can read, outside the codebase:
|
|
353
|
-
|
|
354
|
-
```bash
|
|
355
|
-
mkdir -p ~/.config/orchestra && touch ~/.config/orchestra/tokens.env && chmod 600 ~/.config/orchestra/tokens.env
|
|
356
|
-
```
|
|
357
|
-
|
|
358
|
-
2. Ask them to add one line to it, filled in by them, such as `ORCHESTRA_FDK_CLAUDE_CODE_OAUTH_TOKEN=...`.
|
|
359
|
-
Step 11 adds the Bitbucket and Jira tokens to the same file later.
|
|
360
|
-
3. Load the file into each apply's shell without printing it: `set -a; . ~/.config/orchestra/tokens.env;
|
|
361
|
-
set +a`.
|
|
362
|
-
|
|
363
|
-
Then edit `<factory>/main.ts` and `<factory>/lib/environment.ts`, and run `npm run typecheck` and
|
|
364
|
-
`npx orchestra fdk synth`.
|
|
365
|
-
|
|
366
|
-
**Check:** the developer chose an option, and the plan shows it: a gateway rule for the model gateway, or a
|
|
367
|
-
Secret and a rule on the provider's host for a subscription or an own key. For those two, the file exists
|
|
368
|
-
with mode 600 (`stat`). Do not read its contents.
|
|
369
|
-
|
|
370
|
-
### 7. The first apply (no code host or tracker tokens)
|
|
371
|
-
|
|
372
|
-
`orchestra fdk apply` makes the platform match the code. The developer approves the change list first.
|
|
373
|
-
|
|
374
|
-
1. For a subscription or an own key (step 6), load the token or key from the private file. Use a shell without the
|
|
375
|
-
Bitbucket and Jira tokens: if `ORCHESTRA_FDK_BITBUCKET_TOKEN` or `ORCHESTRA_FDK_JIRA_TOKEN` is set,
|
|
376
|
-
unset it for this step.
|
|
377
|
-
2. In `<factory>`, run `npx orchestra fdk diff`. It changes nothing.
|
|
378
|
-
3. Show the developer the change list in plain words: the five agents, their four machines, the keys and
|
|
379
|
-
their secrets, and the four pipelines.
|
|
380
|
-
4. Ask them to approve it, with your question tool.
|
|
381
|
-
5. On a yes, run `npx orchestra fdk apply --require-approval never` in `<factory>`. The flag is needed
|
|
382
|
-
because your shell has no terminal to type "y" at. It is safe only after the developer approved the
|
|
383
|
-
same change list.
|
|
384
|
-
|
|
385
|
-
An organization on the `individual` plan cannot store a key or add one at the network edge, so this apply
|
|
386
|
-
stops with a plan error. Tell the developer, and point them to **Settings › Plan & usage** in the console.
|
|
387
|
-
|
|
388
|
-
**Check:** a second `npx orchestra fdk diff` is a clean diff, and `<factory>/fdk.out/result.json` exists.
|
|
389
|
-
|
|
390
|
-
### 8. Set up the machines
|
|
391
|
-
|
|
392
|
-
Read and follow `references/environment.md`, in this skill's folder. It finds how the codebase is installed,
|
|
393
|
-
tested and started. It proves that on this computer first, in the local environment, and the cloud is the
|
|
394
|
-
fallback. It writes what worked into `<factory>/lib/environment.ts` and `<factory>/lib/setup.sh`.
|
|
395
|
-
|
|
396
|
-
Then apply the machine setup, in a shell loaded as in step 7: the model token or key of step 6 if there
|
|
397
|
-
is one, and no Bitbucket or Jira token yet.
|
|
398
|
-
|
|
399
|
-
1. In `<factory>`, run `npx orchestra fdk diff`.
|
|
400
|
-
2. Explain what changed, in plain words: the setup script, the settings and the ports.
|
|
401
|
-
Say that each new machine gets them, and that running machines keep their old setup.
|
|
402
|
-
3. Ask the developer to approve it, with your question tool.
|
|
403
|
-
4. On a yes, run `npx orchestra fdk apply --require-approval never` in `<factory>`.
|
|
404
|
-
|
|
405
|
-
**Check:** the checks in `references/environment.md` pass, and a second `npx orchestra fdk diff` is a clean
|
|
406
|
-
diff.
|
|
407
|
-
|
|
408
|
-
### 9. The steps the code cannot declare
|
|
409
|
-
|
|
410
|
-
Do these before Set up starts, in the README's order: the first two steps of "After apply: steps the code
|
|
411
|
-
cannot declare" in `<factory>/README.md`. It holds the exact commands.
|
|
412
|
-
|
|
413
|
-
1. **Grant the Manager Agent the `agent-manager` role**, for the whole organization. The Manager Agent
|
|
414
|
-
works on items in every pipeline, reads the Engineer Agents' sessions, and changes the Engineer Agents.
|
|
415
|
-
An agent starts with only `agent-worker`. The role list you send replaces the old one, so keep every
|
|
416
|
-
entry it has now. Ask the developer to approve: "Give the Manager Agent the agent-manager role in the
|
|
417
|
-
whole organization?" On a yes, send the update with `--require-approval never`.
|
|
418
|
-
2. **Create the score metrics**: `bash onboarding/create-score-metrics.sh`, once, in `<factory>`. The
|
|
419
|
-
Manager Agent writes each replay's scores into them.
|
|
420
|
-
|
|
421
|
-
**Check:** `npx orchestra organization-memberships get <membership id>` lists both roles, and
|
|
422
|
-
`npx orchestra metrics list --output json` lists the five `replay-` metrics.
|
|
423
|
-
|
|
424
|
-
### 10. Set up: run the repository from a bundle
|
|
425
|
-
|
|
426
|
-
The Manager Agent has no access to the code host yet. So it gets the code as a *git bundle*: one file that
|
|
427
|
-
holds the repository's history. This item is also the cloud's confirmation of what you proved on this
|
|
428
|
-
computer.
|
|
429
|
-
|
|
430
|
-
1. Find the default branch: `git -C <codebase> symbolic-ref refs/remotes/origin/HEAD`.
|
|
431
|
-
2. Cut the bundle outside the codebase:
|
|
432
|
-
`git -C <codebase> bundle create <codebase>/../orchestra-setup.bundle <default branch>`.
|
|
433
|
-
3. Upload it: `npx orchestra files create --file <codebase>/../orchestra-setup.bundle --output json`. Note
|
|
434
|
-
the file id.
|
|
435
|
-
4. The kit cannot declare items. Create them in the Onboarding pipeline, in this order:
|
|
436
|
-
|
|
437
|
-
```bash
|
|
438
|
-
npx orchestra work-items create --pipeline onboarding --title "Set up" --description "<what done means>" --output json
|
|
439
|
-
npx orchestra work-items create --pipeline onboarding --title "Bootstrap" --description "<the threshold>" --output json
|
|
440
|
-
```
|
|
441
|
-
|
|
442
|
-
The Set up description says:
|
|
443
|
-
- Get the bundle with `orchestra files get-content <file id> --output-file setup.bundle`, and clone the
|
|
444
|
-
code from it under `/work`.
|
|
445
|
-
- Install with the internet. Then run the stack with local settings only, such as the local Supabase
|
|
446
|
-
stack's. Write those settings files, such as `.env.local`, from what `references/environment.md`
|
|
447
|
-
found.
|
|
448
|
-
- Note in the report any setting or log that names a production or live host, and continue.
|
|
449
|
-
- Stack up: start the whole stack with the project's own scripts, and load its seed data.
|
|
450
|
-
- Validation: call the API and check real answers; for a web UI, sign in as a local test user and do one
|
|
451
|
-
real business operation at the machine endpoint.
|
|
452
|
-
- Tests: then run the unit, functional and end-to-end tests. Report which ran, which could not, and
|
|
453
|
-
whether they match the team's CI.
|
|
454
|
-
- Report each command, its result and its time.
|
|
455
|
-
- Done means the stack is up and validation passes. The tests do not decide Done.
|
|
456
|
-
- Prove that an Engineer Agent can run the tests from the same bundle.
|
|
457
|
-
|
|
458
|
-
The Bootstrap description holds the two values of "The Bootstrap threshold" in `<factory>/README.md`.
|
|
459
|
-
Leave the Bootstrap unassigned in Todo.
|
|
460
|
-
5. Start Set up: `npx orchestra work-items assign <set-up item id> --agent-id manager-agent`. Assigning
|
|
461
|
-
starts the Manager Agent's conversation on the item.
|
|
462
|
-
6. Watch it: `npx orchestra work-items get <id> --output json` lists the item's `sessions`. Run
|
|
463
|
-
`npx orchestra sessions wait <session id> --timeout 540` in the foreground, and run it again when it
|
|
464
|
-
times out, as the fast path says. The developer can watch the same session in the console at
|
|
465
|
-
`https://app.orchestraworks.ai`.
|
|
466
|
-
7. When it ends, read the agent's report with the developer. Fix a failed step in the environment: go back
|
|
467
|
-
to `references/environment.md`, prove the fix on this computer, apply it as in step 8, then assign the
|
|
468
|
-
item again to wake the agent. Note the time before you assign. The session can still show the last
|
|
469
|
-
turn's `COMPLETE`, and then `sessions wait` returns at once. So run
|
|
470
|
-
`npx orchestra sessions get <session id> --output json` first, and wait only once its `lastActiveAt` is
|
|
471
|
-
later than that time.
|
|
472
|
-
|
|
473
|
-
**Check:** the report shows the stack up, validation passing at a machine endpoint, and the test result.
|
|
474
|
-
|
|
475
|
-
### 11. Connect the code and the tracker
|
|
476
|
-
|
|
477
|
-
The agents reach Bitbucket and Jira with two personal API tokens. The platform stores each one as a
|
|
478
|
-
*Secret*, a value the agents never see: the network edge adds it to their requests. You never see the
|
|
479
|
-
values either. Connect the code first, then the tracker.
|
|
480
|
-
|
|
481
|
-
1. Fill in `<factory>/inputs.json`. Read the values from `<codebase>` where you can, and ask for the rest:
|
|
482
|
-
- `repositoryUrl`: the repository's HTTPS address, from `git -C <codebase> remote get-url origin`.
|
|
483
|
-
Write it as `https://bitbucket.org/<workspace>/<repository>`.
|
|
484
|
-
- `repositoryDefaultBranch`: the default branch from step 10.
|
|
485
|
-
- `jiraSite`: the Jira site host, such as `acme.atlassian.net`. Ask.
|
|
486
|
-
- `jiraEmail`: the Atlassian account email the Jira token belongs to. Ask.
|
|
487
|
-
2. Ask the developer to create two tokens:
|
|
488
|
-
- The code: a Bitbucket API token, at `https://id.atlassian.com/manage-profile/security/api-tokens`,
|
|
489
|
-
with the Bitbucket scopes to read and write repositories and pull requests.
|
|
490
|
-
- The tracker: a Jira API token, at the same page, without scopes. A token with scopes works only
|
|
491
|
-
through `api.atlassian.com`, which this starter does not add the token to.
|
|
492
|
-
3. Ask the developer to add both to the private file of step 6. If it does not exist yet, they make it
|
|
493
|
-
first:
|
|
494
|
-
|
|
495
|
-
```bash
|
|
496
|
-
mkdir -p ~/.config/orchestra && touch ~/.config/orchestra/tokens.env && chmod 600 ~/.config/orchestra/tokens.env
|
|
497
|
-
```
|
|
498
|
-
|
|
499
|
-
Then they add these two lines, filled in by them:
|
|
500
|
-
|
|
501
|
-
```
|
|
502
|
-
ORCHESTRA_FDK_BITBUCKET_TOKEN=...
|
|
503
|
-
ORCHESTRA_FDK_JIRA_TOKEN=...
|
|
504
|
-
```
|
|
505
|
-
|
|
506
|
-
4. Load the file into a command's shell without printing it:
|
|
507
|
-
`set -a; . ~/.config/orchestra/tokens.env; set +a`.
|
|
508
|
-
|
|
509
|
-
You may use the same tokens on this computer to read past pull requests and issues. Load the file the same
|
|
510
|
-
way and send `Authorization: Bearer $ORCHESTRA_FDK_BITBUCKET_TOKEN` to `https://api.bitbucket.org/2.0/`.
|
|
511
|
-
For Jira, use Basic auth with `jiraEmail` and `$ORCHESTRA_FDK_JIRA_TOKEN` on
|
|
512
|
-
`https://<jiraSite>/rest/api/3/`. Never print a token, and never write one into a file in `<codebase>` or
|
|
513
|
-
`<factory>`.
|
|
514
|
-
|
|
515
|
-
Other code hosts and trackers connect through a *connection*: orchestra skill, section 17.
|
|
516
|
-
|
|
517
|
-
**Check:** the file exists and has mode 600 (`stat`). Do not read its contents. With the tokens loaded,
|
|
518
|
-
`npx orchestra fdk synth` writes an empty `fdk.out/warnings.json`.
|
|
519
|
-
|
|
520
|
-
### 12. The token apply
|
|
521
|
-
|
|
522
|
-
1. In `<factory>`, with the tokens loaded, run `npx orchestra fdk diff`.
|
|
523
|
-
2. Explain only what changed since step 8, in plain words:
|
|
524
|
-
- *The token secrets.* The Bitbucket token (twice: once for the API, once for git) and the Jira token
|
|
525
|
-
are stored as secrets. No one sees their values.
|
|
526
|
-
- *The Manager Agent's machine.* It gets rules that add the Bitbucket token on `api.bitbucket.org` and
|
|
527
|
-
`bitbucket.org`, and the Jira token on the Jira site. So it can clone, open pull requests and read
|
|
528
|
-
issues.
|
|
529
|
-
- *The Engineer Agents' machines.* They get deny rules for Bitbucket and for the Jira site. Say why:
|
|
530
|
-
in the Bootstrap, the Engineer Agents redo past pull requests, called replays, to show how well they
|
|
531
|
-
work. A replay must not see the real fix. So they cannot reach Bitbucket or Jira until commissioning,
|
|
532
|
-
when they start real work. They get the code as a file the Manager Agent uploads.
|
|
533
|
-
- The Manager Agent's instructions now name the repository and the tracker.
|
|
534
|
-
3. Ask the developer to approve it, with your question tool.
|
|
535
|
-
4. On a yes, run `npx orchestra fdk apply --require-approval never` in `<factory>`, with the tokens loaded.
|
|
536
|
-
|
|
537
|
-
Run every later apply with the tokens loaded. An apply without them takes the token rules off the
|
|
538
|
-
Manager Agent's machine again.
|
|
539
|
-
|
|
540
|
-
**Check:** a second `npx orchestra fdk diff`, with the tokens loaded, is a clean diff.
|
|
541
|
-
|
|
542
|
-
### 13. The Bootstrap
|
|
543
|
-
|
|
544
|
-
The Bootstrap teaches the Engineer Agents this codebase, then tests them on past pull requests they have
|
|
545
|
-
not seen. `<factory>/README.md`, "Bootstrap", says each step and the threshold.
|
|
546
|
-
|
|
547
|
-
1. Once Set up is in Done, assign the Bootstrap:
|
|
548
|
-
`npx orchestra work-items assign <bootstrap item id> --agent-id manager-agent`. Watch it as in step 10.
|
|
549
|
-
2. The Manager Agent creates the Replay items and scores them. It moves the Bootstrap to Done on a pass,
|
|
550
|
-
or to Needs review after two rounds that do not pass. Read its report with the developer.
|
|
551
|
-
|
|
552
|
-
Commissioning comes after a pass: `<factory>/README.md`, "Commissioning".
|
|
553
|
-
|
|
554
|
-
**Check:** the Bootstrap has a session, and the Onboarding pipeline lists its Replay items.
|
|
117
|
+
```bash
|
|
118
|
+
npx orchestra fdk diff
|
|
119
|
+
npx orchestra fdk apply --require-approval never
|
|
120
|
+
```
|
|
555
121
|
|
|
556
|
-
##
|
|
122
|
+
## The other references
|
|
557
123
|
|
|
558
|
-
-
|
|
559
|
-
|
|
560
|
-
-
|
|
561
|
-
|
|
124
|
+
- `references/environment.md`: how to find the codebase's setup, prove it on this computer, and write it into
|
|
125
|
+
the environment.
|
|
126
|
+
- `references/integrations/`: one file per category of service, with how to give the agents access.
|
|
127
|
+
- `references/authoring.md`: the kit's building blocks, for a case the phases do not cover.
|
|
128
|
+
- `references/troubleshooting.md`: what each failure means, and what to do.
|