@kodax-ai/kodax 0.7.95 → 0.7.96-alpha.2
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/CHANGELOG.md +178 -1
- package/LICENSE +158 -158
- package/README.md +149 -24
- package/README_CN.md +117 -24
- package/config-templates/config.example.jsonc +2 -1
- package/config-templates/integrations/a2a.example.jsonc +91 -91
- package/config-templates/integrations/extensions.example.jsonc +7 -7
- package/config-templates/integrations/mcp.example.jsonc +16 -16
- package/dist/builtin/code-review/SKILL.md +82 -82
- package/dist/builtin/git-workflow/SKILL.md +84 -84
- package/dist/builtin/skill-creator/SKILL.md +127 -127
- package/dist/builtin/skill-creator/agents/analyzer.md +12 -12
- package/dist/builtin/skill-creator/agents/comparator.md +13 -13
- package/dist/builtin/skill-creator/agents/grader.md +13 -13
- package/dist/builtin/skill-creator/references/schemas.md +227 -227
- package/dist/builtin/skill-creator/scripts/aggregate-benchmark.d.ts +46 -46
- package/dist/builtin/skill-creator/scripts/aggregate-benchmark.js +208 -208
- package/dist/builtin/skill-creator/scripts/analyze-benchmark.d.ts +46 -46
- package/dist/builtin/skill-creator/scripts/analyze-benchmark.js +286 -286
- package/dist/builtin/skill-creator/scripts/compare-runs.d.ts +62 -62
- package/dist/builtin/skill-creator/scripts/compare-runs.js +330 -330
- package/dist/builtin/skill-creator/scripts/generate-review.d.ts +33 -33
- package/dist/builtin/skill-creator/scripts/generate-review.js +414 -414
- package/dist/builtin/skill-creator/scripts/grade-evals.d.ts +73 -73
- package/dist/builtin/skill-creator/scripts/grade-evals.js +402 -402
- package/dist/builtin/skill-creator/scripts/improve-description.d.ts +23 -23
- package/dist/builtin/skill-creator/scripts/improve-description.js +160 -160
- package/dist/builtin/skill-creator/scripts/init-skill.d.ts +14 -14
- package/dist/builtin/skill-creator/scripts/init-skill.js +155 -155
- package/dist/builtin/skill-creator/scripts/install-skill.d.ts +29 -29
- package/dist/builtin/skill-creator/scripts/install-skill.js +173 -173
- package/dist/builtin/skill-creator/scripts/package-skill.d.ts +38 -38
- package/dist/builtin/skill-creator/scripts/package-skill.js +121 -121
- package/dist/builtin/skill-creator/scripts/quick-validate.d.ts +8 -8
- package/dist/builtin/skill-creator/scripts/quick-validate.js +163 -163
- package/dist/builtin/skill-creator/scripts/run-eval.d.ts +66 -66
- package/dist/builtin/skill-creator/scripts/run-eval.js +353 -353
- package/dist/builtin/skill-creator/scripts/run-loop.d.ts +49 -49
- package/dist/builtin/skill-creator/scripts/run-loop.js +242 -242
- package/dist/builtin/skill-creator/scripts/run-trigger-eval.d.ts +58 -58
- package/dist/builtin/skill-creator/scripts/run-trigger-eval.js +224 -224
- package/dist/builtin/tdd/SKILL.md +56 -56
- package/dist/chunks/agent-4FABF6WK.js +2 -0
- package/dist/chunks/argument-completer-72VHB2VL.js +2 -0
- package/dist/chunks/{chunk-7JXA3533.js → chunk-4OIQZWA5.js} +223 -226
- package/dist/chunks/{chunk-BNVSKIAB.js → chunk-6BVF3HZ7.js} +136 -136
- package/dist/chunks/chunk-7JZZIFZH.js +501 -0
- package/dist/chunks/chunk-AC7Z2OIY.js +2 -0
- package/dist/chunks/{chunk-JS452J2F.js → chunk-C4KYZAFU.js} +2 -2
- package/dist/chunks/chunk-CHUPIWIF.js +251 -0
- package/dist/chunks/{chunk-C4DTUKTR.js → chunk-GYUU7XLH.js} +5 -4
- package/dist/chunks/{chunk-OK4AXDC5.js → chunk-HAX55GOQ.js} +1 -1
- package/dist/chunks/chunk-JKTJCGO2.js +418 -0
- package/dist/chunks/{chunk-O743AJ5V.js → chunk-LQYETRFK.js} +171 -175
- package/dist/chunks/{chunk-2PEDBGKN.js → chunk-LTUZTQ6W.js} +1 -1
- package/dist/chunks/chunk-LYWDUSKO.js +2 -0
- package/dist/chunks/chunk-NGH6T4FD.js +92 -0
- package/dist/chunks/{chunk-SRIJX5ZP.js → chunk-NVRWCSA5.js} +1 -1
- package/dist/chunks/chunk-O4DS7RIQ.js +384 -0
- package/dist/chunks/chunk-ORXU6OWZ.js +2 -0
- package/dist/chunks/chunk-POTW3O65.js +124 -0
- package/dist/chunks/{chunk-2TM3W3GK.js → chunk-RIQSS56Y.js} +1 -1
- package/dist/chunks/chunk-U27XKEN5.js +407 -0
- package/dist/chunks/{chunk-6ABQJUK6.js → chunk-XUX6OUCA.js} +2 -2
- package/dist/chunks/{client-JDOS3YJR.js → client-4C456K4O.js} +1 -1
- package/dist/chunks/compaction-config-3VQRDFF4.js +2 -0
- package/dist/chunks/{construction-bootstrap-YCWHHUYO.js → construction-bootstrap-AHN7EDGG.js} +1 -1
- package/dist/chunks/dist-BCBQXAGI.js +2 -0
- package/dist/chunks/dist-QK2YDWU6.js +2 -0
- package/dist/chunks/host-VIHV7ADG.js +2 -0
- package/dist/chunks/run-manager-NBVMU3KV.js +2 -0
- package/dist/chunks/utils-MEJZ2IGI.js +2 -0
- package/dist/index.d.ts +22 -21
- package/dist/index.js +7 -7
- package/dist/kodax_bootstrap.js +26 -26
- package/dist/kodax_cli.js +1905 -1882
- package/dist/native/darwin-arm64/LICENSE-APACHE.txt +13 -0
- package/dist/native/darwin-arm64/kodax-text-transaction.node +0 -0
- package/dist/native/darwin-arm64/manifest.json +16 -0
- package/dist/native/darwin-x64/LICENSE-APACHE.txt +13 -0
- package/dist/native/darwin-x64/kodax-text-transaction.node +0 -0
- package/dist/native/darwin-x64/manifest.json +16 -0
- package/dist/native/linux-arm64/LICENSE-APACHE.txt +13 -0
- package/dist/native/linux-arm64/kodax-text-transaction.node +0 -0
- package/dist/native/linux-arm64/manifest.json +16 -0
- package/dist/native/linux-x64/LICENSE-APACHE.txt +13 -0
- package/dist/native/linux-x64/kodax-text-transaction.node +0 -0
- package/dist/native/linux-x64/manifest.json +16 -0
- package/dist/native/win32-x64/LICENSE-APACHE.txt +13 -0
- package/dist/native/win32-x64/NOTICE-windows-sandbox.txt +8 -0
- package/dist/native/win32-x64/kodax-windows-sandbox.exe +0 -0
- package/dist/native/win32-x64/kodax-windows-text-transaction.node +0 -0
- package/dist/native/win32-x64/manifest.json +30 -0
- package/dist/provider-capabilities.json +108 -2
- package/dist/runtime-worker.js +1745 -1727
- package/dist/sandbox-network-broker.js +1715 -0
- package/dist/sdk-a2a.d.ts +13 -12
- package/dist/sdk-a2a.js +1 -1
- package/dist/sdk-agent.d.ts +27 -18
- package/dist/sdk-agent.js +1 -1
- package/dist/sdk-coding.d.ts +107 -58
- package/dist/sdk-coding.js +1 -1
- package/dist/sdk-experimental-memory.d.ts +4 -4
- package/dist/sdk-experimental-memory.js +1 -1
- package/dist/sdk-llm.d.ts +9 -10
- package/dist/sdk-llm.js +1 -1
- package/dist/sdk-mcp.js +1 -1
- package/dist/sdk-media.d.ts +1 -1
- package/dist/sdk-media.js +1 -1
- package/dist/sdk-repl.d.ts +25 -17
- package/dist/sdk-repl.js +1 -1
- package/dist/sdk-runtime.d.ts +41 -17
- package/dist/sdk-runtime.js +1 -1
- package/dist/sdk-sandbox.d.ts +17 -3
- package/dist/sdk-sandbox.js +1 -1
- package/dist/sdk-session.d.ts +8 -7
- package/dist/sdk-session.js +1 -1
- package/dist/sdk-skills.js +1 -1
- package/dist/semantic-worker.js +61 -61
- package/dist/types-chunks/{base.d-vopO1rml.d.ts → base.d-COo8E2dk.d.ts} +18 -27
- package/dist/types-chunks/{bash-prefix-extractor.d-B2rxNI4L.d.ts → bash-prefix-extractor.d-DQOlA8cy.d.ts} +72 -52
- package/dist/types-chunks/{capability-learning.d-CE1tm29C.d.ts → capability-learning.d-lRPgA3Or.d.ts} +1 -1
- package/dist/types-chunks/{capsule.d-Y7QRS4J2.d.ts → capsule.d-0zxsgXg_.d.ts} +3 -3
- package/dist/types-chunks/{controller.d-BR-UVeUR.d.ts → controller.d-BTtyIIC1.d.ts} +1 -1
- package/dist/types-chunks/{controller.d-C5noq5-w.d.ts → controller.d-C7tXUcXo.d.ts} +2 -2
- package/dist/types-chunks/{guardrail.d-DqHD-61O.d.ts → guardrail.d-DKTyEHJa.d.ts} +5 -5
- package/dist/types-chunks/{history-retrieval.d-CKU8zmt_.d.ts → history-retrieval.d-CHnL99S7.d.ts} +2 -2
- package/dist/types-chunks/{public-api.d-D7fXaWW8.d.ts → public-api.d-Dx3L3W4Z.d.ts} +7 -4
- package/dist/types-chunks/{repl.d-BYDb14s6.d.ts → repl.d-mO01olIa.d.ts} +5 -5
- package/dist/types-chunks/{resolver.d-CwHUwbdE.d.ts → resolver.d-DlXPjeyx.d.ts} +38 -6
- package/dist/types-chunks/{review-inbox.d-BSgFewyj.d.ts → review-inbox.d-WDSe1nze.d.ts} +1 -1
- package/dist/types-chunks/{run-manager.d-BVJSntpS.d.ts → run-manager.d-DENbbzgR.d.ts} +1 -1
- package/dist/types-chunks/{sdk-session-CqEG84oP.d.ts → sdk-session-DYHGXXH4.d.ts} +3 -3
- package/dist/types-chunks/{shell-command-sets.d-DqaaBwhU.d.ts → shell-command-sets.d-CjFqS4dp.d.ts} +1 -1
- package/dist/types-chunks/{side-query.d-iH0P9ASy.d.ts → side-query.d-j8A3sFv_.d.ts} +2 -2
- package/dist/types-chunks/{types.d-rUOjXych.d.ts → types.d-BbZjR0Wr.d.ts} +1 -1
- package/dist/types-chunks/{types.d-CaTXAW_Q.d.ts → types.d-BkTIKdH6.d.ts} +2 -2
- package/dist/types-chunks/{types.d-C5xQEFcj.d.ts → types.d-DncLrpu_.d.ts} +4 -4
- package/dist/types-chunks/{types.d-CK9A9rpP.d.ts → types.d-Xy0f3x4i.d.ts} +9 -0
- package/dist/types-chunks/{utils.d-CWUyLiXo.d.ts → utils.d-CnxefMos.d.ts} +6 -6
- package/package.json +10 -3
- package/public_docs/README.md +130 -0
- package/public_docs/configuration/sandbox.md +289 -0
- package/public_docs/sdk/embedder-guide.md +6674 -0
- package/scripts/kodax-bin.cjs +28 -28
- package/scripts/production-env.cjs +25 -25
- package/dist/chunks/agent-XXZMXKKA.js +0 -2
- package/dist/chunks/argument-completer-KCYDGTQW.js +0 -2
- package/dist/chunks/chunk-77PNP27P.js +0 -92
- package/dist/chunks/chunk-7QBWHCIZ.js +0 -2
- package/dist/chunks/chunk-BHE66SP3.js +0 -123
- package/dist/chunks/chunk-BR2OSB2I.js +0 -722
- package/dist/chunks/chunk-DSMONSVB.js +0 -407
- package/dist/chunks/chunk-Q5VRWSKG.js +0 -418
- package/dist/chunks/chunk-XWRPOGJN.js +0 -4
- package/dist/chunks/chunk-Y5VIQBT6.js +0 -383
- package/dist/chunks/compaction-config-EGS4577X.js +0 -2
- package/dist/chunks/dist-ITTXQHRJ.js +0 -2
- package/dist/chunks/dist-KFYN3OKD.js +0 -2
- package/dist/chunks/host-VAYADIPW.js +0 -2
- package/dist/chunks/run-manager-52IJZMZJ.js +0 -2
- package/dist/chunks/utils-P7PBSL3R.js +0 -2
- package/dist/sandbox-workspace-session.js +0 -1705
|
@@ -1,71 +1,71 @@
|
|
|
1
|
-
// Bidirectional A2A configuration: ~/.kodax/integrations/a2a.json.
|
|
2
|
-
// `agents` calls many third-party Agents. The optional singleton `server`
|
|
3
|
-
// exposes exactly one KodaX general task Agent; ACP remains the coding/editor
|
|
4
|
-
// protocol. Uncomment only the entries you need; no token value belongs here.
|
|
5
|
-
// Legacy version 1 files remain readable. Non-empty files require an explicit
|
|
6
|
-
// stopped-daemon migration; new/empty files and every later write use version 2.
|
|
7
|
-
{
|
|
8
|
-
"version": 2,
|
|
9
|
-
|
|
10
|
-
// Create this inbound block with `kodax a2a expose`; config never starts a
|
|
11
|
-
// listener by itself. Do not copy private Agent instructions, Runtime Skills,
|
|
12
|
-
// model names, or local paths into the public `published.skills` list.
|
|
13
|
-
// Managed workspaces default below
|
|
14
|
-
// ~/kodax_a2a_server_workspace/<runtime-profile>/contexts/<context-key>/.
|
|
15
|
-
// Native read/grep/glob remains available according to workspace access.
|
|
16
|
-
// Arbitrary shell is never exposed. Skill instructions/assets need no
|
|
17
|
-
// process authority. An exact checked-in scripts/... entry requires
|
|
18
|
-
// process="isolated", skillScripts admission, and `kodax sandbox doctor`.
|
|
19
|
-
// ASRT receives no KodaX credentials or ambient ~/.srt-settings.json and its
|
|
20
|
-
// script quota is observed; hostile tenants also require an outer container/VM.
|
|
21
|
-
//
|
|
22
|
-
// "server": {
|
|
23
|
-
// "execution": {
|
|
24
|
-
// "kind": "local-agent",
|
|
25
|
-
// "agentRef": { "source": "markdown:user", "name": "report-agent" },
|
|
26
|
-
// "workspace": { "mode": "managed" },
|
|
27
|
-
// "toolPolicy": {
|
|
28
|
-
// "workspace": "write",
|
|
29
|
-
// "process": "deny",
|
|
30
|
-
// "network": { "mode": "deny" },
|
|
31
|
-
// "tools": [],
|
|
32
|
-
// "mcp": {},
|
|
33
|
-
// "skillScripts": {},
|
|
34
|
-
// "subagents": "deny"
|
|
35
|
-
// }
|
|
36
|
-
// },
|
|
37
|
-
// "published": {
|
|
38
|
-
// "name": "KodaX Agent",
|
|
39
|
-
// "description": "Completes approved general tasks.",
|
|
40
|
-
// "version": "0.7.71",
|
|
41
|
-
// "skills": [{ "id": "general", "name": "General", "description": "Complete general tasks.", "tags": [] }],
|
|
42
|
-
// "inputModes": ["text/plain"],
|
|
43
|
-
// "outputModes": ["text/plain"]
|
|
44
|
-
// },
|
|
45
|
-
// "authentication": { "type": "bearer-env", "tokenEnv": "KODAX_A2A_TOKEN", "principalId": "configured-client" },
|
|
46
|
-
// "dataDir": "~/.kodax/a2a/tasks"
|
|
47
|
-
// },
|
|
48
|
-
|
|
49
|
-
// Production OAuth2 resource-server alternative for the server above. The
|
|
50
|
-
// external Authorization Server issues access tokens and, for JWT tokens,
|
|
51
|
-
// signs them. KodaX holds no issuer signing key; it validates RFC 9068 tokens
|
|
52
|
-
// against the issuer's rotating JWKS, audience, expiry, subject, and scopes.
|
|
53
|
-
// Replace the server.authentication value above with:
|
|
54
|
-
// {
|
|
55
|
-
// "type": "oauth2-jwt",
|
|
56
|
-
// "scheme": "enterprise-oauth",
|
|
57
|
-
// "issuer": "https://identity.example.com",
|
|
58
|
-
// "audience": "https://agent.example.com/a2a",
|
|
59
|
-
// "jwksUrl": "https://identity.example.com/.well-known/jwks.json",
|
|
60
|
-
// "tokenUrl": "https://identity.example.com/oauth/token",
|
|
61
|
-
// "metadataUrl": "https://identity.example.com/.well-known/oauth-authorization-server",
|
|
62
|
-
// "requiredScopes": ["a2a.invoke"]
|
|
63
|
-
// }
|
|
64
|
-
|
|
65
|
-
"agents": {
|
|
66
|
-
// Fixed Bearer compatibility example. `enabled` is hot desired state:
|
|
67
|
-
// disabled Agents remain configured but are not candidates for new
|
|
68
|
-
// orchestration, while already admitted remote tasks may finish.
|
|
1
|
+
// Bidirectional A2A configuration: ~/.kodax/integrations/a2a.json.
|
|
2
|
+
// `agents` calls many third-party Agents. The optional singleton `server`
|
|
3
|
+
// exposes exactly one KodaX general task Agent; ACP remains the coding/editor
|
|
4
|
+
// protocol. Uncomment only the entries you need; no token value belongs here.
|
|
5
|
+
// Legacy version 1 files remain readable. Non-empty files require an explicit
|
|
6
|
+
// stopped-daemon migration; new/empty files and every later write use version 2.
|
|
7
|
+
{
|
|
8
|
+
"version": 2,
|
|
9
|
+
|
|
10
|
+
// Create this inbound block with `kodax a2a expose`; config never starts a
|
|
11
|
+
// listener by itself. Do not copy private Agent instructions, Runtime Skills,
|
|
12
|
+
// model names, or local paths into the public `published.skills` list.
|
|
13
|
+
// Managed workspaces default below
|
|
14
|
+
// ~/kodax_a2a_server_workspace/<runtime-profile>/contexts/<context-key>/.
|
|
15
|
+
// Native read/grep/glob remains available according to workspace access.
|
|
16
|
+
// Arbitrary shell is never exposed. Skill instructions/assets need no
|
|
17
|
+
// process authority. An exact checked-in scripts/... entry requires
|
|
18
|
+
// process="isolated", skillScripts admission, and `kodax sandbox doctor`.
|
|
19
|
+
// ASRT receives no KodaX credentials or ambient ~/.srt-settings.json and its
|
|
20
|
+
// script quota is observed; hostile tenants also require an outer container/VM.
|
|
21
|
+
//
|
|
22
|
+
// "server": {
|
|
23
|
+
// "execution": {
|
|
24
|
+
// "kind": "local-agent",
|
|
25
|
+
// "agentRef": { "source": "markdown:user", "name": "report-agent" },
|
|
26
|
+
// "workspace": { "mode": "managed" },
|
|
27
|
+
// "toolPolicy": {
|
|
28
|
+
// "workspace": "write",
|
|
29
|
+
// "process": "deny",
|
|
30
|
+
// "network": { "mode": "deny" },
|
|
31
|
+
// "tools": [],
|
|
32
|
+
// "mcp": {},
|
|
33
|
+
// "skillScripts": {},
|
|
34
|
+
// "subagents": "deny"
|
|
35
|
+
// }
|
|
36
|
+
// },
|
|
37
|
+
// "published": {
|
|
38
|
+
// "name": "KodaX Agent",
|
|
39
|
+
// "description": "Completes approved general tasks.",
|
|
40
|
+
// "version": "0.7.71",
|
|
41
|
+
// "skills": [{ "id": "general", "name": "General", "description": "Complete general tasks.", "tags": [] }],
|
|
42
|
+
// "inputModes": ["text/plain"],
|
|
43
|
+
// "outputModes": ["text/plain"]
|
|
44
|
+
// },
|
|
45
|
+
// "authentication": { "type": "bearer-env", "tokenEnv": "KODAX_A2A_TOKEN", "principalId": "configured-client" },
|
|
46
|
+
// "dataDir": "~/.kodax/a2a/tasks"
|
|
47
|
+
// },
|
|
48
|
+
|
|
49
|
+
// Production OAuth2 resource-server alternative for the server above. The
|
|
50
|
+
// external Authorization Server issues access tokens and, for JWT tokens,
|
|
51
|
+
// signs them. KodaX holds no issuer signing key; it validates RFC 9068 tokens
|
|
52
|
+
// against the issuer's rotating JWKS, audience, expiry, subject, and scopes.
|
|
53
|
+
// Replace the server.authentication value above with:
|
|
54
|
+
// {
|
|
55
|
+
// "type": "oauth2-jwt",
|
|
56
|
+
// "scheme": "enterprise-oauth",
|
|
57
|
+
// "issuer": "https://identity.example.com",
|
|
58
|
+
// "audience": "https://agent.example.com/a2a",
|
|
59
|
+
// "jwksUrl": "https://identity.example.com/.well-known/jwks.json",
|
|
60
|
+
// "tokenUrl": "https://identity.example.com/oauth/token",
|
|
61
|
+
// "metadataUrl": "https://identity.example.com/.well-known/oauth-authorization-server",
|
|
62
|
+
// "requiredScopes": ["a2a.invoke"]
|
|
63
|
+
// }
|
|
64
|
+
|
|
65
|
+
"agents": {
|
|
66
|
+
// Fixed Bearer compatibility example. `enabled` is hot desired state:
|
|
67
|
+
// disabled Agents remain configured but are not candidates for new
|
|
68
|
+
// orchestration, while already admitted remote tasks may finish.
|
|
69
69
|
// "reporting": {
|
|
70
70
|
// "cardUrl": "https://agents.example.com/.well-known/agent-card.json",
|
|
71
71
|
// "enabled": true,
|
|
@@ -89,26 +89,26 @@
|
|
|
89
89
|
// "effect": "read"
|
|
90
90
|
// },
|
|
91
91
|
|
|
92
|
-
// Standards-based machine-to-machine OAuth2 example. The external
|
|
93
|
-
// Authorization Server issues access tokens; KodaX obtains and caches them
|
|
94
|
-
// only in process memory. `tokenUrl` must exactly match the selected Card
|
|
95
|
-
// OAuth2 clientCredentials flow. Use `kodax a2a enable|disable <name>` to
|
|
96
|
-
// mutate `enabled` atomically; the owning Runtime applies it asynchronously.
|
|
97
|
-
// "reviewer": {
|
|
98
|
-
// "cardUrl": "https://reviewer.example.com/.well-known/agent-card.json",
|
|
99
|
-
// "enabled": false,
|
|
100
|
-
// "effect": "read",
|
|
101
|
-
// "authentication": {
|
|
102
|
-
// "type": "oauth2-client-credentials",
|
|
103
|
-
// "scheme": "enterprise-oauth",
|
|
104
|
-
// "issuer": "https://identity.example.com",
|
|
105
|
-
// "tokenUrl": "https://identity.example.com/oauth/token",
|
|
106
|
-
// "clientId": "kodax-reviewer",
|
|
107
|
-
// "clientSecretEnv": "REVIEWER_CLIENT_SECRET",
|
|
108
|
-
// "scopes": ["a2a.invoke"],
|
|
109
|
-
// "resource": "https://reviewer.example.com/",
|
|
110
|
-
// "clientAuthentication": "client-secret-basic"
|
|
111
|
-
// }
|
|
112
|
-
// }
|
|
113
|
-
}
|
|
114
|
-
}
|
|
92
|
+
// Standards-based machine-to-machine OAuth2 example. The external
|
|
93
|
+
// Authorization Server issues access tokens; KodaX obtains and caches them
|
|
94
|
+
// only in process memory. `tokenUrl` must exactly match the selected Card
|
|
95
|
+
// OAuth2 clientCredentials flow. Use `kodax a2a enable|disable <name>` to
|
|
96
|
+
// mutate `enabled` atomically; the owning Runtime applies it asynchronously.
|
|
97
|
+
// "reviewer": {
|
|
98
|
+
// "cardUrl": "https://reviewer.example.com/.well-known/agent-card.json",
|
|
99
|
+
// "enabled": false,
|
|
100
|
+
// "effect": "read",
|
|
101
|
+
// "authentication": {
|
|
102
|
+
// "type": "oauth2-client-credentials",
|
|
103
|
+
// "scheme": "enterprise-oauth",
|
|
104
|
+
// "issuer": "https://identity.example.com",
|
|
105
|
+
// "tokenUrl": "https://identity.example.com/oauth/token",
|
|
106
|
+
// "clientId": "kodax-reviewer",
|
|
107
|
+
// "clientSecretEnv": "REVIEWER_CLIENT_SECRET",
|
|
108
|
+
// "scopes": ["a2a.invoke"],
|
|
109
|
+
// "resource": "https://reviewer.example.com/",
|
|
110
|
+
// "clientAuthentication": "client-secret-basic"
|
|
111
|
+
// }
|
|
112
|
+
// }
|
|
113
|
+
}
|
|
114
|
+
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
// Trusted user Extension paths: ~/.kodax/integrations/extensions.json.
|
|
2
|
-
// Extensions are host code. Reload is whole-domain atomic; use MCP for
|
|
3
|
-
// capabilities that should remain outside the KodaX process.
|
|
4
|
-
{
|
|
5
|
-
"version": 1,
|
|
6
|
-
"paths": []
|
|
7
|
-
}
|
|
1
|
+
// Trusted user Extension paths: ~/.kodax/integrations/extensions.json.
|
|
2
|
+
// Extensions are host code. Reload is whole-domain atomic; use MCP for
|
|
3
|
+
// capabilities that should remain outside the KodaX process.
|
|
4
|
+
{
|
|
5
|
+
"version": 1,
|
|
6
|
+
"paths": []
|
|
7
|
+
}
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
// User MCP declarations: ~/.kodax/integrations/mcp.json (strict JSON).
|
|
2
|
-
// The whole file hot-reloads; healthy entries remain active if one new entry
|
|
3
|
-
// fails to prepare. Keep credentials in ${env:NAME} references.
|
|
4
|
-
{
|
|
5
|
-
"version": 1,
|
|
6
|
-
"servers": {}
|
|
7
|
-
// Example:
|
|
8
|
-
// "servers": {
|
|
9
|
-
// "reporting": {
|
|
10
|
-
// "type": "streamable-http",
|
|
11
|
-
// "url": "https://mcp.example.com",
|
|
12
|
-
// "headers": { "Authorization": "Bearer ${env:REPORTING_MCP_TOKEN}" },
|
|
13
|
-
// "connect": "lazy"
|
|
14
|
-
// }
|
|
15
|
-
// }
|
|
16
|
-
}
|
|
1
|
+
// User MCP declarations: ~/.kodax/integrations/mcp.json (strict JSON).
|
|
2
|
+
// The whole file hot-reloads; healthy entries remain active if one new entry
|
|
3
|
+
// fails to prepare. Keep credentials in ${env:NAME} references.
|
|
4
|
+
{
|
|
5
|
+
"version": 1,
|
|
6
|
+
"servers": {}
|
|
7
|
+
// Example:
|
|
8
|
+
// "servers": {
|
|
9
|
+
// "reporting": {
|
|
10
|
+
// "type": "streamable-http",
|
|
11
|
+
// "url": "https://mcp.example.com",
|
|
12
|
+
// "headers": { "Authorization": "Bearer ${env:REPORTING_MCP_TOKEN}" },
|
|
13
|
+
// "connect": "lazy"
|
|
14
|
+
// }
|
|
15
|
+
// }
|
|
16
|
+
}
|
|
@@ -1,82 +1,82 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: code-review
|
|
3
|
-
description: 审查代码、diff、提交或当前 git 改动,重点发现 bug、行为回归、边界条件遗漏、安全风险、性能问题和缺失测试。当用户提到 code review、review 这段代码、帮我看看改动有没有问题、审查 PR/提交时使用;不要用于单纯解释代码或直接实现需求。
|
|
4
|
-
user-invocable: true
|
|
5
|
-
allowed-tools: "Read, Grep, Glob, Bash(npm:*, node:*, npx:*)"
|
|
6
|
-
argument-hint: "[file-or-directory]"
|
|
7
|
-
compatibility: "Works best in a git repository or when the review target is provided explicitly."
|
|
8
|
-
---
|
|
9
|
-
|
|
10
|
-
# Code Review Skill
|
|
11
|
-
|
|
12
|
-
对 **$ARGUMENTS** 进行代码审查,并优先输出真正会影响正确性、稳定性或可维护性的发现。
|
|
13
|
-
|
|
14
|
-
## 范围判定
|
|
15
|
-
|
|
16
|
-
- 如果提供了 `$ARGUMENTS`,审查对应文件、目录、diff 或提交范围。
|
|
17
|
-
- 如果没有提供参数,优先审查当前 git 改动;如果不在 git 仓库中,就明确说明缺少范围并请求更具体的目标。
|
|
18
|
-
- 在下结论前,尽量查看相邻实现、调用方、测试和相关配置,避免脱离上下文的误报。
|
|
19
|
-
|
|
20
|
-
## 审查重点
|
|
21
|
-
|
|
22
|
-
- 正确性与回归风险:逻辑错误、边界条件、状态同步、类型假设、兼容性变化。
|
|
23
|
-
- 稳定性与安全性:异常处理、输入校验、资源泄漏、敏感信息暴露、权限或注入风险。
|
|
24
|
-
- 性能与可维护性:明显的复杂度问题、重复逻辑、难以验证的实现、缺失测试保护。
|
|
25
|
-
- 只报告有行动价值的问题。纯风格偏好或可选优化,不要包装成高优先级 finding。
|
|
26
|
-
|
|
27
|
-
## 严重级别
|
|
28
|
-
|
|
29
|
-
- `Critical`: 会导致数据丢失、严重安全问题、崩溃或明显错误结果。
|
|
30
|
-
- `High`: 很可能引发实际 bug、行为回归或线上风险。
|
|
31
|
-
- `Medium`: 不是立刻出错,但会留下明显缺陷、维护风险或测试空洞。
|
|
32
|
-
- `Low`: 小范围问题或局部改进点,仅在确实值得用户处理时报告。
|
|
33
|
-
|
|
34
|
-
## 输出要求
|
|
35
|
-
|
|
36
|
-
- 先给 `## Findings`,并按严重级别从高到低排列。
|
|
37
|
-
- 每条 finding 都要包含:
|
|
38
|
-
- 严重级别和简短标题
|
|
39
|
-
- 具体文件和行号
|
|
40
|
-
- 为什么这是问题,可能造成什么影响
|
|
41
|
-
- 建议的修复方向
|
|
42
|
-
- 如果没有发现值得报告的问题,明确写 `No findings.`,然后补充剩余风险或测试空白。
|
|
43
|
-
- 需要时再追加 `## Open Questions` 或 `## Change Summary`,但不要用总体打分或“亮点”冲淡问题。
|
|
44
|
-
|
|
45
|
-
## 输出模板
|
|
46
|
-
|
|
47
|
-
```markdown
|
|
48
|
-
## Findings
|
|
49
|
-
- [High] Title — `path/to/file.ts:42`
|
|
50
|
-
Why it matters and what to change.
|
|
51
|
-
|
|
52
|
-
## Open Questions
|
|
53
|
-
- Optional clarification or assumption.
|
|
54
|
-
|
|
55
|
-
## Change Summary
|
|
56
|
-
- Optional short summary only after findings.
|
|
57
|
-
```
|
|
58
|
-
|
|
59
|
-
## 使用示例
|
|
60
|
-
|
|
61
|
-
- `/code-review src/auth.ts` - 审查单个文件
|
|
62
|
-
- `/code-review packages/coding/src/` - 审查目录
|
|
63
|
-
- `/code-review` - 审查当前 git 变更
|
|
64
|
-
|
|
65
|
-
## Lean Review Lens
|
|
66
|
-
|
|
67
|
-
When the user asks for lean review, minimal diff, YAGNI, over-engineering, or
|
|
68
|
-
native/stdlib replacement opportunities, add this lens after correctness and
|
|
69
|
-
security findings:
|
|
70
|
-
|
|
71
|
-
- Look for code, files, abstractions, dependencies, configuration, or workflow
|
|
72
|
-
changes that can be deleted without losing requested behavior.
|
|
73
|
-
- Prefer existing repository code, stdlib/native platform features, or an
|
|
74
|
-
already-installed dependency when that is verifiably simpler than new custom
|
|
75
|
-
code.
|
|
76
|
-
- Do not recommend cutting trust-boundary validation, security checks,
|
|
77
|
-
data-loss protection, accessibility basics, observability needed for safety,
|
|
78
|
-
or explicitly requested behavior.
|
|
79
|
-
- Do not present optional cleanup as a high-severity finding. Put non-blocking
|
|
80
|
-
deletion/replacement ideas under `## Lean Suggestions`.
|
|
81
|
-
- For each lean suggestion, explain what can be skipped or removed and when it
|
|
82
|
-
should be added back.
|
|
1
|
+
---
|
|
2
|
+
name: code-review
|
|
3
|
+
description: 审查代码、diff、提交或当前 git 改动,重点发现 bug、行为回归、边界条件遗漏、安全风险、性能问题和缺失测试。当用户提到 code review、review 这段代码、帮我看看改动有没有问题、审查 PR/提交时使用;不要用于单纯解释代码或直接实现需求。
|
|
4
|
+
user-invocable: true
|
|
5
|
+
allowed-tools: "Read, Grep, Glob, Bash(npm:*, node:*, npx:*)"
|
|
6
|
+
argument-hint: "[file-or-directory]"
|
|
7
|
+
compatibility: "Works best in a git repository or when the review target is provided explicitly."
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# Code Review Skill
|
|
11
|
+
|
|
12
|
+
对 **$ARGUMENTS** 进行代码审查,并优先输出真正会影响正确性、稳定性或可维护性的发现。
|
|
13
|
+
|
|
14
|
+
## 范围判定
|
|
15
|
+
|
|
16
|
+
- 如果提供了 `$ARGUMENTS`,审查对应文件、目录、diff 或提交范围。
|
|
17
|
+
- 如果没有提供参数,优先审查当前 git 改动;如果不在 git 仓库中,就明确说明缺少范围并请求更具体的目标。
|
|
18
|
+
- 在下结论前,尽量查看相邻实现、调用方、测试和相关配置,避免脱离上下文的误报。
|
|
19
|
+
|
|
20
|
+
## 审查重点
|
|
21
|
+
|
|
22
|
+
- 正确性与回归风险:逻辑错误、边界条件、状态同步、类型假设、兼容性变化。
|
|
23
|
+
- 稳定性与安全性:异常处理、输入校验、资源泄漏、敏感信息暴露、权限或注入风险。
|
|
24
|
+
- 性能与可维护性:明显的复杂度问题、重复逻辑、难以验证的实现、缺失测试保护。
|
|
25
|
+
- 只报告有行动价值的问题。纯风格偏好或可选优化,不要包装成高优先级 finding。
|
|
26
|
+
|
|
27
|
+
## 严重级别
|
|
28
|
+
|
|
29
|
+
- `Critical`: 会导致数据丢失、严重安全问题、崩溃或明显错误结果。
|
|
30
|
+
- `High`: 很可能引发实际 bug、行为回归或线上风险。
|
|
31
|
+
- `Medium`: 不是立刻出错,但会留下明显缺陷、维护风险或测试空洞。
|
|
32
|
+
- `Low`: 小范围问题或局部改进点,仅在确实值得用户处理时报告。
|
|
33
|
+
|
|
34
|
+
## 输出要求
|
|
35
|
+
|
|
36
|
+
- 先给 `## Findings`,并按严重级别从高到低排列。
|
|
37
|
+
- 每条 finding 都要包含:
|
|
38
|
+
- 严重级别和简短标题
|
|
39
|
+
- 具体文件和行号
|
|
40
|
+
- 为什么这是问题,可能造成什么影响
|
|
41
|
+
- 建议的修复方向
|
|
42
|
+
- 如果没有发现值得报告的问题,明确写 `No findings.`,然后补充剩余风险或测试空白。
|
|
43
|
+
- 需要时再追加 `## Open Questions` 或 `## Change Summary`,但不要用总体打分或“亮点”冲淡问题。
|
|
44
|
+
|
|
45
|
+
## 输出模板
|
|
46
|
+
|
|
47
|
+
```markdown
|
|
48
|
+
## Findings
|
|
49
|
+
- [High] Title — `path/to/file.ts:42`
|
|
50
|
+
Why it matters and what to change.
|
|
51
|
+
|
|
52
|
+
## Open Questions
|
|
53
|
+
- Optional clarification or assumption.
|
|
54
|
+
|
|
55
|
+
## Change Summary
|
|
56
|
+
- Optional short summary only after findings.
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
## 使用示例
|
|
60
|
+
|
|
61
|
+
- `/code-review src/auth.ts` - 审查单个文件
|
|
62
|
+
- `/code-review packages/coding/src/` - 审查目录
|
|
63
|
+
- `/code-review` - 审查当前 git 变更
|
|
64
|
+
|
|
65
|
+
## Lean Review Lens
|
|
66
|
+
|
|
67
|
+
When the user asks for lean review, minimal diff, YAGNI, over-engineering, or
|
|
68
|
+
native/stdlib replacement opportunities, add this lens after correctness and
|
|
69
|
+
security findings:
|
|
70
|
+
|
|
71
|
+
- Look for code, files, abstractions, dependencies, configuration, or workflow
|
|
72
|
+
changes that can be deleted without losing requested behavior.
|
|
73
|
+
- Prefer existing repository code, stdlib/native platform features, or an
|
|
74
|
+
already-installed dependency when that is verifiably simpler than new custom
|
|
75
|
+
code.
|
|
76
|
+
- Do not recommend cutting trust-boundary validation, security checks,
|
|
77
|
+
data-loss protection, accessibility basics, observability needed for safety,
|
|
78
|
+
or explicitly requested behavior.
|
|
79
|
+
- Do not present optional cleanup as a high-severity finding. Put non-blocking
|
|
80
|
+
deletion/replacement ideas under `## Lean Suggestions`.
|
|
81
|
+
- For each lean suggestion, explain what can be skipped or removed and when it
|
|
82
|
+
should be added back.
|
|
@@ -1,84 +1,84 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: git-workflow
|
|
3
|
-
description: 执行明确的 Git 操作,例如查看状态、提交、建分支、push、stash 或创建 PR。只有在用户明确要求实际执行这些 Git 操作时才使用;不要用于单纯解释 Git 概念或讨论策略。
|
|
4
|
-
user-invocable: true
|
|
5
|
-
disable-model-invocation: true
|
|
6
|
-
allowed-tools: "Read, Grep, Glob, Bash(git:*, gh:*)"
|
|
7
|
-
argument-hint: "[status|commit|branch|push|pr|stash] [args]"
|
|
8
|
-
compatibility: "Requires a Git repository. Pull request creation works best when GitHub CLI (gh) is installed and authenticated."
|
|
9
|
-
---
|
|
10
|
-
|
|
11
|
-
# Git Workflow Skill
|
|
12
|
-
|
|
13
|
-
执行 Git 工作流时,优先保证仓库安全、改动边界清晰、命令可追溯。
|
|
14
|
-
|
|
15
|
-
## 总流程
|
|
16
|
-
|
|
17
|
-
1. 先检查仓库状态,例如 `git status --short --branch`,必要时补充 `git diff --stat`、`git diff --cached`、`git log --oneline`。
|
|
18
|
-
2. 根据第一个参数判断操作类型;如果用户表达明确,就直接执行对应流程。
|
|
19
|
-
3. 对会改写历史、删除数据或影响远程分支的操作,先说明风险;只有在用户明确要求时才继续。
|
|
20
|
-
4. 所有 Git 命令都使用非交互方式执行。
|
|
21
|
-
|
|
22
|
-
## 支持的操作
|
|
23
|
-
|
|
24
|
-
### status
|
|
25
|
-
- 汇总当前分支、upstream、已暂存/未暂存/未跟踪文件,以及明显的下一步建议。
|
|
26
|
-
|
|
27
|
-
### commit
|
|
28
|
-
- 只暂存与当前任务直接相关的文件;不要顺手带上无关改动。
|
|
29
|
-
- 如果用户没有提供 message,基于 diff 生成简洁的 Conventional Commit。
|
|
30
|
-
- 优先使用 `git add <path>`,避免无差别 `git add .`,除非用户明确要求全部提交。
|
|
31
|
-
- 提交前检查是否混入敏感文件或明显不该提交的产物。
|
|
32
|
-
|
|
33
|
-
**Commit 模板**
|
|
34
|
-
```
|
|
35
|
-
<type>(<scope>): <description>
|
|
36
|
-
|
|
37
|
-
[optional body]
|
|
38
|
-
|
|
39
|
-
[optional footer]
|
|
40
|
-
```
|
|
41
|
-
|
|
42
|
-
### branch
|
|
43
|
-
- `create` / `new`: 创建新分支。除非用户指定,否则遵循仓库已有命名风格。
|
|
44
|
-
- `switch` / `checkout`: 切换分支前,先检查当前工作区是否干净。
|
|
45
|
-
- `list`: 列出本地/远程分支,并在有帮助时指出当前分支。
|
|
46
|
-
- `delete` / `remove`: 仅在删除条件安全且用户请求明确时执行。
|
|
47
|
-
|
|
48
|
-
### push
|
|
49
|
-
- 先确认当前分支与 upstream 的关系。
|
|
50
|
-
- 首次 push 或没有 upstream 时,设置合适的 upstream。
|
|
51
|
-
- `--force` 或 `--force-with-lease` 只有在用户明确要求时才允许。
|
|
52
|
-
|
|
53
|
-
### pr
|
|
54
|
-
- 检查当前分支是否已 push,必要时先推送。
|
|
55
|
-
- 基于 diff 和提交历史生成简洁的 PR 标题与描述。
|
|
56
|
-
- 使用 `gh pr create` 前确认 `gh` 可用且已认证;否则清楚说明阻塞点。
|
|
57
|
-
|
|
58
|
-
### stash
|
|
59
|
-
- `save`: 有上下文时附带说明性消息。
|
|
60
|
-
- `list`: 列出 stash,并说明最近一条的用途。
|
|
61
|
-
- `pop`: 应用并删除最近 stash,若有冲突需明确报告。
|
|
62
|
-
- `drop`: 仅在用户明确要求删除时执行。
|
|
63
|
-
|
|
64
|
-
## 安全边界
|
|
65
|
-
|
|
66
|
-
- 不要使用 `git reset --hard`、`git checkout --`、`git clean -fd`、`git commit --amend`、强推、历史改写等危险操作,除非用户明确要求。
|
|
67
|
-
- 不要回滚、覆盖或丢弃用户的无关改动。
|
|
68
|
-
- 遇到脏工作区、冲突、无 upstream、权限不足、缺少 `gh` 等阻塞时,要先解释现状再继续。
|
|
69
|
-
- 对“合并分支”“rebase”“cherry-pick”等这里没有明确定义的操作,如果用户明确提出,可以按 Git 最佳实践执行,但要先说明风险和计划。
|
|
70
|
-
|
|
71
|
-
## 汇报方式
|
|
72
|
-
|
|
73
|
-
- 简洁说明执行了哪些命令、当前仓库状态变成了什么样。
|
|
74
|
-
- 如果因为风险或条件不满足而没有执行,要明确说明原因和下一步建议。
|
|
75
|
-
|
|
76
|
-
## 使用示例
|
|
77
|
-
|
|
78
|
-
- `/git-workflow status` - 查看当前仓库状态
|
|
79
|
-
- `/git-workflow commit` - 分析相关改动并提交
|
|
80
|
-
- `/git-workflow commit "fix: resolve auth bug"` - 使用指定消息提交
|
|
81
|
-
- `/git-workflow branch create feature/login` - 创建新分支
|
|
82
|
-
- `/git-workflow push` - 推送当前分支
|
|
83
|
-
- `/git-workflow pr` - 为当前分支创建 PR
|
|
84
|
-
- `/git-workflow stash` - 暂存当前变更
|
|
1
|
+
---
|
|
2
|
+
name: git-workflow
|
|
3
|
+
description: 执行明确的 Git 操作,例如查看状态、提交、建分支、push、stash 或创建 PR。只有在用户明确要求实际执行这些 Git 操作时才使用;不要用于单纯解释 Git 概念或讨论策略。
|
|
4
|
+
user-invocable: true
|
|
5
|
+
disable-model-invocation: true
|
|
6
|
+
allowed-tools: "Read, Grep, Glob, Bash(git:*, gh:*)"
|
|
7
|
+
argument-hint: "[status|commit|branch|push|pr|stash] [args]"
|
|
8
|
+
compatibility: "Requires a Git repository. Pull request creation works best when GitHub CLI (gh) is installed and authenticated."
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
# Git Workflow Skill
|
|
12
|
+
|
|
13
|
+
执行 Git 工作流时,优先保证仓库安全、改动边界清晰、命令可追溯。
|
|
14
|
+
|
|
15
|
+
## 总流程
|
|
16
|
+
|
|
17
|
+
1. 先检查仓库状态,例如 `git status --short --branch`,必要时补充 `git diff --stat`、`git diff --cached`、`git log --oneline`。
|
|
18
|
+
2. 根据第一个参数判断操作类型;如果用户表达明确,就直接执行对应流程。
|
|
19
|
+
3. 对会改写历史、删除数据或影响远程分支的操作,先说明风险;只有在用户明确要求时才继续。
|
|
20
|
+
4. 所有 Git 命令都使用非交互方式执行。
|
|
21
|
+
|
|
22
|
+
## 支持的操作
|
|
23
|
+
|
|
24
|
+
### status
|
|
25
|
+
- 汇总当前分支、upstream、已暂存/未暂存/未跟踪文件,以及明显的下一步建议。
|
|
26
|
+
|
|
27
|
+
### commit
|
|
28
|
+
- 只暂存与当前任务直接相关的文件;不要顺手带上无关改动。
|
|
29
|
+
- 如果用户没有提供 message,基于 diff 生成简洁的 Conventional Commit。
|
|
30
|
+
- 优先使用 `git add <path>`,避免无差别 `git add .`,除非用户明确要求全部提交。
|
|
31
|
+
- 提交前检查是否混入敏感文件或明显不该提交的产物。
|
|
32
|
+
|
|
33
|
+
**Commit 模板**
|
|
34
|
+
```
|
|
35
|
+
<type>(<scope>): <description>
|
|
36
|
+
|
|
37
|
+
[optional body]
|
|
38
|
+
|
|
39
|
+
[optional footer]
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
### branch
|
|
43
|
+
- `create` / `new`: 创建新分支。除非用户指定,否则遵循仓库已有命名风格。
|
|
44
|
+
- `switch` / `checkout`: 切换分支前,先检查当前工作区是否干净。
|
|
45
|
+
- `list`: 列出本地/远程分支,并在有帮助时指出当前分支。
|
|
46
|
+
- `delete` / `remove`: 仅在删除条件安全且用户请求明确时执行。
|
|
47
|
+
|
|
48
|
+
### push
|
|
49
|
+
- 先确认当前分支与 upstream 的关系。
|
|
50
|
+
- 首次 push 或没有 upstream 时,设置合适的 upstream。
|
|
51
|
+
- `--force` 或 `--force-with-lease` 只有在用户明确要求时才允许。
|
|
52
|
+
|
|
53
|
+
### pr
|
|
54
|
+
- 检查当前分支是否已 push,必要时先推送。
|
|
55
|
+
- 基于 diff 和提交历史生成简洁的 PR 标题与描述。
|
|
56
|
+
- 使用 `gh pr create` 前确认 `gh` 可用且已认证;否则清楚说明阻塞点。
|
|
57
|
+
|
|
58
|
+
### stash
|
|
59
|
+
- `save`: 有上下文时附带说明性消息。
|
|
60
|
+
- `list`: 列出 stash,并说明最近一条的用途。
|
|
61
|
+
- `pop`: 应用并删除最近 stash,若有冲突需明确报告。
|
|
62
|
+
- `drop`: 仅在用户明确要求删除时执行。
|
|
63
|
+
|
|
64
|
+
## 安全边界
|
|
65
|
+
|
|
66
|
+
- 不要使用 `git reset --hard`、`git checkout --`、`git clean -fd`、`git commit --amend`、强推、历史改写等危险操作,除非用户明确要求。
|
|
67
|
+
- 不要回滚、覆盖或丢弃用户的无关改动。
|
|
68
|
+
- 遇到脏工作区、冲突、无 upstream、权限不足、缺少 `gh` 等阻塞时,要先解释现状再继续。
|
|
69
|
+
- 对“合并分支”“rebase”“cherry-pick”等这里没有明确定义的操作,如果用户明确提出,可以按 Git 最佳实践执行,但要先说明风险和计划。
|
|
70
|
+
|
|
71
|
+
## 汇报方式
|
|
72
|
+
|
|
73
|
+
- 简洁说明执行了哪些命令、当前仓库状态变成了什么样。
|
|
74
|
+
- 如果因为风险或条件不满足而没有执行,要明确说明原因和下一步建议。
|
|
75
|
+
|
|
76
|
+
## 使用示例
|
|
77
|
+
|
|
78
|
+
- `/git-workflow status` - 查看当前仓库状态
|
|
79
|
+
- `/git-workflow commit` - 分析相关改动并提交
|
|
80
|
+
- `/git-workflow commit "fix: resolve auth bug"` - 使用指定消息提交
|
|
81
|
+
- `/git-workflow branch create feature/login` - 创建新分支
|
|
82
|
+
- `/git-workflow push` - 推送当前分支
|
|
83
|
+
- `/git-workflow pr` - 为当前分支创建 PR
|
|
84
|
+
- `/git-workflow stash` - 暂存当前变更
|