@notis_ai/cli 0.2.0-beta.16.1 → 0.2.0-beta.160.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (154) hide show
  1. package/README.md +433 -133
  2. package/config/notis_app_boundary_rules.json +50 -0
  3. package/config/notis_app_design_rules.json +135 -0
  4. package/dist/agent-hooks/notis-agent-hook.mjs +18672 -0
  5. package/dist/base-skills/notis-apps/SKILL.md +70 -0
  6. package/dist/base-skills/notis-apps/references/architecture.md +164 -0
  7. package/dist/base-skills/notis-apps/references/context.md +81 -0
  8. package/dist/base-skills/notis-apps/references/design.md +165 -0
  9. package/dist/base-skills/notis-apps/references/reading.md +89 -0
  10. package/dist/base-skills/notis-apps/references/release.md +99 -0
  11. package/dist/base-skills/notis-apps/references/sdk.md +62 -0
  12. package/dist/base-skills/notis-apps/references/troubleshooting.md +23 -0
  13. package/dist/base-skills/notis-cli/SKILL.md +140 -0
  14. package/dist/base-skills/notis-cli/references/app-delivery.md +18 -0
  15. package/dist/base-skills/notis-cli/references/native-databases.md +20 -0
  16. package/dist/base-skills/notis-cli/references/tool-examples.md +56 -0
  17. package/dist/base-skills/notis-cli/references/troubleshooting.md +39 -0
  18. package/dist/base-skills/notis-query/SKILL.md +67 -0
  19. package/dist/base-skills/notis-query/references/database-discovery.md +59 -0
  20. package/dist/base-skills/notis-query/references/documents.md +50 -0
  21. package/dist/base-skills/notis-query/references/query.md +543 -0
  22. package/dist/skill-sync/index.js +1626 -0
  23. package/dist/skill-sync/index.js.map +7 -0
  24. package/dist/skill-sync-worker.mjs +2990 -0
  25. package/package.json +16 -6
  26. package/skills/notis-apps/cli.md +313 -0
  27. package/skills/notis-cli/AGENT_INSTRUCTIONS.md +39 -0
  28. package/skills/notis-onboarding/BRIEF.md +129 -0
  29. package/skills/notis-query/cli.md +39 -0
  30. package/src/agent-hook-entry.js +5 -0
  31. package/src/cli.js +294 -25
  32. package/src/command-specs/agents.js +392 -0
  33. package/src/command-specs/apps.js +1470 -202
  34. package/src/command-specs/auth.js +114 -137
  35. package/src/command-specs/diagnostics.js +716 -0
  36. package/src/command-specs/handover.js +374 -0
  37. package/src/command-specs/helpers.js +84 -82
  38. package/src/command-specs/index.js +25 -6
  39. package/src/command-specs/meta.js +150 -18
  40. package/src/command-specs/onboarding.js +290 -0
  41. package/src/command-specs/profile.js +358 -0
  42. package/src/command-specs/reports.js +86 -0
  43. package/src/command-specs/skills.js +75 -0
  44. package/src/command-specs/smoke.js +386 -0
  45. package/src/command-specs/tools.js +455 -139
  46. package/src/runtime/agent-browser.js +632 -0
  47. package/src/runtime/agent-memory-state.js +126 -0
  48. package/src/runtime/agent-setup.js +383 -0
  49. package/src/runtime/app-boundary-validator.js +404 -0
  50. package/src/runtime/app-changelog.js +79 -0
  51. package/src/runtime/app-platform.js +2633 -210
  52. package/src/runtime/app-registry-scaffolds.js +367 -0
  53. package/src/runtime/app-test-server.js +292 -0
  54. package/src/runtime/assets/store-screenshot-dark.png +0 -0
  55. package/src/runtime/auth-recovery.js +110 -0
  56. package/src/runtime/base-skills.d.ts +20 -0
  57. package/src/runtime/base-skills.js +167 -0
  58. package/src/runtime/channel.js +133 -0
  59. package/src/runtime/delegated-context.js +68 -0
  60. package/src/runtime/errors.js +1 -0
  61. package/src/runtime/git.js +233 -0
  62. package/src/runtime/login-listener.js +15 -0
  63. package/src/runtime/oauth.js +2622 -0
  64. package/src/runtime/output.js +37 -5
  65. package/src/runtime/ports.js +31 -0
  66. package/src/runtime/profiles.js +906 -55
  67. package/src/runtime/skill-sync/cloud-client.ts +99 -0
  68. package/src/runtime/skill-sync/index.ts +697 -0
  69. package/src/runtime/skill-sync/local-scanner.ts +1046 -0
  70. package/src/runtime/skill-sync/symlink-manager.ts +433 -0
  71. package/src/runtime/skill-sync/sync-plan.ts +22 -0
  72. package/src/runtime/skill-sync/types.ts +110 -0
  73. package/src/runtime/skill-sync/write-cloud-skill.ts +50 -0
  74. package/src/runtime/skill-sync-service.js +109 -0
  75. package/src/runtime/store-screenshot.js +143 -0
  76. package/src/runtime/sync-skills.d.ts +37 -0
  77. package/src/runtime/sync-skills.js +231 -0
  78. package/src/runtime/telemetry.js +92 -0
  79. package/src/runtime/transport.js +324 -45
  80. package/src/skill-sync-worker-entry.js +2 -0
  81. package/src/skill-sync-worker.js +50 -0
  82. package/template/.harness/index.html.tmpl +430 -0
  83. package/template/CHANGELOG.md +5 -0
  84. package/template/app/layout.tsx +5 -2
  85. package/template/app/page.tsx +49 -42
  86. package/template/components/page-heading.tsx +23 -0
  87. package/template/components/ui/badge.tsx +7 -4
  88. package/template/components/ui/card.tsx +24 -11
  89. package/template/components/ui/native-select.tsx +24 -0
  90. package/template/notis.config.ts +24 -6
  91. package/template/package-lock.json +4137 -0
  92. package/template/package.json +5 -5
  93. package/template/packages/{notis-sdk → sdk}/package.json +13 -3
  94. package/template/packages/sdk/src/agentContext.ts +36 -0
  95. package/template/packages/sdk/src/components/DocumentEditor.tsx +103 -0
  96. package/template/packages/sdk/src/components/Markdown.tsx +60 -0
  97. package/template/packages/sdk/src/components/MarkdownEditor.tsx +121 -0
  98. package/template/packages/sdk/src/components/MultiSelectActionBar.tsx +285 -0
  99. package/template/packages/sdk/src/components/MultiSelectCheckbox.tsx +97 -0
  100. package/template/packages/sdk/src/components/MultiSelectDragOverlay.tsx +39 -0
  101. package/template/packages/sdk/src/components/NotisCommentBoundary.tsx +172 -0
  102. package/template/packages/sdk/src/components/NotisSelectionBoundary.tsx +59 -0
  103. package/template/packages/sdk/src/components/ShortcutHints.tsx +56 -0
  104. package/template/packages/sdk/src/components/Skeleton.tsx +24 -0
  105. package/template/packages/sdk/src/config.ts +257 -0
  106. package/template/packages/sdk/src/documents.ts +256 -0
  107. package/template/packages/sdk/src/hooks/useActiveResource.ts +19 -0
  108. package/template/packages/sdk/src/hooks/useAgentContext.ts +23 -0
  109. package/template/packages/sdk/src/hooks/useCloudComputer.ts +64 -0
  110. package/template/packages/sdk/src/hooks/useCollectionInteractions.ts +836 -0
  111. package/template/packages/sdk/src/hooks/useDatabaseSchema.ts +49 -0
  112. package/template/packages/sdk/src/hooks/useDatabaseSubscription.ts +76 -0
  113. package/template/packages/sdk/src/hooks/useDocument.ts +43 -0
  114. package/template/packages/sdk/src/hooks/useDocuments.ts +84 -0
  115. package/template/packages/sdk/src/hooks/useHandover.ts +78 -0
  116. package/template/packages/sdk/src/hooks/useLongPressSelection.ts +79 -0
  117. package/template/packages/sdk/src/hooks/useMultiSelect.ts +95 -0
  118. package/template/packages/{notis-sdk → sdk}/src/hooks/useNotis.ts +10 -4
  119. package/template/packages/{notis-sdk → sdk}/src/hooks/useNotisNavigation.ts +11 -8
  120. package/template/packages/sdk/src/hooks/useQuery.ts +71 -0
  121. package/template/packages/sdk/src/hooks/useTool.ts +65 -0
  122. package/template/packages/sdk/src/hooks/useToolQuery.ts +12 -0
  123. package/template/packages/sdk/src/hooks/useTopBarSearch.ts +81 -0
  124. package/template/packages/sdk/src/hooks/useUpsertDocument.ts +95 -0
  125. package/template/packages/sdk/src/index.ts +161 -0
  126. package/template/packages/sdk/src/interactions/actions.ts +59 -0
  127. package/template/packages/sdk/src/interactions/shortcuts.tsx +694 -0
  128. package/template/packages/sdk/src/interactions/visibility.ts +13 -0
  129. package/template/packages/sdk/src/interactions.ts +45 -0
  130. package/template/packages/sdk/src/provider.tsx +44 -0
  131. package/template/packages/sdk/src/queryCache.ts +170 -0
  132. package/template/packages/sdk/src/runtime.ts +451 -0
  133. package/template/packages/sdk/src/styles.css +213 -0
  134. package/template/packages/sdk/src/tailwind.ts +56 -0
  135. package/template/packages/{notis-sdk → sdk}/src/vite.ts +5 -1
  136. package/template/tailwind.config.ts +1 -0
  137. package/src/command-specs/db.js +0 -163
  138. package/src/runtime/app-preview-server.js +0 -312
  139. package/template/packages/notis-sdk/src/config.ts +0 -48
  140. package/template/packages/notis-sdk/src/helpers.ts +0 -131
  141. package/template/packages/notis-sdk/src/hooks/useAppState.ts +0 -50
  142. package/template/packages/notis-sdk/src/hooks/useCollectionItem.ts +0 -58
  143. package/template/packages/notis-sdk/src/hooks/useDatabase.ts +0 -87
  144. package/template/packages/notis-sdk/src/hooks/useDocument.ts +0 -61
  145. package/template/packages/notis-sdk/src/hooks/useTool.ts +0 -49
  146. package/template/packages/notis-sdk/src/hooks/useUpsertDocument.ts +0 -57
  147. package/template/packages/notis-sdk/src/index.ts +0 -47
  148. package/template/packages/notis-sdk/src/provider.tsx +0 -44
  149. package/template/packages/notis-sdk/src/runtime.ts +0 -159
  150. package/template/packages/notis-sdk/src/styles.css +0 -123
  151. /package/template/packages/{notis-sdk → sdk}/src/hooks/useBackend.ts +0 -0
  152. /package/template/packages/{notis-sdk → sdk}/src/hooks/useTools.ts +0 -0
  153. /package/template/packages/{notis-sdk → sdk}/src/ui.ts +0 -0
  154. /package/template/packages/{notis-sdk → sdk}/tsconfig.json +0 -0
