@khanglvm/outline-cli 0.1.1 → 0.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,20 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.1.3 - 2026-03-06
4
+
5
+ - Changes since `v0.1.2`.
6
+ - feat(ai-onboarding): add approval-gated npx skills install flow (9992856)
7
+
8
+ ## 0.1.2 - 2026-03-06
9
+
10
+ - Changes since `v0.1.1`.
11
+ - docs(readme): remove redundant quick-start copy prompt (28ab2cd)
12
+ - feat(help): add quick-start-agent onboarding section (1d21814)
13
+ - docs(readme): rewrite quick start as AI agent instructions (2b3065b)
14
+ - docs(readme): remove duplicated intro wording (88eddcf)
15
+ - docs: remove tracked docs directory and refine README intro (7235f95)
16
+ - docs(readme): prioritize global install usage (052c31b)
17
+
3
18
  ## 0.1.1 - 2026-03-05
4
19
 
5
20
  - Initial tagged release notes.
package/README.md CHANGED
@@ -1,57 +1,21 @@
1
1
  # outline-cli
2
2
 
3
- `outline-cli` (alias `outline-agent`) is a Node.js CLI for the Outline API, designed for both human operators and AI agents.
4
-
5
- It prioritizes deterministic, machine-friendly output:
6
-
7
- - Stable JSON envelopes
8
- - Token-efficient `ids` and `summary` views
9
- - Batch operations to reduce API round trips
10
- - Safe mutation gates (`performAction: true`)
11
- - Automatic large-result offload to temp files
3
+ A CLI for Outline ([`https://getoutline.com`](https://getoutline.com)) - optimized for AI agents.
12
4
 
13
5
  ## Quick Start
14
6
 
15
- Prerequisites:
16
-
17
- - Node.js `>=18.17`
18
- - An Outline workspace URL
19
- - An Outline API key (recommended auth mode)
20
-
21
- Run from npm without installing:
22
-
23
- ```bash
24
- npx @khanglvm/outline-cli --help
25
- ```
26
-
27
- Or install locally in this repo:
7
+ Install globally:
28
8
 
29
9
  ```bash
30
- npm install
31
- node ./bin/outline-cli.js --help
10
+ npm i -g @khanglvm/outline-cli
32
11
  ```
33
12
 
34
- Set up a profile (API key mode):
13
+ ## Get Started with AI Agents
35
14
 
36
- ```bash
37
- npx @khanglvm/outline-cli profile add prod \
38
- --base-url https://app.getoutline.com \
39
- --api-key "$OUTLINE_API_KEY" \
40
- --set-default
41
- ```
42
-
43
- Verify auth:
44
-
45
- ```bash
46
- npx @khanglvm/outline-cli profile test prod --pretty
47
- ```
15
+ After installing, paste this instruction into your AI coding assistant:
48
16
 
49
- Run your first search:
50
-
51
- ```bash
52
- npx @khanglvm/outline-cli invoke documents.search \
53
- --args '{"query":"oncall runbook","mode":"semantic","limit":5,"view":"summary"}' \
54
- --pretty
17
+ ```text
18
+ Run `outline-cli tools help quick-start-agent --view full` and follow its instructions to help me get started with Outline CLI
55
19
  ```
56
20
 
57
21
  ## Day-to-Day Usage
@@ -59,36 +23,36 @@ npx @khanglvm/outline-cli invoke documents.search \
59
23
  Discover tools and contracts:
60
24
 
61
25
  ```bash
62
- npx @khanglvm/outline-cli tools list
63
- npx @khanglvm/outline-cli tools contract documents.search --pretty
64
- npx @khanglvm/outline-cli tools contract all --result-mode inline
26
+ outline-cli tools list
27
+ outline-cli tools contract documents.search --pretty
28
+ outline-cli tools contract all --result-mode inline
65
29
  ```
66
30
 
67
- Read document metadata by id:
31
+ Read document metadata by ID:
68
32
 
69
33
  ```bash
70
- npx @khanglvm/outline-cli invoke documents.info \
34
+ outline-cli invoke documents.info \
71
35
  --args '{"id":"<document-id>","view":"summary"}'
72
36
  ```
73
37
 
74
38
  Create a document:
75
39
 
76
40
  ```bash
77
- npx @khanglvm/outline-cli invoke documents.create \
41
+ outline-cli invoke documents.create \
78
42
  --args '{"title":"Release Notes","text":"# Release Notes","publish":false,"view":"summary"}'
79
43
  ```
80
44
 
81
45
  Update a document (mutation requires `performAction: true`):
82
46
 
83
47
  ```bash
84
- npx @khanglvm/outline-cli invoke documents.update \
48
+ outline-cli invoke documents.update \
85
49
  --args '{"id":"<document-id>","text":"\n\nUpdated by automation.","editMode":"append","performAction":true,"view":"summary"}'
86
50
  ```
87
51
 
88
52
  Batch multiple calls:
89
53
 
90
54
  ```bash
91
- npx @khanglvm/outline-cli batch --ops '[
55
+ outline-cli batch --ops '[
92
56
  {"tool":"collections.list","args":{"limit":5,"view":"summary"}},
93
57
  {"tool":"documents.search","args":{"query":"incident","limit":5,"view":"ids"}}
94
58
  ]'
@@ -96,19 +60,19 @@ npx @khanglvm/outline-cli batch --ops '[
96
60
 
97
61
  ## Safe Delete Flow
98
62
 
99
- Delete is guarded by read-token confirmation.
63
+ Deletion is guarded by read-token confirmation.
100
64
 
101
65
  1. Arm-delete read:
102
66
 
103
67
  ```bash
104
- npx @khanglvm/outline-cli invoke documents.info \
68
+ outline-cli invoke documents.info \
105
69
  --args '{"id":"<document-id>","armDelete":true,"view":"summary"}'
106
70
  ```
107
71
 
108
72
  2. Copy the returned `deleteReadReceipt.token`, then delete:
109
73
 
110
74
  ```bash
111
- npx @khanglvm/outline-cli invoke documents.delete \
75
+ outline-cli invoke documents.delete \
112
76
  --args '{"id":"<document-id>","readToken":"<token>","performAction":true}'
113
77
  ```
114
78
 
@@ -128,17 +92,17 @@ Result mode:
128
92
  Temp-file management:
129
93
 
130
94
  ```bash
131
- npx @khanglvm/outline-cli tmp list
132
- npx @khanglvm/outline-cli tmp cat /absolute/path/from/result.json
133
- npx @khanglvm/outline-cli tmp gc --older-than-hours 24
95
+ outline-cli tmp list
96
+ outline-cli tmp cat /absolute/path/from/result.json
97
+ outline-cli tmp gc --older-than-hours 24
134
98
  ```
135
99
 
136
100
  ## Profile Management
137
101
 
138
- Add password-mode profile:
102
+ Add a password-mode profile:
139
103
 
140
104
  ```bash
141
- npx @khanglvm/outline-cli profile add internal \
105
+ outline-cli profile add internal \
142
106
  --base-url https://outline.company.com \
143
107
  --auth-type password \
144
108
  --username agent@company.com \
@@ -148,17 +112,17 @@ npx @khanglvm/outline-cli profile add internal \
148
112
  Select default profile:
149
113
 
150
114
  ```bash
151
- npx @khanglvm/outline-cli profile use prod
115
+ outline-cli profile use prod
152
116
  ```
153
117
 
154
118
  Improve AI profile routing metadata:
155
119
 
156
120
  ```bash
157
- npx @khanglvm/outline-cli profile annotate prod \
121
+ outline-cli profile annotate prod \
158
122
  --description "Production knowledge base" \
159
123
  --append-keywords "prod,runbook,incident"
160
124
 
161
- npx @khanglvm/outline-cli profile enrich prod \
125
+ outline-cli profile enrich prod \
162
126
  --query "incident escalation process" \
163
127
  --titles "Incident Playbook,Escalation Matrix"
164
128
  ```
@@ -167,23 +131,29 @@ npx @khanglvm/outline-cli profile enrich prod \
167
131
 
168
132
  Use this short operating pattern when an AI agent drives the CLI:
169
133
 
170
- 1. Start with `tools contract all --result-mode inline`.
171
- 2. Prefer `view:"ids"` or `view:"summary"` first; hydrate to `full` only when needed.
172
- 3. Bundle independent reads into one `batch` call.
173
- 4. For any mutation endpoint, explicitly set `performAction:true`.
174
- 5. For delete, always run `documents.info` with `armDelete:true` first and pass the returned read token.
175
- 6. If output is file-offloaded, read only the required fields via `tmp cat` + `jq`.
134
+ 1. Start with `outline-cli --version` and `tools help --view summary` to confirm onboarding help is available.
135
+ 2. Suggest installing the `outline-cli` skill via `npx skills` for all currently supported local AI tools; only run install after explicit user approval.
136
+ 3. If approved, run headless install without tool-specific filter: `npx skills add https://github.com/khanglvm/skills --skill outline-cli -y`.
137
+ 4. Prefer `view:"ids"` or `view:"summary"` first; hydrate to `full` only when needed.
138
+ 5. Bundle independent reads into one `batch` call.
139
+ 6. For any mutation endpoint, explicitly set `performAction:true`.
140
+ 7. For delete, always run `documents.info` with `armDelete:true` first and pass the returned read token.
141
+ 8. List existing profiles before creating one with `outline-cli profile list --pretty`.
142
+ 9. For new profiles, prefer API key mode and guide users through base URL + API key generation (`<base-url>/settings/api`) before `profile add`.
143
+ 10. If output is file-offloaded, read only the required fields via `tmp cat` + `jq`.
176
144
 
177
145
  For structured AI playbooks and scenario guides:
178
146
 
179
147
  ```bash
180
- npx @khanglvm/outline-cli tools help ai-skills --view summary
181
- npx @khanglvm/outline-cli tools help ai-skills --scenario UC-12
148
+ outline-cli tools help --view summary
149
+ outline-cli tools help quick-start-agent --view full
150
+ outline-cli tools help ai-skills --view summary
151
+ outline-cli tools help ai-skills --scenario UC-12
182
152
  ```
183
153
 
184
154
  ## Testing (Live Environment)
185
155
 
186
- Set test credentials in local env file:
156
+ Set test credentials in a local env file:
187
157
 
188
158
  ```bash
189
159
  cp .env.test.example .env.test.local
@@ -197,7 +167,7 @@ npm run check
197
167
  npm test
198
168
  ```
199
169
 
200
- Test rule in this repository:
170
+ Test rules in this repository:
201
171
 
202
172
  - Mutation tests create and clean up their own test documents.
203
173
  - Read-only tests may use site-wide data.
@@ -235,10 +205,9 @@ Release prerequisites:
235
205
 
236
206
  - Never commit real API keys.
237
207
  - Keep local secrets in untracked files such as `.env.test.local`.
238
- - Profile secrets are stored in OS keychain by default.
208
+ - Profile secrets are stored in the OS keychain by default.
239
209
 
240
210
  ## Reference Docs
241
211
 
242
- - Tool contracts: [`docs/TOOL_CONTRACTS.md`](docs/TOOL_CONTRACTS.md)
243
212
  - Agent rules for this repo: [`AGENTS.md`](AGENTS.md)
244
213
  - Release script: [`scripts/release.mjs`](scripts/release.mjs)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@khanglvm/outline-cli",
3
- "version": "0.1.1",
3
+ "version": "0.1.3",
4
4
  "description": "Agent-optimized CLI for Outline API",
5
5
  "type": "module",
6
6
  "bin": {
@@ -2,6 +2,169 @@ import { CliError } from "./errors.js";
2
2
 
3
3
  const AI_SKILL_DATA_VERSION = "2026-03-05.1";
4
4
  const AI_HELP_SECTION_ID = "ai-skills";
5
+ const QUICK_START_HELP_SECTION_ID = "quick-start-agent";
6
+ const QUICK_START_HELP_VERSION = "2026-03-06.3";
7
+
8
+ const QUICK_START_AGENT_PLAYBOOK = {
9
+ title: "outline-cli onboarding for non-expert users",
10
+ audience: "AI agents assisting non-expert users in terminal setup and first usage.",
11
+ objective:
12
+ "Verify existing outline-cli installation first, discover AI onboarding commands, explicitly offer optional outline-cli skill installation via npx skills (approval-gated), list existing profiles before creating one, then guide API-key setup with domain checks and provide natural-language starter prompts.",
13
+ steps: [
14
+ {
15
+ step: 1,
16
+ title: "Check current installation and help command availability",
17
+ commands: [
18
+ "outline-cli --version",
19
+ "outline-cli --help",
20
+ "outline-cli tools --help",
21
+ "outline-cli tools help --view summary",
22
+ ],
23
+ fallbackCommands: [
24
+ "npm i -g @khanglvm/outline-cli@latest",
25
+ "outline-cli --version",
26
+ "outline-cli tools help --view summary",
27
+ ],
28
+ successCheck: "tools help output includes the quick-start-agent section",
29
+ },
30
+ {
31
+ step: 2,
32
+ title: "Load full onboarding guide for deterministic setup steps",
33
+ command: "outline-cli tools help quick-start-agent --view full",
34
+ },
35
+ {
36
+ step: 3,
37
+ title: "Suggest optional outline-cli skill installation via npx skills",
38
+ question:
39
+ "Would you like me to install the outline-cli skill now via npx skills for all currently supported local AI tools? This helps future AI sessions use the right workflow by default.",
40
+ commandTemplates: [
41
+ "npx skills add https://github.com/khanglvm/skills --skill outline-cli -y",
42
+ ],
43
+ decisionRules: [
44
+ "If user explicitly approves, run the command in headless mode exactly once so installation applies to currently supported local tools.",
45
+ "If user declines, skip installation and continue onboarding without blocking profile setup.",
46
+ ],
47
+ expectedSignals: [
48
+ "Successful install prints completion output from npx skills.",
49
+ "Failure should be reported with the exact command and next recovery step.",
50
+ ],
51
+ },
52
+ {
53
+ step: 4,
54
+ title: "Inspect command surfaces before asking the user for inputs",
55
+ commands: [
56
+ "outline-cli profile --help",
57
+ "outline-cli invoke --help",
58
+ ],
59
+ },
60
+ {
61
+ step: 5,
62
+ title: "List existing profiles first and branch setup flow",
63
+ command: "outline-cli profile list --pretty",
64
+ decisionRules: [
65
+ "If one or more profiles exist, show them and ask whether to use an existing profile or create a new one.",
66
+ "If no profiles exist, continue with new profile setup questions.",
67
+ ],
68
+ },
69
+ {
70
+ step: 6,
71
+ title: "Ask for Outline base URL with beginner-friendly explanation",
72
+ question:
73
+ "What is your Outline base URL? This is the web address you open in your browser to use Outline.",
74
+ examples: [
75
+ "Official cloud: https://app.getoutline.com",
76
+ "Custom/self-hosted: https://docs.yourcompany.com",
77
+ ],
78
+ guidance: [
79
+ "Use https:// and do not include a trailing path.",
80
+ "If unsure, copy the URL from your browser while viewing your Outline workspace home.",
81
+ ],
82
+ },
83
+ {
84
+ step: 7,
85
+ title: "Validate the provided base URL before asking for API key",
86
+ commandTemplates: [
87
+ 'curl -sS -o /dev/null -w "HTTP %{http_code}\\n" "<base-url>"',
88
+ 'curl -sS -o /dev/null -w "API %{http_code}\\n" "<base-url>/api/auth.info"',
89
+ ],
90
+ expectedSignals: [
91
+ "Base URL check should return a reachable HTTP status (often 200/301/302).",
92
+ "API auth endpoint without token often returns 401/403, which still confirms domain + API route are reachable.",
93
+ ],
94
+ },
95
+ {
96
+ step: 8,
97
+ title: "Guide user to create API key in Outline UI",
98
+ apiKeySettingsUrlTemplate: "<base-url>/settings/api",
99
+ fallbackNavigation: "In Outline UI: Settings → API Keys",
100
+ apiKeyConfigTemplate: [
101
+ "Name: outline-cli-<profile-id-or-your-name>",
102
+ "Expiration date: choose your policy (for example 90 days or no expiry if policy allows)",
103
+ "Scopes: leave empty for same permissions as your user, or restrict to needed endpoints",
104
+ ],
105
+ scopeExamples: [
106
+ "Read-focused starter scope: *.info documents.search collections.list",
107
+ "Document automation scope: documents.* collections.info",
108
+ ],
109
+ requiredUserAction:
110
+ "Create the key, then copy the generated token value (typically starts with ol_api_) and share it with the agent for profile setup.",
111
+ },
112
+ {
113
+ step: 9,
114
+ title: "Ask follow-up questions for remaining setup values (one at a time)",
115
+ questions: [
116
+ "What is your Outline API key?",
117
+ "What profile id do you want? (default to prod if user has no preference)",
118
+ ],
119
+ },
120
+ {
121
+ step: 10,
122
+ title: "Guide profile setup (API key mode) and set it as default",
123
+ command:
124
+ 'outline-cli profile add <profile-id> --base-url <base-url> --auth-type apiKey --api-key "<api-key>" --set-default',
125
+ },
126
+ {
127
+ step: 11,
128
+ title: "Verify profile authentication",
129
+ command: "outline-cli profile test <profile-id> --pretty",
130
+ },
131
+ {
132
+ step: 12,
133
+ title: "Show natural-language prompts for what the AI agent can do with outline-cli",
134
+ minimumPromptCount: 10,
135
+ naturalLanguagePrompts: [
136
+ "Find our onboarding checklist in Outline.",
137
+ "List recent documents in the Engineering collection.",
138
+ "Show me a summary of document <document-id>.",
139
+ "Create a draft release notes document with today's date.",
140
+ "Append a short status update to document <document-id>.",
141
+ "Find documents mentioning incident response in the last month.",
142
+ "Show who can access document <document-id>.",
143
+ "Compare two documents and list key differences.",
144
+ "Generate a TODO list from document <document-id>.",
145
+ "Find stale docs that have not been updated recently.",
146
+ ],
147
+ commandTemplates: [
148
+ 'outline-cli invoke documents.search --args \'{"query":"onboarding checklist","mode":"semantic","limit":5,"view":"summary"}\' --pretty',
149
+ 'outline-cli invoke documents.list --args \'{"limit":5,"view":"summary"}\' --pretty',
150
+ 'outline-cli invoke documents.info --args \'{"id":"<document-id>","view":"summary"}\' --pretty',
151
+ ],
152
+ },
153
+ ],
154
+ interactionRules: [
155
+ "Use short and clear explanations for beginners.",
156
+ "Always run installation/help discovery commands before setup questions.",
157
+ "Always suggest optional outline-cli skill installation via npx skills and ask for explicit approval before running install.",
158
+ "If approved, run npx skills installation in headless mode (`-y`, no tool-specific agent filter) and continue onboarding.",
159
+ "Always run profile list before profile add.",
160
+ "Prefer API key authentication for beginner onboarding unless the user explicitly requests another auth mode.",
161
+ "Explain base URL and API key steps in plain language, then validate the domain before requesting the API key.",
162
+ "Ask one question at a time when required information is missing.",
163
+ "If a command fails, explain the cause and provide the exact next command.",
164
+ "Confirm each step completion before moving to the next step.",
165
+ "After setup, provide at least 10 natural-language prompts and run one command example.",
166
+ ],
167
+ };
5
168
 
6
169
  const AI_GLOBAL_GUIDANCE = {
7
170
  principles: [
@@ -630,6 +793,67 @@ function normalizeView(view = "summary") {
630
793
  return normalized;
631
794
  }
632
795
 
796
+ function normalizeQuickStartView(view = "summary") {
797
+ const normalized = String(view || "summary").toLowerCase();
798
+ if (normalized !== "summary" && normalized !== "full") {
799
+ throw new CliError("Invalid view for quick-start-agent help. Expected summary or full.", {
800
+ code: "QUICK_START_HELP_INVALID_VIEW",
801
+ view,
802
+ });
803
+ }
804
+ return normalized;
805
+ }
806
+
807
+ function summarizeQuickStartPlaybook() {
808
+ return {
809
+ title: QUICK_START_AGENT_PLAYBOOK.title,
810
+ audience: QUICK_START_AGENT_PLAYBOOK.audience,
811
+ objective: QUICK_START_AGENT_PLAYBOOK.objective,
812
+ steps: QUICK_START_AGENT_PLAYBOOK.steps.map((row) => {
813
+ const summaryRow = {
814
+ step: row.step,
815
+ title: row.title,
816
+ };
817
+ if (row.command) {
818
+ summaryRow.command = row.command;
819
+ }
820
+ if (Array.isArray(row.commands)) {
821
+ summaryRow.commands = row.commands;
822
+ }
823
+ if (Array.isArray(row.questions)) {
824
+ summaryRow.questions = row.questions;
825
+ }
826
+ if (row.question) {
827
+ summaryRow.question = row.question;
828
+ }
829
+ if (row.minimumPromptCount) {
830
+ summaryRow.minimumPromptCount = row.minimumPromptCount;
831
+ }
832
+ if (Array.isArray(row.commandTemplates)) {
833
+ summaryRow.commandTemplates = row.commandTemplates;
834
+ }
835
+ if (Array.isArray(row.decisionRules)) {
836
+ summaryRow.decisionRules = row.decisionRules;
837
+ }
838
+ if (Array.isArray(row.expectedSignals)) {
839
+ summaryRow.expectedSignals = row.expectedSignals;
840
+ }
841
+ if (row.apiKeySettingsUrlTemplate) {
842
+ summaryRow.apiKeySettingsUrlTemplate = row.apiKeySettingsUrlTemplate;
843
+ }
844
+ if (Array.isArray(row.apiKeyConfigTemplate)) {
845
+ summaryRow.apiKeyConfigTemplate = row.apiKeyConfigTemplate;
846
+ }
847
+ if (Array.isArray(row.scopeExamples)) {
848
+ summaryRow.scopeExamples = row.scopeExamples;
849
+ }
850
+ return summaryRow;
851
+ }),
852
+ interactionRules: QUICK_START_AGENT_PLAYBOOK.interactionRules,
853
+ nextCommand: "outline-cli tools help quick-start-agent --view full",
854
+ };
855
+ }
856
+
633
857
  function normalizeScenario(input) {
634
858
  if (!input) {
635
859
  return null;
@@ -747,8 +971,25 @@ export function getAgentSkillHelp(options = {}) {
747
971
  };
748
972
  }
749
973
 
974
+ export function getQuickStartAgentHelp(options = {}) {
975
+ const view = normalizeQuickStartView(options.view || "summary");
976
+ return {
977
+ section: QUICK_START_HELP_SECTION_ID,
978
+ version: QUICK_START_HELP_VERSION,
979
+ view,
980
+ ...(view === "full" ? QUICK_START_AGENT_PLAYBOOK : summarizeQuickStartPlaybook()),
981
+ };
982
+ }
983
+
750
984
  export function listHelpSections() {
751
985
  return [
986
+ {
987
+ id: QUICK_START_HELP_SECTION_ID,
988
+ title: "AI setup onboarding",
989
+ description:
990
+ "Copy-ready AI onboarding instructions to verify installation, guide API-key profile setup (including base URL + settings path), and provide natural-language starter prompts.",
991
+ commandExample: "outline-cli tools help quick-start-agent --view full",
992
+ },
752
993
  {
753
994
  id: AI_HELP_SECTION_ID,
754
995
  title: "AI instruction skills",
package/src/cli.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { Command } from "commander";
2
2
  import path from "node:path";
3
- import { getAgentSkillHelp, listHelpSections } from "./agent-skills.js";
3
+ import { getAgentSkillHelp, getQuickStartAgentHelp, listHelpSections } from "./agent-skills.js";
4
4
  import {
5
5
  buildProfile,
6
6
  defaultConfigPath,
@@ -786,6 +786,32 @@ export async function run(argv = process.argv) {
786
786
  return;
787
787
  }
788
788
 
789
+ if (
790
+ sectionName === "quick-start-agent" ||
791
+ sectionName === "quickstart-agent" ||
792
+ sectionName === "quick-start" ||
793
+ sectionName === "quickstart" ||
794
+ sectionName === "setup" ||
795
+ sectionName === "agent" ||
796
+ sectionName === "onboarding"
797
+ ) {
798
+ await emitOutput(
799
+ store,
800
+ {
801
+ ok: true,
802
+ ...getQuickStartAgentHelp({
803
+ view: merged.view,
804
+ }),
805
+ },
806
+ merged,
807
+ {
808
+ label: "tools-help-quick-start-agent",
809
+ mode: merged.resultMode,
810
+ }
811
+ );
812
+ return;
813
+ }
814
+
789
815
  throw new CliError(
790
816
  `Unknown tools help section: ${section}. Supported: ${listHelpSections().map((row) => row.id).join(", ")}`
791
817
  );
@@ -3,8 +3,8 @@ export const ENTRY_INTEGRITY_MANIFEST = Object.freeze({
3
3
  version: 1,
4
4
  algorithm: "sha256",
5
5
  signatureAlgorithm: "sha256-salted-manifest-v1",
6
- signature: "26d0616d3f957992d3bf8ecf5a243bed9afb4bd239710449c5e2b8df56117996",
7
- generatedAt: "2026-03-05T13:45:11.761Z",
6
+ signature: "03f876687f3972f11cce73da3da5f5f5266536bdce151a03326a813082240016",
7
+ generatedAt: "2026-03-06T04:21:12.443Z",
8
8
  files: [
9
9
  {
10
10
  "path": "src/action-gate.js",
@@ -12,11 +12,11 @@ export const ENTRY_INTEGRITY_MANIFEST = Object.freeze({
12
12
  },
13
13
  {
14
14
  "path": "src/agent-skills.js",
15
- "sha256": "d9ea2f000689311ecb6bfae92c469dd16a2d4f64ce84098f121cad2a24dd4529"
15
+ "sha256": "12d54830ec84d9e8815cd28915070453175520416c83983de2496c1734acd7a2"
16
16
  },
17
17
  {
18
18
  "path": "src/cli.js",
19
- "sha256": "b19f98ced5aba789c860891bbc21f95d4a5443f185c6c48f00bced81eadc1acb"
19
+ "sha256": "7959970b8e2d0d81de0c2e35201274f0d16744aaa2a73f001decfdad45c85522"
20
20
  },
21
21
  {
22
22
  "path": "src/config-store.js",
@@ -1,15 +1,107 @@
1
1
  import test from "node:test";
2
2
  import assert from "node:assert/strict";
3
3
 
4
- import { getAgentSkillHelp, listHelpSections } from "../src/agent-skills.js";
4
+ import { getAgentSkillHelp, getQuickStartAgentHelp, listHelpSections } from "../src/agent-skills.js";
5
5
  import { CliError } from "../src/errors.js";
6
6
 
7
7
  test("listHelpSections exposes ai-skills section", () => {
8
8
  const sections = listHelpSections();
9
9
  assert.ok(Array.isArray(sections));
10
+ assert.ok(sections.some((section) => section.id === "quick-start-agent"));
10
11
  assert.ok(sections.some((section) => section.id === "ai-skills"));
11
12
  });
12
13
 
14
+ test("getQuickStartAgentHelp returns summary by default", () => {
15
+ const payload = getQuickStartAgentHelp();
16
+
17
+ assert.equal(payload.section, "quick-start-agent");
18
+ assert.equal(payload.view, "summary");
19
+ assert.ok(Array.isArray(payload.steps));
20
+ assert.ok(payload.steps.length >= 4);
21
+ assert.ok(
22
+ payload.steps.some(
23
+ (row) => Array.isArray(row.commands) && row.commands.includes("outline-cli --version")
24
+ )
25
+ );
26
+ assert.ok(
27
+ payload.steps.some(
28
+ (row) =>
29
+ typeof row.question === "string" &&
30
+ row.question.toLowerCase().includes("install the outline-cli skill")
31
+ )
32
+ );
33
+ assert.ok(
34
+ payload.steps.some(
35
+ (row) =>
36
+ Array.isArray(row.commandTemplates) &&
37
+ row.commandTemplates.some(
38
+ (cmd) => cmd.includes("npx skills add") && cmd.includes("--skill outline-cli -y") && !cmd.includes("--agent")
39
+ )
40
+ )
41
+ );
42
+ assert.ok(
43
+ payload.steps.some(
44
+ (row) =>
45
+ typeof row.question === "string" &&
46
+ row.question.toLowerCase().includes("base url")
47
+ )
48
+ );
49
+ assert.equal(payload.nextCommand, "outline-cli tools help quick-start-agent --view full");
50
+ });
51
+
52
+ test("getQuickStartAgentHelp returns full payload and validates view", () => {
53
+ const payload = getQuickStartAgentHelp({ view: "full" });
54
+ assert.equal(payload.section, "quick-start-agent");
55
+ assert.equal(payload.view, "full");
56
+ assert.ok(Array.isArray(payload.steps));
57
+ assert.ok(payload.steps.some((row) => row.command === "outline-cli profile list --pretty"));
58
+ assert.ok(
59
+ payload.steps.some(
60
+ (row) =>
61
+ row.command &&
62
+ row.command.includes("--auth-type apiKey") &&
63
+ row.command.includes("--api-key")
64
+ )
65
+ );
66
+ assert.ok(
67
+ payload.steps.some(
68
+ (row) =>
69
+ Array.isArray(row.commandTemplates) &&
70
+ row.commandTemplates.includes(
71
+ "npx skills add https://github.com/khanglvm/skills --skill outline-cli -y"
72
+ ) &&
73
+ Array.isArray(row.decisionRules) &&
74
+ row.decisionRules.some((rule) => rule.toLowerCase().includes("explicitly approves"))
75
+ )
76
+ );
77
+ assert.ok(
78
+ payload.steps.some(
79
+ (row) =>
80
+ row.apiKeySettingsUrlTemplate === "<base-url>/settings/api" &&
81
+ Array.isArray(row.apiKeyConfigTemplate) &&
82
+ row.apiKeyConfigTemplate.length >= 3
83
+ )
84
+ );
85
+ assert.ok(
86
+ payload.steps.some(
87
+ (row) =>
88
+ row.minimumPromptCount >= 10 &&
89
+ Array.isArray(row.naturalLanguagePrompts) &&
90
+ row.naturalLanguagePrompts.length >= 10
91
+ )
92
+ );
93
+ assert.ok(Array.isArray(payload.interactionRules));
94
+
95
+ assert.throws(
96
+ () => getQuickStartAgentHelp({ view: "compact" }),
97
+ (err) => {
98
+ assert.ok(err instanceof CliError);
99
+ assert.equal(err.details?.code, "QUICK_START_HELP_INVALID_VIEW");
100
+ return true;
101
+ }
102
+ );
103
+ });
104
+
13
105
  test("getAgentSkillHelp returns summary guidance by default", () => {
14
106
  const payload = getAgentSkillHelp();
15
107