copilotkit 4.22.0 → 4.23.1
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 +390 -17
- package/cli-build-info.json +8 -8
- package/index.js +52224 -34474
- package/onboarding/index.json +83 -9
- package/onboarding/prompts/authenticate/start.md +44 -34
- package/onboarding/prompts/conversion/plan.md +3 -3
- package/onboarding/prompts/credentials/finalize-plan.md +12 -7
- package/onboarding/prompts/credentials/plan.md +23 -23
- package/onboarding/prompts/credentials/settle-credentials.md +10 -7
- package/onboarding/prompts/credentials/write-plan.md +17 -7
- package/onboarding/prompts/deployment/choose-local.md +46 -0
- package/onboarding/prompts/deployment/local-evaluation.md +71 -0
- package/onboarding/prompts/fallback/best-effort.md +8 -8
- package/onboarding/prompts/feature/a2ui/implement.md +6 -6
- package/onboarding/prompts/feature/a2ui/plan.md +72 -0
- package/onboarding/prompts/feature/a2ui/proof.md +5 -5
- package/onboarding/prompts/feature/a2ui/start.md +11 -32
- package/onboarding/prompts/feature/channels/implement.md +23 -16
- package/onboarding/prompts/feature/channels/plan.md +85 -0
- package/onboarding/prompts/feature/channels/proof.md +5 -5
- package/onboarding/prompts/feature/channels/start.md +14 -41
- package/onboarding/prompts/feature/chat-suggestions/implement.md +6 -6
- package/onboarding/prompts/feature/chat-suggestions/plan.md +71 -0
- package/onboarding/prompts/feature/chat-suggestions/proof.md +5 -5
- package/onboarding/prompts/feature/chat-suggestions/start.md +11 -30
- package/onboarding/prompts/feature/complete.md +2 -2
- package/onboarding/prompts/feature/learning/implement.md +13 -13
- package/onboarding/prompts/feature/learning/plan.md +82 -0
- package/onboarding/prompts/feature/learning/proof.md +6 -6
- package/onboarding/prompts/feature/learning/start.md +11 -40
- package/onboarding/prompts/feature/open-generative-ui/implement.md +6 -6
- package/onboarding/prompts/feature/open-generative-ui/plan.md +70 -0
- package/onboarding/prompts/feature/open-generative-ui/proof.md +5 -5
- package/onboarding/prompts/feature/open-generative-ui/start.md +11 -30
- package/onboarding/prompts/feature/realtime-sync/implement.md +7 -7
- package/onboarding/prompts/feature/realtime-sync/plan.md +75 -0
- package/onboarding/prompts/feature/realtime-sync/proof.md +5 -5
- package/onboarding/prompts/feature/realtime-sync/start.md +10 -33
- package/onboarding/prompts/feature/rich-threads/implement.md +8 -8
- package/onboarding/prompts/feature/rich-threads/plan.md +77 -0
- package/onboarding/prompts/feature/rich-threads/proof.md +5 -5
- package/onboarding/prompts/feature/rich-threads/start.md +10 -35
- package/onboarding/prompts/feature/stop.md +3 -3
- package/onboarding/prompts/feature/voice/implement.md +6 -6
- package/onboarding/prompts/feature/voice/plan.md +74 -0
- package/onboarding/prompts/feature/voice/proof.md +5 -5
- package/onboarding/prompts/feature/voice/start.md +11 -29
- package/onboarding/prompts/framework/ag2.md +2 -2
- package/onboarding/prompts/framework/agno.md +2 -2
- package/onboarding/prompts/framework/built-in.md +2 -2
- package/onboarding/prompts/framework/claude-sdk-python.md +2 -2
- package/onboarding/prompts/framework/claude-sdk-typescript.md +2 -2
- package/onboarding/prompts/framework/crewai-flows.md +2 -2
- package/onboarding/prompts/framework/custom-ag-ui.md +5 -2
- package/onboarding/prompts/framework/deep-agents.md +2 -2
- package/onboarding/prompts/framework/google-adk.md +2 -2
- package/onboarding/prompts/framework/langgraph-fastapi.md +2 -2
- package/onboarding/prompts/framework/langgraph-python.md +2 -2
- package/onboarding/prompts/framework/langgraph-typescript.md +2 -2
- package/onboarding/prompts/framework/llamaindex.md +2 -2
- package/onboarding/prompts/framework/mastra.md +2 -2
- package/onboarding/prompts/framework/ms-agent-dotnet.md +3 -3
- package/onboarding/prompts/framework/ms-agent-harness-dotnet.md +3 -3
- package/onboarding/prompts/framework/ms-agent-python.md +2 -2
- package/onboarding/prompts/framework/pydantic-ai.md +2 -2
- package/onboarding/prompts/framework/strands-python.md +2 -2
- package/onboarding/prompts/framework/strands-typescript.md +2 -2
- package/onboarding/prompts/frontend/angular.md +3 -3
- package/onboarding/prompts/frontend/nextjs.md +3 -3
- package/onboarding/prompts/frontend/plan.md +7 -7
- package/onboarding/prompts/frontend/react-native.md +2 -2
- package/onboarding/prompts/frontend/react-spa.md +2 -2
- package/onboarding/prompts/frontend/vue.md +2 -2
- package/onboarding/prompts/implementation/build-and-validate.md +14 -13
- package/onboarding/prompts/proof/complete.md +3 -3
- package/onboarding/prompts/proof/oss-baseline.md +5 -5
- package/onboarding/prompts/proof/round-trip.md +16 -11
- package/onboarding/prompts/research/gather.md +9 -8
- package/onboarding/prompts/research/merge.md +6 -3
- package/onboarding/prompts/research/preflight.md +2 -2
- package/onboarding/prompts/research/route.md +22 -14
- package/onboarding/prompts/starter/clone.md +5 -5
- package/onboarding/prompts/stopped/run-failed.md +2 -2
- package/onboarding/prompts/subagent/create-plan.md +9 -2
- package/onboarding/prompts/subagent/implement-and-validate.md +34 -2
- package/onboarding/prompts/subagent/inspect-repository.md +1 -1
- package/onboarding/prompts/subagent/prove-oss-baseline.md +1 -1
- package/onboarding/prompts/subagent/prove-round-trip.md +39 -21
- package/onboarding/prompts/unsupported/no-validated-path.md +2 -2
- package/package.json +4 -1
- package/release/release-tool.js +167 -18
- package/services/local-auth-worker.js +21465 -0
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
First, report your coding agent identity using the same command as generic onboarding:
|
|
4
4
|
|
|
5
5
|
```text
|
|
6
|
-
npx --prefer-offline --yes copilotkit@4.
|
|
6
|
+
npx --prefer-offline --yes copilotkit@4.23.1 onboard identify --coding-agent <coding-agent-slug> --model <model-id> --model-family <model-family>
|
|
7
7
|
```
|
|
8
8
|
|
|
9
9
|
Use your own product's slug, such as `codex` or `claude-code`. For `--model`, copy the
|
|
@@ -34,13 +34,13 @@ carry on. Keep a read-only assignment read-only. If no subagent works at all, re
|
|
|
34
34
|
once:
|
|
35
35
|
|
|
36
36
|
```text
|
|
37
|
-
npx --prefer-offline --yes copilotkit@4.
|
|
37
|
+
npx --prefer-offline --yes copilotkit@4.23.1 onboard checkpoint --phase delegation-unavailable
|
|
38
38
|
```
|
|
39
39
|
|
|
40
40
|
Before you end your turn to wait for the developer, report the pause:
|
|
41
41
|
|
|
42
42
|
```text
|
|
43
|
-
npx --prefer-offline --yes copilotkit@4.
|
|
43
|
+
npx --prefer-offline --yes copilotkit@4.23.1 onboard checkpoint --phase awaiting-developer
|
|
44
44
|
```
|
|
45
45
|
|
|
46
46
|
A turn that ends while the run waits is a pause, not a stop, even when your harness ends it.
|
|
@@ -50,7 +50,7 @@ If you stop this run, send one short report before you stop. The friction comman
|
|
|
50
50
|
the telemetry setting the developer already chose, so it needs no separate question.
|
|
51
51
|
|
|
52
52
|
```text
|
|
53
|
-
npx --prefer-offline --yes copilotkit@4.
|
|
53
|
+
npx --prefer-offline --yes copilotkit@4.23.1 onboard friction --phase stop --category <slug> --message "<sentences>"
|
|
54
54
|
```
|
|
55
55
|
|
|
56
56
|
`--message` takes one or two sentences: the step you stopped at and what stopped it.
|
|
@@ -64,7 +64,7 @@ one scoped fix, and sends the report itself when no fix is approved.
|
|
|
64
64
|
Before any subagent or project process runs, capture the developer's existing work:
|
|
65
65
|
|
|
66
66
|
```text
|
|
67
|
-
npx --prefer-offline --yes copilotkit@4.
|
|
67
|
+
npx --prefer-offline --yes copilotkit@4.23.1 onboard protect
|
|
68
68
|
```
|
|
69
69
|
|
|
70
70
|
Keep the exact protected path list it prints and give that list to every subagent. Do not
|
|
@@ -74,9 +74,9 @@ authorization first.
|
|
|
74
74
|
Before changing files, send a short welcome. Say you will inspect the project, show a
|
|
75
75
|
Channel plan, implement only after approval, and prove a real mention reply.
|
|
76
76
|
|
|
77
|
-
Ask Slack or Teams as its own question only when the copied prompt
|
|
78
|
-
|
|
79
|
-
Teams. Do not ask again.
|
|
77
|
+
Ask Slack or Teams as its own question only when neither the copied prompt nor the
|
|
78
|
+
developer already named one. If either named Slack, use Slack. If either named Teams or
|
|
79
|
+
Microsoft Teams, use Teams. Do not ask again.
|
|
80
80
|
|
|
81
81
|
For an empty folder, the OpenTag starter brings its own agent. An agent framework this
|
|
82
82
|
run recorded earlier does not apply here. Say that plainly and do not ask for a framework
|
|
@@ -94,7 +94,7 @@ This one does not.
|
|
|
94
94
|
Wait for the inspection subagent to finish. Then report that the inspection came back:
|
|
95
95
|
|
|
96
96
|
```text
|
|
97
|
-
npx --prefer-offline --yes copilotkit@4.
|
|
97
|
+
npx --prefer-offline --yes copilotkit@4.23.1 onboard checkpoint --phase research-returned
|
|
98
98
|
```
|
|
99
99
|
|
|
100
100
|
If the folder is empty, check Node 22, `uv`, and Python before cloning. Python 3.12 or
|
|
@@ -108,41 +108,14 @@ and its install command in the message the developer sees: `nvm install 22` for
|
|
|
108
108
|
for Python. Offer a custom headless build as a later path. Then route out:
|
|
109
109
|
|
|
110
110
|
```text
|
|
111
|
-
npx --prefer-offline --yes copilotkit@4.
|
|
111
|
+
npx --prefer-offline --yes copilotkit@4.23.1 onboard read feature/stop
|
|
112
112
|
```
|
|
113
113
|
|
|
114
|
-
|
|
115
|
-
approves the plan. Fetch the connect guide for the chosen provider before planning:
|
|
116
|
-
https://docs.copilotkit.ai/slack/connect.md for Slack,
|
|
117
|
-
https://docs.copilotkit.ai/teams/connect.md for Teams.
|
|
118
|
-
Retry it a second way if needed.
|
|
119
|
-
|
|
120
|
-
For an empty folder, OpenTag runs its own agent on `OPENAI_API_KEY`. State that before the
|
|
121
|
-
plan. Check the target `.env` and the environment for that name. Report presence only, and
|
|
122
|
-
never read, print, or store the value. If it is absent, ask the developer to place it as
|
|
123
|
-
part of the plan approval, not at backend start. Say that the key is never displayed and
|
|
124
|
-
goes only into the project `.env`. Asking for a key the developer already owns is not
|
|
125
|
-
creating a credential.
|
|
126
|
-
|
|
127
|
-
Show a small plan. For an empty folder, clone OpenTag and do not rewrite it. For an
|
|
128
|
-
existing agent or app, keep that code and wire a managed Channel. Slack or Teams is
|
|
129
|
-
only `channels add <name> --adapter slack|teams`, with the project's directory or package
|
|
130
|
-
name as `<name>`. On Teams, skip Slack-only tools and the Slack e2e harness. Name focused
|
|
131
|
-
tests and a real mention proof on the chosen provider. Ask for approval separately.
|
|
132
|
-
|
|
133
|
-
The plan must list every protected path it needs to change under `Authorization requested`,
|
|
134
|
-
with one sentence explaining why. Write `None` when it needs none. Authorization covers
|
|
135
|
-
changing a protected path, not removing it, so the plan must not delete, move, or rename
|
|
136
|
-
one.
|
|
137
|
-
|
|
138
|
-
After approval, record each approved path before implementation:
|
|
114
|
+
When the tools this run needs are present, read the next prompt now, in this turn:
|
|
139
115
|
|
|
140
116
|
```text
|
|
141
|
-
npx --prefer-offline --yes copilotkit@4.
|
|
117
|
+
npx --prefer-offline --yes copilotkit@4.23.1 onboard read feature/channels/plan
|
|
142
118
|
```
|
|
143
119
|
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
authorize a path the approved plan did not list.
|
|
147
|
-
|
|
148
|
-
Then run `npx --prefer-offline --yes copilotkit@4.22.0 onboard read feature/channels/implement`.
|
|
120
|
+
That prompt holds the plan, the developer's approval, and the paths the plan changes.
|
|
121
|
+
Do not write the plan or change project files in this prompt.
|
|
@@ -15,7 +15,7 @@ Run focused type/test checks and start the app. Record the changed files and val
|
|
|
15
15
|
Before you spawn the implementation subagent, take the authorized list from the CLI:
|
|
16
16
|
|
|
17
17
|
```text
|
|
18
|
-
npx --prefer-offline --yes copilotkit@4.
|
|
18
|
+
npx --prefer-offline --yes copilotkit@4.23.1 onboard audit
|
|
19
19
|
```
|
|
20
20
|
|
|
21
21
|
From its result, copy the paths under `Authorized to modify:`. A passed or failed audit with
|
|
@@ -34,7 +34,7 @@ still go on the record. Name the file and why the work needs it, then end your t
|
|
|
34
34
|
for the developer's answer. If they allow it, record their answer before any edit:
|
|
35
35
|
|
|
36
36
|
```text
|
|
37
|
-
npx --prefer-offline --yes copilotkit@4.
|
|
37
|
+
npx --prefer-offline --yes copilotkit@4.23.1 onboard protect --authorize --unplanned --path <path> --reason "<what the developer said>"
|
|
38
38
|
```
|
|
39
39
|
|
|
40
40
|
Continue only when the result starts with `Status: passed`. Run the audit again, take the
|
|
@@ -46,7 +46,7 @@ feature stop route below.
|
|
|
46
46
|
After validation and each repair, run:
|
|
47
47
|
|
|
48
48
|
```text
|
|
49
|
-
npx --prefer-offline --yes copilotkit@4.
|
|
49
|
+
npx --prefer-offline --yes copilotkit@4.23.1 onboard audit
|
|
50
50
|
```
|
|
51
51
|
|
|
52
52
|
Continue only when it starts with `Status: passed`. A path under `Authorized to modify:` is
|
|
@@ -57,7 +57,7 @@ with the implementation subagent's `Files changed` section. If that section does
|
|
|
57
57
|
the path, accept the developer's external change:
|
|
58
58
|
|
|
59
59
|
```text
|
|
60
|
-
npx --prefer-offline --yes copilotkit@4.
|
|
60
|
+
npx --prefer-offline --yes copilotkit@4.23.1 onboard protect --accept-external --path <path>
|
|
61
61
|
```
|
|
62
62
|
|
|
63
63
|
For an env file where the developer placed a requested credential, use
|
|
@@ -70,11 +70,11 @@ Run the audit again after each accepted change. If it still fails, or starts
|
|
|
70
70
|
with `Status: blocked`, route out and stop:
|
|
71
71
|
|
|
72
72
|
```text
|
|
73
|
-
npx --prefer-offline --yes copilotkit@4.
|
|
73
|
+
npx --prefer-offline --yes copilotkit@4.23.1 onboard read feature/stop
|
|
74
74
|
```
|
|
75
75
|
|
|
76
76
|
If validation cannot pass, or this intent needs a prerequisite the app does not have, use
|
|
77
77
|
the feature stop route above without further changes.
|
|
78
78
|
|
|
79
79
|
Otherwise run
|
|
80
|
-
`npx --prefer-offline --yes copilotkit@4.
|
|
80
|
+
`npx --prefer-offline --yes copilotkit@4.23.1 onboard read feature/chat-suggestions/proof`.
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
# Plan chat suggestions with the developer
|
|
2
|
+
|
|
3
|
+
The inspection in `feature/chat-suggestions/start` came back and proved what this intent
|
|
4
|
+
needs. This prompt turns it into a plan, asks the developer to approve it, and records the
|
|
5
|
+
protected paths the plan changes. Do not change project files in this prompt.
|
|
6
|
+
|
|
7
|
+
## Waits and stops
|
|
8
|
+
|
|
9
|
+
The rules in `feature/chat-suggestions/start` still hold here.
|
|
10
|
+
|
|
11
|
+
The approval is a wait for the developer. Before you end your turn to wait, report the
|
|
12
|
+
pause:
|
|
13
|
+
|
|
14
|
+
```text
|
|
15
|
+
npx --prefer-offline --yes copilotkit@4.23.1 onboard checkpoint --phase awaiting-developer
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
A turn that ends while the run waits is a pause, not a stop, even when your harness ends it.
|
|
19
|
+
When the answer arrives, continue from the step that paused. If the developer asks for a
|
|
20
|
+
change, show the changed plan and ask again.
|
|
21
|
+
|
|
22
|
+
## What this prompt takes from the start
|
|
23
|
+
|
|
24
|
+
Keep these from `feature/chat-suggestions/start`, and give them to every subagent:
|
|
25
|
+
|
|
26
|
+
- the protected path list that `onboard protect` printed, and
|
|
27
|
+
- the paths and findings the inspection returned: the CopilotKit provider, chat component,
|
|
28
|
+
message lifecycle, agent id, package version, test and dev commands, and the OSS round
|
|
29
|
+
trip that `verify` proved.
|
|
30
|
+
|
|
31
|
+
If you do not hold them, as after `onboard resume` in a new session, get them back before
|
|
32
|
+
you plan. Run `onboard protect` again from the target app directory: on the same run it
|
|
33
|
+
prints the baseline the run already holds.
|
|
34
|
+
|
|
35
|
+
```text
|
|
36
|
+
npx --prefer-offline --yes copilotkit@4.23.1 onboard protect
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
Then have one read-only subagent repeat the inspection for the findings above, and wait
|
|
40
|
+
for it. It changes no files.
|
|
41
|
+
|
|
42
|
+
## Plan the change
|
|
43
|
+
|
|
44
|
+
Do not run login, provision Intelligence, request a credential, replace the agent, or alter
|
|
45
|
+
the existing runtime/persistence. Fetch the official hook guide before planning:
|
|
46
|
+
https://docs.copilotkit.ai/reference/hooks/useConfigureSuggestions.md
|
|
47
|
+
Use a second retrieval method if the first fails.
|
|
48
|
+
|
|
49
|
+
Determine static versus dynamic suggestions from the repository. If the repository does
|
|
50
|
+
not answer it, ask one short question only: recommend static suggestions for a predictable
|
|
51
|
+
first-message experience, or offer dynamic suggestions when the developer needs
|
|
52
|
+
context-dependent follow-ups. Show an approved-plan-sized diff, a focused test, and a
|
|
53
|
+
proof that a visible suggestion submits the intended message. Ask for approval as its own
|
|
54
|
+
question.
|
|
55
|
+
|
|
56
|
+
The plan must list every protected path it needs to change under `Authorization requested`,
|
|
57
|
+
with one sentence explaining why. Write `None` when it needs none. Authorization covers
|
|
58
|
+
changing a protected path, not removing it, so the plan must not delete, move, or rename
|
|
59
|
+
one.
|
|
60
|
+
|
|
61
|
+
After approval, record each approved path before implementation:
|
|
62
|
+
|
|
63
|
+
```text
|
|
64
|
+
npx --prefer-offline --yes copilotkit@4.23.1 onboard protect --authorize --path <path> --reason "<the plan's sentence>"
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
If an approved path changed after capture and no implementation step has run, add
|
|
68
|
+
`--with-prior-change`. Continue only when every result starts with `Status: passed`. Do not
|
|
69
|
+
authorize a path the approved plan did not list.
|
|
70
|
+
|
|
71
|
+
Then run `npx --prefer-offline --yes copilotkit@4.23.1 onboard read feature/chat-suggestions/implement`.
|
|
@@ -20,7 +20,7 @@ still go on the record. Name the file and why the fix needs it, then end your tu
|
|
|
20
20
|
for the developer's answer. If they allow it, record their answer before any edit:
|
|
21
21
|
|
|
22
22
|
```text
|
|
23
|
-
npx --prefer-offline --yes copilotkit@4.
|
|
23
|
+
npx --prefer-offline --yes copilotkit@4.23.1 onboard protect --authorize --unplanned --path <path> --reason "<what the developer said>"
|
|
24
24
|
```
|
|
25
25
|
|
|
26
26
|
Continue only when the result starts with `Status: passed`. Run the audit again, take the
|
|
@@ -33,11 +33,11 @@ Report the outcome of each attempt as it ends, before any repair. The command co
|
|
|
33
33
|
attempts and the repairs:
|
|
34
34
|
|
|
35
35
|
```text
|
|
36
|
-
npx --prefer-offline --yes copilotkit@4.
|
|
36
|
+
npx --prefer-offline --yes copilotkit@4.23.1 onboard proof --step round-trip --outcome <passed|failed|skipped>
|
|
37
37
|
```
|
|
38
38
|
|
|
39
39
|
Use `passed` only for a proved sent suggestion, `failed` for an attempted proof that failed,
|
|
40
|
-
and `skipped` when the proof could not run. Then run `npx --prefer-offline --yes copilotkit@4.
|
|
40
|
+
and `skipped` when the proof could not run. Then run `npx --prefer-offline --yes copilotkit@4.23.1 onboard audit`.
|
|
41
41
|
Continue only when it starts with `Status: passed`.
|
|
42
42
|
|
|
43
43
|
If the audit fails, never repair, reset, or revert a protected path. Compare each named path
|
|
@@ -52,9 +52,9 @@ the path and the change the audit reports. Run the audit again after each accept
|
|
|
52
52
|
If the audit still fails, or starts with `Status: blocked`, route out and stop:
|
|
53
53
|
|
|
54
54
|
```text
|
|
55
|
-
npx --prefer-offline --yes copilotkit@4.
|
|
55
|
+
npx --prefer-offline --yes copilotkit@4.23.1 onboard read feature/stop
|
|
56
56
|
```
|
|
57
57
|
|
|
58
58
|
When the audit passes, run
|
|
59
|
-
`npx --prefer-offline --yes copilotkit@4.
|
|
59
|
+
`npx --prefer-offline --yes copilotkit@4.23.1 onboard read feature/complete` with the real browser-proof
|
|
60
60
|
outcome.
|
|
@@ -19,13 +19,13 @@ carry on. Keep a read-only assignment read-only. If no subagent works at all, re
|
|
|
19
19
|
once:
|
|
20
20
|
|
|
21
21
|
```text
|
|
22
|
-
npx --prefer-offline --yes copilotkit@4.
|
|
22
|
+
npx --prefer-offline --yes copilotkit@4.23.1 onboard checkpoint --phase delegation-unavailable
|
|
23
23
|
```
|
|
24
24
|
|
|
25
25
|
Before you end your turn to wait for the developer, report the pause:
|
|
26
26
|
|
|
27
27
|
```text
|
|
28
|
-
npx --prefer-offline --yes copilotkit@4.
|
|
28
|
+
npx --prefer-offline --yes copilotkit@4.23.1 onboard checkpoint --phase awaiting-developer
|
|
29
29
|
```
|
|
30
30
|
|
|
31
31
|
A turn that ends while the run waits is a pause, not a stop, even when your harness ends it.
|
|
@@ -35,7 +35,7 @@ If you stop this run, send one short report before you stop. The friction comman
|
|
|
35
35
|
the telemetry setting the developer already chose, so it needs no separate question.
|
|
36
36
|
|
|
37
37
|
```text
|
|
38
|
-
npx --prefer-offline --yes copilotkit@4.
|
|
38
|
+
npx --prefer-offline --yes copilotkit@4.23.1 onboard friction --phase stop --category <slug> --message "<sentences>"
|
|
39
39
|
```
|
|
40
40
|
|
|
41
41
|
`--message` takes one or two sentences: the step you stopped at and what stopped it.
|
|
@@ -49,7 +49,7 @@ one scoped fix, and sends the report itself when no fix is approved.
|
|
|
49
49
|
Before any subagent or project process runs, capture the developer's existing work:
|
|
50
50
|
|
|
51
51
|
```text
|
|
52
|
-
npx --prefer-offline --yes copilotkit@4.
|
|
52
|
+
npx --prefer-offline --yes copilotkit@4.23.1 onboard protect
|
|
53
53
|
```
|
|
54
54
|
|
|
55
55
|
Keep the exact protected path list it prints and give that list to every subagent. No
|
|
@@ -58,46 +58,27 @@ approved authorization before implementation.
|
|
|
58
58
|
|
|
59
59
|
Before edits, identify the current CopilotKit provider, chat component, message lifecycle,
|
|
60
60
|
agent id, package version, and test/dev commands. Prove the existing OSS round trip with
|
|
61
|
-
`/info`, `npx --prefer-offline --yes copilotkit@4.
|
|
61
|
+
`/info`, `npx --prefer-offline --yes copilotkit@4.23.1 verify --expect-runtime oss --round-trip --agent <agent-id> --json`,
|
|
62
62
|
and one real frontend request when browser control is available.
|
|
63
63
|
|
|
64
64
|
Wait for the inspection subagent to finish. Then report that the inspection came back:
|
|
65
65
|
|
|
66
66
|
```text
|
|
67
|
-
npx --prefer-offline --yes copilotkit@4.
|
|
67
|
+
npx --prefer-offline --yes copilotkit@4.23.1 onboard checkpoint --phase research-returned
|
|
68
68
|
```
|
|
69
69
|
|
|
70
70
|
If the inspection did not prove the baseline this intent extends, stop here without
|
|
71
71
|
changing files:
|
|
72
72
|
|
|
73
73
|
```text
|
|
74
|
-
npx --prefer-offline --yes copilotkit@4.
|
|
74
|
+
npx --prefer-offline --yes copilotkit@4.23.1 onboard read feature/stop
|
|
75
75
|
```
|
|
76
76
|
|
|
77
|
-
|
|
78
|
-
the existing runtime/persistence. Fetch the official hook guide before planning:
|
|
79
|
-
https://docs.copilotkit.ai/reference/hooks/useConfigureSuggestions.md
|
|
80
|
-
Use a second retrieval method if the first fails.
|
|
81
|
-
|
|
82
|
-
Determine static versus dynamic suggestions from the repository. If the repository does not
|
|
83
|
-
answer it, ask one short question only: recommend static suggestions for a predictable
|
|
84
|
-
first-message experience, or offer dynamic suggestions when the developer needs
|
|
85
|
-
context-dependent follow-ups. Show an approved-plan-sized diff, a focused test, and a proof
|
|
86
|
-
that a visible suggestion submits the intended message.
|
|
87
|
-
|
|
88
|
-
The plan must list every protected path it needs to change under `Authorization requested`,
|
|
89
|
-
with one sentence explaining why. Write `None` when it needs none. Authorization covers
|
|
90
|
-
changing a protected path, not removing it, so the plan must not delete, move, or rename
|
|
91
|
-
one.
|
|
92
|
-
|
|
93
|
-
After approval, record each approved path before implementation:
|
|
77
|
+
When the inspection proved what this intent needs, read the next prompt now, in this turn:
|
|
94
78
|
|
|
95
79
|
```text
|
|
96
|
-
npx --prefer-offline --yes copilotkit@4.
|
|
80
|
+
npx --prefer-offline --yes copilotkit@4.23.1 onboard read feature/chat-suggestions/plan
|
|
97
81
|
```
|
|
98
82
|
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
authorize a path the approved plan did not list.
|
|
102
|
-
|
|
103
|
-
Then run `npx --prefer-offline --yes copilotkit@4.22.0 onboard read feature/chat-suggestions/implement`.
|
|
83
|
+
That prompt holds the plan, the developer's approval, and the paths the plan changes.
|
|
84
|
+
Do not write the plan or change project files in this prompt.
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Use the outcome the proof step observed. Run:
|
|
4
4
|
|
|
5
5
|
```text
|
|
6
|
-
npx --prefer-offline --yes copilotkit@4.
|
|
6
|
+
npx --prefer-offline --yes copilotkit@4.23.1 onboard complete --visual-check <performed|skipped-no-browser-tool|channels-proof-passed|failed>
|
|
7
7
|
```
|
|
8
8
|
|
|
9
9
|
Use `channels-proof-passed` for a Slack or Teams run that recorded a passed round-trip proof
|
|
@@ -22,7 +22,7 @@ Before `onboard complete`, send the friction this run mentioned to the developer
|
|
|
22
22
|
report each, at most four, costliest first:
|
|
23
23
|
|
|
24
24
|
```text
|
|
25
|
-
npx --prefer-offline --yes copilotkit@4.
|
|
25
|
+
npx --prefer-offline --yes copilotkit@4.23.1 onboard friction --category <slug> --cost-seconds <seconds> --message "<sentences>"
|
|
26
26
|
```
|
|
27
27
|
|
|
28
28
|
Put one or two sentences in `--message`, with no secrets, source, or logs. Pick the
|
|
@@ -17,7 +17,7 @@ follows the telemetry setting the developer already chose, so it needs no separa
|
|
|
17
17
|
question.
|
|
18
18
|
|
|
19
19
|
```text
|
|
20
|
-
npx --prefer-offline --yes copilotkit@4.
|
|
20
|
+
npx --prefer-offline --yes copilotkit@4.23.1 onboard friction --phase stop --category <slug> --message "<sentences>"
|
|
21
21
|
```
|
|
22
22
|
|
|
23
23
|
`--message` takes one or two sentences: the step you stopped at and what stopped it.
|
|
@@ -49,7 +49,7 @@ settled refusal rather than a missing baseline, so stop here, before any file ch
|
|
|
49
49
|
take its own ending:
|
|
50
50
|
|
|
51
51
|
```text
|
|
52
|
-
npx --prefer-offline --yes copilotkit@4.
|
|
52
|
+
npx --prefer-offline --yes copilotkit@4.23.1 onboard read feature/blocked-by-plan
|
|
53
53
|
```
|
|
54
54
|
|
|
55
55
|
`LEARNING_AVAILABILITY_UNAVAILABLE` means the platform did not resolve the answer. It is
|
|
@@ -63,7 +63,7 @@ then, so the read below is where its refusal surfaces.
|
|
|
63
63
|
When the plan or the repository already names an id, ask about that one id and nothing else:
|
|
64
64
|
|
|
65
65
|
```text
|
|
66
|
-
npx --prefer-offline --yes copilotkit@4.
|
|
66
|
+
npx --prefer-offline --yes copilotkit@4.23.1 learning containers get <id> --json
|
|
67
67
|
```
|
|
68
68
|
|
|
69
69
|
One call answers it, and no list is needed.
|
|
@@ -71,7 +71,7 @@ One call answers it, and no list is needed.
|
|
|
71
71
|
When no id is in hand, survey what the project holds:
|
|
72
72
|
|
|
73
73
|
```text
|
|
74
|
-
npx --prefer-offline --yes copilotkit@4.
|
|
74
|
+
npx --prefer-offline --yes copilotkit@4.23.1 learning containers list --json
|
|
75
75
|
```
|
|
76
76
|
|
|
77
77
|
One call returns at most 500 containers. When `nextCursor` in the result is not null, read
|
|
@@ -94,7 +94,7 @@ user, so the callback can return a different id per tier or per customer.
|
|
|
94
94
|
Ask the CLI for the id rather than spelling one yourself:
|
|
95
95
|
|
|
96
96
|
```text
|
|
97
|
-
npx --prefer-offline --yes copilotkit@4.
|
|
97
|
+
npx --prefer-offline --yes copilotkit@4.23.1 learning containers default-id --json
|
|
98
98
|
```
|
|
99
99
|
|
|
100
100
|
It derives the project-scoped id from the selected project's slug, reads the local project
|
|
@@ -108,7 +108,7 @@ run that spells the id differently gives one project two containers, each below
|
|
|
108
108
|
above on its own. One command is what keeps the two spellings identical.
|
|
109
109
|
|
|
110
110
|
```text
|
|
111
|
-
npx --prefer-offline --yes copilotkit@4.
|
|
111
|
+
npx --prefer-offline --yes copilotkit@4.23.1 learning containers create --id <id> --name <name> --json
|
|
112
112
|
```
|
|
113
113
|
|
|
114
114
|
An id already in use answers `LEARNING_CONTAINER_ALREADY_EXISTS`. That is a container to
|
|
@@ -134,13 +134,13 @@ non-zero on an app that is working. Pass what `identifyUser` reads with a repeat
|
|
|
134
134
|
It is not a defect to repair.
|
|
135
135
|
|
|
136
136
|
Run focused tests and
|
|
137
|
-
`npx --prefer-offline --yes copilotkit@4.
|
|
137
|
+
`npx --prefer-offline --yes copilotkit@4.23.1 verify --expect-runtime intelligence --round-trip --agent <agent-id> --json`.
|
|
138
138
|
Repair changed-file failures and record secret-safe evidence.
|
|
139
139
|
|
|
140
140
|
Before you spawn the implementation subagent, take the authorized list from the CLI:
|
|
141
141
|
|
|
142
142
|
```text
|
|
143
|
-
npx --prefer-offline --yes copilotkit@4.
|
|
143
|
+
npx --prefer-offline --yes copilotkit@4.23.1 onboard audit
|
|
144
144
|
```
|
|
145
145
|
|
|
146
146
|
From its result, copy the paths under `Authorized to modify:`. A passed or failed audit with
|
|
@@ -159,7 +159,7 @@ still go on the record. Name the file and why the work needs it, then end your t
|
|
|
159
159
|
for the developer's answer. If they allow it, record their answer before any edit:
|
|
160
160
|
|
|
161
161
|
```text
|
|
162
|
-
npx --prefer-offline --yes copilotkit@4.
|
|
162
|
+
npx --prefer-offline --yes copilotkit@4.23.1 onboard protect --authorize --unplanned --path <path> --reason "<what the developer said>"
|
|
163
163
|
```
|
|
164
164
|
|
|
165
165
|
Continue only when the result starts with `Status: passed`. Run the audit again, take the
|
|
@@ -171,7 +171,7 @@ feature stop route below.
|
|
|
171
171
|
After validation and each repair, run:
|
|
172
172
|
|
|
173
173
|
```text
|
|
174
|
-
npx --prefer-offline --yes copilotkit@4.
|
|
174
|
+
npx --prefer-offline --yes copilotkit@4.23.1 onboard audit
|
|
175
175
|
```
|
|
176
176
|
|
|
177
177
|
Continue only when it starts with `Status: passed`. A path under `Authorized to modify:` is
|
|
@@ -182,7 +182,7 @@ with the implementation subagent's `Files changed` section. If that section does
|
|
|
182
182
|
the path, accept the developer's external change:
|
|
183
183
|
|
|
184
184
|
```text
|
|
185
|
-
npx --prefer-offline --yes copilotkit@4.
|
|
185
|
+
npx --prefer-offline --yes copilotkit@4.23.1 onboard protect --accept-external --path <path>
|
|
186
186
|
```
|
|
187
187
|
|
|
188
188
|
For an env file where the developer placed a requested credential, use
|
|
@@ -196,11 +196,11 @@ with `Status: blocked`, route out and stop. Route out the same way when
|
|
|
196
196
|
`--accept-credential` refuses because it names a lost variable:
|
|
197
197
|
|
|
198
198
|
```text
|
|
199
|
-
npx --prefer-offline --yes copilotkit@4.
|
|
199
|
+
npx --prefer-offline --yes copilotkit@4.23.1 onboard read feature/stop
|
|
200
200
|
```
|
|
201
201
|
|
|
202
202
|
If validation cannot pass, or this intent needs a prerequisite the app does not have, use
|
|
203
203
|
the feature stop route above without further changes.
|
|
204
204
|
|
|
205
205
|
Otherwise run
|
|
206
|
-
`npx --prefer-offline --yes copilotkit@4.
|
|
206
|
+
`npx --prefer-offline --yes copilotkit@4.23.1 onboard read feature/learning/proof`.
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
# Plan Learning with the developer
|
|
2
|
+
|
|
3
|
+
The inspection in `feature/learning/start` came back and proved what this intent needs.
|
|
4
|
+
This prompt turns it into a plan, asks the developer to approve it, and records the
|
|
5
|
+
protected paths the plan changes. Do not change project files in this prompt.
|
|
6
|
+
|
|
7
|
+
## Waits and stops
|
|
8
|
+
|
|
9
|
+
The rules in `feature/learning/start` still hold here.
|
|
10
|
+
|
|
11
|
+
The approval is a wait for the developer. Before you end your turn to wait, report the
|
|
12
|
+
pause:
|
|
13
|
+
|
|
14
|
+
```text
|
|
15
|
+
npx --prefer-offline --yes copilotkit@4.23.1 onboard checkpoint --phase awaiting-developer
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
A turn that ends while the run waits is a pause, not a stop, even when your harness ends it.
|
|
19
|
+
When the answer arrives, continue from the step that paused. If the developer asks for a
|
|
20
|
+
change, show the changed plan and ask again.
|
|
21
|
+
|
|
22
|
+
## What this prompt takes from the start
|
|
23
|
+
|
|
24
|
+
Keep these from `feature/learning/start`, and give them to every subagent:
|
|
25
|
+
|
|
26
|
+
- the protected path list that `onboard protect` printed,
|
|
27
|
+
- the paths and findings the inspection returned: the runtime, agent id, provider and
|
|
28
|
+
chat, server-side user identity, existing Intelligence configuration (presence only),
|
|
29
|
+
existing thread routes, test and dev commands, and the round trip, and
|
|
30
|
+
- the answer `copilotkit learning containers list --json` gave.
|
|
31
|
+
|
|
32
|
+
If you do not hold them, as after `onboard resume` in a new session, get them back before
|
|
33
|
+
you plan. Run `onboard protect` again from the target app directory: on the same run it
|
|
34
|
+
prints the baseline the run already holds.
|
|
35
|
+
|
|
36
|
+
```text
|
|
37
|
+
npx --prefer-offline --yes copilotkit@4.23.1 onboard protect
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
Then have one read-only subagent repeat the inspection for the findings above, and wait
|
|
41
|
+
for it. It changes no files. If the Learning answer is lost, leave it.
|
|
42
|
+
`feature/learning/implement` asks the same question again before any file changes.
|
|
43
|
+
|
|
44
|
+
## Plan the change
|
|
45
|
+
|
|
46
|
+
Fetch the current official guides before planning:
|
|
47
|
+
https://docs.copilotkit.ai/learning.md
|
|
48
|
+
https://docs.copilotkit.ai/backend/copilot-runtime.md
|
|
49
|
+
https://docs.copilotkit.ai/intelligence/quickstart.md
|
|
50
|
+
https://docs.copilotkit.ai/threads.md
|
|
51
|
+
Use a second retrieval method if needed.
|
|
52
|
+
|
|
53
|
+
The CLI owns the container. `copilotkit learning containers list --json` reads the ones this
|
|
54
|
+
project already has, and `copilotkit learning containers create --id <id> --name <name>
|
|
55
|
+
--json` makes one. So there is no dashboard step and no reason to guess: never invent an id,
|
|
56
|
+
scrape a dashboard, or treat an arbitrary string as a container.
|
|
57
|
+
|
|
58
|
+
Read the "Assign Threads to Learning Containers" section of that page. The container is
|
|
59
|
+
chosen by `getLearningContainerId` on the `CopilotKitIntelligence` instance, which the
|
|
60
|
+
same page documents. It receives the resolved application user and the run input, and it
|
|
61
|
+
serves web and Channel runs through one API.
|
|
62
|
+
|
|
63
|
+
Show a concise plan for managed runtime/thread prerequisites, a stable selected container,
|
|
64
|
+
the documented `getLearningContainerId` selector, validation, and a visible assignment
|
|
65
|
+
proof. Ask for approval as its own question.
|
|
66
|
+
|
|
67
|
+
The plan must list every protected path it needs to change under `Authorization requested`,
|
|
68
|
+
with one sentence explaining why. Write `None` when it needs none. Authorization covers
|
|
69
|
+
changing a protected path, not removing it, so the plan must not delete, move, or rename
|
|
70
|
+
one.
|
|
71
|
+
|
|
72
|
+
After approval, record each approved path before implementation:
|
|
73
|
+
|
|
74
|
+
```text
|
|
75
|
+
npx --prefer-offline --yes copilotkit@4.23.1 onboard protect --authorize --path <path> --reason "<the plan's sentence>"
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
If an approved path changed after capture and no implementation step has run, add
|
|
79
|
+
`--with-prior-change`. Continue only when every result starts with `Status: passed`. Do not
|
|
80
|
+
authorize a path the approved plan did not list.
|
|
81
|
+
|
|
82
|
+
Then run `npx --prefer-offline --yes copilotkit@4.23.1 onboard read feature/learning/implement`.
|
|
@@ -7,7 +7,7 @@ Container. Confirm the thread remains associated with the expected user.
|
|
|
7
7
|
One command decides it:
|
|
8
8
|
|
|
9
9
|
```text
|
|
10
|
-
npx --prefer-offline --yes copilotkit@4.
|
|
10
|
+
npx --prefer-offline --yes copilotkit@4.23.1 verify --expect-runtime intelligence --round-trip --agent <agent-id> --expect-learning-container <id> --json
|
|
11
11
|
```
|
|
12
12
|
|
|
13
13
|
It reads the thread back from the platform, so it answers for any runtime mount, and it
|
|
@@ -40,7 +40,7 @@ still go on the record. Name the file and why the fix needs it, then end your tu
|
|
|
40
40
|
for the developer's answer. If they allow it, record their answer before any edit:
|
|
41
41
|
|
|
42
42
|
```text
|
|
43
|
-
npx --prefer-offline --yes copilotkit@4.
|
|
43
|
+
npx --prefer-offline --yes copilotkit@4.23.1 onboard protect --authorize --unplanned --path <path> --reason "<what the developer said>"
|
|
44
44
|
```
|
|
45
45
|
|
|
46
46
|
Continue only when the result starts with `Status: passed`. Run the audit again, take the
|
|
@@ -53,12 +53,12 @@ Report the outcome of each attempt as it ends, before any repair. The command co
|
|
|
53
53
|
attempts and the repairs:
|
|
54
54
|
|
|
55
55
|
```text
|
|
56
|
-
npx --prefer-offline --yes copilotkit@4.
|
|
56
|
+
npx --prefer-offline --yes copilotkit@4.23.1 onboard proof --step round-trip --outcome <passed|failed|skipped>
|
|
57
57
|
```
|
|
58
58
|
|
|
59
59
|
Use `passed` only for a proved Container assignment, `failed` for an attempted proof that
|
|
60
60
|
failed, and `skipped` when the proof could not run. Then run
|
|
61
|
-
`npx --prefer-offline --yes copilotkit@4.
|
|
61
|
+
`npx --prefer-offline --yes copilotkit@4.23.1 onboard audit`. Continue only when it starts with
|
|
62
62
|
`Status: passed`.
|
|
63
63
|
|
|
64
64
|
If the audit fails, never repair, reset, or revert a protected path. Compare each named path
|
|
@@ -73,9 +73,9 @@ the path and the change the audit reports. Run the audit again after each accept
|
|
|
73
73
|
If the audit still fails, or starts with `Status: blocked`, route out and stop:
|
|
74
74
|
|
|
75
75
|
```text
|
|
76
|
-
npx --prefer-offline --yes copilotkit@4.
|
|
76
|
+
npx --prefer-offline --yes copilotkit@4.23.1 onboard read feature/stop
|
|
77
77
|
```
|
|
78
78
|
|
|
79
79
|
When the audit passes, run
|
|
80
|
-
`npx --prefer-offline --yes copilotkit@4.
|
|
80
|
+
`npx --prefer-offline --yes copilotkit@4.23.1 onboard read feature/complete` with the actual surface
|
|
81
81
|
outcome.
|