@awebai/pi 0.1.11 → 0.1.13
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/package.json
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: aweb-bootstrap
|
|
3
|
-
description: This skill should be used when helping a human create
|
|
3
|
+
description: This skill should be used when helping a human create or join an aweb team from a template (aw team bootstrap), choosing a template and team source (hosted new team, BYOT, API key, invite, or current workspace forwarding), selecting work-directory vs work-repo-url, provisioning optional worktree agents, and validating/re-running bootstrap safely.
|
|
4
4
|
allowed-tools: "Bash(aw *)"
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
# aweb Bootstrap
|
|
8
8
|
|
|
9
|
-
Use this skill when a human wants to create
|
|
9
|
+
Use this skill when a human wants to create or extend an aweb team from a reusable template, and you need to guide them through `aw team bootstrap` decisions and validation.
|
|
10
10
|
|
|
11
|
-
This skill is about **decision policy + safe execution**, not memorizing flags.
|
|
11
|
+
This skill is about **mental model + decision policy + safe execution**, not memorizing flags.
|
|
12
12
|
|
|
13
13
|
Related skills:
|
|
14
14
|
|
|
@@ -18,13 +18,48 @@ Related skills:
|
|
|
18
18
|
|
|
19
19
|
Long-form reference: docs/team-bootstrap.md in the aweb repo.
|
|
20
20
|
|
|
21
|
+
## Mental model: what bootstrap is assembling
|
|
22
|
+
|
|
23
|
+
`aw team bootstrap` combines four separate things that are easy to confuse:
|
|
24
|
+
|
|
25
|
+
1) Template repo — the blueprint.
|
|
26
|
+
|
|
27
|
+
- Contains `team.yaml`, role playbooks, shared instructions, and `agents/<responsibility>/AGENTS.md` files.
|
|
28
|
+
- The template says what responsibilities should exist and which `role_name` each should use.
|
|
29
|
+
|
|
30
|
+
2) Work directory or work repo — the thing agents work on.
|
|
31
|
+
|
|
32
|
+
- `--work-directory` points at an existing folder.
|
|
33
|
+
- `--work-repo-url` clones a repo into `<template>/worktrees/<derived-name>/` and uses that clone as the work directory.
|
|
34
|
+
- Each responsibility workspace gets this directory symlinked as `./work`.
|
|
35
|
+
|
|
36
|
+
3) Team source — the authority/context the generated agents join.
|
|
37
|
+
|
|
38
|
+
- Hosted new team, existing hosted team via `AWEB_API_KEY`, explicit `--invite-token`, current workspace forwarding, or BYOT.
|
|
39
|
+
- Exactly one explicit source is allowed. If no explicit source is set and cwd is already an aw workspace, bootstrap forwards that current team. If no current workspace exists and the run is interactive, bootstrap creates a hosted team. Non-interactive runs need an explicit source.
|
|
40
|
+
|
|
41
|
+
4) Generated workspaces — the identities that will act.
|
|
42
|
+
|
|
43
|
+
- Each `agents/<responsibility>/` directory becomes an aw workspace with its own identity and team certificate.
|
|
44
|
+
- The **first generated plan** is the anchor: bootstrap connects it first, installs roles/instructions from that workspace's team context, then invites/connects the rest.
|
|
45
|
+
- Do not assume a responsibility named `implementation` is special. The anchor is the first plan the CLI generated.
|
|
46
|
+
|
|
47
|
+
Aweb team source terms:
|
|
48
|
+
|
|
49
|
+
- Hosted new team: aweb.ai creates/hosts the team.
|
|
50
|
+
- API key: joins the hosted team represented by `AWEB_API_KEY`; `--aweb-url`/`AWEB_URL` is optional and defaults to hosted aweb.ai.
|
|
51
|
+
- Invite token: first generated workspace accepts an existing invite.
|
|
52
|
+
- Current workspace forwarding: caller cwd already has `.aw`; bootstrap creates a one-use invite from that active team.
|
|
53
|
+
- BYOT: bring your own team. This includes bringing your own domain/namespace and controller key. Do not describe a separate domain-only bootstrap mode.
|
|
54
|
+
|
|
21
55
|
## Bootstrap vs join (first decision)
|
|
22
56
|
|
|
23
57
|
Bootstrap when:
|
|
24
58
|
|
|
25
|
-
- You are creating a brand-new team
|
|
59
|
+
- You are creating a brand-new team from a template.
|
|
60
|
+
- You are extending an existing team with a template-defined set of agent workspaces, roles, and instructions.
|
|
26
61
|
- You want reproducible setup for multiple agents/workspaces.
|
|
27
|
-
- You want a “one command
|
|
62
|
+
- You want a “one command resolves the team source + installs roles + provisions agent dirs” flow.
|
|
28
63
|
|
|
29
64
|
Do NOT bootstrap when:
|
|
30
65
|
|
|
@@ -79,31 +114,64 @@ B) --work-repo-url VALUE
|
|
|
79
114
|
|
|
80
115
|
If both flags are set, treat it as a user error and stop.
|
|
81
116
|
|
|
82
|
-
##
|
|
117
|
+
## Team source policy
|
|
118
|
+
|
|
119
|
+
Non-dry-run bootstrap needs one coherent team source. This is the most important decision: it determines which team owns the roles, instructions, tasks, mail, chat, and membership certificates created during bootstrap.
|
|
120
|
+
|
|
121
|
+
Resolution order:
|
|
83
122
|
|
|
84
|
-
|
|
123
|
+
- If any explicit source is set (`AWEB_API_KEY`, `--invite-token`, `--username`, or `--namespace/--team`), do not set another explicit source.
|
|
124
|
+
- If no explicit source is set and cwd is an initialized aw workspace, bootstrap forwards the current active team.
|
|
125
|
+
- If no explicit source is set, cwd is not an aw workspace, and the run is interactive, bootstrap creates/uses a hosted team through onboarding prompts.
|
|
126
|
+
- If no source can be resolved, stop and ask the human which team source to use.
|
|
85
127
|
|
|
86
|
-
|
|
128
|
+
The first generated agent workspace is the anchor: bootstrap connects it first, installs roles/instructions from that workspace's team context, then invites/connects the remaining agents and any declared worktree agents.
|
|
129
|
+
|
|
130
|
+
Supported sources:
|
|
131
|
+
|
|
132
|
+
1) Hosted new team (aweb.ai)
|
|
87
133
|
|
|
88
134
|
- Best for first-time teams.
|
|
89
|
-
-
|
|
135
|
+
- Use `--username <name>` or run interactively in a TTY.
|
|
136
|
+
- Bootstrap uses the same hosted onboarding path as `aw init` for the first generated workspace.
|
|
137
|
+
|
|
138
|
+
2) Existing hosted team via API key
|
|
139
|
+
|
|
140
|
+
- If `AWEB_API_KEY` is set, bootstrap joins the API key's hosted team.
|
|
141
|
+
- `--aweb-url`/`AWEB_URL` is optional; when omitted, the hosted aweb.ai default is used. Set it only to target a non-default stack.
|
|
142
|
+
- Do not also pass `--username`, `--invite-token`, or BYOT flags.
|
|
143
|
+
|
|
144
|
+
3) Existing team via invite token
|
|
145
|
+
|
|
146
|
+
- Pass `--invite-token <token>`.
|
|
147
|
+
- Bootstrap accepts it into the first generated workspace, then creates further invites from that established team context.
|
|
148
|
+
|
|
149
|
+
4) Current workspace forwarding
|
|
150
|
+
|
|
151
|
+
- If the caller's cwd is already initialized for aw and no explicit source is set, bootstrap creates a one-use invite from the current active team and accepts it into the first generated workspace.
|
|
152
|
+
- This is the safe default for adding a template team shape to the team you are already using.
|
|
90
153
|
|
|
91
|
-
|
|
154
|
+
5) BYOT (bring your own team)
|
|
92
155
|
|
|
93
|
-
- Use when the team
|
|
94
|
-
-
|
|
156
|
+
- Use `--namespace <domain> --team <slug>` when the team's namespace/domain and controller key live in your environment.
|
|
157
|
+
- BYOT includes bringing your own domain; there is no separate supported domain-only bootstrap mode.
|
|
158
|
+
- Bootstrap creates/ensures the team in that namespace, invites the first generated workspace, then uses it as the anchor.
|
|
95
159
|
|
|
96
|
-
|
|
160
|
+
Decision recipe:
|
|
97
161
|
|
|
98
|
-
-
|
|
99
|
-
-
|
|
100
|
-
-
|
|
162
|
+
- Human says “make me a new team” and has no existing aw context: use hosted (`--username` or interactive prompt).
|
|
163
|
+
- Human has a dashboard/API key: use `AWEB_API_KEY=... aw team bootstrap ...`; do not ask for `AWEB_URL` unless they are using a non-default stack.
|
|
164
|
+
- Human pasted an invite: use `--invite-token`.
|
|
165
|
+
- Human is already inside the team workspace that should own the new agents: use current workspace forwarding (no explicit source).
|
|
166
|
+
- Human controls a namespace/domain and wants the team under that namespace: use BYOT (`--namespace` + `--team`).
|
|
101
167
|
|
|
102
168
|
Policy guidance:
|
|
103
169
|
|
|
104
170
|
- Prefer hosted for “get a working team now”.
|
|
105
|
-
- Prefer
|
|
106
|
-
- Prefer
|
|
171
|
+
- Prefer API key or invite when the team already exists but the caller is not already inside it.
|
|
172
|
+
- Prefer current workspace forwarding when you are already inside the target team.
|
|
173
|
+
- Prefer BYOT when you need local control over the team namespace/domain and routing.
|
|
174
|
+
- Use `--dry-run` for planning only. It prints the resolved plan (template ref, work directory, team source, generated workspaces) without writing identities, files, or server state. Do not pair it with side-effecting flags expecting partial provisioning.
|
|
107
175
|
|
|
108
176
|
## Worktree agents (team.yaml worktrees:)
|
|
109
177
|
|
|
@@ -4,6 +4,21 @@ This reference is support material for the aweb-bootstrap skill. Use it when you
|
|
|
4
4
|
|
|
5
5
|
It is intentionally narrower than docs/team-bootstrap.md: it focuses on common decision points and failure modes.
|
|
6
6
|
|
|
7
|
+
## Quick mental model
|
|
8
|
+
|
|
9
|
+
- Template repo = blueprint for roles, instructions, and responsibility directories.
|
|
10
|
+
- Work directory/repo = the project/content agents see as `./work`.
|
|
11
|
+
- Team source = the authority the generated agents join.
|
|
12
|
+
- First generated workspace = bootstrap anchor. It connects first; roles/instructions install through it; all other generated agents join through invites from that established team context.
|
|
13
|
+
- BYOT means bring your own team, including your own namespace/domain and controller key. Do not present a separate domain-only bootstrap mode.
|
|
14
|
+
|
|
15
|
+
Team-source precedence:
|
|
16
|
+
|
|
17
|
+
- Explicit sources conflict: use only one of `AWEB_API_KEY`, `--invite-token`, `--username`, or `--namespace/--team`.
|
|
18
|
+
- With no explicit source, an initialized caller cwd forwards its current active team.
|
|
19
|
+
- With no explicit source and no caller workspace, an interactive run uses hosted onboarding.
|
|
20
|
+
- Non-interactive runs need an explicit source or initialized caller workspace.
|
|
21
|
+
|
|
7
22
|
## Scenario: first-time hosted team from a template (recommended)
|
|
8
23
|
|
|
9
24
|
Goal: create a new aweb.ai team and provision agent workspaces from a template.
|
|
@@ -32,14 +47,15 @@ Notes:
|
|
|
32
47
|
|
|
33
48
|
where derived-name is the git-style repo directory name (basename with .git stripped).
|
|
34
49
|
|
|
35
|
-
## Scenario: BYOT (your own
|
|
50
|
+
## Scenario: BYOT (bring your own team)
|
|
36
51
|
|
|
37
|
-
Goal: bootstrap a team under a namespace you control.
|
|
52
|
+
Goal: bootstrap a team under a namespace/domain you control.
|
|
38
53
|
|
|
39
54
|
Checklist:
|
|
40
55
|
|
|
41
|
-
- Confirm you have a controller identity key for the namespace.
|
|
42
|
-
-
|
|
56
|
+
- Confirm you have a controller identity key for the namespace/domain.
|
|
57
|
+
- Remember BYOT includes bringing your own domain; there is no separate supported domain-only bootstrap mode.
|
|
58
|
+
- Bootstrap will connect the first generated workspace, install roles/instructions there, then invite/connect the remaining agents.
|
|
43
59
|
|
|
44
60
|
Example shape (values are placeholders):
|
|
45
61
|
|
|
@@ -54,14 +70,44 @@ If you are also self-hosting the coordination stack, add:
|
|
|
54
70
|
--aweb-url http://localhost:8000
|
|
55
71
|
--registry http://localhost:8010
|
|
56
72
|
|
|
57
|
-
## Scenario:
|
|
73
|
+
## Scenario: existing hosted team via API key
|
|
74
|
+
|
|
75
|
+
Goal: provision a template into the hosted team associated with an API key.
|
|
76
|
+
|
|
77
|
+
Checklist:
|
|
78
|
+
|
|
79
|
+
- Set AWEB_API_KEY.
|
|
80
|
+
- Optionally set AWEB_URL or pass --aweb-url to target a non-default stack; otherwise the hosted default is used.
|
|
81
|
+
- Do not also pass --username, --invite-token, or BYOT flags.
|
|
82
|
+
|
|
83
|
+
Example:
|
|
84
|
+
|
|
85
|
+
AWEB_API_KEY=aw_sk_... \
|
|
86
|
+
aw team bootstrap /path/to/template --work-directory /path/to/work
|
|
87
|
+
|
|
88
|
+
## Scenario: existing team via invite token
|
|
89
|
+
|
|
90
|
+
Goal: accept an invite into the first generated workspace and use it as the anchor for the rest of bootstrap.
|
|
91
|
+
|
|
92
|
+
Example:
|
|
93
|
+
|
|
94
|
+
aw team bootstrap /path/to/template \
|
|
95
|
+
--invite-token <token> \
|
|
96
|
+
--work-directory /path/to/work
|
|
97
|
+
|
|
98
|
+
## Scenario: current workspace forwarding
|
|
58
99
|
|
|
59
|
-
Goal:
|
|
100
|
+
Goal: run bootstrap from an existing aw workspace and forward that active team into the generated template workspaces.
|
|
60
101
|
|
|
61
102
|
Checklist:
|
|
62
103
|
|
|
63
|
-
-
|
|
64
|
-
-
|
|
104
|
+
- Confirm `aw workspace status` succeeds in the caller cwd.
|
|
105
|
+
- Do not pass another explicit team source.
|
|
106
|
+
- Bootstrap will create a one-use invite from the current active team for the first generated workspace.
|
|
107
|
+
|
|
108
|
+
## Scenario: dry-run planning
|
|
109
|
+
|
|
110
|
+
Goal: validate the plan and see generated workspace commands without changing files, identities, or server state.
|
|
65
111
|
|
|
66
112
|
Example:
|
|
67
113
|
|
|
@@ -51,7 +51,7 @@ Addressability and delivery authorization are separate:
|
|
|
51
51
|
- `did:aw` is identity binding, not a first-contact delivery route.
|
|
52
52
|
- `inbound_mode=open|team_and_contacts` controls delivery after route validation.
|
|
53
53
|
- `team_and_contacts` accepts verified same-team senders plus exact active identity contacts for trusted non-team senders. Contacts do not create routes or resolver visibility.
|
|
54
|
-
-
|
|
54
|
+
- Reachability fields that appear in support or migration output are compatibility/audit state, not live delivery authority.
|
|
55
55
|
- `aw contacts ...` manages saved contact relationships.
|
|
56
56
|
- `aw id namespace resolve <domain>/<alias> --json` performs a workspace-free directory lookup.
|
|
57
57
|
|