@treasuredata/tdx 2026.3.46 → 2026.3.48
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/bin.js +1 -1
- package/dist/build-info.json +3 -3
- package/dist/cli-categories.js +1 -1
- package/dist/cli.js +1 -1
- package/dist/commands/activations.js +1 -1
- package/dist/commands/agent-command.js +1 -1
- package/dist/commands/agent-test-command.js +1 -1
- package/dist/commands/api-command.js +1 -1
- package/dist/commands/auth-command.js +1 -1
- package/dist/commands/auth-login-command.js +1 -1
- package/dist/commands/cas-command.js +1 -1
- package/dist/commands/cas-segment-command.js +1 -1
- package/dist/commands/chat-command.js +1 -1
- package/dist/commands/claude-command.js +1 -1
- package/dist/commands/claude-statusline-command.js +1 -1
- package/dist/commands/claude-usage-command.js +1 -1
- package/dist/commands/command.js +1 -1
- package/dist/commands/connection-command.js +1 -1
- package/dist/commands/databases.js +1 -1
- package/dist/commands/delivery-command.js +1 -1
- package/dist/commands/describe.js +1 -1
- package/dist/commands/engage-campaign-pull-command.js +1 -1
- package/dist/commands/engage-campaign-push-command.js +1 -1
- package/dist/commands/engage-campaign-validate-command.js +1 -1
- package/dist/commands/engage-command.js +1 -1
- package/dist/commands/engage-template-pull-command.js +1 -1
- package/dist/commands/engage-template-push-command.js +1 -1
- package/dist/commands/engage-template-validate-command.js +1 -1
- package/dist/commands/job-command.js +1 -1
- package/dist/commands/journey-command.js +1 -1
- package/dist/commands/journey-validate-command.js +1 -1
- package/dist/commands/llm-command.js +1 -1
- package/dist/commands/mcp-command.js +1 -1
- package/dist/commands/parent-segment-command.js +1 -1
- package/dist/commands/policy-command.js +1 -1
- package/dist/commands/profile-command.js +1 -1
- package/dist/commands/profiles-command.js +1 -1
- package/dist/commands/query-command.js +1 -1
- package/dist/commands/schedule-command.js +1 -1
- package/dist/commands/segment-command.js +1 -1
- package/dist/commands/segment-create-command.js +1 -1
- package/dist/commands/segment-fields-command.js +1 -1
- package/dist/commands/segment-pull-command.js +1 -1
- package/dist/commands/segment-push-command.js +1 -1
- package/dist/commands/segment-update-command.js +1 -1
- package/dist/commands/segment-use-command.js +1 -1
- package/dist/commands/segment-validate-command.js +1 -1
- package/dist/commands/segments.js +1 -1
- package/dist/commands/show.js +1 -1
- package/dist/commands/status-command.js +1 -1
- package/dist/commands/tables.js +1 -1
- package/dist/commands/unset-command.js +1 -1
- package/dist/commands/upgrade-command.js +1 -1
- package/dist/commands/use-command.js +1 -1
- package/dist/commands/user-command.js +1 -1
- package/dist/commands/work-command.js +1 -1
- package/dist/commands/workflow-command.js +1 -1
- package/dist/core/auth.js +1 -1
- package/dist/core/command-output.js +1 -1
- package/dist/core/config.js +1 -1
- package/dist/core/connection-cache.js +1 -1
- package/dist/core/constants.js +1 -1
- package/dist/core/credential-cache.js +1 -1
- package/dist/core/global-context.js +1 -1
- package/dist/core/keychain.js +1 -1
- package/dist/core/oauth-keychain.js +1 -1
- package/dist/core/oauth.js +1 -1
- package/dist/core/profile.js +1 -1
- package/dist/core/project-config.js +1 -1
- package/dist/core/session.js +1 -1
- package/dist/core/user-cache.js +1 -1
- package/dist/core/version.js +1 -1
- package/dist/index.js +1 -1
- package/dist/mcp/server.js +1 -1
- package/dist/mcp/tools/index.js +1 -1
- package/dist/mcp/tools/tdx-run.js +1 -1
- package/dist/mcp/tools/tdx-search.js +1 -1
- package/dist/mcp/utils.js +1 -1
- package/dist/proxy/claude-usage-tracker.js +1 -1
- package/dist/proxy/passthrough-server.js +1 -1
- package/dist/proxy/sse-usage-parser.js +1 -1
- package/dist/sdk/agent/agent-config.js +1 -1
- package/dist/sdk/agent/agent-ref-parser.js +1 -1
- package/dist/sdk/agent/agent-yaml.js +1 -1
- package/dist/sdk/agent/test/evaluator.js +1 -1
- package/dist/sdk/agent/test/executor.js +1 -1
- package/dist/sdk/agent/test/index.js +1 -1
- package/dist/sdk/agent/test/output.js +1 -1
- package/dist/sdk/agent/test/parser.js +1 -1
- package/dist/sdk/agent/tool-target-registry.js +1 -1
- package/dist/sdk/api.js +1 -1
- package/dist/sdk/cas/cas-api-client.js +1 -1
- package/dist/sdk/cas/cas-audience-yaml.js +1 -1
- package/dist/sdk/cas/cas-segment-yaml.js +1 -1
- package/dist/sdk/cas/index.js +1 -1
- package/dist/sdk/cas/pull-workflow.js +1 -1
- package/dist/sdk/cas/push-workflow.js +1 -1
- package/dist/sdk/client/cdp-api-client.js +1 -1
- package/dist/sdk/client/delivery-api-client.js +1 -1
- package/dist/sdk/client/endpoints.js +1 -1
- package/dist/sdk/client/engage-api-client.js +1 -1
- package/dist/sdk/client/http-client.js +1 -1
- package/dist/sdk/client/llm-api-client.js +1 -1
- package/dist/sdk/client/oauth-refresh.js +1 -1
- package/dist/sdk/client/rate-limiter.js +1 -1
- package/dist/sdk/client/td-api-client.js +1 -1
- package/dist/sdk/client/trino-api-client.js +1 -1
- package/dist/sdk/client/workflow-client.js +1 -1
- package/dist/sdk/connection-validator.js +1 -1
- package/dist/sdk/connection.js +1 -1
- package/dist/sdk/delivery.js +1 -1
- package/dist/sdk/engage/campaign-pull.js +1 -1
- package/dist/sdk/engage/campaign-push.js +1 -1
- package/dist/sdk/engage/campaign-validator.js +1 -1
- package/dist/sdk/engage/campaign-yaml.js +1 -1
- package/dist/sdk/engage/template-pull.js +1 -1
- package/dist/sdk/engage/template-push.js +1 -1
- package/dist/sdk/engage/template-validator.js +1 -1
- package/dist/sdk/engage/template-yaml.js +1 -1
- package/dist/sdk/engage/types/campaign-def.js +1 -1
- package/dist/sdk/engage/types/campaign-schema.js +1 -1
- package/dist/sdk/engage/types/template-schema.js +1 -1
- package/dist/sdk/engage.js +1 -1
- package/dist/sdk/errors.js +1 -1
- package/dist/sdk/index.js +1 -1
- package/dist/sdk/io/index.js +1 -1
- package/dist/sdk/io/node-filesystem.js +1 -1
- package/dist/sdk/job.js +1 -1
- package/dist/sdk/journey.js +1 -1
- package/dist/sdk/llm/chat-cache.js +1 -1
- package/dist/sdk/llm/index.js +1 -1
- package/dist/sdk/llm/llm-backup-utils.js +1 -1
- package/dist/sdk/llm/model-factors.js +1 -1
- package/dist/sdk/personalization.js +1 -1
- package/dist/sdk/policy.js +1 -1
- package/dist/sdk/query/index.js +1 -1
- package/dist/sdk/query/sql-parser.js +1 -1
- package/dist/sdk/realtime.js +1 -1
- package/dist/sdk/schedule.js +1 -1
- package/dist/sdk/segment/child-segment-yaml.js +1 -1
- package/dist/sdk/segment/fields-display.js +1 -1
- package/dist/sdk/segment/file-discovery.js +1 -1
- package/dist/sdk/segment/journey-utils.js +1 -1
- package/dist/sdk/segment/journey-validator.js +1 -1
- package/dist/sdk/segment/journey-yaml.js +1 -1
- package/dist/sdk/segment/parent-segment-preview.js +1 -1
- package/dist/sdk/segment/parent-segment-yaml.js +1 -1
- package/dist/sdk/segment/pull-workflow.js +1 -1
- package/dist/sdk/segment/push-recovery.js +1 -1
- package/dist/sdk/segment/push-workflow.js +1 -1
- package/dist/sdk/segment/resolution-context.js +1 -1
- package/dist/sdk/segment/segment-path-parser.js +1 -1
- package/dist/sdk/segment/segment-ref-parser.js +1 -1
- package/dist/sdk/segment/segment-validator.js +1 -1
- package/dist/sdk/segment/target-resolution.js +1 -1
- package/dist/sdk/segment/tdx-config.js +1 -1
- package/dist/sdk/segment/types/activation-schema.js +1 -1
- package/dist/sdk/segment/types/journey-def.js +1 -1
- package/dist/sdk/segment/types/journey-schema.js +1 -1
- package/dist/sdk/segment/types/segment-def.js +1 -1
- package/dist/sdk/segment/types/segment-schema.js +1 -1
- package/dist/sdk/segment/validate-files.js +1 -1
- package/dist/sdk/segment/yaml-validator.js +1 -1
- package/dist/sdk/segment.js +1 -1
- package/dist/sdk/types/index.js +1 -1
- package/dist/sdk/types/progress.js +1 -1
- package/dist/sdk/types/workspace.js +1 -1
- package/dist/sdk/user.js +1 -1
- package/dist/sdk/util/format-detector.js +1 -1
- package/dist/sdk/util/formatters.js +1 -1
- package/dist/sdk/util/index.js +1 -1
- package/dist/sdk/util/paginate.js +1 -1
- package/dist/sdk/util/tree-formatter.js +1 -1
- package/dist/sdk/workflow/archive-validation.js +1 -1
- package/dist/sdk/workflow/clone-workflow.js +1 -1
- package/dist/sdk/workflow/index.js +1 -1
- package/dist/sdk/workflow/pull-workflow.js +1 -1
- package/dist/sdk/workflow/push-workflow.js +1 -1
- package/dist/sdk/workflow/tdx-config.js +1 -1
- package/dist/sdk/workflow/workflow-utils.js +1 -1
- package/dist/sdk/workspace/builtin-schedules/builtin-schedules/execute-items/TASK.md +62 -0
- package/dist/sdk/workspace/builtin-schedules/builtin-schedules/execute-items/schedule.yaml +20 -0
- package/dist/sdk/workspace/builtin-schedules/builtin-schedules/item-triage/TASK.md +106 -0
- package/dist/sdk/workspace/builtin-schedules/builtin-schedules/item-triage/schedule.yaml +18 -0
- package/dist/sdk/workspace/builtin-schedules/builtin-schedules/stale-item-cleanup/TASK.md +26 -0
- package/dist/sdk/workspace/builtin-schedules/builtin-schedules/stale-item-cleanup/schedule.yaml +15 -0
- package/dist/sdk/workspace/builtin-schedules/builtin-schedules/synthesize-knowledge/TASK.md +26 -0
- package/dist/sdk/workspace/builtin-schedules/builtin-schedules/synthesize-knowledge/schedule.yaml +16 -0
- package/dist/sdk/workspace/builtin-schedules/builtin-schedules/weekly-review/TASK.md +21 -0
- package/dist/sdk/workspace/builtin-schedules/builtin-schedules/weekly-review/schedule.yaml +14 -0
- package/dist/sdk/workspace/builtin-schedules/execute-items/TASK.md +62 -0
- package/dist/sdk/workspace/builtin-schedules/execute-items/schedule.yaml +20 -0
- package/dist/sdk/workspace/builtin-schedules/item-triage/TASK.md +106 -0
- package/dist/sdk/workspace/builtin-schedules/item-triage/schedule.yaml +18 -0
- package/dist/sdk/workspace/builtin-schedules/stale-item-cleanup/TASK.md +26 -0
- package/dist/sdk/workspace/builtin-schedules/stale-item-cleanup/schedule.yaml +15 -0
- package/dist/sdk/workspace/builtin-schedules/synthesize-knowledge/TASK.md +26 -0
- package/dist/sdk/workspace/builtin-schedules/synthesize-knowledge/schedule.yaml +16 -0
- package/dist/sdk/workspace/builtin-schedules/weekly-review/TASK.md +21 -0
- package/dist/sdk/workspace/builtin-schedules/weekly-review/schedule.yaml +14 -0
- package/dist/sdk/workspace/frontmatter.js +1 -1
- package/dist/sdk/workspace/git.js +1 -1
- package/dist/sdk/workspace/index.d.ts +5 -1
- package/dist/sdk/workspace/index.d.ts.map +1 -1
- package/dist/sdk/workspace/index.js +1 -1
- package/dist/sdk/workspace/index.js.map +1 -1
- package/dist/sdk/workspace/templates.js +1 -1
- package/dist/sdk/workspace/weekly.js +1 -1
- package/dist/sdk/workspace/wikilinks.js +1 -1
- package/dist/test-utils/command-runner.js +1 -1
- package/dist/test-utils/factories.js +1 -1
- package/dist/test-utils/fixtures.js +1 -1
- package/dist/test-utils/http-mock.js +1 -1
- package/dist/test-utils/index.js +1 -1
- package/dist/utils/async.js +1 -1
- package/dist/utils/colors.js +1 -1
- package/dist/utils/diff.js +1 -1
- package/dist/utils/file-permissions.js +1 -1
- package/dist/utils/file-reader.js +1 -1
- package/dist/utils/github-releases.js +1 -1
- package/dist/utils/global-cache.js +1 -1
- package/dist/utils/json-loader.js +1 -1
- package/dist/utils/local-cache.js +1 -1
- package/dist/utils/logger/formatters/default-formatter.js +1 -1
- package/dist/utils/logger/formatters/index.js +1 -1
- package/dist/utils/logger/handlers/console-handler.js +1 -1
- package/dist/utils/logger/handlers/file-handler.js +1 -1
- package/dist/utils/logger/handlers/index.js +1 -1
- package/dist/utils/logger/handlers/null-handler.js +1 -1
- package/dist/utils/logger/index.js +1 -1
- package/dist/utils/logger/logger.js +1 -1
- package/dist/utils/logger/types.js +1 -1
- package/dist/utils/option-validation.js +1 -1
- package/dist/utils/process.js +1 -1
- package/dist/utils/prompt.js +1 -1
- package/dist/utils/spinner.js +1 -1
- package/dist/utils/sse-parser.js +1 -1
- package/dist/utils/string-utils.js +1 -1
- package/dist/utils/table-ref-parser.js +1 -1
- package/dist/utils/tdx-logger.js +1 -1
- package/dist/utils/version-check.js +1 -1
- package/package.json +2 -2
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
name: item-triage
|
|
2
|
+
schedule: "0 10 * * 1-5"
|
|
3
|
+
enabled: false
|
|
4
|
+
output:
|
|
5
|
+
note: true
|
|
6
|
+
note_tags: [triage, auto]
|
|
7
|
+
context:
|
|
8
|
+
max_turns: 25
|
|
9
|
+
timeout: 900
|
|
10
|
+
permissions:
|
|
11
|
+
allow:
|
|
12
|
+
- Write
|
|
13
|
+
- Edit
|
|
14
|
+
- web_search
|
|
15
|
+
- current_time
|
|
16
|
+
- work_board
|
|
17
|
+
- slack_post_message
|
|
18
|
+
- slack_upload_file
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: stale-item-cleanup
|
|
3
|
+
description: Review stale items and propose cleanup actions
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Stale Item Cleanup
|
|
7
|
+
|
|
8
|
+
Review workspace items that may need attention.
|
|
9
|
+
|
|
10
|
+
## Steps
|
|
11
|
+
|
|
12
|
+
1. Scan `items/*.md` for items with `status: in_progress` that haven't been updated in 7+ days
|
|
13
|
+
2. Scan for items with `status: todo` older than 30 days
|
|
14
|
+
3. For each stale item:
|
|
15
|
+
- Read the item content
|
|
16
|
+
- Check if linked Goal is still active
|
|
17
|
+
- Propose action: void (no longer needed), keep (still relevant), or escalate (needs human decision)
|
|
18
|
+
4. For items proposed as `void`, set `status: void` and add a note explaining why
|
|
19
|
+
5. Write a summary of all actions taken and items needing human review to output.md
|
|
20
|
+
6. Post the summary to Slack
|
|
21
|
+
|
|
22
|
+
## Notes
|
|
23
|
+
|
|
24
|
+
- Never void an item with `priority: critical` or `priority: high` — escalate those.
|
|
25
|
+
- Never void an item that has recent git commits touching its file in the last 3 days.
|
|
26
|
+
- Items linked to active goals (status != done/void) should be kept unless clearly obsolete.
|
package/dist/sdk/workspace/builtin-schedules/builtin-schedules/stale-item-cleanup/schedule.yaml
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
name: stale-item-cleanup
|
|
2
|
+
schedule: "0 8 * * 1"
|
|
3
|
+
enabled: false
|
|
4
|
+
output:
|
|
5
|
+
note: true
|
|
6
|
+
note_tags: [cleanup, auto]
|
|
7
|
+
context:
|
|
8
|
+
max_turns: 10
|
|
9
|
+
timeout: 300
|
|
10
|
+
permissions:
|
|
11
|
+
allow:
|
|
12
|
+
- Write
|
|
13
|
+
- Edit
|
|
14
|
+
- slack_post_message
|
|
15
|
+
- slack_upload_file
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: synthesize-knowledge
|
|
3
|
+
description: Analyze recent notes for recurring patterns and propose new guides
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Knowledge Synthesis
|
|
7
|
+
|
|
8
|
+
Review accumulated notes and identify patterns that should become guides.
|
|
9
|
+
|
|
10
|
+
## Steps
|
|
11
|
+
|
|
12
|
+
1. Invoke the `synthesize-knowledge` workspace skill
|
|
13
|
+
2. The skill will:
|
|
14
|
+
- Read all notes in `notes/*.md` (excluding weekly/)
|
|
15
|
+
- Identify recurring themes across 3+ notes
|
|
16
|
+
- Check existing guides to avoid duplicates
|
|
17
|
+
- For each pattern found, create a guide with `status: proposed` in `guides/`
|
|
18
|
+
- Include [[wiki-links]] back to source notes
|
|
19
|
+
3. After completion, write a summary of proposed guides to output.md
|
|
20
|
+
4. Post the summary to Slack
|
|
21
|
+
|
|
22
|
+
## Notes
|
|
23
|
+
|
|
24
|
+
- This runs unattended. Create guides with `status: proposed` — never set to `accepted` automatically.
|
|
25
|
+
- The human reviews proposed guides and promotes to `accepted` when ready.
|
|
26
|
+
- If no patterns are found, report that in output.md.
|
package/dist/sdk/workspace/builtin-schedules/builtin-schedules/synthesize-knowledge/schedule.yaml
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
name: synthesize-knowledge
|
|
2
|
+
schedule: "0 17 * * 5"
|
|
3
|
+
enabled: false
|
|
4
|
+
skill: synthesize-knowledge
|
|
5
|
+
output:
|
|
6
|
+
note: true
|
|
7
|
+
note_tags: [knowledge-synthesis, auto]
|
|
8
|
+
context:
|
|
9
|
+
max_turns: 20
|
|
10
|
+
timeout: 600
|
|
11
|
+
permissions:
|
|
12
|
+
allow:
|
|
13
|
+
- Write
|
|
14
|
+
- Edit
|
|
15
|
+
- slack_post_message
|
|
16
|
+
- slack_upload_file
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: weekly-review
|
|
3
|
+
description: Generate a weekly review note with goal progress, completed items, and knowledge synthesis
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Weekly Review
|
|
7
|
+
|
|
8
|
+
Execute the `/weekly-review` skill to generate this week's review note.
|
|
9
|
+
|
|
10
|
+
## Steps
|
|
11
|
+
|
|
12
|
+
1. Invoke the `weekly-review` workspace skill
|
|
13
|
+
2. The skill will:
|
|
14
|
+
- Scan goals and items for progress
|
|
15
|
+
- Summarize completed items this week
|
|
16
|
+
- Identify key learnings from notes
|
|
17
|
+
- Report guide changes
|
|
18
|
+
- Create the note in `notes/weekly/YYYY-WNN.md`
|
|
19
|
+
3. After the skill completes, verify the note was created successfully
|
|
20
|
+
4. Write a brief summary of the review to output.md
|
|
21
|
+
5. Post the summary to Slack
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: execute-items
|
|
3
|
+
description: Execute prioritized items — work through the backlog to advance workspace goals
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Execute Items
|
|
7
|
+
|
|
8
|
+
Pick up triaged items in priority order and do the actual work to advance workspace goals. This task runs after item-triage has organized, linked, and prioritized items.
|
|
9
|
+
|
|
10
|
+
## Steps
|
|
11
|
+
|
|
12
|
+
1. **Get current date/time**: Call `current_time` to get the exact current date and time.
|
|
13
|
+
|
|
14
|
+
2. **Read all goals**: Use `Glob` to find `goals/*.md`. Read each active goal (status != done/void) and its linked items via [[wiki-links]].
|
|
15
|
+
|
|
16
|
+
3. **Build execution queue**: Collect all items with status in: todo, planning, in_progress. Order by:
|
|
17
|
+
- Priority (critical > high > medium > low)
|
|
18
|
+
- Goal urgency (goals with due dates approaching first)
|
|
19
|
+
- Status progression (items already in_progress before todo)
|
|
20
|
+
- Dependencies (items mentioned as prerequisites in other items' body text — do prerequisites first)
|
|
21
|
+
|
|
22
|
+
4. **Check accepted guides**: Search `guides/` for relevant conventions before starting work. Follow all `status: accepted` guides.
|
|
23
|
+
|
|
24
|
+
5. **Execute items in order**: For each item in the queue:
|
|
25
|
+
- Read the item's full content to understand what needs to be done
|
|
26
|
+
- Move status forward: todo → planning → in_progress → review → done as appropriate
|
|
27
|
+
- **Do the actual work**: code changes, file edits, data queries, research — whatever the item describes
|
|
28
|
+
- If the item is blocked or requires human input, add a note in the item body explaining what's needed and skip to the next
|
|
29
|
+
- If an item is too large to complete in one run, break it into sub-items:
|
|
30
|
+
- Create new item files in `items/`
|
|
31
|
+
- Add [[wiki-links]] from the parent item
|
|
32
|
+
- Mark the parent as `planning` and work on the sub-items
|
|
33
|
+
- After completing an item, capture any learnings as a note in `notes/`
|
|
34
|
+
|
|
35
|
+
6. **Write output**: Create `results/{run_id}/output.md` with:
|
|
36
|
+
- Items completed (moved to done/review)
|
|
37
|
+
- Items progressed (status advanced)
|
|
38
|
+
- Items broken into sub-items
|
|
39
|
+
- Items blocked (with reasons)
|
|
40
|
+
- Items not reached (ran out of turns)
|
|
41
|
+
- Key learnings or decisions made
|
|
42
|
+
|
|
43
|
+
7. **Post to Slack**: Post a concise execution summary:
|
|
44
|
+
```
|
|
45
|
+
:rocket: Item Execution — {date}
|
|
46
|
+
|
|
47
|
+
Completed: {count}
|
|
48
|
+
Progressed: {count}
|
|
49
|
+
Blocked: {count}
|
|
50
|
+
Not reached: {count}
|
|
51
|
+
|
|
52
|
+
{one-line highlight of most impactful completion}
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
## Notes
|
|
56
|
+
|
|
57
|
+
- Focus on making concrete progress, not just planning. Actually do the work described in each item.
|
|
58
|
+
- Never skip a critical/high priority item without documenting why in the item body.
|
|
59
|
+
- Time is limited. If running low on turns, prioritize completing in-progress items over starting new ones.
|
|
60
|
+
- Respect accepted guides — they define conventions and constraints for this workspace.
|
|
61
|
+
- When writing code or making changes, follow existing patterns in the workspace.
|
|
62
|
+
- This task is designed to run after `item-triage` has organized the backlog.
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
name: execute-items
|
|
2
|
+
schedule: "0 11 * * 1-5"
|
|
3
|
+
enabled: false
|
|
4
|
+
context:
|
|
5
|
+
max_turns: 30
|
|
6
|
+
timeout: 1800
|
|
7
|
+
autonomous: true
|
|
8
|
+
output:
|
|
9
|
+
note: true
|
|
10
|
+
note_tags: [execution, auto]
|
|
11
|
+
permissions:
|
|
12
|
+
allow:
|
|
13
|
+
- Write
|
|
14
|
+
- Edit
|
|
15
|
+
- Bash
|
|
16
|
+
- web_search
|
|
17
|
+
- current_time
|
|
18
|
+
- work_board
|
|
19
|
+
- slack_post_message
|
|
20
|
+
- slack_upload_file
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: item-triage
|
|
3
|
+
description: Triage auto-generated items — link to goals, adjust priority, merge duplicates, void stale items
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Item Triage
|
|
7
|
+
|
|
8
|
+
Review all items in the workspace, focusing on auto-generated items (`auto` tag). Link orphaned items to goals, adjust priorities, merge duplicates, and void stale or irrelevant items. Post a triage summary to Slack.
|
|
9
|
+
|
|
10
|
+
## Steps
|
|
11
|
+
|
|
12
|
+
1. **Get current date/time**: Call `current_time` to get the exact current date and time.
|
|
13
|
+
|
|
14
|
+
2. **Read all goals**: Use `Glob` to find `goals/*.md`. Read each goal to understand:
|
|
15
|
+
- Goal title and objective
|
|
16
|
+
- Currently linked items (extract `[[wiki-links]]` from body)
|
|
17
|
+
- Goal's tags and theme
|
|
18
|
+
|
|
19
|
+
3. **Read all items**: Use `Glob` to find `items/*.md`. Read each item's frontmatter and body. Build an inventory:
|
|
20
|
+
- title, status, priority, tags, created date
|
|
21
|
+
- Whether the item is linked from any goal (check against step 2)
|
|
22
|
+
- Whether the item has the `auto` tag (auto-generated by watch tasks)
|
|
23
|
+
|
|
24
|
+
4. **Categorize items into triage buckets**:
|
|
25
|
+
|
|
26
|
+
**a. Orphaned items** (not linked from any goal):
|
|
27
|
+
- Determine which goal they best fit under based on tags and content
|
|
28
|
+
- Add wiki-link `[[item-slug]]` to the appropriate goal's Linked Items section
|
|
29
|
+
- If no goal fits, flag for human review
|
|
30
|
+
|
|
31
|
+
**b. Duplicate/overlapping items**:
|
|
32
|
+
- Compare titles and content of all items
|
|
33
|
+
- If two items cover the same topic (e.g., same competitor, same technology), merge into one:
|
|
34
|
+
- Keep the more detailed item
|
|
35
|
+
- Set the duplicate's status to `void` with note: "Merged into [[other-item]]"
|
|
36
|
+
|
|
37
|
+
**c. Stale auto-generated items** (auto tag + status:todo + created 14+ days ago):
|
|
38
|
+
- Check if the topic is still relevant (use web_search if needed for context)
|
|
39
|
+
- If no longer relevant: set status to `void` with reason
|
|
40
|
+
- If still relevant but untouched: bump priority or add a comment noting staleness
|
|
41
|
+
|
|
42
|
+
**d. Priority adjustment**:
|
|
43
|
+
- Auto-generated items default to `high` — reassess based on:
|
|
44
|
+
- Does this directly affect TD revenue or customers? → keep `high` or upgrade to `critical`
|
|
45
|
+
- Is this a "nice to know" or exploratory? → downgrade to `medium`
|
|
46
|
+
- Is this already being handled elsewhere? → downgrade to `low` or `void`
|
|
47
|
+
|
|
48
|
+
5. **Execute triage actions**: For each item that needs changes:
|
|
49
|
+
- Update frontmatter (status, priority) via Edit
|
|
50
|
+
- Add goal links via Edit on goal files
|
|
51
|
+
- Set void items with a reason comment at the bottom
|
|
52
|
+
|
|
53
|
+
6. **Write output**: Create `results/{run_id}/output.md` with:
|
|
54
|
+
- Executive summary (items triaged, actions taken)
|
|
55
|
+
- Table: | Item | Action | Reason |
|
|
56
|
+
- Orphaned items linked: | Item | Linked to Goal |
|
|
57
|
+
- Duplicates merged: | Kept | Voided |
|
|
58
|
+
- Stale items: | Item | Decision | Reason |
|
|
59
|
+
- Priority changes: | Item | Old Priority | New Priority | Reason |
|
|
60
|
+
- Items flagged for human review
|
|
61
|
+
|
|
62
|
+
7. **Post to Slack**: Post a concise triage summary to the notification channel. Format:
|
|
63
|
+
```
|
|
64
|
+
:broom: Item Triage — {date}
|
|
65
|
+
|
|
66
|
+
Items scanned: {total}
|
|
67
|
+
Orphaned → linked: {count}
|
|
68
|
+
Duplicates merged: {count}
|
|
69
|
+
Stale → voided: {count}
|
|
70
|
+
Priority adjusted: {count}
|
|
71
|
+
Needs human review: {count}
|
|
72
|
+
|
|
73
|
+
{one-line highlight if notable action taken}
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
## Error Handling
|
|
77
|
+
|
|
78
|
+
- If a goal file cannot be edited (permissions), log and continue with other goals.
|
|
79
|
+
- Never void items with `priority: critical` — flag for human review instead.
|
|
80
|
+
- Never void items that are `in_progress` — only triage `todo` and `backlog` items.
|
|
81
|
+
- If unsure about a triage decision, flag for human review rather than acting.
|
|
82
|
+
|
|
83
|
+
## Data Files
|
|
84
|
+
|
|
85
|
+
- None persistent. Reads directly from workspace goals/ and items/.
|
|
86
|
+
|
|
87
|
+
## Triage Rules
|
|
88
|
+
|
|
89
|
+
| Condition | Action |
|
|
90
|
+
|-----------|--------|
|
|
91
|
+
| `auto` tag + not linked to any goal | Link to best-matching goal |
|
|
92
|
+
| `auto` tag + `todo` + created 14+ days ago | Reassess relevance; void if stale |
|
|
93
|
+
| Two items with same topic/competitor/technology | Merge (keep detailed one, void other) |
|
|
94
|
+
| `auto` tag + `high` priority + exploratory content | Downgrade to `medium` |
|
|
95
|
+
| `auto` tag + directly revenue-impacting | Keep `high` or upgrade to `critical` |
|
|
96
|
+
| Any item + `todo` + 30+ days old | Flag for human review |
|
|
97
|
+
| Any item + unclear goal fit | Flag for human review |
|
|
98
|
+
|
|
99
|
+
## Notes
|
|
100
|
+
|
|
101
|
+
- This task is the "cleanup crew" — it keeps the workspace organized as watch tasks generate items
|
|
102
|
+
- Be conservative: when in doubt, flag for human review rather than auto-voiding
|
|
103
|
+
- The most important action is linking orphaned items to goals — this ensures nothing falls through cracks
|
|
104
|
+
- Duplicate detection should consider semantic similarity, not just exact title match
|
|
105
|
+
- This task should run AFTER watch tasks have completed their daily runs
|
|
106
|
+
- Keep Slack messages concise — detailed triage log goes in output.md
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
name: item-triage
|
|
2
|
+
schedule: "0 10 * * 1-5"
|
|
3
|
+
enabled: false
|
|
4
|
+
output:
|
|
5
|
+
note: true
|
|
6
|
+
note_tags: [triage, auto]
|
|
7
|
+
context:
|
|
8
|
+
max_turns: 25
|
|
9
|
+
timeout: 900
|
|
10
|
+
permissions:
|
|
11
|
+
allow:
|
|
12
|
+
- Write
|
|
13
|
+
- Edit
|
|
14
|
+
- web_search
|
|
15
|
+
- current_time
|
|
16
|
+
- work_board
|
|
17
|
+
- slack_post_message
|
|
18
|
+
- slack_upload_file
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: stale-item-cleanup
|
|
3
|
+
description: Review stale items and propose cleanup actions
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Stale Item Cleanup
|
|
7
|
+
|
|
8
|
+
Review workspace items that may need attention.
|
|
9
|
+
|
|
10
|
+
## Steps
|
|
11
|
+
|
|
12
|
+
1. Scan `items/*.md` for items with `status: in_progress` that haven't been updated in 7+ days
|
|
13
|
+
2. Scan for items with `status: todo` older than 30 days
|
|
14
|
+
3. For each stale item:
|
|
15
|
+
- Read the item content
|
|
16
|
+
- Check if linked Goal is still active
|
|
17
|
+
- Propose action: void (no longer needed), keep (still relevant), or escalate (needs human decision)
|
|
18
|
+
4. For items proposed as `void`, set `status: void` and add a note explaining why
|
|
19
|
+
5. Write a summary of all actions taken and items needing human review to output.md
|
|
20
|
+
6. Post the summary to Slack
|
|
21
|
+
|
|
22
|
+
## Notes
|
|
23
|
+
|
|
24
|
+
- Never void an item with `priority: critical` or `priority: high` — escalate those.
|
|
25
|
+
- Never void an item that has recent git commits touching its file in the last 3 days.
|
|
26
|
+
- Items linked to active goals (status != done/void) should be kept unless clearly obsolete.
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
name: stale-item-cleanup
|
|
2
|
+
schedule: "0 8 * * 1"
|
|
3
|
+
enabled: false
|
|
4
|
+
output:
|
|
5
|
+
note: true
|
|
6
|
+
note_tags: [cleanup, auto]
|
|
7
|
+
context:
|
|
8
|
+
max_turns: 10
|
|
9
|
+
timeout: 300
|
|
10
|
+
permissions:
|
|
11
|
+
allow:
|
|
12
|
+
- Write
|
|
13
|
+
- Edit
|
|
14
|
+
- slack_post_message
|
|
15
|
+
- slack_upload_file
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: synthesize-knowledge
|
|
3
|
+
description: Analyze recent notes for recurring patterns and propose new guides
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Knowledge Synthesis
|
|
7
|
+
|
|
8
|
+
Review accumulated notes and identify patterns that should become guides.
|
|
9
|
+
|
|
10
|
+
## Steps
|
|
11
|
+
|
|
12
|
+
1. Invoke the `synthesize-knowledge` workspace skill
|
|
13
|
+
2. The skill will:
|
|
14
|
+
- Read all notes in `notes/*.md` (excluding weekly/)
|
|
15
|
+
- Identify recurring themes across 3+ notes
|
|
16
|
+
- Check existing guides to avoid duplicates
|
|
17
|
+
- For each pattern found, create a guide with `status: proposed` in `guides/`
|
|
18
|
+
- Include [[wiki-links]] back to source notes
|
|
19
|
+
3. After completion, write a summary of proposed guides to output.md
|
|
20
|
+
4. Post the summary to Slack
|
|
21
|
+
|
|
22
|
+
## Notes
|
|
23
|
+
|
|
24
|
+
- This runs unattended. Create guides with `status: proposed` — never set to `accepted` automatically.
|
|
25
|
+
- The human reviews proposed guides and promotes to `accepted` when ready.
|
|
26
|
+
- If no patterns are found, report that in output.md.
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
name: synthesize-knowledge
|
|
2
|
+
schedule: "0 17 * * 5"
|
|
3
|
+
enabled: false
|
|
4
|
+
skill: synthesize-knowledge
|
|
5
|
+
output:
|
|
6
|
+
note: true
|
|
7
|
+
note_tags: [knowledge-synthesis, auto]
|
|
8
|
+
context:
|
|
9
|
+
max_turns: 20
|
|
10
|
+
timeout: 600
|
|
11
|
+
permissions:
|
|
12
|
+
allow:
|
|
13
|
+
- Write
|
|
14
|
+
- Edit
|
|
15
|
+
- slack_post_message
|
|
16
|
+
- slack_upload_file
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: weekly-review
|
|
3
|
+
description: Generate a weekly review note with goal progress, completed items, and knowledge synthesis
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Weekly Review
|
|
7
|
+
|
|
8
|
+
Execute the `/weekly-review` skill to generate this week's review note.
|
|
9
|
+
|
|
10
|
+
## Steps
|
|
11
|
+
|
|
12
|
+
1. Invoke the `weekly-review` workspace skill
|
|
13
|
+
2. The skill will:
|
|
14
|
+
- Scan goals and items for progress
|
|
15
|
+
- Summarize completed items this week
|
|
16
|
+
- Identify key learnings from notes
|
|
17
|
+
- Report guide changes
|
|
18
|
+
- Create the note in `notes/weekly/YYYY-WNN.md`
|
|
19
|
+
3. After the skill completes, verify the note was created successfully
|
|
20
|
+
4. Write a brief summary of the review to output.md
|
|
21
|
+
5. Post the summary to Slack
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x209212,_0x42a90a){const _0x39aa9d=a197_0x16ea,_0x44270e=_0x209212();while(!![]){try{const _0x363451=parseInt(_0x39aa9d(0x189))/0x1+parseInt(_0x39aa9d(0x18b))/0x2*(-parseInt(_0x39aa9d(0x17a))/0x3)+-parseInt(_0x39aa9d(0x17d))/0x4*(parseInt(_0x39aa9d(0x179))/0x5)+parseInt(_0x39aa9d(0x186))/0x6+-parseInt(_0x39aa9d(0x177))/0x7*(-parseInt(_0x39aa9d(0x183))/0x8)+-parseInt(_0x39aa9d(0x176))/0x9+parseInt(_0x39aa9d(0x188))/0xa*(parseInt(_0x39aa9d(0x174))/0xb);if(_0x363451===_0x42a90a)break;else _0x44270e['push'](_0x44270e['shift']());}catch(_0x3c8ae0){_0x44270e['push'](_0x44270e['shift']());}}}(a197_0x51b3,0x7e1dd));export function parseFrontmatter(_0x366f16){const _0x21de95=a197_0x16ea,_0x4a168c=_0x366f16[_0x21de95(0x16c)](/^---\s*\n([\s\S]*?)\n---\s*\n?([\s\S]*)$/);if(!_0x4a168c)return{'frontmatter':{},'body':_0x366f16[_0x21de95(0x17f)]()};const _0x1dbee0=_0x4a168c[0x1],_0x18ae44=_0x4a168c[0x2][_0x21de95(0x17f)](),_0x3072eb=parseSimpleYaml(_0x1dbee0);return{'frontmatter':_0x3072eb,'body':_0x18ae44};}export function serializeFrontmatter(_0xea04ae,_0x9f543){const _0x54b1e6=a197_0x16ea,_0x2ecb1c=[];for(const [_0x4f62df,_0x302a2a]of Object[_0x54b1e6(0x16e)](_0xea04ae)){if(_0x302a2a===undefined||_0x302a2a===null)continue;if(Array[_0x54b1e6(0x16d)](_0x302a2a))_0x302a2a[_0x54b1e6(0x172)]===0x0?_0x2ecb1c['push'](_0x4f62df+':\x20[]'):_0x2ecb1c[_0x54b1e6(0x17b)](_0x4f62df+_0x54b1e6(0x173)+_0x302a2a['map'](_0x4ff1e8=>formatYamlValue(String(_0x4ff1e8)))['join'](',\x20')+']');else{if(typeof _0x302a2a==='boolean')_0x2ecb1c[_0x54b1e6(0x17b)](_0x4f62df+':\x20'+_0x302a2a);else typeof _0x302a2a===_0x54b1e6(0x185)?_0x2ecb1c[_0x54b1e6(0x17b)](_0x4f62df+':\x20'+_0x302a2a):_0x2ecb1c[_0x54b1e6(0x17b)](_0x4f62df+':\x20'+formatYamlValue(String(_0x302a2a)));}}const _0x4f5511=_0x2ecb1c[_0x54b1e6(0x16f)]('\x0a');return _0x54b1e6(0x184)+_0x4f5511+_0x54b1e6(0x178)+_0x9f543+'\x0a';}function a197_0x16ea(_0x19fd44,_0x4e6645){_0x19fd44=_0x19fd44-0x16c;const _0x51b3a4=a197_0x51b3();let _0x16ea2d=_0x51b3a4[_0x19fd44];return _0x16ea2d;}function formatYamlValue(_0x1d0661){const _0x1f3f25=a197_0x16ea;if(_0x1d0661[_0x1f3f25(0x17e)](':')||_0x1d0661[_0x1f3f25(0x17e)]('#')||_0x1d0661[_0x1f3f25(0x17e)]('\x27')||_0x1d0661[_0x1f3f25(0x17e)]('\x22')||_0x1d0661[_0x1f3f25(0x17e)]('\x0a')||_0x1d0661[_0x1f3f25(0x17c)]('\x20')||_0x1d0661[_0x1f3f25(0x170)]('\x20'))return'\x22'+_0x1d0661[_0x1f3f25(0x18a)](/\\/g,'\x5c\x5c')[_0x1f3f25(0x18a)](/"/g,'\x5c\x22')+'\x22';return _0x1d0661;}function a197_0x51b3(){const _0x148e48=['endsWith','test','length',':\x20[','495275oovPbH','slice','6650595WaNgzP','8743pnQrct','\x0a---\x0a\x0a','1676885cCutGJ','177StVLgJ','push','startsWith','8JcZsyn','includes','trim','null','indexOf','false','2856oMOZyV','---\x0a','number','3947994mGLEfI','split','210ZoLuqT','805348DIgEbr','replace','31474Krqpgf','true','match','isArray','entries','join'];a197_0x51b3=function(){return _0x148e48;};return a197_0x51b3();}function parseSimpleYaml(_0x58aceb){const _0xc8fa03=a197_0x16ea,_0x57f9f6={},_0x1366b5=_0x58aceb[_0xc8fa03(0x187)]('\x0a');for(const _0x546e05 of _0x1366b5){const _0x5e3423=_0x546e05[_0xc8fa03(0x17f)]();if(!_0x5e3423||_0x5e3423[_0xc8fa03(0x17c)]('#'))continue;const _0x3de291=_0x5e3423[_0xc8fa03(0x181)](':');if(_0x3de291===-0x1)continue;const _0x3e9fcc=_0x5e3423[_0xc8fa03(0x175)](0x0,_0x3de291)[_0xc8fa03(0x17f)]();let _0x5a8a3b=_0x5e3423[_0xc8fa03(0x175)](_0x3de291+0x1)[_0xc8fa03(0x17f)]();const _0x2210bc=_0x5a8a3b['indexOf']('\x20#');_0x2210bc!==-0x1&&!_0x5a8a3b['startsWith']('\x22')&&!_0x5a8a3b[_0xc8fa03(0x17c)]('\x27')&&(_0x5a8a3b=_0x5a8a3b[_0xc8fa03(0x175)](0x0,_0x2210bc)[_0xc8fa03(0x17f)]()),_0x57f9f6[_0x3e9fcc]=parseYamlValue(_0x5a8a3b);}return _0x57f9f6;}function parseYamlValue(_0x5e72a3){const _0x3a97f7=a197_0x16ea;if(!_0x5e72a3||_0x5e72a3==='~'||_0x5e72a3===_0x3a97f7(0x180))return null;if(_0x5e72a3===_0x3a97f7(0x18c))return!![];if(_0x5e72a3===_0x3a97f7(0x182))return![];if(_0x5e72a3[_0x3a97f7(0x17c)]('[')&&_0x5e72a3[_0x3a97f7(0x170)](']')){const _0xc0be00=_0x5e72a3['slice'](0x1,-0x1)[_0x3a97f7(0x17f)]();if(!_0xc0be00)return[];return _0xc0be00[_0x3a97f7(0x187)](',')['map'](_0x55ecff=>{const _0x1c04e8=_0x3a97f7,_0x245db9=_0x55ecff[_0x1c04e8(0x17f)]();return parseYamlScalar(_0x245db9);});}if(_0x5e72a3['startsWith']('\x22')&&_0x5e72a3[_0x3a97f7(0x170)]('\x22'))return _0x5e72a3[_0x3a97f7(0x175)](0x1,-0x1)[_0x3a97f7(0x18a)](/\\"/g,'\x22')[_0x3a97f7(0x18a)](/\\\\/g,'\x5c');if(_0x5e72a3[_0x3a97f7(0x17c)]('\x27')&&_0x5e72a3[_0x3a97f7(0x170)]('\x27'))return _0x5e72a3['slice'](0x1,-0x1);if(/^-?\d+(\.\d+)?$/[_0x3a97f7(0x171)](_0x5e72a3))return Number(_0x5e72a3);return _0x5e72a3;}function parseYamlScalar(_0x146d0e){const _0x548543=a197_0x16ea;if(_0x146d0e[_0x548543(0x17c)]('\x22')&&_0x146d0e[_0x548543(0x170)]('\x22'))return _0x146d0e['slice'](0x1,-0x1)[_0x548543(0x18a)](/\\"/g,'\x22')['replace'](/\\\\/g,'\x5c');if(_0x146d0e[_0x548543(0x17c)]('\x27')&&_0x146d0e[_0x548543(0x170)]('\x27'))return _0x146d0e[_0x548543(0x175)](0x1,-0x1);if(_0x146d0e===_0x548543(0x18c))return!![];if(_0x146d0e==='false')return![];if(/^-?\d+(\.\d+)?$/[_0x548543(0x171)](_0x146d0e))return Number(_0x146d0e);return _0x146d0e;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a198_0x37038b=a198_0x538d;function a198_0x5d62(){const _0x166d80=['pendingMessage','--porcelain','workspacePath','355263CZQVdq','config','size','2225316nrHXjm','add','cachedIsRepo','utf-8','flush','--cached','--quiet','pipe','1290618CjIKOE','log','commitAll','commit','hasDirtyFiles','join','init','96HPjMuq','map','git','existsSync','length','from','commitStaged','--pretty=format:%H|%aI|%s','56yaMsLx','status','autoCommit','clear','136923dJPGor','226735ZXgqkO','trim','.git','4378612qEHXZH','split','pendingFiles','batchMs','batchTimer','--git-dir','work:\x20update','isRepo','1376728qEaEzn','diff'];a198_0x5d62=function(){return _0x166d80;};return a198_0x5d62();}(function(_0x44f578,_0x577547){const _0x466422=a198_0x538d,_0x26de99=_0x44f578();while(!![]){try{const _0x4244c7=-parseInt(_0x466422(0xb5))/0x1+-parseInt(_0x466422(0xc1))/0x2+-parseInt(_0x466422(0xc6))/0x3+-parseInt(_0x466422(0xb1))/0x4*(parseInt(_0x466422(0xb6))/0x5)+-parseInt(_0x466422(0xc9))/0x6+parseInt(_0x466422(0xb9))/0x7+-parseInt(_0x466422(0xd8))/0x8*(-parseInt(_0x466422(0xd1))/0x9);if(_0x4244c7===_0x577547)break;else _0x26de99['push'](_0x26de99['shift']());}catch(_0x3ccb1a){_0x26de99['push'](_0x26de99['shift']());}}}(a198_0x5d62,0x60e58));import{execFileSync}from'node:child_process';function a198_0x538d(_0x3d4b6f,_0x386014){_0x3d4b6f=_0x3d4b6f-0xaa;const _0x5d62d4=a198_0x5d62();let _0x538d29=_0x5d62d4[_0x3d4b6f];return _0x538d29;}import*as a198_0x31d7a1 from'node:fs';import*as a198_0x7817ba from'node:path';const DEFAULT_CONFIG={'autoCommit':!![],'batchMs':0x7d0};export class WorkspaceGit{[a198_0x37038b(0xc5)];['config'];[a198_0x37038b(0xbd)]=null;[a198_0x37038b(0xbb)]=new Set();['pendingMessage']=null;['cachedIsRepo']=null;constructor(_0x14ef4c,_0x1275ed){const _0x11dff1=a198_0x37038b;this['workspacePath']=_0x14ef4c,this[_0x11dff1(0xc7)]={...DEFAULT_CONFIG,..._0x1275ed};}['ensureRepo'](){const _0x50672f=a198_0x37038b,_0x2284ab=a198_0x7817ba[_0x50672f(0xd6)](this[_0x50672f(0xc5)],_0x50672f(0xb8));!a198_0x31d7a1[_0x50672f(0xac)](_0x2284ab)&&(this[_0x50672f(0xab)](_0x50672f(0xd7)),this[_0x50672f(0xcb)]=!![]);}[a198_0x37038b(0xc0)](){const _0x530deb=a198_0x37038b;if(this['cachedIsRepo']!==null)return this[_0x530deb(0xcb)];try{this['git']('rev-parse',_0x530deb(0xbe)),this[_0x530deb(0xcb)]=!![];}catch{this[_0x530deb(0xcb)]=![];}return this['cachedIsRepo'];}[a198_0x37038b(0xd4)](_0x38b42b,_0x292229){const _0x382f5d=a198_0x37038b;if(!this['config'][_0x382f5d(0xb3)])return;if(!this[_0x382f5d(0xc0)]())return;const _0x376c59=a198_0x7817ba['relative'](this[_0x382f5d(0xc5)],_0x38b42b);this['pendingFiles'][_0x382f5d(0xca)](_0x376c59),this[_0x382f5d(0xc3)]=_0x292229,this['batchTimer']&&clearTimeout(this[_0x382f5d(0xbd)]),this['config'][_0x382f5d(0xbc)]===0x0?this['flush']():this[_0x382f5d(0xbd)]=setTimeout(()=>this['flush'](),this[_0x382f5d(0xc7)][_0x382f5d(0xbc)]);}[a198_0x37038b(0xcd)](){const _0x18edef=a198_0x37038b;if(this[_0x18edef(0xbb)][_0x18edef(0xc8)]===0x0)return;const _0x2ab44b=Array[_0x18edef(0xae)](this['pendingFiles']),_0x1ca91d=this[_0x18edef(0xc3)]||_0x18edef(0xbf);this[_0x18edef(0xbb)][_0x18edef(0xb4)](),this[_0x18edef(0xc3)]=null;this[_0x18edef(0xbd)]&&(clearTimeout(this[_0x18edef(0xbd)]),this[_0x18edef(0xbd)]=null);try{this['git'](_0x18edef(0xca),'--',..._0x2ab44b);}catch{return;}this[_0x18edef(0xaf)](_0x1ca91d);}[a198_0x37038b(0xd3)](_0x2f26e3){const _0x32a168=a198_0x37038b;if(!this[_0x32a168(0xc7)]['autoCommit'])return;if(!this['hasDirtyFiles']())return;try{this[_0x32a168(0xab)](_0x32a168(0xca),'-A');}catch{return;}this['commitStaged'](_0x2f26e3);}[a198_0x37038b(0xd5)](){const _0x1fa28b=a198_0x37038b;if(!this['isRepo']())return![];try{const _0x427f7a=this[_0x1fa28b(0xab)](_0x1fa28b(0xb2),_0x1fa28b(0xc4));return _0x427f7a[_0x1fa28b(0xb7)]()[_0x1fa28b(0xad)]>0x0;}catch{return![];}}['fileHistory'](_0x202d84,_0x580bc6=0xa){const _0x5843b9=a198_0x37038b;if(!this[_0x5843b9(0xc0)]())return[];const _0x61709=a198_0x7817ba['relative'](this['workspacePath'],_0x202d84);try{const _0x35fc92=this[_0x5843b9(0xab)](_0x5843b9(0xd2),_0x5843b9(0xb0),'-n',String(_0x580bc6),'--',_0x61709);if(!_0x35fc92[_0x5843b9(0xb7)]())return[];return _0x35fc92[_0x5843b9(0xb7)]()[_0x5843b9(0xba)]('\x0a')[_0x5843b9(0xaa)](_0x1798dd=>{const _0x5ac38f=_0x5843b9,[_0x36f1c3,_0xffce8c,..._0x93fde3]=_0x1798dd['split']('|');return{'hash':_0x36f1c3,'date':_0xffce8c,'message':_0x93fde3[_0x5ac38f(0xd6)]('|')};});}catch{return[];}}[a198_0x37038b(0xaf)](_0x4727f4){const _0x2f6575=a198_0x37038b;try{try{this['git'](_0x2f6575(0xc2),_0x2f6575(0xce),_0x2f6575(0xcf));return;}catch{}this[_0x2f6575(0xab)](_0x2f6575(0xd4),'-m',_0x4727f4);}catch{}}[a198_0x37038b(0xab)](..._0x215ea0){const _0x272660=a198_0x37038b;return execFileSync('git',_0x215ea0,{'cwd':this[_0x272660(0xc5)],'encoding':_0x272660(0xcc),'stdio':['pipe',_0x272660(0xd0),'pipe']});}}
|
|
@@ -18,7 +18,7 @@ export declare function resolveWorkspacePath(options?: {
|
|
|
18
18
|
cwd?: string;
|
|
19
19
|
}): string | null;
|
|
20
20
|
/** Workspace system prompt for AI agent context (injected via Agent SDK, not CLAUDE.md) */
|
|
21
|
-
export declare const WORKSPACE_SYSTEM_PROMPT = "You are working in a **Work** workspace \u2014 an AI-native work management system where all state lives in markdown files with YAML frontmatter. You manage documents using standard file tools (Read, Write, Edit, Glob, Grep) \u2014 no special MCP tools needed for file operations.\n\n## Folder Structure\n\n| Folder | Purpose |\n|--------|---------|\n| goals/ | OKR-style strategic objectives \u2014 indexes linking to items via wiki-links. No date prefix on filenames. |\n| guides/ | ADR/design guidance \u2014 directional constraints for AI and team. Status: proposed \u2192 accepted \u2192 deprecated \u2192 superseded. |\n| items/ | Trackable work items \u2014 tasks and plans merged. Status lifecycle: backlog \u2192 todo \u2192 planning \u2192 design_review \u2192 in_progress \u2192 review \u2192 done. |\n| notes/ | Knowledge capture \u2014 observations, learnings, meeting summaries. |\n| notes/weekly/ | AI-generated weekly review notes with human reflection section. |\n| references/ | Clippings from external sources \u2014 web pages, books, articles. Include source field. |\n| attachments/ | Binary files \u2014 images, PDFs, diagrams. Referenced from documents but no frontmatter. |\n| workflows/ | Automation \u2014 repeatable processes. |\n| templates/ | Document blueprints for creating new documents. |\n| .claude/skills/ | Workspace-local skills \u2014 each skill is a folder with a SKILL.md file. These are automatically available as slash commands. |\n\n## Conventions\n\n- All documents use YAML frontmatter with title, tags, created fields\n- Use tags for sub-categorization (e.g., tags: [weekly], tags: [article])\n- Wiki-links: [[slug]] or [[slug|Display Text]] for cross-references\n- Goals use slug-only filenames (e.g., auth-redesign.md), all others use YYYY-MM-DD-slug.md\n- Items flow through statuses: backlog \u2192 todo \u2192 planning \u2192 design_review \u2192 in_progress \u2192 review \u2192 done\n- Guides flow through statuses: proposed \u2192 accepted \u2192 deprecated \u2192 superseded\n\n## File Operations\n\nUse standard tools to manage workspace documents:\n- **Read files**: Use the Read tool to view any document\n- **Create documents**: Use Write to create markdown files with YAML frontmatter in the correct folder\n- **Edit documents**: Use Edit to update frontmatter fields or body content\n- **Search documents**: Use Glob to find files by pattern (e.g., `items/*.md`) and Grep to search content\n- **Attachments**: Store binary files (images, PDFs) in attachments/ and reference them from documents\n\n## Work Context\n\nMessages may include a `[Work Context]` section indicating the user's current focus:\n- **Goal** \u2014 the active goal. Scope your work to this goal: read it first for linked items, create new items linked to it, and report progress against it.\n- **Item** \u2014 the item being viewed. Use it as the subject of the conversation unless the user says otherwise.\n- **Knowledge doc** \u2014 a note/guide/reference being viewed. Use it as context for the conversation.\n\nWhen a goal is set, always read the goal file to understand its linked items before acting. Note that **goals link to items** (the goal body contains [[item-slug]] wiki-links), not the other way around \u2014 individual item files may not reference their parent goal.\n\n## Knowledge Loop\n\nThe workspace is a self-evolving knowledge system. Follow this cycle:\n\n1. **Before starting work** \u2014 search guides/ for relevant conventions using Grep\n2. **During work** \u2014 capture learnings, observations, and decisions as notes\n3. **After completing work** \u2014 check if insights should become guides (use synthesize-knowledge skill)\n4. **Accepted guides** are automatically injected into agent context for future sessions\n5. **Before creating a note/guide** \u2014 search existing ones with Glob/Grep to avoid duplicates\n";
|
|
21
|
+
export declare const WORKSPACE_SYSTEM_PROMPT = "You are working in a **Work** workspace \u2014 an AI-native work management system where all state lives in markdown files with YAML frontmatter. You manage documents using standard file tools (Read, Write, Edit, Glob, Grep) \u2014 no special MCP tools needed for file operations.\n\n## Folder Structure\n\n| Folder | Purpose |\n|--------|---------|\n| goals/ | OKR-style strategic objectives \u2014 indexes linking to items via wiki-links. No date prefix on filenames. |\n| guides/ | ADR/design guidance \u2014 directional constraints for AI and team. Status: proposed \u2192 accepted \u2192 deprecated \u2192 superseded. |\n| items/ | Trackable work items \u2014 tasks and plans merged. Status lifecycle: backlog \u2192 todo \u2192 planning \u2192 design_review \u2192 in_progress \u2192 review \u2192 done. |\n| notes/ | Knowledge capture \u2014 observations, learnings, meeting summaries. |\n| notes/weekly/ | AI-generated weekly review notes with human reflection section. |\n| references/ | Clippings from external sources \u2014 web pages, books, articles. Include source field. |\n| attachments/ | Binary files \u2014 images, PDFs, diagrams. Referenced from documents but no frontmatter. |\n| workflows/ | Automation \u2014 repeatable processes. |\n| templates/ | Document blueprints for creating new documents. |\n| schedules/ | Periodic schedule tasks \u2014 each subdirectory has TASK.md + schedule.yaml. Built-in schedules are auto-created with the workspace. Custom schedules can be added by writing files to schedules/{task-name}/. |\n| .claude/skills/ | Workspace-local skills \u2014 each skill is a folder with a SKILL.md file. These are automatically available as slash commands. |\n\n## Conventions\n\n- All documents use YAML frontmatter with title, tags, created fields\n- Use tags for sub-categorization (e.g., tags: [weekly], tags: [article])\n- Wiki-links: [[slug]] or [[slug|Display Text]] for cross-references\n- Goals use slug-only filenames (e.g., auth-redesign.md), all others use YYYY-MM-DD-slug.md\n- Items flow through statuses: backlog \u2192 todo \u2192 planning \u2192 design_review \u2192 in_progress \u2192 review \u2192 done\n- Guides flow through statuses: proposed \u2192 accepted \u2192 deprecated \u2192 superseded\n\n## File Operations\n\nUse standard tools to manage workspace documents:\n- **Read files**: Use the Read tool to view any document\n- **Create documents**: Use Write to create markdown files with YAML frontmatter in the correct folder\n- **Edit documents**: Use Edit to update frontmatter fields or body content\n- **Search documents**: Use Glob to find files by pattern (e.g., `items/*.md`) and Grep to search content\n- **Attachments**: Store binary files (images, PDFs) in attachments/ and reference them from documents\n\n## Work Context\n\nMessages may include a `[Work Context]` section indicating the user's current focus:\n- **Goal** \u2014 the active goal. Scope your work to this goal: read it first for linked items, create new items linked to it, and report progress against it.\n- **Item** \u2014 the item being viewed. Use it as the subject of the conversation unless the user says otherwise.\n- **Knowledge doc** \u2014 a note/guide/reference being viewed. Use it as context for the conversation.\n\nWhen a goal is set, always read the goal file to understand its linked items before acting. Note that **goals link to items** (the goal body contains [[item-slug]] wiki-links), not the other way around \u2014 individual item files may not reference their parent goal.\n\n## Knowledge Loop\n\nThe workspace is a self-evolving knowledge system. Follow this cycle:\n\n1. **Before starting work** \u2014 search guides/ for relevant conventions using Grep\n2. **During work** \u2014 capture learnings, observations, and decisions as notes\n3. **After completing work** \u2014 check if insights should become guides (use synthesize-knowledge skill)\n4. **Accepted guides** are automatically injected into agent context for future sessions\n5. **Before creating a note/guide** \u2014 search existing ones with Glob/Grep to avoid duplicates\n\n## Schedule Tasks\n\nThe `schedules/` folder contains periodic tasks that run automatically on a cron schedule while Studio is open. Each schedule is a subdirectory with:\n- `TASK.md` \u2014 Task instructions (YAML frontmatter + markdown body)\n- `schedule.yaml` \u2014 Cron schedule, permissions, and configuration\n- `reference/` (optional) \u2014 Task-specific reference materials\n- `results/{runId}/` \u2014 Execution history (auto-created per run)\n\nTo create a new schedule, write TASK.md and schedule.yaml to `schedules/{task-name}/`.\nWorkspace context (accepted guides, goal if specified) is automatically available during execution.\nAlways create new schedules with `enabled: false` \u2014 the user decides when to enable.\n";
|
|
22
22
|
/**
|
|
23
23
|
* WorkspaceSDK — manages workspace documents, git, and wiki-links
|
|
24
24
|
*/
|
|
@@ -46,6 +46,10 @@ export declare class WorkspaceSDK {
|
|
|
46
46
|
private loadConfig;
|
|
47
47
|
getConfig(): WorkspaceConfig | null;
|
|
48
48
|
getName(): string;
|
|
49
|
+
/**
|
|
50
|
+
* Rename this workspace by updating tdx.json and committing the change.
|
|
51
|
+
*/
|
|
52
|
+
setName(newName: string): void;
|
|
49
53
|
/**
|
|
50
54
|
* Read a single document by path or filename
|
|
51
55
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/sdk/workspace/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/sdk/workspace/index.ts"],"names":[],"mappings":"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"}
|