agent-issues 0.0.121 → 0.0.126
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/dist/build-info.json +3 -0
- package/dist/cli.js +97746 -26
- package/kanban/dist/assets/index-CIAg6qj5.css +1 -0
- package/kanban/dist/assets/index-DaYQjJS7.js +920 -0
- package/kanban/dist/index.html +13 -0
- package/package.json +12 -11
- package/site/dist/assets/{index-Cx-fLU3e.js → index-D6NM1iDo.js} +181 -144
- package/site/dist/index.html +1 -1
- package/dist/agent-installer.d.ts +0 -49
- package/dist/agent-installer.js +0 -171
- package/dist/agent-installer.js.map +0 -1
- package/dist/auth-session.d.ts +0 -40
- package/dist/auth-session.js +0 -107
- package/dist/auth-session.js.map +0 -1
- package/dist/body-backfill.d.ts +0 -26
- package/dist/body-backfill.js +0 -219
- package/dist/body-backfill.js.map +0 -1
- package/dist/build-mode.d.ts +0 -1
- package/dist/build-mode.js +0 -1
- package/dist/build-mode.js.map +0 -1
- package/dist/cli/commands/auth.d.ts +0 -61
- package/dist/cli/commands/auth.js +0 -134
- package/dist/cli/commands/auth.js.map +0 -1
- package/dist/cli/commands/backfill.d.ts +0 -8
- package/dist/cli/commands/backfill.js +0 -36
- package/dist/cli/commands/backfill.js.map +0 -1
- package/dist/cli/commands/comments.d.ts +0 -34
- package/dist/cli/commands/comments.js +0 -124
- package/dist/cli/commands/comments.js.map +0 -1
- package/dist/cli/commands/context.d.ts +0 -13
- package/dist/cli/commands/context.js +0 -156
- package/dist/cli/commands/context.js.map +0 -1
- package/dist/cli/commands/entities.d.ts +0 -91
- package/dist/cli/commands/entities.js +0 -420
- package/dist/cli/commands/entities.js.map +0 -1
- package/dist/cli/commands/export.d.ts +0 -20
- package/dist/cli/commands/export.js +0 -98
- package/dist/cli/commands/export.js.map +0 -1
- package/dist/cli/commands/fallback.d.ts +0 -6
- package/dist/cli/commands/fallback.js +0 -10
- package/dist/cli/commands/fallback.js.map +0 -1
- package/dist/cli/commands/handoff.d.ts +0 -1
- package/dist/cli/commands/handoff.js +0 -2
- package/dist/cli/commands/handoff.js.map +0 -1
- package/dist/cli/commands/installers.d.ts +0 -37
- package/dist/cli/commands/installers.js +0 -78
- package/dist/cli/commands/installers.js.map +0 -1
- package/dist/cli/commands/kanban.d.ts +0 -8
- package/dist/cli/commands/kanban.js +0 -83
- package/dist/cli/commands/kanban.js.map +0 -1
- package/dist/cli/commands/meta.d.ts +0 -14
- package/dist/cli/commands/meta.js +0 -33
- package/dist/cli/commands/meta.js.map +0 -1
- package/dist/cli/commands/plan-entries.d.ts +0 -30
- package/dist/cli/commands/plan-entries.js +0 -94
- package/dist/cli/commands/plan-entries.js.map +0 -1
- package/dist/cli/commands/site.d.ts +0 -29
- package/dist/cli/commands/site.js +0 -89
- package/dist/cli/commands/site.js.map +0 -1
- package/dist/cli/commands/sql.d.ts +0 -6
- package/dist/cli/commands/sql.js +0 -21
- package/dist/cli/commands/sql.js.map +0 -1
- package/dist/cli/commands/synchronize.d.ts +0 -12
- package/dist/cli/commands/synchronize.js +0 -31
- package/dist/cli/commands/synchronize.js.map +0 -1
- package/dist/cli/commands/tenants.d.ts +0 -29
- package/dist/cli/commands/tenants.js +0 -101
- package/dist/cli/commands/tenants.js.map +0 -1
- package/dist/cli/index.d.ts +0 -4
- package/dist/cli/index.js +0 -120
- package/dist/cli/index.js.map +0 -1
- package/dist/cli/renderers.d.ts +0 -250
- package/dist/cli/renderers.js +0 -286
- package/dist/cli/renderers.js.map +0 -1
- package/dist/cli/shared.d.ts +0 -97
- package/dist/cli/shared.js +0 -192
- package/dist/cli/shared.js.map +0 -1
- package/dist/cli.d.ts +0 -11
- package/dist/cli.js.map +0 -1
- package/dist/context-cli.d.ts +0 -16
- package/dist/context-cli.js +0 -131
- package/dist/context-cli.js.map +0 -1
- package/dist/daemon/daemon-lifecycle.d.ts +0 -1
- package/dist/daemon/daemon-lifecycle.js +0 -2
- package/dist/daemon/daemon-lifecycle.js.map +0 -1
- package/dist/daemon/daemon-main.d.ts +0 -14
- package/dist/daemon/daemon-main.js +0 -30
- package/dist/daemon/daemon-main.js.map +0 -1
- package/dist/daemon/local-daemon-store.d.ts +0 -21
- package/dist/daemon/local-daemon-store.js +0 -31
- package/dist/daemon/local-daemon-store.js.map +0 -1
- package/dist/entity-projection.d.ts +0 -141
- package/dist/entity-projection.js +0 -147
- package/dist/entity-projection.js.map +0 -1
- package/dist/entra-device-login.d.ts +0 -12
- package/dist/entra-device-login.js +0 -40
- package/dist/entra-device-login.js.map +0 -1
- package/dist/export-files.d.ts +0 -24
- package/dist/export-files.js +0 -230
- package/dist/export-files.js.map +0 -1
- package/dist/export-markdown.d.ts +0 -24
- package/dist/export-markdown.js +0 -343
- package/dist/export-markdown.js.map +0 -1
- package/dist/help.d.ts +0 -112
- package/dist/help.js +0 -1430
- package/dist/help.js.map +0 -1
- package/dist/kanban/assets.d.ts +0 -3
- package/dist/kanban/assets.js +0 -37
- package/dist/kanban/assets.js.map +0 -1
- package/dist/kanban/index.d.ts +0 -1
- package/dist/kanban/index.js +0 -2
- package/dist/kanban/index.js.map +0 -1
- package/dist/kanban/server.d.ts +0 -28
- package/dist/kanban/server.js +0 -118
- package/dist/kanban/server.js.map +0 -1
- package/dist/mcp-installer.d.ts +0 -32
- package/dist/mcp-installer.js +0 -118
- package/dist/mcp-installer.js.map +0 -1
- package/dist/mcp-server/index.d.ts +0 -11
- package/dist/mcp-server/index.js +0 -504
- package/dist/mcp-server/index.js.map +0 -1
- package/dist/mcp-server/index.test.d.ts +0 -1
- package/dist/mcp-server/index.test.js +0 -746
- package/dist/mcp-server/index.test.js.map +0 -1
- package/dist/mcp-server/mcp-tool-audit.d.ts +0 -6
- package/dist/mcp-server/mcp-tool-audit.js +0 -47
- package/dist/mcp-server/mcp-tool-audit.js.map +0 -1
- package/dist/mcp-server/stdio.d.ts +0 -2
- package/dist/mcp-server/stdio.js +0 -7
- package/dist/mcp-server/stdio.js.map +0 -1
- package/dist/mcp.d.ts +0 -2
- package/dist/mcp.js +0 -19
- package/dist/mcp.js.map +0 -1
- package/dist/open-storage-driver.d.ts +0 -55
- package/dist/open-storage-driver.js +0 -73
- package/dist/open-storage-driver.js.map +0 -1
- package/dist/open-synchronize-stores.d.ts +0 -24
- package/dist/open-synchronize-stores.js +0 -34
- package/dist/open-synchronize-stores.js.map +0 -1
- package/dist/project-identity.d.ts +0 -23
- package/dist/project-identity.js +0 -121
- package/dist/project-identity.js.map +0 -1
- package/dist/runtime-access-boundary.d.ts +0 -7
- package/dist/runtime-access-boundary.js +0 -182
- package/dist/runtime-access-boundary.js.map +0 -1
- package/dist/service-discovery.d.ts +0 -10
- package/dist/service-discovery.js +0 -64
- package/dist/service-discovery.js.map +0 -1
- package/dist/site/assets.d.ts +0 -4
- package/dist/site/assets.js +0 -46
- package/dist/site/assets.js.map +0 -1
- package/dist/site/cloud-events-relay.d.ts +0 -16
- package/dist/site/cloud-events-relay.js +0 -78
- package/dist/site/cloud-events-relay.js.map +0 -1
- package/dist/site/index.d.ts +0 -1
- package/dist/site/index.js +0 -2
- package/dist/site/index.js.map +0 -1
- package/dist/site/server.d.ts +0 -42
- package/dist/site/server.js +0 -632
- package/dist/site/server.js.map +0 -1
- package/dist/skill-installer.d.ts +0 -35
- package/dist/skill-installer.js +0 -180
- package/dist/skill-installer.js.map +0 -1
- package/dist/vitest-setup.d.ts +0 -1
- package/dist/vitest-setup.js +0 -7
- package/dist/vitest-setup.js.map +0 -1
package/dist/help.js
DELETED
|
@@ -1,1430 +0,0 @@
|
|
|
1
|
-
import { ALLOWED_RELATIONS, ENTITY_CATEGORIES, ENTITY_TYPES, ENTITY_KINDS, ENTITY_PRIORITIES, ID_PREFIX, STATUS_FLOW, STRUCTURAL_RELATION_TYPES, getArchiveStatus, isStructuralRelationType } from "@agent-issues/core";
|
|
2
|
-
import { DEFAULT_CONTEXT_KEY } from "@agent-issues/api-local";
|
|
3
|
-
const GLOBAL_OPTIONS = [
|
|
4
|
-
{
|
|
5
|
-
name: "--db <path>",
|
|
6
|
-
description: "Use a specific SQLite database path."
|
|
7
|
-
},
|
|
8
|
-
{
|
|
9
|
-
name: "--json",
|
|
10
|
-
description: "Print machine-readable JSON. Entity mutations return acknowledgements; list and relation reads return summaries."
|
|
11
|
-
},
|
|
12
|
-
{
|
|
13
|
-
name: "--pretty",
|
|
14
|
-
description: "Pretty-print JSON when used with --json."
|
|
15
|
-
},
|
|
16
|
-
{
|
|
17
|
-
name: "--help, -h",
|
|
18
|
-
description: "Show help for the whole CLI or the selected command."
|
|
19
|
-
}
|
|
20
|
-
];
|
|
21
|
-
const ENTITY_KIND_VALUES = ENTITY_KINDS;
|
|
22
|
-
const ENTITY_CATEGORY_OPTION = {
|
|
23
|
-
name: "--category <category>",
|
|
24
|
-
description: "Set a category. Debt creation requires a category.",
|
|
25
|
-
allowedValues: ENTITY_CATEGORIES
|
|
26
|
-
};
|
|
27
|
-
const ENTITY_PRIORITY_OPTION = {
|
|
28
|
-
name: "--priority <priority>",
|
|
29
|
-
description: "Set a priority. Debt creation requires a priority.",
|
|
30
|
-
allowedValues: ENTITY_PRIORITIES
|
|
31
|
-
};
|
|
32
|
-
const ENTITY_TYPE_OPTION = {
|
|
33
|
-
name: "--type <type>",
|
|
34
|
-
description: "Set a kind-specific entity type.",
|
|
35
|
-
allowedValues: Object.values(ENTITY_TYPES).flat()
|
|
36
|
-
};
|
|
37
|
-
const RELATION_TYPE_VALUES = Array.from(new Set(ALLOWED_RELATIONS.map((relation) => relation.type))).sort();
|
|
38
|
-
const STATUS_VALUES = Array.from(new Set(Object.values(STATUS_FLOW).flat())).sort();
|
|
39
|
-
const COMMAND_SPECS = [
|
|
40
|
-
{
|
|
41
|
-
name: "sql",
|
|
42
|
-
summary: "Run a read-only SQL query against the active local SQLite database.",
|
|
43
|
-
usage: [
|
|
44
|
-
"agent-issues sql <statement>"
|
|
45
|
-
],
|
|
46
|
-
positionals: [
|
|
47
|
-
{
|
|
48
|
-
name: "statement",
|
|
49
|
-
description: "The SQL statement to run. Quote the statement in the shell.",
|
|
50
|
-
required: true
|
|
51
|
-
}
|
|
52
|
-
],
|
|
53
|
-
examples: [
|
|
54
|
-
'agent-issues sql "SELECT id, title FROM entities" --json'
|
|
55
|
-
],
|
|
56
|
-
notes: [
|
|
57
|
-
"This command is available only when the active saved login is local.",
|
|
58
|
-
"The query runs through a read-only SQLite connection."
|
|
59
|
-
],
|
|
60
|
-
output: {
|
|
61
|
-
human: ["A JSON array of result rows."],
|
|
62
|
-
json: ["An object with a rows array."]
|
|
63
|
-
}
|
|
64
|
-
},
|
|
65
|
-
{
|
|
66
|
-
name: "context",
|
|
67
|
-
summary: "Read and update shared, project-scoped, and initiative-scoped database-backed context.",
|
|
68
|
-
usage: [
|
|
69
|
-
"agent-issues context",
|
|
70
|
-
"agent-issues context list",
|
|
71
|
-
"agent-issues context show",
|
|
72
|
-
"agent-issues context show --view initiatives --query <text>",
|
|
73
|
-
"agent-issues context show default",
|
|
74
|
-
"agent-issues context show <entityOrProjectOrInitiativeId>",
|
|
75
|
-
"agent-issues context search <query> [--view <all|global|initiatives>]",
|
|
76
|
-
"agent-issues context conflicts [<query>] [--view <all|initiatives>]",
|
|
77
|
-
"agent-issues context set [--scope <entityOrProjectOrInitiativeId|default>] --title <title> --body-file <path|-> [--view <compact|full>]",
|
|
78
|
-
"agent-issues context define <term> [--scope <entityOrProjectOrInitiativeId|default>] --body-file <path|-> [--avoid <comma-separated terms>] [--view <compact|full>]",
|
|
79
|
-
"agent-issues context forget <term> [--scope <entityOrProjectOrInitiativeId|default>] [--view <compact|full>]"
|
|
80
|
-
],
|
|
81
|
-
positionals: [
|
|
82
|
-
{
|
|
83
|
-
name: "subcommand",
|
|
84
|
-
description: "Context action. Defaults to show.",
|
|
85
|
-
allowedValues: ["list", "show", "search", "conflicts", "set", "define", "forget"]
|
|
86
|
-
},
|
|
87
|
-
{
|
|
88
|
-
name: "scopeOrTerm",
|
|
89
|
-
description: "Context scope for show, or term name for define and forget."
|
|
90
|
-
}
|
|
91
|
-
],
|
|
92
|
-
options: [
|
|
93
|
-
{
|
|
94
|
-
name: "--scope <entityOrProjectOrInitiativeId|default>",
|
|
95
|
-
description: "Resolve context from a project, an initiative, or an entity inside an initiative."
|
|
96
|
-
},
|
|
97
|
-
{
|
|
98
|
-
name: "--title <title>",
|
|
99
|
-
description: "Context title for `context set`."
|
|
100
|
-
},
|
|
101
|
-
{
|
|
102
|
-
name: "--body-file <path|->",
|
|
103
|
-
description: "Read the authored markdown body from a file, or from stdin when the value is `-`: the context summary for `context set`, or the canonical term definition for `context define`."
|
|
104
|
-
},
|
|
105
|
-
{
|
|
106
|
-
name: "--query <text>",
|
|
107
|
-
description: "Filter project-wide context discovery for `context show`, `context search`, or `context conflicts`."
|
|
108
|
-
},
|
|
109
|
-
{
|
|
110
|
-
name: "--avoid <comma-separated terms>",
|
|
111
|
-
description: "Alternative terms to avoid for `context define`."
|
|
112
|
-
},
|
|
113
|
-
{
|
|
114
|
-
name: "--view <all|global|initiatives|compact|full>",
|
|
115
|
-
description: "For show, search, and conflicts: all/global/initiatives. For set, define, and forget: compact/full JSON acknowledgements."
|
|
116
|
-
},
|
|
117
|
-
{
|
|
118
|
-
name: "--terms-only",
|
|
119
|
-
description: "For `context search`, return only the matching term entries instead of the full project directory summary."
|
|
120
|
-
}
|
|
121
|
-
],
|
|
122
|
-
examples: [
|
|
123
|
-
"agent-issues context --json",
|
|
124
|
-
"agent-issues context show --view initiatives --query review --json",
|
|
125
|
-
"agent-issues context list --json",
|
|
126
|
-
"agent-issues context show default --json",
|
|
127
|
-
"agent-issues context show PROJ1 --json",
|
|
128
|
-
"agent-issues context show INIT1 --json",
|
|
129
|
-
"agent-issues context show ISS3 --json",
|
|
130
|
-
"agent-issues context search review --view initiatives --json",
|
|
131
|
-
"agent-issues context search review --view initiatives --terms-only --json",
|
|
132
|
-
"agent-issues context conflicts --json",
|
|
133
|
-
'agent-issues context set --scope PROJ1 --title "Payments Context" --body-file /tmp/summary.md',
|
|
134
|
-
'agent-issues context define "Order" --scope INIT1 --body-file /tmp/order-definition.md --avoid "purchase, transaction" --json',
|
|
135
|
-
'agent-issues context forget "Legacy order" --scope INIT1 --json'
|
|
136
|
-
],
|
|
137
|
-
notes: [
|
|
138
|
-
"Context is stored in the agent-issues database, not in a raw CONTEXT.md file.",
|
|
139
|
-
"`context show` without a scope returns the current project's shared context plus initiative-scoped discovery.",
|
|
140
|
-
"Use `context show default` to read only the shared project glossary.",
|
|
141
|
-
"Use `context search <query>` or `context show --query <text>` to narrow project-wide discovery before reading a specific project or initiative scope.",
|
|
142
|
-
"Use `context search <query> --terms-only --json` when you only need matching definitions and do not want the surrounding project directory summary.",
|
|
143
|
-
"Use `context conflicts` to list duplicate labels across scopes so agents can resolve terminology collisions early.",
|
|
144
|
-
"Use project context for project-wide terms and initiative context for workstream-specific terms.",
|
|
145
|
-
"Read the context before using project-specific vocabulary, and update it immediately when a term is resolved.",
|
|
146
|
-
"Use `--body-file` for multiline markdown to avoid shell quoting problems."
|
|
147
|
-
],
|
|
148
|
-
output: {
|
|
149
|
-
human: [
|
|
150
|
-
"Context metadata block, project-wide context directory, or context list",
|
|
151
|
-
"One line per term with definition and optional avoid list, plus duplicate-scope warnings in the project directory"
|
|
152
|
-
],
|
|
153
|
-
json: ["contexts", "context", "terms", "shared", "initiatives", "duplicateTerms", "view", "query", "conflictsOnly"]
|
|
154
|
-
}
|
|
155
|
-
},
|
|
156
|
-
{
|
|
157
|
-
name: "comment",
|
|
158
|
-
summary: "Add, list, edit, delete, and inspect revision history for issue-owned comment records.",
|
|
159
|
-
usage: [
|
|
160
|
-
"agent-issues comment",
|
|
161
|
-
"agent-issues comment add <issueId> --body-file <path|-> [--reference <issueId>]",
|
|
162
|
-
"agent-issues comment list <issueId> [--before <cursor>] [--all]",
|
|
163
|
-
"agent-issues comment edit <issueId> <commentId> --body-file <path|-> [--reference <issueId>]",
|
|
164
|
-
"agent-issues comment delete <issueId> <commentId>",
|
|
165
|
-
"agent-issues comment history <commentId>"
|
|
166
|
-
],
|
|
167
|
-
positionals: [
|
|
168
|
-
{
|
|
169
|
-
name: "subcommand",
|
|
170
|
-
description: "Comment action.",
|
|
171
|
-
allowedValues: ["add", "list", "edit", "delete", "history"]
|
|
172
|
-
}
|
|
173
|
-
],
|
|
174
|
-
examples: [
|
|
175
|
-
"agent-issues comment list ISS1 --json",
|
|
176
|
-
"agent-issues comment add ISS1 --body-file - --reference ISS2 --json",
|
|
177
|
-
"agent-issues comment history COM1 --json"
|
|
178
|
-
],
|
|
179
|
-
notes: [
|
|
180
|
-
"Issue comments are database records owned by an issue. They are not workflow entity kinds.",
|
|
181
|
-
"Use `schema --json` to discover the record fields and commands.",
|
|
182
|
-
"Use `--body-file` for multiline markdown to avoid shell quoting problems."
|
|
183
|
-
],
|
|
184
|
-
output: {
|
|
185
|
-
human: ["One comment record, a comment page, or revision history"],
|
|
186
|
-
json: ["id", "reference", "issueId", "body", "referencedIssueIds", "revision", "contentHash", "comments", "total", "nextBefore"]
|
|
187
|
-
}
|
|
188
|
-
},
|
|
189
|
-
{
|
|
190
|
-
name: "plan-entry",
|
|
191
|
-
summary: "Add, list, edit, delete, and inspect revision history for Plan entries.",
|
|
192
|
-
usage: [
|
|
193
|
-
"agent-issues plan-entry add <planId> --role <question|decision|scope|constraint|preference|consideration> --body-file <path|-> [--scope-direction <included|excluded>] [--reference <entityId>] [--supersedes <entryId>]",
|
|
194
|
-
"agent-issues plan-entry list <planId>",
|
|
195
|
-
"agent-issues plan-entry edit <planId> <entryId> --body-file <path|->",
|
|
196
|
-
"agent-issues plan-entry delete <planId> <entryId>",
|
|
197
|
-
"agent-issues plan-entry history <entryId>"
|
|
198
|
-
],
|
|
199
|
-
positionals: [
|
|
200
|
-
{
|
|
201
|
-
name: "subcommand",
|
|
202
|
-
description: "Plan-entry action.",
|
|
203
|
-
allowedValues: ["add", "list", "edit", "delete", "history"]
|
|
204
|
-
},
|
|
205
|
-
{ name: "planId", description: "Owning Plan ID or reference." },
|
|
206
|
-
{ name: "entryId", description: "Plan-entry ID or reference for edit and delete." }
|
|
207
|
-
],
|
|
208
|
-
options: [
|
|
209
|
-
{
|
|
210
|
-
name: "--role <question|decision|scope|constraint|preference|consideration>",
|
|
211
|
-
description: "Role for a new Plan entry.",
|
|
212
|
-
allowedValues: ["question", "decision", "scope", "constraint", "preference", "consideration"]
|
|
213
|
-
},
|
|
214
|
-
{
|
|
215
|
-
name: "--scope-direction <included|excluded>",
|
|
216
|
-
description: "Required direction for a scope entry.",
|
|
217
|
-
allowedValues: ["included", "excluded"]
|
|
218
|
-
},
|
|
219
|
-
{
|
|
220
|
-
name: "--reference <entityId>",
|
|
221
|
-
description: "Reference an entity from a new Plan entry. Repeat for each entity."
|
|
222
|
-
},
|
|
223
|
-
{
|
|
224
|
-
name: "--supersedes <entryId>",
|
|
225
|
-
description: "Replace a question or decision entry with a decision entry. Repeat for each entry."
|
|
226
|
-
},
|
|
227
|
-
{
|
|
228
|
-
name: "--body-file <path|->",
|
|
229
|
-
description: "Read the entry body from a file, or from stdin when the value is `-`."
|
|
230
|
-
}
|
|
231
|
-
],
|
|
232
|
-
examples: [
|
|
233
|
-
"agent-issues plan-entry add PLAN1 --role question --body-file - --reference ISS1",
|
|
234
|
-
"agent-issues link PLAN_ENTRY1 informs ISS1",
|
|
235
|
-
"agent-issues plan-entry add PLAN1 --role decision --body-file - --supersedes PLAN_ENTRY1",
|
|
236
|
-
"agent-issues plan-entry list PLAN1 --json"
|
|
237
|
-
],
|
|
238
|
-
notes: [
|
|
239
|
-
"Plans are initiative-owned entities created with `agent-issues create plan --parent <initiativeId>`.",
|
|
240
|
-
"Link an existing Plan entry to an issue with `agent-issues link <planEntryId> informs <issueId>`.",
|
|
241
|
-
"A decision can supersede question or decision entries.",
|
|
242
|
-
"Delete retains the entry in revision history."
|
|
243
|
-
],
|
|
244
|
-
output: {
|
|
245
|
-
human: ["One Plan entry, a Plan-entry list, or Plan-entry revision history"],
|
|
246
|
-
json: ["id", "reference", "planId", "role", "body", "referencedEntityIds", "supersededEntryIds", "revision", "contentHash"]
|
|
247
|
-
}
|
|
248
|
-
},
|
|
249
|
-
{
|
|
250
|
-
name: "init",
|
|
251
|
-
summary: "Initialize the local data store.",
|
|
252
|
-
usage: ["agent-issues init"],
|
|
253
|
-
examples: ["agent-issues init"],
|
|
254
|
-
output: {
|
|
255
|
-
human: ["Initialized data store at <dbPath>"],
|
|
256
|
-
json: ["command", "dbPath", "status"]
|
|
257
|
-
}
|
|
258
|
-
},
|
|
259
|
-
{
|
|
260
|
-
name: "current-tenant",
|
|
261
|
-
summary: "Show which tenant the CLI would use from the current workspace.",
|
|
262
|
-
usage: ["agent-issues current-tenant"],
|
|
263
|
-
examples: ["agent-issues current-tenant", "agent-issues current-tenant --json"],
|
|
264
|
-
notes: [
|
|
265
|
-
"The CLI always derives the tenant automatically - there is exactly one tenant per OS user.",
|
|
266
|
-
"Workspace root discovery walks upward from the current directory and prefers pnpm-workspace.yaml, then .git, then package.json."
|
|
267
|
-
],
|
|
268
|
-
output: {
|
|
269
|
-
human: ["Current tenant, workspace root, and database path"],
|
|
270
|
-
json: ["command", "tenantId", "workspaceRoot", "dbPath"]
|
|
271
|
-
}
|
|
272
|
-
},
|
|
273
|
-
{
|
|
274
|
-
name: "project-identity",
|
|
275
|
-
summary: "Show the project identity resolved from the current workspace.",
|
|
276
|
-
usage: ["agent-issues project-identity"],
|
|
277
|
-
examples: ["agent-issues project-identity", "agent-issues project-identity --json"],
|
|
278
|
-
notes: [
|
|
279
|
-
"Resolution precedence is environment override, .agent-issues.json file, Git remote name, package.json name, then folder name."
|
|
280
|
-
],
|
|
281
|
-
output: {
|
|
282
|
-
human: ["Resolved project identity and its source"],
|
|
283
|
-
json: ["command", "identity", "source"]
|
|
284
|
-
}
|
|
285
|
-
},
|
|
286
|
-
{
|
|
287
|
-
name: "list-tenants",
|
|
288
|
-
summary: "List the tenants currently present in the selected database.",
|
|
289
|
-
usage: ["agent-issues list-tenants", "agent-issues list-tenants --db <path> --json"],
|
|
290
|
-
examples: ["agent-issues list-tenants", "agent-issues list-tenants --json"],
|
|
291
|
-
notes: [
|
|
292
|
-
"The command lists tenants with any stored entities, relations, context, terms, or handoffs.",
|
|
293
|
-
"Use this before `delete-tenant` to avoid deleting the wrong tenant."
|
|
294
|
-
],
|
|
295
|
-
output: {
|
|
296
|
-
human: ["Database path followed by one line per tenant with per-table counts"],
|
|
297
|
-
json: ["command", "dbPath", "currentTenantId", "tenants"]
|
|
298
|
-
}
|
|
299
|
-
},
|
|
300
|
-
{
|
|
301
|
-
name: "delete-tenant",
|
|
302
|
-
summary: "Delete one tenant and all of its rows from the selected database.",
|
|
303
|
-
usage: ["agent-issues delete-tenant <tenantId> --force"],
|
|
304
|
-
positionals: [{ name: "tenantId", description: "Tenant ID to delete.", required: true }],
|
|
305
|
-
options: [
|
|
306
|
-
{
|
|
307
|
-
name: "--force",
|
|
308
|
-
description: "Required safety flag for whole-tenant deletion."
|
|
309
|
-
}
|
|
310
|
-
],
|
|
311
|
-
examples: ["agent-issues delete-tenant payments --force", "agent-issues delete-tenant agent-issues-de3fbe614e21 --force --json"],
|
|
312
|
-
notes: [
|
|
313
|
-
"This removes the tenant's counters, entities, relations, context, context terms, and handoffs.",
|
|
314
|
-
"Tenant IDs are sanitized (display-style input like `Payments Sandbox` resolves to `payments-sandbox`).",
|
|
315
|
-
"The command is irreversible. Run `list-tenants` first if you are not sure which tenant to delete."
|
|
316
|
-
],
|
|
317
|
-
output: {
|
|
318
|
-
human: ["Deleted tenant summary with per-table removal counts, or a not-found message"],
|
|
319
|
-
json: ["command", "dbPath", "tenantId", "displayName", "removed", "counts", "counters"]
|
|
320
|
-
}
|
|
321
|
-
},
|
|
322
|
-
{
|
|
323
|
-
name: "rename-tenant",
|
|
324
|
-
summary: "Rename one tenant namespace across the selected database.",
|
|
325
|
-
usage: ["agent-issues rename-tenant <tenantId> <newTenantId> --force"],
|
|
326
|
-
positionals: [
|
|
327
|
-
{ name: "tenantId", description: "Existing tenant ID to rename.", required: true },
|
|
328
|
-
{ name: "newTenantId", description: "New tenant ID to assign.", required: true }
|
|
329
|
-
],
|
|
330
|
-
options: [
|
|
331
|
-
{
|
|
332
|
-
name: "--force",
|
|
333
|
-
description: "Required safety flag for whole-tenant renaming."
|
|
334
|
-
}
|
|
335
|
-
],
|
|
336
|
-
examples: ["agent-issues rename-tenant smoke-handoff handoff-sandbox --force", "agent-issues rename-tenant payments-sandbox payments --force --json"],
|
|
337
|
-
notes: [
|
|
338
|
-
"Tenant IDs are sanitized the same way (display-style input like `Payments Sandbox` resolves to `payments-sandbox`).",
|
|
339
|
-
"Renaming updates counters, entities, relations, contexts, context terms, and handoffs.",
|
|
340
|
-
"The target tenant must not already exist. Run `list-tenants` first if you are not sure."
|
|
341
|
-
],
|
|
342
|
-
output: {
|
|
343
|
-
human: ["Renamed tenant summary with per-table moved counts, or a not-found message"],
|
|
344
|
-
json: ["command", "dbPath", "previousTenantId", "previousDisplayName", "newTenantId", "newDisplayName", "renamed", "counts", "counters"]
|
|
345
|
-
}
|
|
346
|
-
},
|
|
347
|
-
{
|
|
348
|
-
name: "auth list",
|
|
349
|
-
summary: "List saved logins in switching order and mark the active saved login.",
|
|
350
|
-
usage: ["agent-issues auth list"],
|
|
351
|
-
examples: ["agent-issues auth list", "agent-issues auth list --json"],
|
|
352
|
-
notes: [
|
|
353
|
-
"The permanent local login is listed first, followed by remote saved logins in creation order.",
|
|
354
|
-
"Never prints raw access tokens, in either human or --json output."
|
|
355
|
-
],
|
|
356
|
-
output: {
|
|
357
|
-
human: ["One line per saved login, with * marking the active login"],
|
|
358
|
-
json: ["command", "logins"]
|
|
359
|
-
}
|
|
360
|
-
},
|
|
361
|
-
{
|
|
362
|
-
name: "auth login",
|
|
363
|
-
summary: "Discover a remote service's Entra configuration and create or refresh a named saved login.",
|
|
364
|
-
usage: ["agent-issues auth login", "agent-issues auth login --name <name> --url <url>"],
|
|
365
|
-
options: [
|
|
366
|
-
{
|
|
367
|
-
name: "--name <name>",
|
|
368
|
-
description: "Unique saved-login name for one-shot use. Prompted when omitted interactively."
|
|
369
|
-
},
|
|
370
|
-
{
|
|
371
|
-
name: "--url <url>",
|
|
372
|
-
description: "Remote agent-issues service URL for one-shot use. Prompted when omitted interactively."
|
|
373
|
-
}
|
|
374
|
-
],
|
|
375
|
-
examples: ["agent-issues auth login", "agent-issues auth login --name work --url https://agent-issues.example.com"],
|
|
376
|
-
notes: [
|
|
377
|
-
"Remote login fetches /.well-known/agent-issues from the normalized service URL and uses its tenant and client IDs for device-code sign-in.",
|
|
378
|
-
"Interactive login prompts for the saved-login name and service URL.",
|
|
379
|
-
"When --json is present, --name and --url are required so prompt text never mixes with JSON output.",
|
|
380
|
-
"Refreshing an existing name preserves saved-login switching order and makes that login active."
|
|
381
|
-
],
|
|
382
|
-
output: {
|
|
383
|
-
human: ["Saved-login destination, signed-in identity, tenant, and session expiry"],
|
|
384
|
-
json: ["command", "login"]
|
|
385
|
-
}
|
|
386
|
-
},
|
|
387
|
-
{
|
|
388
|
-
name: "auth logout",
|
|
389
|
-
summary: "Remove a remote saved login.",
|
|
390
|
-
usage: ["agent-issues auth logout [name]"],
|
|
391
|
-
positionals: [
|
|
392
|
-
{
|
|
393
|
-
name: "name",
|
|
394
|
-
description: "Remote saved login to remove. Defaults to the active saved login.",
|
|
395
|
-
required: false
|
|
396
|
-
}
|
|
397
|
-
],
|
|
398
|
-
examples: ["agent-issues auth logout work", "agent-issues auth logout --json"],
|
|
399
|
-
notes: [
|
|
400
|
-
"Removing the active remote saved login activates local atomically.",
|
|
401
|
-
"The permanent local saved login cannot be removed."
|
|
402
|
-
],
|
|
403
|
-
output: {
|
|
404
|
-
human: ["Confirmation of which saved login was removed"],
|
|
405
|
-
json: ["command", "name"]
|
|
406
|
-
}
|
|
407
|
-
},
|
|
408
|
-
{
|
|
409
|
-
name: "auth status",
|
|
410
|
-
summary: "Show the active saved login and its destination and identity details.",
|
|
411
|
-
usage: ["agent-issues auth status"],
|
|
412
|
-
examples: ["agent-issues auth status", "agent-issues auth status --json"],
|
|
413
|
-
notes: ["Never prints raw access tokens, in either human or --json output."],
|
|
414
|
-
output: {
|
|
415
|
-
human: ["Active saved-login name, destination kind, remote URL when applicable, identity, and expiry"],
|
|
416
|
-
json: ["command", "login"]
|
|
417
|
-
}
|
|
418
|
-
},
|
|
419
|
-
{
|
|
420
|
-
name: "auth switch",
|
|
421
|
-
summary: "Activate a named saved login or advance to the next saved login.",
|
|
422
|
-
usage: ["agent-issues auth switch [name]"],
|
|
423
|
-
positionals: [{ name: "name", description: "Saved login to activate. Omit to advance in switching order.", required: false }],
|
|
424
|
-
examples: ["agent-issues auth switch work", "agent-issues auth switch local", "agent-issues auth switch"],
|
|
425
|
-
notes: [
|
|
426
|
-
"Without a name, advances from local through remote saved logins in creation order, then wraps to local.",
|
|
427
|
-
"Never prints the raw access token, in either human or --json output."
|
|
428
|
-
],
|
|
429
|
-
output: {
|
|
430
|
-
human: ["Confirmation of the saved login switched to"],
|
|
431
|
-
json: ["command", "login"]
|
|
432
|
-
}
|
|
433
|
-
},
|
|
434
|
-
{
|
|
435
|
-
name: "backfill-bodies",
|
|
436
|
-
summary: "Generate metadata-derived bodies for initiatives, issues, PRDs, user stories, and ADRs when authored bodies are missing.",
|
|
437
|
-
usage: [
|
|
438
|
-
"agent-issues backfill-bodies [--kinds <comma-separated kinds>] [--dry-run] [--force]",
|
|
439
|
-
"agent-issues backfill-bodies --all-tenants --json"
|
|
440
|
-
],
|
|
441
|
-
options: [
|
|
442
|
-
{
|
|
443
|
-
name: "--kinds <initiative,issue,prd,userStory,adr>",
|
|
444
|
-
description: "Comma-separated record kinds to backfill. Defaults to initiative,issue,prd,userStory,adr."
|
|
445
|
-
},
|
|
446
|
-
{
|
|
447
|
-
name: "--all-tenants",
|
|
448
|
-
description: "Process every tenant already present in the selected database instead of only the current or explicit tenant."
|
|
449
|
-
},
|
|
450
|
-
{
|
|
451
|
-
name: "--dry-run",
|
|
452
|
-
description: "Preview what would be updated without writing any bodies to the database."
|
|
453
|
-
},
|
|
454
|
-
{
|
|
455
|
-
name: "--force",
|
|
456
|
-
description: "Overwrite existing bodies instead of only filling empty ones."
|
|
457
|
-
}
|
|
458
|
-
],
|
|
459
|
-
examples: [
|
|
460
|
-
"agent-issues backfill-bodies",
|
|
461
|
-
"agent-issues backfill-bodies --kinds initiative,prd,userStory,adr --json",
|
|
462
|
-
"agent-issues backfill-bodies --dry-run --json",
|
|
463
|
-
"agent-issues backfill-bodies --all-tenants --force"
|
|
464
|
-
],
|
|
465
|
-
notes: [
|
|
466
|
-
"By default the command only fills empty bodies and leaves authored content unchanged.",
|
|
467
|
-
"Generated bodies are derived from existing tracker metadata such as structural parents, fixing issues, and dependency links.",
|
|
468
|
-
"Use `--all-tenants` to sweep the entire shared database; otherwise the command only touches the current or explicitly selected tenant.",
|
|
469
|
-
"Use `--dry-run` to preview the counts without mutating the database.",
|
|
470
|
-
"The command is idempotent unless `--force` is supplied."
|
|
471
|
-
],
|
|
472
|
-
output: {
|
|
473
|
-
human: [
|
|
474
|
-
"Backfill scope, database path, selected kinds, dry-run mode, and overwrite mode",
|
|
475
|
-
"One section per tenant with considered, updated, and skipped counts by kind"
|
|
476
|
-
],
|
|
477
|
-
json: ["command", "dbPath", "scope", "kinds", "dryRun", "force", "tenants"]
|
|
478
|
-
}
|
|
479
|
-
},
|
|
480
|
-
{
|
|
481
|
-
name: "create",
|
|
482
|
-
summary: "Create an entity, optionally under a structural parent.",
|
|
483
|
-
usage: ["agent-issues create <kind> --title <title> [--parent <id>] [--status <status>] [--body-file <path|->]"],
|
|
484
|
-
positionals: [
|
|
485
|
-
{
|
|
486
|
-
name: "kind",
|
|
487
|
-
description: "Entity kind to create.",
|
|
488
|
-
required: true,
|
|
489
|
-
allowedValues: ENTITY_KIND_VALUES
|
|
490
|
-
}
|
|
491
|
-
],
|
|
492
|
-
options: [
|
|
493
|
-
{
|
|
494
|
-
name: "--title <title>",
|
|
495
|
-
description: "Entity title.",
|
|
496
|
-
required: true
|
|
497
|
-
},
|
|
498
|
-
ENTITY_CATEGORY_OPTION,
|
|
499
|
-
ENTITY_PRIORITY_OPTION,
|
|
500
|
-
ENTITY_TYPE_OPTION,
|
|
501
|
-
{
|
|
502
|
-
name: "--parent <id>",
|
|
503
|
-
description: "Structural parent ID when one is required by the workflow."
|
|
504
|
-
},
|
|
505
|
-
{
|
|
506
|
-
name: "--link <relationType> <targetId>",
|
|
507
|
-
description: "Create a relation from the new entity to a target. Repeat for each link."
|
|
508
|
-
},
|
|
509
|
-
{
|
|
510
|
-
name: "--status <status>",
|
|
511
|
-
description: "Override the default initial status.",
|
|
512
|
-
allowedValues: STATUS_VALUES
|
|
513
|
-
},
|
|
514
|
-
{
|
|
515
|
-
name: "--body-file <path|->",
|
|
516
|
-
description: "Read the authored markdown body from a file, or from stdin when the value is `-`."
|
|
517
|
-
}
|
|
518
|
-
],
|
|
519
|
-
examples: [
|
|
520
|
-
'agent-issues create initiative --title "Workflow tooling"',
|
|
521
|
-
'agent-issues create plan --title "Routing decision" --parent INIT1 --body-file -',
|
|
522
|
-
'agent-issues create prd --title "Handoff support" --parent INIT1',
|
|
523
|
-
'agent-issues create issue --title "Add help schema" --parent INIT1',
|
|
524
|
-
'agent-issues create debt --title "Replace legacy worker" --parent INIT1 --category technical --priority high',
|
|
525
|
-
'agent-issues create handoff --title "Resume export work" --body-file - --link handsOff ISS1',
|
|
526
|
-
'agent-issues create issue --title "Split parser edge cases" --parent ISS1',
|
|
527
|
-
'agent-issues create issue --title "Add help schema" --parent INIT1 --body-file /tmp/iss1.md'
|
|
528
|
-
],
|
|
529
|
-
notes: [
|
|
530
|
-
"Valid structural parent-child pairs are exposed by `agent-issues schema --json`.",
|
|
531
|
-
"A Plan requires an initiative parent. Use `plan-entry` to record its questions and decisions.",
|
|
532
|
-
"Issues can be created under initiatives as tracked work, or under other issues as structural sub-issues.",
|
|
533
|
-
"If no status is supplied, the CLI uses the first status in the workflow for that kind.",
|
|
534
|
-
"Use `--body-file` for multiline markdown to avoid shell quoting problems.",
|
|
535
|
-
"Use `--link` to create graph relations atomically with the entity.",
|
|
536
|
-
"Debt requires one project, epic, initiative, or issue parent, plus category and priority.",
|
|
537
|
-
"Create a handoff with `--title`, `--body-file`, and `--link handsOff <focusId>`."
|
|
538
|
-
],
|
|
539
|
-
output: {
|
|
540
|
-
human: ["<id> <kind> <status> <title>"],
|
|
541
|
-
json: ["operation", "reference", "status", "revision"]
|
|
542
|
-
}
|
|
543
|
-
},
|
|
544
|
-
{
|
|
545
|
-
name: "archive",
|
|
546
|
-
summary: "Move one entity to its archive status.",
|
|
547
|
-
usage: ["agent-issues archive <id>"],
|
|
548
|
-
positionals: [{ name: "id", description: "Entity ID.", required: true }],
|
|
549
|
-
examples: ["agent-issues archive ISS1", "agent-issues archive DEBT1"],
|
|
550
|
-
notes: [
|
|
551
|
-
"Archive status depends on entity kind and is exposed by `agent-issues schema --json`.",
|
|
552
|
-
"Archiving debt sets its lifecycle to archived. Use `status <debtId> open` to restore it.",
|
|
553
|
-
"For an ADR, archive is refused while a supersedes edge points at it."
|
|
554
|
-
],
|
|
555
|
-
output: {
|
|
556
|
-
human: ["Archived <id> from <previousStatus> to <status>"],
|
|
557
|
-
json: ["entity", "previousStatus"]
|
|
558
|
-
}
|
|
559
|
-
},
|
|
560
|
-
{
|
|
561
|
-
name: "history",
|
|
562
|
-
summary: "Read one entity or context revision.",
|
|
563
|
-
usage: [
|
|
564
|
-
"agent-issues history <id> --revision <revision>",
|
|
565
|
-
"agent-issues history --context <scope> --revision <revision>",
|
|
566
|
-
"agent-issues history --context <scope> --term <term> --revision <revision>"
|
|
567
|
-
],
|
|
568
|
-
positionals: [{ name: "id", description: "Entity ID when --context is not supplied." }],
|
|
569
|
-
options: [
|
|
570
|
-
{ name: "--revision <revision>", description: "Revision number to materialize.", required: true },
|
|
571
|
-
{ name: "--context <scope>", description: "Context scope for context history." },
|
|
572
|
-
{ name: "--term <term>", description: "Context term for term revision history. Requires --context." }
|
|
573
|
-
],
|
|
574
|
-
examples: ["agent-issues history ISS1 --revision 2 --json", "agent-issues history --context INIT1 --revision 3 --json"],
|
|
575
|
-
notes: ["History reads complete materialized content at the requested revision."],
|
|
576
|
-
output: {
|
|
577
|
-
human: ["Revision identity, current and requested revision numbers, and materialized content"],
|
|
578
|
-
json: ["MaterializedEntityRevision | MaterializedContextRevision | MaterializedContextTermRevision"]
|
|
579
|
-
}
|
|
580
|
-
},
|
|
581
|
-
{
|
|
582
|
-
name: "restore",
|
|
583
|
-
summary: "Restore one entity or context revision after confirmation.",
|
|
584
|
-
usage: [
|
|
585
|
-
"agent-issues restore <id> --revision <revision>",
|
|
586
|
-
"agent-issues restore --context <scope> --revision <revision> [--view <compact|full>]",
|
|
587
|
-
"agent-issues restore --context <scope> --term <term> --revision <revision> [--view <compact|full>]"
|
|
588
|
-
],
|
|
589
|
-
positionals: [{ name: "id", description: "Entity ID when --context is not supplied." }],
|
|
590
|
-
options: [
|
|
591
|
-
{ name: "--revision <revision>", description: "Revision number to restore.", required: true },
|
|
592
|
-
{ name: "--context <scope>", description: "Context scope for context restoration." },
|
|
593
|
-
{ name: "--term <term>", description: "Context term to restore. Requires --context." },
|
|
594
|
-
{ name: "--view <compact|full>", description: "Context-only JSON acknowledgement shape.", allowedValues: ["compact", "full"] }
|
|
595
|
-
],
|
|
596
|
-
examples: ["agent-issues restore ISS1 --revision 2 --json", "agent-issues restore --context INIT1 --revision 3 --view compact --json"],
|
|
597
|
-
notes: ["Entity restore always returns a compact acknowledgement. Use --view only with --context."],
|
|
598
|
-
output: {
|
|
599
|
-
human: ["Restored record identity, target revision, and new head revision"],
|
|
600
|
-
json: ["Compact entity acknowledgement, or selected context restore result"]
|
|
601
|
-
}
|
|
602
|
-
},
|
|
603
|
-
{
|
|
604
|
-
name: "delete",
|
|
605
|
-
summary: "Delete one leaf entity.",
|
|
606
|
-
usage: ["agent-issues delete <id>"],
|
|
607
|
-
positionals: [{ name: "id", description: "Entity ID.", required: true }],
|
|
608
|
-
examples: ["agent-issues delete ISS2"],
|
|
609
|
-
notes: ["Deletion fails when the entity still has outgoing relations."],
|
|
610
|
-
output: {
|
|
611
|
-
human: ["Deleted <id> <kind> <title>"],
|
|
612
|
-
json: ["entity", "removed"]
|
|
613
|
-
}
|
|
614
|
-
},
|
|
615
|
-
{
|
|
616
|
-
name: "export",
|
|
617
|
-
summary: "Export one initiative or the whole project as markdown with graph metadata in frontmatter.",
|
|
618
|
-
usage: [
|
|
619
|
-
"agent-issues export <initiativeId> [--output <path>] [--force]",
|
|
620
|
-
"agent-issues export project [--output <path>] [--force]",
|
|
621
|
-
"agent-issues export <initiativeId|project> --single-file [--output <file>]"
|
|
622
|
-
],
|
|
623
|
-
positionals: [
|
|
624
|
-
{
|
|
625
|
-
name: "initiativeId|project",
|
|
626
|
-
description: "One initiative ID, or `project` for a tenant-wide export.",
|
|
627
|
-
required: true
|
|
628
|
-
}
|
|
629
|
-
],
|
|
630
|
-
options: [
|
|
631
|
-
{
|
|
632
|
-
name: "--output <path>",
|
|
633
|
-
description: "Directory path for grouped export output, or a file path when used with `--single-file`."
|
|
634
|
-
},
|
|
635
|
-
{
|
|
636
|
-
name: "--single-file",
|
|
637
|
-
description: "Emit one markdown document instead of a grouped folder export. Without `--output`, prints to stdout."
|
|
638
|
-
},
|
|
639
|
-
{
|
|
640
|
-
name: "--force",
|
|
641
|
-
description: "Replace an existing export directory when writing grouped output."
|
|
642
|
-
}
|
|
643
|
-
],
|
|
644
|
-
examples: [
|
|
645
|
-
"agent-issues export INIT1",
|
|
646
|
-
"agent-issues export project --output ./tmp/export --force",
|
|
647
|
-
"agent-issues export INIT1 --single-file",
|
|
648
|
-
"agent-issues export INIT1 --single-file --output ./tmp/init1.md",
|
|
649
|
-
"agent-issues export INIT1 --json"
|
|
650
|
-
],
|
|
651
|
-
notes: [
|
|
652
|
-
"Grouped export is the default: it creates a folder tree that mirrors entity-kind and relation groupings in the database.",
|
|
653
|
-
"Single-file export remains available with `--single-file` for piping or ad hoc capture.",
|
|
654
|
-
"The YAML frontmatter summarizes counts, context, and relation edges so connections remain machine-readable.",
|
|
655
|
-
"Project export includes normal entity and relation output, plus one nested initiative export per initiative."
|
|
656
|
-
],
|
|
657
|
-
output: {
|
|
658
|
-
human: [
|
|
659
|
-
"Default: export summary with output path and file count for a grouped folder export",
|
|
660
|
-
"With `--single-file`: one markdown document with YAML frontmatter, entity sections, relation summaries, and context sections"
|
|
661
|
-
],
|
|
662
|
-
json: ["mode", "scope", "initiativeId", "generatedAt", "markdown", "outputPath", "files"]
|
|
663
|
-
}
|
|
664
|
-
},
|
|
665
|
-
{
|
|
666
|
-
name: "move",
|
|
667
|
-
summary: "Move one entity under a new structural parent.",
|
|
668
|
-
usage: ["agent-issues move <id> <newParentId>"],
|
|
669
|
-
positionals: [
|
|
670
|
-
{ name: "id", description: "Entity ID to move.", required: true },
|
|
671
|
-
{ name: "newParentId", description: "New structural parent ID.", required: true }
|
|
672
|
-
],
|
|
673
|
-
examples: ["agent-issues move US1 PRD2", "agent-issues move ISS7 ISS1", "agent-issues move DEBT1 INIT2"],
|
|
674
|
-
notes: [
|
|
675
|
-
"Move rejects incompatible parent kinds, cycles, and initiatives.",
|
|
676
|
-
"Use move to reparent a sub-issue under a different parent issue without rebuilding its other relations.",
|
|
677
|
-
"Debt can move only to a project, epic, initiative, or issue owner."
|
|
678
|
-
],
|
|
679
|
-
output: {
|
|
680
|
-
human: ["Moved <id> from <previousParentId|none> to <newParentId> as <relationType>"],
|
|
681
|
-
json: ["entity", "previousParentId", "newParentId", "relationType"]
|
|
682
|
-
}
|
|
683
|
-
},
|
|
684
|
-
{
|
|
685
|
-
name: "relations",
|
|
686
|
-
summary: "Show incoming and outgoing relations for one entity.",
|
|
687
|
-
usage: ["agent-issues relations <id> [--direction <incoming|outgoing|both>] [--type <comma-separated types>]"],
|
|
688
|
-
positionals: [{ name: "id", description: "Entity ID.", required: true }],
|
|
689
|
-
options: [
|
|
690
|
-
{
|
|
691
|
-
name: "--direction <incoming|outgoing|both>",
|
|
692
|
-
description: "Select incoming, outgoing, or both relation directions. Defaults to both.",
|
|
693
|
-
allowedValues: ["incoming", "outgoing", "both"]
|
|
694
|
-
},
|
|
695
|
-
{
|
|
696
|
-
name: "--type <comma-separated types>",
|
|
697
|
-
description: "Include only the selected relation types.",
|
|
698
|
-
allowedValues: RELATION_TYPE_VALUES
|
|
699
|
-
}
|
|
700
|
-
],
|
|
701
|
-
examples: [
|
|
702
|
-
"agent-issues relations <id>",
|
|
703
|
-
"agent-issues relations <id> --direction incoming --type blocks,decomposes --json",
|
|
704
|
-
"agent-issues relations DEBT1 --direction incoming --type records,resolves --json"
|
|
705
|
-
],
|
|
706
|
-
notes: [
|
|
707
|
-
"JSON returns the focused entity and selected edges with id, kind, status, and title only.",
|
|
708
|
-
"Use --direction and --type to select edges before serialization."
|
|
709
|
-
],
|
|
710
|
-
output: {
|
|
711
|
-
human: [
|
|
712
|
-
"<id> <kind> <status> <title>",
|
|
713
|
-
"Incoming section",
|
|
714
|
-
"Outgoing section"
|
|
715
|
-
],
|
|
716
|
-
json: ["{ entity: CompactEntity, incoming: CompactRelation[], outgoing: CompactRelation[], planEntries: PlanEntryRecord[] }"]
|
|
717
|
-
}
|
|
718
|
-
},
|
|
719
|
-
{
|
|
720
|
-
name: "next-work",
|
|
721
|
-
summary: "List ready and blocked unfinished issues for an initiative scope.",
|
|
722
|
-
usage: ["agent-issues next-work <initiativeOrDescendantId>"],
|
|
723
|
-
positionals: [{ name: "initiativeOrDescendantId", description: "An initiative, PRD, user story, or issue in the initiative.", required: true }],
|
|
724
|
-
examples: ["agent-issues next-work INIT1 --json", "agent-issues next-work ISS7 --json"],
|
|
725
|
-
notes: [
|
|
726
|
-
"The result resolves an initiative from the supplied entity and includes all unfinished issues below it, including nested decomposed issues.",
|
|
727
|
-
"Available issues have no open blocks source and no unfinished sub-issue. Blocked issues name the issue references that must finish first.",
|
|
728
|
-
"Each issue also lists the unfinished issues it unblocks, including its decomposed parent when applicable."
|
|
729
|
-
],
|
|
730
|
-
output: {
|
|
731
|
-
human: ["Initiative reference", "Available issues", "Blocked issues with blocker and unblock references"],
|
|
732
|
-
json: ["{ initiative: CompactEntity, available: CompactNextWorkItem[], blocked: CompactNextWorkItem[] }"]
|
|
733
|
-
}
|
|
734
|
-
},
|
|
735
|
-
{
|
|
736
|
-
name: "orphans",
|
|
737
|
-
summary: "List entities not reachable from any initiative.",
|
|
738
|
-
usage: ["agent-issues orphans [kind]"],
|
|
739
|
-
positionals: [
|
|
740
|
-
{
|
|
741
|
-
name: "kind",
|
|
742
|
-
description: "Optional entity kind filter.",
|
|
743
|
-
allowedValues: ENTITY_KIND_VALUES
|
|
744
|
-
}
|
|
745
|
-
],
|
|
746
|
-
examples: ["agent-issues orphans", "agent-issues orphans issue --json"],
|
|
747
|
-
output: {
|
|
748
|
-
human: ["One line per orphaned entity: <id> <kind> <status> <title>"],
|
|
749
|
-
json: ["Array<EntityRecord>"]
|
|
750
|
-
}
|
|
751
|
-
},
|
|
752
|
-
{
|
|
753
|
-
name: "status",
|
|
754
|
-
summary: "Update an entity status.",
|
|
755
|
-
usage: ["agent-issues status <id> <status>"],
|
|
756
|
-
positionals: [
|
|
757
|
-
{ name: "id", description: "Entity ID.", required: true },
|
|
758
|
-
{
|
|
759
|
-
name: "status",
|
|
760
|
-
description: "New status.",
|
|
761
|
-
required: true,
|
|
762
|
-
allowedValues: STATUS_VALUES
|
|
763
|
-
}
|
|
764
|
-
],
|
|
765
|
-
examples: ["agent-issues status ISS1 in-progress", "agent-issues status US1 done", "agent-issues status DEBT1 resolved"],
|
|
766
|
-
notes: [
|
|
767
|
-
"Each entity kind only accepts its own status flow.",
|
|
768
|
-
"An ADR is current unless it is superseded or archived.",
|
|
769
|
-
"Debt uses open, resolved, and archived states. Its lifecycle changes are manual; a resolves link does not change its state.",
|
|
770
|
-
"Issues cannot move to in-progress or done while blocked by a non-done issue.",
|
|
771
|
-
"Parent issues also cannot move to in-progress or done while any sub-issue remains open."
|
|
772
|
-
],
|
|
773
|
-
output: {
|
|
774
|
-
human: ["Updated <id> from <previousStatus> to <status>"],
|
|
775
|
-
json: ["entity", "previousStatus"]
|
|
776
|
-
}
|
|
777
|
-
},
|
|
778
|
-
{
|
|
779
|
-
name: "edit",
|
|
780
|
-
summary: "Update an entity title and/or authored markdown body.",
|
|
781
|
-
usage: ["agent-issues edit <id> [--title <title>] [--body-file <path|->] [--category <category>] [--priority <priority>] [--type <type>]"],
|
|
782
|
-
positionals: [{ name: "id", description: "Entity ID.", required: true }],
|
|
783
|
-
options: [
|
|
784
|
-
{
|
|
785
|
-
name: "--title <title>",
|
|
786
|
-
description: "Replacement entity title."
|
|
787
|
-
},
|
|
788
|
-
{
|
|
789
|
-
name: "--body-file <path|->",
|
|
790
|
-
description: "Read the authored markdown body from a file, or from stdin when the value is `-`."
|
|
791
|
-
},
|
|
792
|
-
ENTITY_CATEGORY_OPTION,
|
|
793
|
-
ENTITY_PRIORITY_OPTION,
|
|
794
|
-
ENTITY_TYPE_OPTION
|
|
795
|
-
],
|
|
796
|
-
examples: [
|
|
797
|
-
'agent-issues edit ISS1 --body-file /tmp/iss1.md',
|
|
798
|
-
'agent-issues edit HO1 --title "Resume export work" --body-file -'
|
|
799
|
-
],
|
|
800
|
-
notes: [
|
|
801
|
-
"Supply at least one of `--title` or `--body-file`; supplied fields replace their previously stored values.",
|
|
802
|
-
"Use `--body-file` for multiline markdown to avoid shell quoting problems."
|
|
803
|
-
],
|
|
804
|
-
output: {
|
|
805
|
-
human: ["Updated <id> <kind> <title>"],
|
|
806
|
-
json: ["operation", "reference", "revision"]
|
|
807
|
-
}
|
|
808
|
-
},
|
|
809
|
-
{
|
|
810
|
-
name: "link",
|
|
811
|
-
summary: "Create a relation between entities, or from a Plan entry to an issue.",
|
|
812
|
-
usage: ["agent-issues link <fromId> <relationType> <toId>"],
|
|
813
|
-
positionals: [
|
|
814
|
-
{ name: "fromId", description: "Source entity or Plan-entry ID.", required: true },
|
|
815
|
-
{
|
|
816
|
-
name: "relationType",
|
|
817
|
-
description: "Relation type.",
|
|
818
|
-
required: true,
|
|
819
|
-
allowedValues: RELATION_TYPE_VALUES
|
|
820
|
-
},
|
|
821
|
-
{ name: "toId", description: "Target entity ID.", required: true }
|
|
822
|
-
],
|
|
823
|
-
examples: [
|
|
824
|
-
"agent-issues link ISS1 fixes US1",
|
|
825
|
-
"agent-issues link ADR1 constrains ISS1",
|
|
826
|
-
"agent-issues link ISS2 blocks ISS1",
|
|
827
|
-
"agent-issues link ISS1 decomposes ISS7",
|
|
828
|
-
"agent-issues link ISS1 resolves DEBT1",
|
|
829
|
-
"agent-issues link DEBT1 relatesTo ADR1",
|
|
830
|
-
"agent-issues link PLAN_ENTRY1 informs ISS1"
|
|
831
|
-
],
|
|
832
|
-
notes: [
|
|
833
|
-
"Allowed relation pairs are exposed by `agent-issues schema --json`.",
|
|
834
|
-
"A Plan entry can link only to an issue and only as `informs`.",
|
|
835
|
-
"For structural parent-child work, prefer `create --parent` or `move` over `link` so the intent stays explicit.",
|
|
836
|
-
"Only epics, initiatives, and issues can resolve debt. A resolves link does not change debt lifecycle state.",
|
|
837
|
-
"The CLI rejects self-links and cycle-forming `blocks` or `supersedes` links."
|
|
838
|
-
],
|
|
839
|
-
output: {
|
|
840
|
-
human: [
|
|
841
|
-
"Linked <fromId> -> <toId> as <relationType>",
|
|
842
|
-
"or Relation already existed: <fromId> -> <toId> as <relationType>"
|
|
843
|
-
],
|
|
844
|
-
json: ["relation", "created"]
|
|
845
|
-
}
|
|
846
|
-
},
|
|
847
|
-
{
|
|
848
|
-
name: "unlink",
|
|
849
|
-
summary: "Remove one relation between entities, or from a Plan entry to an issue.",
|
|
850
|
-
usage: ["agent-issues unlink <fromId> <relationType> <toId>"],
|
|
851
|
-
positionals: [
|
|
852
|
-
{ name: "fromId", description: "Source entity or Plan-entry ID.", required: true },
|
|
853
|
-
{
|
|
854
|
-
name: "relationType",
|
|
855
|
-
description: "Relation type.",
|
|
856
|
-
required: true,
|
|
857
|
-
allowedValues: RELATION_TYPE_VALUES
|
|
858
|
-
},
|
|
859
|
-
{ name: "toId", description: "Target entity ID.", required: true }
|
|
860
|
-
],
|
|
861
|
-
examples: ["agent-issues unlink ISS1 fixes US1", "agent-issues unlink PLAN_ENTRY1 informs ISS1"],
|
|
862
|
-
notes: [
|
|
863
|
-
"A Plan entry can unlink only from an issue and only as `informs`.",
|
|
864
|
-
"Unlink rejects structural removals that would orphan a subtree."
|
|
865
|
-
],
|
|
866
|
-
output: {
|
|
867
|
-
human: [
|
|
868
|
-
"Unlinked <fromId> -> <toId> as <relationType>",
|
|
869
|
-
"or Relation did not exist: <fromId> -> <toId> as <relationType>"
|
|
870
|
-
],
|
|
871
|
-
json: ["relation", "removed"]
|
|
872
|
-
}
|
|
873
|
-
},
|
|
874
|
-
{
|
|
875
|
-
name: "show",
|
|
876
|
-
summary: "Show one complete entity or initiative.",
|
|
877
|
-
usage: ["agent-issues show <id>"],
|
|
878
|
-
positionals: [{ name: "id", description: "Entity ID.", required: true }],
|
|
879
|
-
examples: ["agent-issues show INIT1", "agent-issues show ISS1 --json"],
|
|
880
|
-
notes: [
|
|
881
|
-
"Show is the explicit complete read for authored body content and stored entity fields.",
|
|
882
|
-
"For initiatives, show returns the complete initiative-wide graph and authored records."
|
|
883
|
-
],
|
|
884
|
-
output: {
|
|
885
|
-
human: [
|
|
886
|
-
"For initiatives: InitiativeBundle with complete records",
|
|
887
|
-
"For other kinds: EntityDetails with a complete focused entity"
|
|
888
|
-
],
|
|
889
|
-
json: ["InitiativeBundle | EntityDetails"]
|
|
890
|
-
}
|
|
891
|
-
},
|
|
892
|
-
{
|
|
893
|
-
name: "list",
|
|
894
|
-
summary: "List entities by kind.",
|
|
895
|
-
usage: ["agent-issues list <kind> [--status <comma-separated statuses>] [--parent <id>] [--limit <count>]"],
|
|
896
|
-
positionals: [
|
|
897
|
-
{
|
|
898
|
-
name: "kind",
|
|
899
|
-
description: "Entity kind.",
|
|
900
|
-
required: true,
|
|
901
|
-
allowedValues: ENTITY_KIND_VALUES
|
|
902
|
-
}
|
|
903
|
-
],
|
|
904
|
-
options: [
|
|
905
|
-
{
|
|
906
|
-
name: "--status <comma-separated statuses>",
|
|
907
|
-
description: "Include only entities with a selected status.",
|
|
908
|
-
allowedValues: STATUS_VALUES
|
|
909
|
-
},
|
|
910
|
-
{
|
|
911
|
-
name: "--parent <id>",
|
|
912
|
-
description: "Include only entities with this structural parent."
|
|
913
|
-
},
|
|
914
|
-
{
|
|
915
|
-
name: "--limit <count>",
|
|
916
|
-
description: "Return at most this many entities. Total reports the full filtered count."
|
|
917
|
-
}
|
|
918
|
-
],
|
|
919
|
-
examples: [
|
|
920
|
-
"agent-issues list issue",
|
|
921
|
-
"agent-issues list issue --status todo,in-progress --parent <initiativeId> --limit 20 --json",
|
|
922
|
-
"agent-issues list debt --status open --json"
|
|
923
|
-
],
|
|
924
|
-
notes: [
|
|
925
|
-
"JSON returns { items, total }; total is the filtered count before --limit is applied.",
|
|
926
|
-
"Use --status, --parent, and --limit to select records before serialization.",
|
|
927
|
-
"Accepted status values depend on the entity kind; use agent-issues schema --json to inspect each kind's workflow.",
|
|
928
|
-
"For kind=issue, JSON also returns openBlockers: an entityId -> open (not-done) blocking issue ids map, so a candidate's blocked status is visible without a separate relations call per issue."
|
|
929
|
-
],
|
|
930
|
-
output: {
|
|
931
|
-
human: ["One line per entity: <id> <status> <title>", "Issue lines append (blocked by <id>, ...) when openBlockers is non-empty."],
|
|
932
|
-
json: ["{ items: CompactEntity[], total: number, openBlockers?: Record<string, string[]> }"]
|
|
933
|
-
}
|
|
934
|
-
},
|
|
935
|
-
{
|
|
936
|
-
name: "site",
|
|
937
|
-
summary: "Start the live site in the background and print its URL.",
|
|
938
|
-
usage: ["agent-issues site [--port <port>]", "agent-issues site --stop [--port <port>]", "agent-issues site --json"],
|
|
939
|
-
options: [
|
|
940
|
-
{
|
|
941
|
-
name: "--port <port>",
|
|
942
|
-
description: "Port for the local HTTP server. Defaults to 4173."
|
|
943
|
-
}
|
|
944
|
-
],
|
|
945
|
-
examples: [
|
|
946
|
-
"agent-issues site",
|
|
947
|
-
"agent-issues site --port 4300",
|
|
948
|
-
"agent-issues site --stop"
|
|
949
|
-
],
|
|
950
|
-
notes: [
|
|
951
|
-
"The command starts a detached site process, then returns immediately.",
|
|
952
|
-
"Use agent-issues site --stop to close the live site."
|
|
953
|
-
],
|
|
954
|
-
output: {
|
|
955
|
-
human: [
|
|
956
|
-
"Started live site at <url>"
|
|
957
|
-
],
|
|
958
|
-
json: ["host", "port", "url", "started"]
|
|
959
|
-
}
|
|
960
|
-
},
|
|
961
|
-
{
|
|
962
|
-
name: "help",
|
|
963
|
-
summary: "Show general or command-specific help.",
|
|
964
|
-
usage: ["agent-issues help [command]", "agent-issues <command> --help"],
|
|
965
|
-
positionals: [{ name: "command", description: "Optional command name." }],
|
|
966
|
-
examples: ["agent-issues help", "agent-issues help create --json", "agent-issues create --help"]
|
|
967
|
-
},
|
|
968
|
-
{
|
|
969
|
-
name: "install-skills",
|
|
970
|
-
summary: "Install the packaged agent-issues skills into an agent skills directory.",
|
|
971
|
-
usage: ["agent-issues install-skills [--target <path>] [--force]", "agent-issues install-skills --json"],
|
|
972
|
-
options: [
|
|
973
|
-
{
|
|
974
|
-
name: "--target <path>",
|
|
975
|
-
description: "Destination directory for installed skills. Defaults to ~/.agents/skills."
|
|
976
|
-
},
|
|
977
|
-
{
|
|
978
|
-
name: "--force",
|
|
979
|
-
description: "Overwrite existing installed copies of the packaged skills."
|
|
980
|
-
}
|
|
981
|
-
],
|
|
982
|
-
examples: [
|
|
983
|
-
"agent-issues install-skills",
|
|
984
|
-
"agent-issues install-skills --target ./tmp/skills --json",
|
|
985
|
-
"agent-issues install-skills --force"
|
|
986
|
-
],
|
|
987
|
-
notes: [
|
|
988
|
-
"Installed skill identities are prefixed with `ai-` to keep them short and avoid clashing with existing generic skills.",
|
|
989
|
-
"The command copies the packaged skill directories and rewrites the installed skill name to match the prefixed identity."
|
|
990
|
-
],
|
|
991
|
-
output: {
|
|
992
|
-
human: [
|
|
993
|
-
"Installed skills to <targetDir>",
|
|
994
|
-
"One line per skill: <installedName> <status> <destinationDir>"
|
|
995
|
-
],
|
|
996
|
-
json: ["targetDir", "installed"]
|
|
997
|
-
}
|
|
998
|
-
},
|
|
999
|
-
{
|
|
1000
|
-
name: "install-agent",
|
|
1001
|
-
summary: "Install the packaged Agent Issues custom agent for VS Code, Copilot, and Claude.",
|
|
1002
|
-
usage: ["agent-issues install-agent [--target <path>] [--force]", "agent-issues install-agent --json"],
|
|
1003
|
-
options: [
|
|
1004
|
-
{
|
|
1005
|
-
name: "--target <path>",
|
|
1006
|
-
description: "Destination directory for one VS Code-compatible custom agent. When set, the command does not also install the default Copilot and Claude agents."
|
|
1007
|
-
},
|
|
1008
|
-
{
|
|
1009
|
-
name: "--force",
|
|
1010
|
-
description: "Overwrite the existing installed custom agent and hook files."
|
|
1011
|
-
}
|
|
1012
|
-
],
|
|
1013
|
-
examples: [
|
|
1014
|
-
"agent-issues install-agent",
|
|
1015
|
-
"agent-issues install-agent --target ./tmp/prompts --json",
|
|
1016
|
-
"agent-issues install-agent --force"
|
|
1017
|
-
],
|
|
1018
|
-
notes: [
|
|
1019
|
-
"Without --target, this installs user-level agents in the VS Code prompts directory, ~/.copilot/agents, and ~/.claude/agents.",
|
|
1020
|
-
"Each installed agent rewrites its hook command to point at its installed hook file.",
|
|
1021
|
-
"Enable `chat.useCustomAgentHooks` in VS Code so the custom agent can enforce issue-context preloading when it is active."
|
|
1022
|
-
],
|
|
1023
|
-
output: {
|
|
1024
|
-
human: [
|
|
1025
|
-
"Installed agent to <targetDir>",
|
|
1026
|
-
"Status lines plus the installed agent file and hook file paths"
|
|
1027
|
-
],
|
|
1028
|
-
json: ["targetDir", "installed", "additionalInstalled"]
|
|
1029
|
-
}
|
|
1030
|
-
},
|
|
1031
|
-
{
|
|
1032
|
-
name: "list-skills",
|
|
1033
|
-
summary: "Report whether the packaged ai skills are installed in an agent skills directory.",
|
|
1034
|
-
usage: ["agent-issues list-skills [--target <path>]", "agent-issues list-skills --json"],
|
|
1035
|
-
options: [
|
|
1036
|
-
{
|
|
1037
|
-
name: "--target <path>",
|
|
1038
|
-
description: "Directory to inspect. Defaults to ~/.agents/skills."
|
|
1039
|
-
}
|
|
1040
|
-
],
|
|
1041
|
-
examples: [
|
|
1042
|
-
"agent-issues list-skills",
|
|
1043
|
-
"agent-issues list-skills --target ./tmp/skills --json"
|
|
1044
|
-
],
|
|
1045
|
-
notes: [
|
|
1046
|
-
"Only the packaged `ai-*` skill directories are reported.",
|
|
1047
|
-
"This command does not modify the target directory."
|
|
1048
|
-
],
|
|
1049
|
-
output: {
|
|
1050
|
-
human: [
|
|
1051
|
-
"Packaged skills in <targetDir>",
|
|
1052
|
-
"One line per skill: <installedName> <status> <destinationDir>"
|
|
1053
|
-
],
|
|
1054
|
-
json: ["targetDir", "skills"]
|
|
1055
|
-
}
|
|
1056
|
-
},
|
|
1057
|
-
{
|
|
1058
|
-
name: "list-agent",
|
|
1059
|
-
summary: "Report whether the packaged Agent Issues custom agent is installed for VS Code, Copilot, and Claude.",
|
|
1060
|
-
usage: ["agent-issues list-agent [--target <path>]", "agent-issues list-agent --json"],
|
|
1061
|
-
options: [
|
|
1062
|
-
{
|
|
1063
|
-
name: "--target <path>",
|
|
1064
|
-
description: "One VS Code-compatible directory to inspect. When omitted, the command inspects the default VS Code, Copilot, and Claude directories."
|
|
1065
|
-
}
|
|
1066
|
-
],
|
|
1067
|
-
examples: ["agent-issues list-agent", "agent-issues list-agent --target ./tmp/prompts --json"],
|
|
1068
|
-
notes: [
|
|
1069
|
-
"The command reports whether each custom agent file and its hook file are present.",
|
|
1070
|
-
"A partial status means one file exists without the other."
|
|
1071
|
-
],
|
|
1072
|
-
output: {
|
|
1073
|
-
human: [
|
|
1074
|
-
"Packaged agent in <targetDir>",
|
|
1075
|
-
"Status lines plus the expected installed agent file and hook file paths"
|
|
1076
|
-
],
|
|
1077
|
-
json: ["targetDir", "agent", "additionalAgents"]
|
|
1078
|
-
}
|
|
1079
|
-
},
|
|
1080
|
-
{
|
|
1081
|
-
name: "uninstall-skills",
|
|
1082
|
-
summary: "Remove the packaged ai skills from an agent skills directory.",
|
|
1083
|
-
usage: ["agent-issues uninstall-skills [--target <path>]", "agent-issues uninstall-skills --json"],
|
|
1084
|
-
options: [
|
|
1085
|
-
{
|
|
1086
|
-
name: "--target <path>",
|
|
1087
|
-
description: "Directory from which the packaged skills should be removed. Defaults to ~/.agents/skills."
|
|
1088
|
-
}
|
|
1089
|
-
],
|
|
1090
|
-
examples: [
|
|
1091
|
-
"agent-issues uninstall-skills",
|
|
1092
|
-
"agent-issues uninstall-skills --target ./tmp/skills --json"
|
|
1093
|
-
],
|
|
1094
|
-
notes: [
|
|
1095
|
-
"Packaged `ai-*` skill directories are removed. Shared skill files are removed only when they still match the packaged copies.",
|
|
1096
|
-
"Missing skill directories are reported but do not cause the command to fail."
|
|
1097
|
-
],
|
|
1098
|
-
output: {
|
|
1099
|
-
human: [
|
|
1100
|
-
"Removed skills from <targetDir>",
|
|
1101
|
-
"One line per skill: <installedName> <status> <destinationDir>"
|
|
1102
|
-
],
|
|
1103
|
-
json: ["targetDir", "removed"]
|
|
1104
|
-
}
|
|
1105
|
-
},
|
|
1106
|
-
{
|
|
1107
|
-
name: "uninstall-agent",
|
|
1108
|
-
summary: "Remove the packaged Agent Issues custom agent for VS Code, Copilot, and Claude.",
|
|
1109
|
-
usage: ["agent-issues uninstall-agent [--target <path>]", "agent-issues uninstall-agent --json"],
|
|
1110
|
-
options: [
|
|
1111
|
-
{
|
|
1112
|
-
name: "--target <path>",
|
|
1113
|
-
description: "One VS Code-compatible directory from which the custom agent should be removed. When omitted, the command removes the default VS Code, Copilot, and Claude agents."
|
|
1114
|
-
}
|
|
1115
|
-
],
|
|
1116
|
-
examples: ["agent-issues uninstall-agent", "agent-issues uninstall-agent --target ./tmp/prompts --json"],
|
|
1117
|
-
notes: [
|
|
1118
|
-
"Each custom agent file and its hook file are removed.",
|
|
1119
|
-
"Missing files are reported but do not cause the command to fail."
|
|
1120
|
-
],
|
|
1121
|
-
output: {
|
|
1122
|
-
human: [
|
|
1123
|
-
"Removed agent from <targetDir>",
|
|
1124
|
-
"Status lines plus the removed agent file and hook file paths"
|
|
1125
|
-
],
|
|
1126
|
-
json: ["targetDir", "removed", "additionalRemoved"]
|
|
1127
|
-
}
|
|
1128
|
-
},
|
|
1129
|
-
{
|
|
1130
|
-
name: "schema",
|
|
1131
|
-
summary: "Show machine-discoverable workflow schema and relation rules.",
|
|
1132
|
-
usage: ["agent-issues schema", "agent-issues schema --json"],
|
|
1133
|
-
examples: ["agent-issues schema", "agent-issues schema --json"],
|
|
1134
|
-
notes: [
|
|
1135
|
-
"Use this command to discover entity kinds, status flows, allowed relations, structural relations, and archive mappings."
|
|
1136
|
-
],
|
|
1137
|
-
output: {
|
|
1138
|
-
human: [
|
|
1139
|
-
"Entity kinds section",
|
|
1140
|
-
"Relation types line",
|
|
1141
|
-
"Structural relation types line",
|
|
1142
|
-
"Allowed relations section",
|
|
1143
|
-
"Structural parent rules section"
|
|
1144
|
-
],
|
|
1145
|
-
json: ["entityKinds", "relationTypes", "allowedRelations", "structuralRelationTypes", "parentRules"]
|
|
1146
|
-
}
|
|
1147
|
-
},
|
|
1148
|
-
{
|
|
1149
|
-
name: "capabilities",
|
|
1150
|
-
summary: "Show combined help and schema data in one discovery payload.",
|
|
1151
|
-
usage: ["agent-issues capabilities [--target <path>]", "agent-issues capabilities --json"],
|
|
1152
|
-
options: [
|
|
1153
|
-
{
|
|
1154
|
-
name: "--target <path>",
|
|
1155
|
-
description: "Directory whose packaged skill installation state should be included. Defaults to ~/.agents/skills."
|
|
1156
|
-
}
|
|
1157
|
-
],
|
|
1158
|
-
examples: [
|
|
1159
|
-
"agent-issues capabilities",
|
|
1160
|
-
"agent-issues capabilities --json",
|
|
1161
|
-
"agent-issues capabilities --target ./tmp/skills --json"
|
|
1162
|
-
],
|
|
1163
|
-
notes: [
|
|
1164
|
-
"Use this command when an agent wants the command catalog, workflow schema, and packaged skill installation state in one round trip."
|
|
1165
|
-
],
|
|
1166
|
-
output: {
|
|
1167
|
-
human: [
|
|
1168
|
-
"General help text followed by the workflow schema summary",
|
|
1169
|
-
"Packaged skill installation summary for the inspected target"
|
|
1170
|
-
],
|
|
1171
|
-
json: ["help", "schema", "skills"]
|
|
1172
|
-
}
|
|
1173
|
-
}
|
|
1174
|
-
];
|
|
1175
|
-
const COMMAND_SPEC_BY_NAME = new Map(COMMAND_SPECS.map((spec) => [spec.name, spec]));
|
|
1176
|
-
export function isKnownCommand(commandName) {
|
|
1177
|
-
return COMMAND_SPEC_BY_NAME.has(commandName);
|
|
1178
|
-
}
|
|
1179
|
-
/**
|
|
1180
|
-
* Resolves a help lookup from raw positionals to a command spec name,
|
|
1181
|
-
* preferring the longest match so multi-word commands (e.g. "auth login")
|
|
1182
|
-
* are found before falling back to their first word alone.
|
|
1183
|
-
*/
|
|
1184
|
-
export function resolveHelpCommandName(positionals) {
|
|
1185
|
-
for (let length = positionals.length; length > 0; length--) {
|
|
1186
|
-
const candidate = positionals.slice(0, length).join(" ");
|
|
1187
|
-
if (isKnownCommand(candidate)) {
|
|
1188
|
-
return candidate;
|
|
1189
|
-
}
|
|
1190
|
-
}
|
|
1191
|
-
return positionals[0];
|
|
1192
|
-
}
|
|
1193
|
-
export function getHelpPayload(commandName) {
|
|
1194
|
-
const command = commandName ? getCommandSpec(commandName) : undefined;
|
|
1195
|
-
return {
|
|
1196
|
-
name: "agent-issues",
|
|
1197
|
-
summary: "Structured workflow CLI for shared context, initiatives, PRDs, user stories, ADRs, and issues.",
|
|
1198
|
-
globalOptions: GLOBAL_OPTIONS,
|
|
1199
|
-
commands: COMMAND_SPECS.map((spec) => ({
|
|
1200
|
-
name: spec.name,
|
|
1201
|
-
summary: spec.summary,
|
|
1202
|
-
usage: spec.usage
|
|
1203
|
-
})),
|
|
1204
|
-
discovery: [
|
|
1205
|
-
"Use `agent-issues context --json` to read the current project's shared glossary plus initiative-scoped discovery.",
|
|
1206
|
-
"Use `agent-issues current-tenant --json` to see which workspace-derived tenant the CLI will use by default.",
|
|
1207
|
-
"Use `agent-issues list-tenants --json` to inspect all tenant namespaces present in the selected database before switching or deleting one.",
|
|
1208
|
-
"Use `agent-issues rename-tenant <tenantId> <newTenantId> --force --json` to normalize a tenant namespace without deleting and recreating it.",
|
|
1209
|
-
"Use `agent-issues backfill-bodies --json` to fill missing issue, PRD, and user story bodies from existing tracker metadata.",
|
|
1210
|
-
"Use `agent-issues context show default --json` to read only the shared glossary.",
|
|
1211
|
-
"Use `agent-issues context show <entityOrProjectOrInitiativeId> --json` to read project or initiative context for active work.",
|
|
1212
|
-
"Use `agent-issues context search <query> --view initiatives --json` to find initiative-local terminology without reading the full project directory.",
|
|
1213
|
-
"Use `agent-issues context conflicts --json` to detect duplicate labels across scopes before you rely on a term.",
|
|
1214
|
-
"Use `agent-issues context define <term> --scope <entityOrProjectOrInitiativeId> --body-file <path|-> [--avoid <comma-separated>] --json` to update the scoped glossary when a term is resolved.",
|
|
1215
|
-
"Use `agent-issues create plan --parent <initiativeId> --title <title> --body-file <path|-> --json` to create an initiative-owned Plan, then use `agent-issues plan-entry add` to record its planning state and `agent-issues link <planEntryId> informs <issueId>` to connect implementation work.",
|
|
1216
|
-
"Use `agent-issues help <command> --json` for command-specific guidance.",
|
|
1217
|
-
"Use `agent-issues schema --json` for entity kinds, statuses, and relation rules.",
|
|
1218
|
-
"Use `agent-issues site --json` to launch a detached local server with snapshot and event endpoints.",
|
|
1219
|
-
"Use `agent-issues site --stop --json` to stop the local server on the default or selected port.",
|
|
1220
|
-
"Use `agent-issues install-agent --json` to install the packaged Agent Issues custom agent into the default VS Code prompts directory.",
|
|
1221
|
-
"Use `agent-issues list-agent --json` to inspect the packaged custom agent state in a prompts directory.",
|
|
1222
|
-
"Use `agent-issues uninstall-agent --json` to remove the packaged custom agent from a prompts directory.",
|
|
1223
|
-
"Use `agent-issues install-skills --json` to install the packaged agent-issues skill set.",
|
|
1224
|
-
"Use `agent-issues list-skills --json` to inspect the packaged agent-issues skill set in a target directory.",
|
|
1225
|
-
"Use `agent-issues uninstall-skills --json` to remove the packaged agent-issues skill set.",
|
|
1226
|
-
"Use `agent-issues capabilities --json` to fetch help, schema, and packaged skill installation state in one call."
|
|
1227
|
-
],
|
|
1228
|
-
command
|
|
1229
|
-
};
|
|
1230
|
-
}
|
|
1231
|
-
export function getCapabilitiesPayload(skills) {
|
|
1232
|
-
return {
|
|
1233
|
-
help: getHelpPayload(),
|
|
1234
|
-
schema: getSchemaPayload(),
|
|
1235
|
-
skills
|
|
1236
|
-
};
|
|
1237
|
-
}
|
|
1238
|
-
export function renderHelp(payload) {
|
|
1239
|
-
if (payload.command) {
|
|
1240
|
-
return renderCommandHelp(payload.command);
|
|
1241
|
-
}
|
|
1242
|
-
const lines = ["agent-issues", "", payload.summary, "", "Commands:"];
|
|
1243
|
-
const longestName = Math.max(...payload.commands.map((command) => command.name.length));
|
|
1244
|
-
for (const command of payload.commands) {
|
|
1245
|
-
lines.push(` ${command.name.padEnd(longestName)} ${command.summary}`);
|
|
1246
|
-
}
|
|
1247
|
-
lines.push("", "Global options:");
|
|
1248
|
-
for (const option of payload.globalOptions) {
|
|
1249
|
-
lines.push(` ${option.name.padEnd(18)} ${option.description}`);
|
|
1250
|
-
}
|
|
1251
|
-
lines.push("", "Discovery:");
|
|
1252
|
-
for (const item of payload.discovery) {
|
|
1253
|
-
lines.push(` ${item}`);
|
|
1254
|
-
}
|
|
1255
|
-
return lines.join("\n");
|
|
1256
|
-
}
|
|
1257
|
-
export function getSchemaPayload() {
|
|
1258
|
-
return {
|
|
1259
|
-
entityKinds: ENTITY_KINDS.map((kind) => ({
|
|
1260
|
-
kind,
|
|
1261
|
-
idPrefix: ID_PREFIX[kind],
|
|
1262
|
-
initialStatus: STATUS_FLOW[kind][0],
|
|
1263
|
-
statuses: STATUS_FLOW[kind],
|
|
1264
|
-
archiveStatus: getArchiveStatus(kind)
|
|
1265
|
-
})),
|
|
1266
|
-
entityCategories: ENTITY_CATEGORIES,
|
|
1267
|
-
entityPriorities: ENTITY_PRIORITIES,
|
|
1268
|
-
relationTypes: RELATION_TYPE_VALUES,
|
|
1269
|
-
allowedRelations: ALLOWED_RELATIONS,
|
|
1270
|
-
structuralRelationTypes: STRUCTURAL_RELATION_TYPES,
|
|
1271
|
-
parentRules: ALLOWED_RELATIONS.filter((relation) => isStructuralRelationType(relation.type)).map((relation) => ({
|
|
1272
|
-
parentKind: relation.fromKind,
|
|
1273
|
-
childKind: relation.toKind,
|
|
1274
|
-
relationType: relation.type
|
|
1275
|
-
})),
|
|
1276
|
-
context: {
|
|
1277
|
-
storage: "database",
|
|
1278
|
-
scopes: ["default", "project", "initiative"],
|
|
1279
|
-
defaultKey: DEFAULT_CONTEXT_KEY,
|
|
1280
|
-
listCommand: "agent-issues context list --json",
|
|
1281
|
-
readCommand: "agent-issues context show [<entityOrProjectOrInitiativeId>|default] --json",
|
|
1282
|
-
searchCommand: "agent-issues context search <query> [--view <all|global|initiatives>] --json",
|
|
1283
|
-
conflictsCommand: "agent-issues context conflicts [<query>] [--view <all|initiatives>] --json",
|
|
1284
|
-
initializeCommand: "agent-issues context set --scope <entityOrProjectOrInitiativeId|default> --title <title> --body-file <path|-> --json",
|
|
1285
|
-
defineCommand: "agent-issues context define <term> --scope <entityOrProjectOrInitiativeId|default> --body-file <path|-> [--avoid <comma-separated terms>] --json",
|
|
1286
|
-
forgetCommand: "agent-issues context forget <term> --scope <entityOrProjectOrInitiativeId|default> --json",
|
|
1287
|
-
termFields: ["term", "definition", "avoid", "createdAt", "updatedAt"]
|
|
1288
|
-
},
|
|
1289
|
-
issueComments: {
|
|
1290
|
-
storage: "database",
|
|
1291
|
-
parentKind: "issue",
|
|
1292
|
-
recordPrefix: "COM",
|
|
1293
|
-
addCommand: "agent-issues comment add <issueId> --body-file <path|-> [--reference <issueId>] --json",
|
|
1294
|
-
listCommand: "agent-issues comment list <issueId> [--before <cursor>] [--all] --json",
|
|
1295
|
-
editCommand: "agent-issues comment edit <issueId> <commentId> --body-file <path|-> [--reference <issueId>] --json",
|
|
1296
|
-
deleteCommand: "agent-issues comment delete <issueId> <commentId> --json",
|
|
1297
|
-
historyCommand: "agent-issues comment history <commentId> --json",
|
|
1298
|
-
fields: ["id", "reference", "issueId", "body", "referencedIssueIds", "revision", "contentHash", "tombstone", "createdAt", "updatedAt"]
|
|
1299
|
-
},
|
|
1300
|
-
planEntries: {
|
|
1301
|
-
storage: "database",
|
|
1302
|
-
parentKind: "plan",
|
|
1303
|
-
recordPrefix: "PLAN_ENTRY",
|
|
1304
|
-
linkRelationType: "informs",
|
|
1305
|
-
linkTargetKind: "issue",
|
|
1306
|
-
addCommand: "agent-issues plan-entry add <planId> --role <role> --body-file <path|-> [--reference <entityId>] --json",
|
|
1307
|
-
linkCommand: "agent-issues link <planEntryId> informs <issueId> --json",
|
|
1308
|
-
unlinkCommand: "agent-issues unlink <planEntryId> informs <issueId> --json",
|
|
1309
|
-
fields: ["id", "reference", "planId", "role", "body", "referencedEntityIds", "supersededEntryIds", "revision", "contentHash", "tombstone", "createdAt", "updatedAt"]
|
|
1310
|
-
}
|
|
1311
|
-
};
|
|
1312
|
-
}
|
|
1313
|
-
export function renderSchema(payload) {
|
|
1314
|
-
const lines = ["Entity kinds:"];
|
|
1315
|
-
for (const entityKind of payload.entityKinds) {
|
|
1316
|
-
lines.push(` ${entityKind.kind} (${entityKind.idPrefix}) statuses=${entityKind.statuses.join(", ")} initial=${entityKind.initialStatus} archive=${entityKind.archiveStatus}`);
|
|
1317
|
-
}
|
|
1318
|
-
lines.push("", `Relation types: ${payload.relationTypes.join(", ")}`);
|
|
1319
|
-
lines.push("", `Structural relation types: ${payload.structuralRelationTypes.join(", ")}`);
|
|
1320
|
-
lines.push("", "Allowed relations:");
|
|
1321
|
-
for (const relation of payload.allowedRelations) {
|
|
1322
|
-
lines.push(` ${relation.fromKind} --${relation.type}--> ${relation.toKind}`);
|
|
1323
|
-
}
|
|
1324
|
-
lines.push("", "Structural parent rules:");
|
|
1325
|
-
for (const rule of payload.parentRules) {
|
|
1326
|
-
lines.push(` ${rule.parentKind} --${rule.relationType}--> ${rule.childKind}`);
|
|
1327
|
-
}
|
|
1328
|
-
lines.push("", "Context:");
|
|
1329
|
-
lines.push(` storage=${payload.context.storage} scopes=${payload.context.scopes.join(", ")} default=${payload.context.defaultKey}`);
|
|
1330
|
-
lines.push(` list: ${payload.context.listCommand}`);
|
|
1331
|
-
lines.push(` read: ${payload.context.readCommand}`);
|
|
1332
|
-
lines.push(` search: ${payload.context.searchCommand}`);
|
|
1333
|
-
lines.push(` conflicts: ${payload.context.conflictsCommand}`);
|
|
1334
|
-
lines.push(` initialize: ${payload.context.initializeCommand}`);
|
|
1335
|
-
lines.push(` define term: ${payload.context.defineCommand}`);
|
|
1336
|
-
lines.push(` forget term: ${payload.context.forgetCommand}`);
|
|
1337
|
-
lines.push(` term fields: ${payload.context.termFields.join(", ")}`);
|
|
1338
|
-
lines.push("", "Issue comments:");
|
|
1339
|
-
lines.push(` storage=${payload.issueComments.storage} parent=${payload.issueComments.parentKind} prefix=${payload.issueComments.recordPrefix}`);
|
|
1340
|
-
lines.push(` add: ${payload.issueComments.addCommand}`);
|
|
1341
|
-
lines.push(` list: ${payload.issueComments.listCommand}`);
|
|
1342
|
-
lines.push(` edit: ${payload.issueComments.editCommand}`);
|
|
1343
|
-
lines.push(` delete: ${payload.issueComments.deleteCommand}`);
|
|
1344
|
-
lines.push(` history: ${payload.issueComments.historyCommand}`);
|
|
1345
|
-
lines.push(` fields: ${payload.issueComments.fields.join(", ")}`);
|
|
1346
|
-
lines.push("", "Plan entries:");
|
|
1347
|
-
lines.push(` storage=${payload.planEntries.storage} parent=${payload.planEntries.parentKind} prefix=${payload.planEntries.recordPrefix}`);
|
|
1348
|
-
lines.push(` add: ${payload.planEntries.addCommand}`);
|
|
1349
|
-
lines.push(` link: ${payload.planEntries.linkCommand}`);
|
|
1350
|
-
lines.push(` unlink: ${payload.planEntries.unlinkCommand}`);
|
|
1351
|
-
lines.push(` fields: ${payload.planEntries.fields.join(", ")}`);
|
|
1352
|
-
return lines.join("\n");
|
|
1353
|
-
}
|
|
1354
|
-
function getCommandSpec(commandName) {
|
|
1355
|
-
const spec = COMMAND_SPEC_BY_NAME.get(commandName);
|
|
1356
|
-
if (!spec) {
|
|
1357
|
-
throw new Error(`Unknown command: ${commandName}`);
|
|
1358
|
-
}
|
|
1359
|
-
return spec;
|
|
1360
|
-
}
|
|
1361
|
-
function renderCommandHelp(command) {
|
|
1362
|
-
const lines = [command.name, "", command.summary, "", "Usage:"];
|
|
1363
|
-
for (const usage of command.usage) {
|
|
1364
|
-
lines.push(` ${usage}`);
|
|
1365
|
-
}
|
|
1366
|
-
if (command.positionals && command.positionals.length > 0) {
|
|
1367
|
-
lines.push("", "Arguments:");
|
|
1368
|
-
for (const positional of command.positionals) {
|
|
1369
|
-
lines.push(` ${formatField(positional.name, positional.description, positional.required, positional.allowedValues)}`);
|
|
1370
|
-
}
|
|
1371
|
-
}
|
|
1372
|
-
const options = dedupeOptions([...(command.options ?? []), ...GLOBAL_OPTIONS]);
|
|
1373
|
-
if (options.length > 0) {
|
|
1374
|
-
lines.push("", "Options:");
|
|
1375
|
-
for (const option of options) {
|
|
1376
|
-
lines.push(` ${formatField(option.name, option.description, option.required, option.allowedValues)}`);
|
|
1377
|
-
}
|
|
1378
|
-
}
|
|
1379
|
-
if (command.examples && command.examples.length > 0) {
|
|
1380
|
-
lines.push("", "Examples:");
|
|
1381
|
-
for (const example of command.examples) {
|
|
1382
|
-
lines.push(` ${example}`);
|
|
1383
|
-
}
|
|
1384
|
-
}
|
|
1385
|
-
if (command.notes && command.notes.length > 0) {
|
|
1386
|
-
lines.push("", "Notes:");
|
|
1387
|
-
for (const note of command.notes) {
|
|
1388
|
-
lines.push(` ${note}`);
|
|
1389
|
-
}
|
|
1390
|
-
}
|
|
1391
|
-
if (command.output) {
|
|
1392
|
-
lines.push("", "Output:");
|
|
1393
|
-
if (command.output.human && command.output.human.length > 0) {
|
|
1394
|
-
lines.push(" Human-readable:");
|
|
1395
|
-
for (const line of command.output.human) {
|
|
1396
|
-
lines.push(` ${line}`);
|
|
1397
|
-
}
|
|
1398
|
-
}
|
|
1399
|
-
if (command.output.json && command.output.json.length > 0) {
|
|
1400
|
-
lines.push(" JSON fields:");
|
|
1401
|
-
for (const field of command.output.json) {
|
|
1402
|
-
lines.push(` ${field}`);
|
|
1403
|
-
}
|
|
1404
|
-
}
|
|
1405
|
-
}
|
|
1406
|
-
return lines.join("\n");
|
|
1407
|
-
}
|
|
1408
|
-
function formatField(name, description, required, allowedValues) {
|
|
1409
|
-
const parts = [name, description];
|
|
1410
|
-
if (required) {
|
|
1411
|
-
parts.push("required");
|
|
1412
|
-
}
|
|
1413
|
-
if (allowedValues && allowedValues.length > 0) {
|
|
1414
|
-
parts.push(`allowed: ${allowedValues.join(", ")}`);
|
|
1415
|
-
}
|
|
1416
|
-
return parts.join(" | ");
|
|
1417
|
-
}
|
|
1418
|
-
function dedupeOptions(options) {
|
|
1419
|
-
const seen = new Set();
|
|
1420
|
-
const deduped = [];
|
|
1421
|
-
for (const option of options) {
|
|
1422
|
-
if (seen.has(option.name)) {
|
|
1423
|
-
continue;
|
|
1424
|
-
}
|
|
1425
|
-
seen.add(option.name);
|
|
1426
|
-
deduped.push(option);
|
|
1427
|
-
}
|
|
1428
|
-
return deduped;
|
|
1429
|
-
}
|
|
1430
|
-
//# sourceMappingURL=help.js.map
|