@@ -0,0 +1,99 @@
1
+ ## Delivery
2
+
3
+ Workspace runs released versions only. Local and cloud agents use the same
4
+ workflow. Run Notis commands through
5
+ `npx --package @notis_ai/cli@latest -- notis ...`.
6
+
7
+ A create/edit request normally authorizes updating that app after checks pass,
8
+ **unless user or repository policy requires explicit deployment consent**.
9
+ Preserve authorization already given. Read-only, preview-only, and no-deploy
10
+ instructions stop at local source, build, and stub verification: no remote
11
+ resource mutation, app activation, or live verification. Store publication always
12
+ needs separate explicit approval. Do not deploy just to obtain visual proof when
13
+ deployment is not authorized; report that the host check remains unverified.
14
+
15
+ ## Update an app
16
+
17
+ 1. **Check identity.** Inspect the effective CLI profile and `apps list --json`.
18
+ Preserve local edits, then pull the exact editable app ID and intended
19
+ personal/team scope. Keep its profile-scoped link, current version, and revision.
20
+ Never silently advance a stale checkout or create a duplicate to avoid a conflict.
21
+ 2. **Build and inspect.** Edit the source, increment `notisAppVersion`, and update
22
+ `CHANGELOG.md`. Run `apps build` and automated `apps verify`, then do the
23
+ [visual check](design.md#look-at-the-result). For a new app, complete these
24
+ local checks before creating remote resources.
25
+ 3. **Prepare only missing resources.** For an existing app, retain its identity.
26
+ For a new app, reconcile the exact canonical name, edit permission, and scope
27
+ against `apps list --json`; reuse one matching editable identity, stop on
28
+ ambiguity, or create only when none exists. Use `apps create "<display title>"
29
+ <dir>` (with a verified `--team-id` for team scope), and read back the same ID.
30
+ Create only necessary missing databases against that app. Verify ownership
31
+ and database IDs before changing schemas; read back changes. Breaking changes
32
+ require separate coordination. Never mutate user data merely to test the UI.
33
+ 4. **Update Workspace.** Run `apps deploy` against that linked app. It builds and
34
+ verifies a frozen source/artifact snapshot before activation. `--skip-build`
35
+ accepts only unchanged valid output and still verifies. Use the supported
36
+ backend path; do not bypass checks or write directly to storage.
37
+ 5. **Verify delivery.** Read back the app ID, integer version, and Portal URL with
38
+ `apps list --json`. Run `apps verify --mode live`, then open the released app
39
+ inside Notis and inspect the affected screen and main interaction. Confirm the
40
+ intended bundle/version, not just the existence of an app with the same name.
41
+ A successful live harness check alone is not visual proof inside Notis.
42
+ 6. **Report accurately.** Give the app link and a brief description of what changed
43
+ and what was verified. Distinguish local-only, deployed and verified, deployed
44
+ but unverified, failed before activation, and outcome unknown. If create/deploy
45
+ has an uncertain outcome, reconcile its exact identity/version before retrying.
46
+
47
+ ## What the checks prove
48
+
49
+ `build` validates the package, enforces design rules, and refreshes its embedded
50
+ SDK. Automated `verify` checks every route at desktop (1280px) and phone (390px)
51
+ widths, render errors, runtime calls, nested boxes, small text, lingering loading
52
+ placeholders, and horizontal overflow. It uses a temporary server and browser;
53
+ printed URLs or `--no-browser` are not passing verification. If tooling is missing,
54
+ install it with `npm exec --yes --package agent-browser@latest -- agent-browser install`.
55
+
56
+ Stub verification does not establish real account data, permissions, host layout,
57
+ or visual quality. Live verification exercises the authenticated runtime but still
58
+ uses the harness. The final installed-app check establishes the result inside Notis.
59
+ If that surface cannot be inspected, say so rather than claim it passed. No extra
60
+ approval round is needed for an already-authorized check.
61
+
62
+ `apps screenshot` supports declared scenarios and stub fixtures, including
63
+ `theme: 'dark'`; `--raw` gives uncomposited captures. Store listing screenshots are
64
+ not required for an ordinary Workspace update.
65
+
66
+ ## Special cases — read only when relevant
67
+
68
+ ### Unreleased container or stale checkout
69
+
70
+ An unreleased container has no source to pull. Recover its original local source,
71
+ or scaffold only if it cannot be recovered; verify the exact ID and scope and use
72
+ `apps link <app-id> <dir> --expected-version 0`. Reuse the container after a failed
73
+ first release; do not duplicate or automatically delete it. If another release
74
+ has appeared, pull it into a fresh directory and reapply the intended edits without
75
+ replacing its deployment base. Link/deploy guards must reject races and conflicts.
76
+
77
+ ### Restore an older source
78
+
79
+ Pull the current release into a fresh checkout and the historical source into a
80
+ separate folder (`apps pull <id> <dir> --source-version <n>`). Replace source without
81
+ replacing the current `.notis` link/base, then check and deploy as a new release.
82
+ Preserve app/database/skill IDs. Never decrement versions or imply that source
83
+ restoration undoes user data or external actions.
84
+
85
+ ### Release history and Store publication
86
+
87
+ Keep all release history in root `CHANGELOG.md`, newest first, with headings
88
+ `## [Release title] - YYYY-MM-DD` (or `{PR_MERGE_DATE}` while unpublished). Do not add
89
+ `versionNotes` to the config. App Details reads deployed history; the Store reads
90
+ its published snapshot. Local edits must not change the published listing.
91
+
92
+ `apps deploy` updates Workspace only. Use `apps publish --confirm-ready` only after
93
+ the user explicitly approves the current App Details and Store listing. Deploy the
94
+ exact approved source first. Respect listing completeness, visibility, version,
95
+ and pending-review guards. A public submission includes editable source, Store
96
+ assets, source-declared database schemas, and only explicitly opted-in starter
97
+ rows. Do not hand-edit `notis-listing.json` or strip files to pass review; fix the
98
+ source, redeploy, and resubmit. To start from a Store app, use `apps init --from
99
+ <slug>`; `apps pull` is for an accessible installed app, not a Store listing clone.
@@ -0,0 +1,62 @@
1
+ ## SDK Hook Reference
2
+
3
+ All hooks and components below are imported from `@notis/sdk`. `NotisProvider`
4
+ already installs `ShortcutProvider`; app code should not add a second provider.
5
+
6
+ | API | Signature | Description |
7
+ |-----|-----------|-------------|
8
+ | `useNotis()` | `() => { app, route, databases, collectionItem, resourceId, ready }` | App metadata, current route, selected collection item, decoded exact-resource id, ready state |
9
+ | `useTool<TArgs, TResult>(name)` | `(name: string) => { call, loading, error }` | Call a declared tool with app-defined argument/result types. Identified reads use `call(args, { readOnly: true, dedupe: true })`; never dedupe writes. See [cached-read ownership](design.md#instant-view-loading-contract-required). |
10
+ | `useTools()` | `() => { tools, loading }` | List available tools |
11
+ | `useDocuments(slug, opts?)` | `(slug: string, opts?) => { documents, loading, hasData, error, refetch }` | Query an app database. Bodies are included by default. For metadata-only lists, opt into `includeContent: false`; load the opened record with `useDocument` and defer any full-body search query until needed. Metadata and full-content query caches are separate. |
12
+ | `useNotisNavigation()` | `() => { toRoute, toDocument, toApp }` | Navigate between routes (including `toRoute(path, { resourceId })`), documents, or the app root |
13
+ | `useTopBarSearch(opts)` | `({ value, onChange, placeholder?, onSubmit? }) => { setLoading }` | Bind the current view to the Portal-owned top-bar search input |
14
+ | `useBackend()` | `() => { request }` | Raw backend request proxy with JWT auth |
15
+ | `useDatabaseSubscription(slug, opts?)` | `(slug: string, opts?) => { rows, documents, loading, error, refetch, live }` | Query a database and refetch it when its rows change. `live` is false on hosts without a change feed (temporary test harness, vite preview) -- keep a manual refresh for those |
16
+ | `useHandover()` | `() => { handover, pending, error, available }` | Open manager chat with app/resource context plus an optional starter prompt or declared skill. Omit `prompt` for a context-only composer. `available` is false on hosts with no chat -- fall back to a copyable prompt |
17
+ | `useCloudComputer()` | `() => { facts, loading, error, refresh }` | Read-only cloud computer facts: sandbox existence/status and whether the GitHub CLI is signed in. Requires `capabilities.cloudComputer: 'read'` plus the user's approval; `facts.available === false` means answer from the app's own fallback |
18
+ | `useActiveResource(resource)` | `(ContextResource \| null) => void` | Publish the record currently open in the app so manager handover and context menus stay grounded |
19
+ | `useCollectionInteractions(opts)` | `(opts) => CollectionInteractionController` | Keyboard navigation, active-row state, range/toggle selection, marquee selection, and action dispatch for collection UIs |
20
+ | `useShortcuts(definitions, opts?)` | `(definitions, opts?) => void` | Register scoped keyboard shortcuts. Editable targets are ignored unless explicitly allowed; use `ShortcutHints` to display them |
21
+ | `MarkdownEditor` | `(NotisMarkdownEditorProps) => ReactElement` | Use the host editor with app-owned persistence, stable `resourceKey`, revision-aware `onSave`, and optional `onUploadFile` returning a durable URL |
22
+ | `useAgentContext()` / `NotisCommentBoundary` / `NotisCommentBox` | generic context API and optional UI | App-defined pills, icons, context, attachments and nearby comments; see [Context sharing](context.md) |
23
+ | `NotisSelectionBoundary` | `(NotisSelectionBoundaryProps) => ReactElement` | Attach structured, explicitly untrusted app/resource/selection context to selected content and copy operations |
24
+ | `SelectionCheckbox` / `SelectionMarquee` | components | Standard selection controls backed by `useCollectionInteractions` |
25
+ | `MultiSelectActionBar` | component | Standard bulk actions with pending/disabled state and shortcut support |
26
+
27
+ Import headless collection action types and helpers from
28
+ `@notis/sdk/interactions`. Keep an open detail view synchronized with
29
+ `useActiveResource`, and wrap its selectable content in
30
+ `NotisSelectionBoundary` so the manager receives both the active record and the
31
+ user's exact selection. For `MarkdownEditor`, keep `resourceKey` stable per
32
+ record, pass the latest revision back from `onSave`, reject revision conflicts
33
+ instead of overwriting newer data, and implement `onUploadFile` whenever the
34
+ editor should accept media or file blocks.
35
+
36
+ ### App configuration additions
37
+
38
+ - `toolBindings` is only for provider-generated public tool names whose upstream
39
+ action cannot be reconstructed. Keep the exact final public `name` in
40
+ `tools`, then bind it to `providerToolName`; the public name remains the
41
+ permission boundary.
42
+
43
+ ### Typed tool calls
44
+
45
+ `useTool` accepts generic argument and result types. Query the database at dev time to discover actual property shapes, then keep those types in the app:
46
+
47
+ ```tsx
48
+ type QueryTasksArgs = { database_id?: string; database_slug?: string; query: { page_size?: number } };
49
+ interface TaskDoc {
50
+ title: string;
51
+ properties: {
52
+ Status: string;
53
+ Priority: string;
54
+ Due: string;
55
+ };
56
+ };
57
+ type QueryTasksResult = { documents: TaskDoc[] };
58
+
59
+ const queryTasks = useTool<QueryTasksArgs, QueryTasksResult>('LOCAL_NOTIS_DATABASE_QUERY');
60
+ const result = await queryTasks.call({ database_id: 'tasks-db-id', query: { page_size: 25 } });
61
+ // result.documents[0].properties.Status is typed as string
62
+ ```
@@ -0,0 +1,23 @@
1
+ ## Troubleshooting
2
+
3
+ Start with the failing screen or operation. Do not invent a second app workflow;
4
+ use the [delivery guide](release.md) and supported Notis CLI commands.
5
+
6
+ - **App looks wrong despite passing checks:** open it inside Notis and compare
7
+ the affected region with the request. Check loading and loaded states, viewport
8
+ sizing, scrolling, and theme. A standalone harness does not reproduce the host's
9
+ parent layout or shadow boundary. Do not assume the cause from a screenshot alone.
10
+ - **Build reports a design violation:** use the scaffold component or theme token
11
+ suggested by the diagnostic. Fix the reported file/line rather than hiding the
12
+ pattern elsewhere. Existing validator exceptions are for justified cases, not a
13
+ shortcut around visual review.
14
+ - **The configured sidebar is missing:** preserve `routes` and `collection.sidebar`;
15
+ investigate the host mismatch instead of duplicating the sidebar in app code.
16
+ - **The app shows old code or is missing from Workspace:** check the exact installed
17
+ app/version and requested bundle first. Local source edits and Desktop restarts
18
+ do not update a released app. Refresh after confirming the correct release exists.
19
+ - **Deploy transport failure:** run `notis doctor` and read back the exact app/version.
20
+ Reconcile the outcome before retrying; do not bypass the backend with storage writes.
21
+ - **Database query is empty or properties are undefined:** inspect the actual schema,
22
+ database ID, and returned property shape through the CLI. Keep types in the app,
23
+ guard optional fields, and distinguish an error from a successful empty result.
@@ -0,0 +1,140 @@
1
+ ---
2
+ name: notis-cli
3
+ description: Use when agents should work through the Notis CLI, especially to develop Notis apps locally or to access Notis, Composio, or MCP tools they do not currently have loaded directly.
4
+ feature_flag: cli_access
5
+ mcp_resource: true
6
+ mcp_tool_patterns: []
7
+ mcp_references: ["references/app-delivery.md", "references/tool-examples.md", "references/native-databases.md", "references/troubleshooting.md"]
8
+ ---
9
+
10
+ # Notis CLI Skill
11
+
12
+ Use this skill when the user wants work done through the Notis CLI.
13
+
14
+ This skill covers two main CLI workflows:
15
+
16
+ 1. Developing Notis apps locally.
17
+ 2. Accessing Notis, Composio, and MCP tools through the CLI.
18
+ ## When to use this skill
19
+
20
+ Activate this skill when:
21
+
22
+ - the user wants to init, develop, build, verify, link, pull, or deploy a Notis app through the CLI
23
+ - the current agent does not have the tool it needs in its direct tool list
24
+ - the user wants direct MCP access through Notis
25
+ - the user wants to use an integration-backed capability through Notis rather than a first-class local tool
26
+ - the task mentions the `notis` CLI directly
27
+
28
+ Use the registry-resolved published npm package everywhere:
29
+
30
+ - `npx --package @notis_ai/cli@latest -- notis ...`
31
+
32
+ Always use this NPX command form so the agent runs the current published CLI. In hosted shells, the CLI is pre-authenticated through `NOTIS_JWT`. On a local machine the CLI holds its own OAuth grant: `notis login` authorizes one in the browser, and signing in to the Notis desktop app authorizes one automatically for that account. Either way the grant belongs to the CLI, which refreshes it without the desktop app running.
33
+
34
+ `@latest` is correct for every account, including beta ones. Each deployment reports which published build belongs to it, `notis login` pins that on the profile, and a later run that finds itself on the wrong build hands the invocation to the right one before doing anything. Never substitute a channel by hand: pinning `@beta` on a production profile is how a machine ends up running a build its API does not expect. `notis doctor` reports the active channel, and `NOTIS_CLI_AUTO_CHANNEL=0` turns the hand-off off for a run.
35
+
36
+ The CLI bundles this `notis-cli` base skill and refreshes its canonical copy under `~/.notis/skills/base/` on every launch. It is independent of account-skill sync, feature flags, target selection, and cloud deletion.
37
+
38
+ ## Profiles: accounts and endpoints
39
+
40
+ A profile is one account paired with one API endpoint. Profiles live side by side; switching between them never signs any of them out.
41
+
42
+ - `npx --package @notis_ai/cli@latest -- notis profile list` — every profile on this machine, with its endpoint, user, and whether it is signed in. The active one is marked.
43
+ - `npx --package @notis_ai/cli@latest -- notis profile use <name>` — change which account subsequent commands run as.
44
+ - `npx --package @notis_ai/cli@latest -- notis --profile <name> <command>` — run a single command as another account without changing the active one.
45
+ - `npx --package @notis_ai/cli@latest -- notis login --profile <name>` — add an account. The existing profiles keep their credentials.
46
+ - `npx --package @notis_ai/cli@latest -- notis logout` — sign out of the active profile only; pass `--all-profiles` to clear every one.
47
+
48
+ Read the profile before acting on the user's data. `notis whoami` reports the account and endpoint a command will hit; if that is not the account the user meant, switch profiles rather than proceeding.
49
+
50
+ ### Working against a local `./dev.sh` backend
51
+
52
+ `./dev.sh` exposes its test account as a lease-backed profile (`dev-<workspace>-<hash>`) pointing at the local backend, and prints the name on startup. Its credential stays in that worktree and it is the automatic default there, so `notis ...` targets the local API and test user with no extra flags. It is not a stored account profile and cannot be selected outside the worktree.
53
+
54
+ Two rules follow from the dev credential being scoped to that local backend:
55
+
56
+ - A `dev-*` profile only exists while its `./dev.sh` lease is running. If it is stopped, the CLI fails with `dev_runtime_unavailable` instead of sending the test user's token to the live API.
57
+ - To reach a real account from inside a worktree — including when the local backend is wedged — name a real profile explicitly: `notis --profile <name> ...`. That is the supported escape hatch.
58
+
59
+ ## Critical rule for missing tools
60
+
61
+ If the tool you need is not already available in your current tool surface, do not stop and do not assume the task is blocked.
62
+
63
+ Use the Notis CLI as the fallback access layer.
64
+
65
+ This is especially important when:
66
+
67
+ - you need direct MCP tools
68
+ - you need a Composio-backed integration tool
69
+ - you need a Notis tool that is not exposed as a first-class command in your current environment
70
+ - you need to discover the canonical tool name before execution
71
+
72
+ Treat the Notis CLI the same way you would treat a Composio-style tool router flow: discover what is available first, then execute the right tool through the CLI.
73
+
74
+ ## User and repository policy takes precedence
75
+
76
+ Default delivery below applies only when no more restrictive user or repository
77
+ instruction exists. Explicit preview-only/no-deploy requests and standing requirements
78
+ for explicit deployment consent override the default. Preserve that authority across
79
+ local and cloud runs. For local-only work, build and run stub verification; do not
80
+ create remote resources or activate an app. Use the CLI's documented
81
+ build/verification harness. Store publication remains
82
+ separately authorized.
83
+
84
+ ### Tool access workflow
85
+
86
+ 1. List available toolkit namespaces:
87
+ - `npx --package @notis_ai/cli@latest -- notis tools toolkits --timeout-ms 90000`
88
+ 2. Search for the capability you need using natural language:
89
+ - `npx --package @notis_ai/cli@latest -- notis tools search "<query>" --timeout-ms 90000`
90
+ - optionally add known field hints with `--known-fields "<key:value>"`
91
+ 3. If needed, inspect the exact tool and parameter schema:
92
+ - `npx --package @notis_ai/cli@latest -- notis tools describe <tool-name> --timeout-ms 90000`
93
+ - `npx --package @notis_ai/cli@latest -- notis tools exec <tool-name> --get-schema --timeout-ms 90000`
94
+ 4. Validate arguments before execution when the tool is mutating or the schema is non-trivial:
95
+ - `npx --package @notis_ai/cli@latest -- notis tools exec <tool-name> --dry-run --arguments '<json>'`
96
+ 5. Execute the tool:
97
+ - `npx --package @notis_ai/cli@latest -- notis tools exec <tool-name> --arguments '<json>'`
98
+ 6. If multiple independent calls are needed, use:
99
+ - `npx --package @notis_ai/cli@latest -- notis tools exec-parallel '<json-array>'`
100
+ 7. If the toolkit is not connected yet, start its connection flow:
101
+ - `npx --package @notis_ai/cli@latest -- notis tools link <toolkit>`
102
+ - For a revoked or invalid credential-based connection, reconnect with credential JSON on stdin: `npx --package @notis_ai/cli@latest -- notis tools link <toolkit> --reconnect --credentials -`
103
+
104
+ ### Discovery latency and caching
105
+
106
+ The discovery bridge may query several connected MCP servers on a cold run and
107
+ can legitimately take longer than the CLI's general 30-second timeout. Always
108
+ use `--timeout-ms 90000` for `tools toolkits`, `tools search`, `tools describe`,
109
+ and schema-only discovery calls. If a discovery call returns `network_timeout`,
110
+ retry that same command once with `--timeout-ms 90000`; do not start a new
111
+ query, invent a tool name, or loop on the default 30-second command.
112
+
113
+ Discovery is idempotent but should be bounded: run the toolkit listing once per
114
+ task, run one natural-language search per distinct capability, and cache the
115
+ returned canonical tool names and schemas for the rest of the current turn.
116
+ After a successful search/schema response, call the returned canonical tool
117
+ directly (with a dry-run before mutations) instead of repeating the same
118
+ discovery request before every connected-service action.
119
+
120
+ ### Tool access rules
121
+
122
+ - Never guess tool names. Discover them with `npx --package @notis_ai/cli@latest -- notis tools search` first.
123
+ - Prefer first-class CLI commands when they exist, but use `npx --package @notis_ai/cli@latest -- notis tools ...` whenever the capability is not covered by a dedicated command.
124
+ - When you know the tool name but not the argument shape, use `npx --package @notis_ai/cli@latest -- notis tools describe` or `--get-schema` before execution.
125
+ - Use `--dry-run` before mutating calls when you want schema validation without execution.
126
+ - If a toolkit is missing, use `npx --package @notis_ai/cli@latest -- notis tools link <toolkit>` to start the connection flow.
127
+ - Use `--reconnect` to replace an existing connection. If multiple accounts exist, select one with `--connection-id <id>`.
128
+ - For API keys, basic auth, or other credential JSON, prefer `--credentials -` and pipe or redirect stdin. Avoid inline secrets because they can enter shell history and process listings.
129
+
130
+ ## Task guides
131
+
132
+ Read only the guide needed for this task. Relative links resolve in the skill bundle.
133
+ For hosted MCP, fetch the matching `notis://docs/notis-cli/references/<file>.md` URI
134
+ with resources/read or the available Notis resource-fetch tool; the root resource
135
+ also rewrites these links to their published URIs.
136
+
137
+ - [App delivery](references/app-delivery.md)
138
+ - [Toolkit mental model](references/tool-examples.md)
139
+ - [Native database access](references/native-databases.md)
140
+ - [Supporting commands](references/troubleshooting.md)
@@ -0,0 +1,18 @@
1
+ # App delivery
2
+
3
+ Use the canonical `notis-apps` skill’s entrypoint and [release guide](../../notis-apps/references/release.md).
4
+ For hosted MCP fetch `notis://docs/notis-apps` and `notis://docs/notis-apps/references/release.md`.
5
+ User/repository no-deploy and explicit-consent policies take precedence over default delivery.
6
+
7
+ ## IMPORTANT: When NOT to use tool access for app development
8
+
9
+ When building or deploying a Notis app, do NOT use `npx --package @notis_ai/cli@latest -- notis tools exec` for app file operations:
10
+
11
+ - Loading or saving app files -- use `npx --package @notis_ai/cli@latest -- notis apps build` and `npx --package @notis_ai/cli@latest -- notis apps deploy`
12
+ - Linting app files -- use `npx --package @notis_ai/cli@latest -- notis apps build` which validates automatically
13
+ - Managing app routes -- write standard Vite + React pages in `app/`, not raw JS files
14
+
15
+ Database schemas are the exception: declaring a slug in `notis.config.ts` does
16
+ not create it. Use the discovery-first native database tool workflow to
17
+ create/update and read back each app-owned schema before deployment. Tool calls
18
+ are also valid for testing runtime behavior after deployment.
@@ -0,0 +1,20 @@
1
+ ## Native database access
2
+
3
+ Native Notis databases are accessed through the generic tool workflow, not a first-class database command group. Use these canonical tool names:
4
+
5
+ - `LOCAL_NOTIS_DATABASE_LIST_DATABASES` -- list databases accessible to the current profile
6
+ - `LOCAL_NOTIS_DATABASE_GET_DATABASE` -- inspect read-only metadata and schema detail
7
+ - `LOCAL_NOTIS_DATABASE_QUERY` -- query documents from a database
8
+ - `LOCAL_NOTIS_DATABASE_UPSERT_DATABASE` -- create or update a database schema. Every database belongs to a Notis app: creation requires the owning app's slug or id in the `app` argument (create the app first with `LOCAL_NOTIS_CREATE_APP` if needed)
9
+
10
+ Example workflow before building an app:
11
+
12
+ ```bash
13
+ npx --package @notis_ai/cli@latest -- notis tools search "list Notis databases"
14
+ npx --package @notis_ai/cli@latest -- notis tools exec LOCAL_NOTIS_DATABASE_LIST_DATABASES --arguments '{}'
15
+ npx --package @notis_ai/cli@latest -- notis tools exec LOCAL_NOTIS_DATABASE_GET_DATABASE --get-schema
16
+ npx --package @notis_ai/cli@latest -- notis tools exec LOCAL_NOTIS_DATABASE_GET_DATABASE --arguments '{"database_slug":"social_media_calendar"}'
17
+ npx --package @notis_ai/cli@latest -- notis tools exec LOCAL_NOTIS_DATABASE_QUERY --arguments '{"database_id":"social-media-calendar-db-id","query":{"page_size":1}}'
18
+ ```
19
+
20
+ When `LOCAL_NOTIS_DATABASE_LIST_DATABASES` or `LOCAL_NOTIS_DATABASE_GET_DATABASE` returns a database ID, prefer `database_id` for `LOCAL_NOTIS_DATABASE_QUERY`; `database_slug` remains supported as a fallback.
@@ -0,0 +1,56 @@
1
+ ### Toolkit mental model
2
+
3
+ Typical toolkit namespaces include:
4
+
5
+ - `notis` for native Notis tools
6
+ - `composio-*` for Composio-backed integrations
7
+ - `mcp-*` for MCP-backed tools
8
+
9
+ The pattern is:
10
+
11
+ 1. discover toolkits
12
+ 2. search tools
13
+ 3. inspect schema if needed
14
+ 4. execute the canonical tool
15
+
16
+ ### Tool access examples
17
+
18
+ Find a tool:
19
+
20
+ ```bash
21
+ npx --package @notis_ai/cli@latest -- notis tools toolkits
22
+ npx --package @notis_ai/cli@latest -- notis tools search "list today's calendar events"
23
+ ```
24
+
25
+ Inspect a tool before execution:
26
+
27
+ ```bash
28
+ npx --package @notis_ai/cli@latest -- notis tools describe composio-googlecalendar-list_events
29
+ npx --package @notis_ai/cli@latest -- notis tools exec composio-googlecalendar-list_events --get-schema
30
+ ```
31
+
32
+ Dry-run a tool call:
33
+
34
+ ```bash
35
+ npx --package @notis_ai/cli@latest -- notis tools exec LOCAL_NOTIS_DATABASE_GET_DATABASE --dry-run --arguments '{"database_slug":"tasks"}'
36
+ npx --package @notis_ai/cli@latest -- notis tools exec LOCAL_NOTIS_DATABASE_QUERY --dry-run --arguments '{"database_id":"tasks-db-id","query":{"page_size":10}}'
37
+ ```
38
+
39
+ Execute a tool call:
40
+
41
+ ```bash
42
+ npx --package @notis_ai/cli@latest -- notis tools exec LOCAL_NOTIS_DATABASE_GET_DATABASE --arguments '{"database_slug":"tasks"}'
43
+ npx --package @notis_ai/cli@latest -- notis tools exec LOCAL_NOTIS_DATABASE_QUERY --arguments '{"database_id":"tasks-db-id","query":{"page_size":10}}'
44
+ ```
45
+
46
+ Connect a missing toolkit:
47
+
48
+ ```bash
49
+ npx --package @notis_ai/cli@latest -- notis tools link github
50
+ ```
51
+
52
+ Reconnect a credential-based toolkit without putting the secret in shell history:
53
+
54
+ ```bash
55
+ npx --package @notis_ai/cli@latest -- notis tools link dataforseo --reconnect --credentials - < credentials.json
56
+ ```
@@ -0,0 +1,39 @@
1
+ ## Supporting commands
2
+
3
+ - `npx --package @notis_ai/cli@latest -- notis whoami` — confirm which account and endpoint a command will target
4
+ - `npx --package @notis_ai/cli@latest -- notis doctor` — verify CLI config, auth, routing, and API reachability before relying on the CLI
5
+ - `npx --package @notis_ai/cli@latest -- notis describe <command...>` — get the exact command contract for first-class CLI commands
6
+
7
+ ## Troubleshooting
8
+
9
+ ### CLI returns `auth_expired` or `auth_missing`
10
+
11
+ The profile's browser authorization has lapsed or was never granted. Run
12
+ `notis login` (add `--profile <name>` when the failing profile is not the
13
+ active one) and have the user approve the browser prompt. In JSON/agent mode
14
+ the first hint is the exact command to run. Do not copy refresh tokens into
15
+ commands or try to mint a credential yourself.
16
+
17
+ If the profile is a `dev-*` one, the fix is to restart `./dev.sh` in the
18
+ workspace it belongs to, or to switch to a real account profile.
19
+
20
+ ### Deploy fails with "network_error" or "fetch failed"
21
+
22
+ Run `notis doctor` to verify the effective profile and endpoint. Read back the exact app ID,
23
+ version and release state before retrying. An uncertain network response is not proof of rollback.
24
+ There is no direct storage deployment path. Repair authentication when needed without changing the
25
+ intended profile, then reconcile the previous outcome before starting a new release.
26
+
27
+ Localhost backends are a Notis-developer test lane owned by `./dev.sh` and its lease-backed profile.
28
+ Do not silently switch between that lane and a live account.
29
+
30
+ ### Health or tool-roundtrip errors
31
+
32
+ Local scaffold/build and stub verification can run without an API connection (dependencies and
33
+ browser tooling must already be available). `link`, `pull`, `create`, `list`, `deploy`, live verification
34
+ and Store operations require the intended backend. Never bypass it.
35
+
36
+ ### Stale bundle in Portal after an update
37
+
38
+ Every successful release gets a new integer deployment version. Read back that version, then use
39
+ normal refresh/navigation to load it. Never overwrite or decrement an existing deployment version.
@@ -0,0 +1,67 @@
1
+ ---
2
+ name: notis-query
3
+ description: Use when agents need to query native Notis databases with direct structured filters, sorts, and pagination through `LOCAL_NOTIS_DATABASE_QUERY`.
4
+ feature_flag: store
5
+ mcp_resource: true
6
+ mcp_tool_patterns: ["LOCAL_NOTIS_DATABASE_*"]
7
+ mcp_references: ["references/database-discovery.md", "references/documents.md", "references/query.md"]
8
+ ---
9
+
10
+ # Notis Query Skill
11
+
12
+ Use this skill when the user wants to search, filter, sort, or page through records in a native Notis database and the task is best handled with structured criteria instead of semantic search.
13
+
14
+ This skill is the single source of truth for `LOCAL_NOTIS_DATABASE_QUERY`.
15
+
16
+ ## Canonical contract source
17
+
18
+ For custom view runtime usage, the canonical contract is always MCP `tools/list` `inputSchema` for `LOCAL_NOTIS_DATABASE_QUERY`.
19
+
20
+ - Use `notisView.listTools()` (or MCP `tools/list`) to read the live schema.
21
+ - Use `notisView.callTool("LOCAL_NOTIS_DATABASE_QUERY", args)` (or MCP `tools/call`) with arguments that match that schema exactly.
22
+ - If this skill text and `inputSchema` ever differ, follow `inputSchema`.
23
+
24
+ This keeps query arguments aligned with the same tool definitions used by agent runtime and avoids maintaining duplicate schema formats.
25
+
26
+ ## When to use `LOCAL_NOTIS_DATABASE_QUERY`
27
+
28
+ Use `LOCAL_NOTIS_DATABASE_QUERY` when:
29
+
30
+ - you already know the target native database
31
+ - the user wants structured filtering or sorting
32
+ - you need predictable pagination over database rows
33
+ - you need to find records before reading or updating a specific document
34
+ - you need to find matching records before calling `LOCAL_NOTIS_DATABASE_GET_DOCUMENT` or a generated database upsert tool
35
+ - the task should use direct database criteria instead of semantic memory search
36
+
37
+ Do not use `LOCAL_NOTIS_DATABASE_QUERY` when:
38
+
39
+ - the relevant database is unknown
40
+ - semantic search over broad workspace context is better
41
+ - the task points to one known document by `document_id` or portal URL
42
+
43
+ Use these tools together:
44
+
45
+ - `LOCAL_NOTIS_DATABASE_LIST_DATABASES` to discover available databases and confirm the slug
46
+ - `LOCAL_NOTIS_DATABASE_GET_DATABASE` to inspect read-only schema detail, ordered properties, options, and relation targets
47
+ - `LOCAL_NOTIS_DATABASE_QUERY` to find matching records
48
+ - `LOCAL_NOTIS_DATABASE_GET_DOCUMENT` to inspect one specific matching document in full
49
+ - generated database upsert tools to update or create records after you know the right document or relation IDs
50
+
51
+ Follow the same workflow and use the exact canonical tool names available in the current runtime.
52
+
53
+ Every database has one owning app; inspect its identity/schema before schema writes.
54
+ Known document IDs/URLs use the document guide, not a broad query. For queries,
55
+ use the query guide for exact filter/property/pagination rules; live inputSchema
56
+ is authoritative. Dry-run writes and read back the resulting state.
57
+
58
+ ## Task guides
59
+
60
+ Read only the guide needed for this task. Relative links resolve in the skill bundle.
61
+ For hosted MCP, fetch the matching `notis://docs/notis-query/references/<file>.md` URI
62
+ with resources/read or the available Notis resource-fetch tool; the root resource
63
+ also rewrites these links to their published URIs.
64
+
65
+ - [Native Database Workflow](references/database-discovery.md)
66
+ - [Reading documents](references/documents.md)
67
+ - [Supported execution mode](references/query.md)
@@ -0,0 +1,59 @@
1
+ ## Native Database Workflow
2
+
3
+ ### Listing databases
4
+
5
+ Use `LOCAL_NOTIS_DATABASE_LIST_DATABASES` (`notis_list_databases` in legacy
6
+ underscore-form references) when:
7
+
8
+ - you need to confirm which native databases exist
9
+ - you need the database ID or slug before querying or choosing an upsert tool
10
+ - you need database metadata such as name, description, or document counts
11
+ - the orchestrator asks what is available in the user's workspace
12
+
13
+ Always inspect the user's native Notis databases before creating schema updates or choosing where to save work.
14
+
15
+ ### Creating databases
16
+
17
+ Use `LOCAL_NOTIS_DATABASE_UPSERT_DATABASE` (`notis_upsert_database` in legacy
18
+ underscore-form references) to create or update native databases.
19
+
20
+ Every native database must belong to a Notis app. When creating a database,
21
+ pass the owning app's slug or id in the `app` field; if the user has no
22
+ suitable app yet, create one first with `LOCAL_NOTIS_CREATE_APP`. Updates do
23
+ not need the `app` field.
24
+
25
+ Define schemas with appropriate property types:
26
+
27
+ - `title`
28
+ - `rich_text`
29
+ - `select`
30
+ - `multi_select`
31
+ - `status`
32
+ - `checkbox`
33
+ - `date`
34
+ - `number`
35
+ - `url`
36
+ - `email`
37
+ - `phone_number`
38
+ - `relation`
39
+
40
+ When adding or updating a `relation` property, always pass the target database explicitly with `database_id`. Do not rely on description text to imply the relation target.
41
+
42
+ Example relation update:
43
+
44
+ ```json
45
+ {
46
+ "operation": "update",
47
+ "database_id": "tasks-db-id",
48
+ "properties": [
49
+ {
50
+ "property_id": "prop_list",
51
+ "name": "List",
52
+ "action": "update",
53
+ "type": "relation",
54
+ "database_id": "lists-db-id",
55
+ "description": "Relation to Lists"
56
+ }
57
+ ]
58
+ }
59
+ ```
@@ -0,0 +1,50 @@
1
+ ### Reading documents
2
+
3
+ Use `LOCAL_NOTIS_DATABASE_GET_DOCUMENT` when:
4
+
5
+ - the task references a specific document by `document_id` or portal URL
6
+ - detailed content from a known document is needed
7
+
8
+ You may pass either a `document_id` or a portal URL such as `https://app.notis.ai/documents/abc123` or `/documents/abc123`.
9
+
10
+ ## Native Document Handling
11
+
12
+ ### Response requirements
13
+
14
+ - Always include the document title, database name, and a markdown portal link for any document you create or update.
15
+ - Never expose a raw `document_id` in your completion summary unless the user explicitly asked for it.
16
+ - Clearly state whether the document was created or updated.
17
+ - For updates, clearly state whether you replaced the original content or appended to the end.
18
+
19
+ ### Upserting with relations
20
+
21
+ When upserting into a database that relates to another database, first query for the related record and use the returned `document_id` for the relation.
22
+
23
+ ### Upserting complex documents
24
+
25
+ For copywriting-style work such as articles or social posts, try to find similar writing by the user and match the user's style and tone.
26
+
27
+ ### Updating a document
28
+
29
+ 1. Retrieve the current content with `LOCAL_NOTIS_DATABASE_GET_DOCUMENT`, `LOCAL_NOTIS_DATABASE_QUERY`, or `LOCAL_NOTIS_SEARCH_MEMORIES` with `memory_kind="native_document"`.
30
+ 2. Use the relevant `LOCAL_NOTIS_DATABASE_UPSERT_<DATABASE_SLUG>` tool with the existing `document_id` so the document is updated instead of recreated.
31
+ 3. For local edits to an existing document such as appending a bullet, inserting a paragraph, changing one section, or preserving structure, use `edit_mode = "block_operations"` instead of rewriting markdown.
32
+ 4. When developer context includes a `<page_context ... resource_type="document" ...>` tag, treat that as the currently open document and fetch it before asking the user for any identifier again.
33
+
34
+ ### Default upsert preferences
35
+
36
+ As long as they do not conflict with the user's intent, the existing document style, or the tool contract:
37
+
38
+ - Prefer updating existing documents over creating new ones when the user asked for a modification.
39
+ - Use `replace = true` to replace content and `replace = false` to append when you are in markdown mode.
40
+ - When the user asked to append, insert, tweak, or preserve the rest of an existing document, prefer `block_operations` with `insert_blocks`, `update_block`, `replace_blocks`, or `remove_blocks`.
41
+ - Do not use markdown rewrite mode for surgical edits unless block operations are genuinely impossible for the requested change.
42
+ - Reorganize messy thoughts into a clearer structure.
43
+ - Highlight essential concepts and extract action items.
44
+ - Format notes with markdown titles, subheadings, bold text, blockquotes, ordered lists, and unordered lists when helpful.
45
+ - Add useful insight, challenge weak reasoning, debunk false claims, or enrich the content when appropriate.
46
+ - Fill in missing information the user asked you to complete when the context supports it.
47
+ - Imitate the user's voice when you can infer it from semantic memory search with `memory_kind="native_document"` or existing document context.
48
+ - Save images in document content using standard markdown and in URL properties when relevant.
49
+ - Do not place videos inside document content. Store them only in media properties.
50
+ - Do not add a custom emoji or cover unless the user requested one.