feat: redesign command hierarchy into Daily Use and Low-level API tiers - #13
Conversation
There was a problem hiding this comment.
3 issues found across 11 files
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="skills/roamresearch/references/usage-examples.md">
<violation number="1" location="skills/roamresearch/references/usage-examples.md:100">
P3: `q` is documented under Daily Use, but the skill’s tiering rules place `q` under Low-level API. This contradicts the two-tier model and can mislead users about intended usage.</violation>
</file>
<file name="internal/cmd/get.go">
<violation number="1" location="internal/cmd/get.go:39">
P2: `get` no longer rejects extra positional arguments, so calls like `get foo bar` are accepted and the second argument is silently ignored.</violation>
</file>
<file name="docs/help/topics/format.md">
<violation number="1" location="docs/help/topics/format.md:60">
P2: The documentation example uses malformed fenced-code delimiters (` ` ``) instead of valid triple backticks, so the sample input is not reproducible as a GFM code block.</violation>
</file>
Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.
There was a problem hiding this comment.
1 issue found across 7 files (changes from recent commits).
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="internal/cmd/search.go">
<violation number="1" location="internal/cmd/search.go:70">
P2: `--limit 0` is documented as unlimited but block searches forcibly convert 0 to 20, causing unintended result truncation for `--type block`.</violation>
</file>
Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.
There was a problem hiding this comment.
2 issues found across 5 files (changes from recent commits).
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="docs/help/topics/workflow-examples.md">
<violation number="1" location="docs/help/topics/workflow-examples.md:8">
P2: These `printf` examples are shell-invalid because the format string starts with `-`; use `printf '%s\n' '...'` (or `printf --`) so the commands run as documented.</violation>
</file>
<file name="docs/help/topics/write-examples.md">
<violation number="1" location="docs/help/topics/write-examples.md:28">
P2: Shell examples use `<uid>` which is parsed as input redirection, so copied commands won’t pass a UID argument. Use a shell-safe placeholder like "$UID" or UID_HERE instead.</violation>
</file>
Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.
There was a problem hiding this comment.
4 issues found across 14 files (changes from recent commits).
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="skills/roamresearch/references/usage-examples.md">
<violation number="1" location="skills/roamresearch/references/usage-examples.md:100">
P3: `q` is documented under Daily Use, but the skill’s tiering rules place `q` under Low-level API. This contradicts the two-tier model and can mislead users about intended usage.</violation>
</file>
Tip: Review your code locally with the cubic CLI to iterate faster.
Re-trigger cubic
There was a problem hiding this comment.
1 issue found across 12 files (changes from recent commits).
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="internal/cmd/page_test.go">
<violation number="1" location="internal/cmd/page_test.go:70">
P2: TestSavePlainOutputsCreatedBlockUID has unsafe t.Fatalf calls from handler goroutine and data race on shared variables sectionUID/contentUID</violation>
</file>
Tip: Review your code locally with the cubic CLI to iterate faster.
Re-trigger cubic
| @@ -0,0 +1,284 @@ | |||
| package cmd | |||
There was a problem hiding this comment.
P2: TestSavePlainOutputsCreatedBlockUID has unsafe t.Fatalf calls from handler goroutine and data race on shared variables sectionUID/contentUID
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At internal/cmd/page_test.go, line 70:
<comment>TestSavePlainOutputsCreatedBlockUID has unsafe t.Fatalf calls from handler goroutine and data race on shared variables sectionUID/contentUID</comment>
<file context>
@@ -56,6 +56,60 @@ func readJSONBody(t *testing.T, r *http.Request) map[string]any {
+ case r.URL.Path == "/api/graph/test-graph/write":
+ actions := body["actions"].([]any)
+ if len(actions) != 3 {
+ t.Fatalf("expected create-page, section, and content actions, got %d", len(actions))
+ }
+ section := actions[1].(map[string]any)["block"].(map[string]any)
</file context>
Restructure CLI commands based on actual Roam user workflows. The most frequent operation (writing to daily page sections) should be one command, not a multi-step UID lookup chain. Changes: - Revert block create --today/--daily/--page (keep it low-level, UID-only) - save --plain now outputs target UID for composability - get: add --today and --daily flags for daily page access - New top-level move command with name-based targeting (--title/--today/--under) - Root --help groups commands into Daily Use and Low-level API sections - New help topics: writing-guide (save vs block create decision tree) and format (GFM-to-Roam conversion rules) - Rewrite help categories (read/write/workflow) with save as primary, printf|save pattern, TODO examples, move workflows - Update SKILL.md: two-tier command table, strengthened anti-patterns, pipeline composability, move command docs - Update usage-examples.md: reorganized by tier with new command examples
- Hide --token/--graph/--base-url/--timeout from root --help (still usable, documented in help topic) - New help topic: configuration (credentials setup, 1Password CLI, API token instructions) - Improve credential error message: points to "roam-cli help configuration" instead of raw env var names
Combine search and search-pages into a single search command with --type page|block flag (default: page). Footer hints at the other mode and pagination. Removes search-pages as a separate command.
…OPICS Move read/write/workflow examples from hardcoded categories in help.go to docs/help/topics/ markdown files. All help content is now managed as topics, eliminating the duplicate "HELP TOPICS" and "Example categories" sections in root --help output.
4e27c73 to
dff5bfb
Compare
Summary
save, including code fences inside list items.get --plainpreserve block hierarchy with indentation.save --replacefor replacing an existing page's content.page clearandpage deletecommands.save --helpand keep help topic names registered.Test plan
go test ./...prek