@unbrained/pm-cli 2026.5.6 → 2026.5.10
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/.agents/pm/extensions/.managed-extensions.json +2 -2
- package/.agents/pm/extensions/beads/runtime.js +4 -4
- package/.agents/pm/extensions/beads/runtime.ts +5 -5
- package/.agents/pm/extensions/todos/runtime.js +7 -7
- package/.agents/pm/extensions/todos/runtime.ts +10 -10
- package/.agents/skills/HARNESS_COMPATIBILITY.md +45 -0
- package/.agents/skills/README.md +21 -0
- package/.agents/skills/pm-developer/SKILL.md +73 -0
- package/.agents/skills/pm-developer/references/COMMAND_PLAYBOOK.md +48 -0
- package/.agents/skills/pm-developer/references/PROMPTS.md +17 -0
- package/.agents/skills/pm-extensions/SKILL.md +57 -0
- package/.agents/skills/pm-extensions/references/LIFECYCLE.md +40 -0
- package/.agents/skills/pm-extensions/references/TROUBLESHOOTING.md +25 -0
- package/.agents/skills/pm-sdk/SKILL.md +50 -0
- package/.agents/skills/pm-sdk/references/INTEGRATION_CHECKLIST.md +31 -0
- package/.agents/skills/pm-sdk/references/PROMPTS.md +13 -0
- package/.agents/skills/pm-user/SKILL.md +59 -0
- package/.agents/skills/pm-user/references/PROMPTS.md +17 -0
- package/.agents/skills/pm-user/references/WORKFLOWS.md +35 -0
- package/.claude-plugin/marketplace.json +38 -0
- package/.pi/README.md +26 -0
- package/.pi/extensions/pm-cli/index.js +147 -0
- package/.pi/prompts/pm-workflow.md +5 -0
- package/.pi/skills/pm-native/SKILL.md +40 -0
- package/.pi/skills/pm-release/SKILL.md +35 -0
- package/AGENTS.md +1 -1
- package/CHANGELOG.md +6 -0
- package/PRD.md +16 -16
- package/README.md +22 -4
- package/dist/cli/commands/claim.js +6 -6
- package/dist/cli/commands/claim.js.map +1 -1
- package/dist/cli/commands/close.js +9 -9
- package/dist/cli/commands/close.js.map +1 -1
- package/dist/cli/commands/comments.d.ts +2 -0
- package/dist/cli/commands/comments.js +57 -8
- package/dist/cli/commands/comments.js.map +1 -1
- package/dist/cli/commands/completion.js +33 -4
- package/dist/cli/commands/completion.js.map +1 -1
- package/dist/cli/commands/config.js +6 -3
- package/dist/cli/commands/config.js.map +1 -1
- package/dist/cli/commands/contracts.js +4 -1
- package/dist/cli/commands/contracts.js.map +1 -1
- package/dist/cli/commands/create.d.ts +2 -2
- package/dist/cli/commands/create.js +4 -4
- package/dist/cli/commands/create.js.map +1 -1
- package/dist/cli/commands/docs.js +4 -4
- package/dist/cli/commands/docs.js.map +1 -1
- package/dist/cli/commands/files.js +10 -10
- package/dist/cli/commands/files.js.map +1 -1
- package/dist/cli/commands/get.js +5 -5
- package/dist/cli/commands/get.js.map +1 -1
- package/dist/cli/commands/guide.d.ts +55 -0
- package/dist/cli/commands/guide.js +260 -0
- package/dist/cli/commands/guide.js.map +1 -0
- package/dist/cli/commands/health.js +1 -1
- package/dist/cli/commands/health.js.map +1 -1
- package/dist/cli/commands/history.js +30 -10
- package/dist/cli/commands/history.js.map +1 -1
- package/dist/cli/commands/index.d.ts +1 -0
- package/dist/cli/commands/index.js +1 -0
- package/dist/cli/commands/index.js.map +1 -1
- package/dist/cli/commands/learnings.js +3 -3
- package/dist/cli/commands/learnings.js.map +1 -1
- package/dist/cli/commands/notes.js +3 -3
- package/dist/cli/commands/notes.js.map +1 -1
- package/dist/cli/commands/reindex.js +18 -32
- package/dist/cli/commands/reindex.js.map +1 -1
- package/dist/cli/commands/restore.d.ts +2 -2
- package/dist/cli/commands/restore.js +44 -24
- package/dist/cli/commands/restore.js.map +1 -1
- package/dist/cli/commands/search.d.ts +2 -0
- package/dist/cli/commands/search.js +30 -21
- package/dist/cli/commands/search.js.map +1 -1
- package/dist/cli/commands/test-all.d.ts +2 -0
- package/dist/cli/commands/test-all.js +2 -0
- package/dist/cli/commands/test-all.js.map +1 -1
- package/dist/cli/commands/test.d.ts +1 -0
- package/dist/cli/commands/test.js +4 -3
- package/dist/cli/commands/test.js.map +1 -1
- package/dist/cli/commands/update.js +118 -118
- package/dist/cli/commands/update.js.map +1 -1
- package/dist/cli/commands/validate.js +1 -1
- package/dist/cli/commands/validate.js.map +1 -1
- package/dist/cli/guide-topics.d.ts +25 -0
- package/dist/cli/guide-topics.js +283 -0
- package/dist/cli/guide-topics.js.map +1 -0
- package/dist/cli/help-content.js +25 -1
- package/dist/cli/help-content.js.map +1 -1
- package/dist/cli/register-list-query.js +38 -1
- package/dist/cli/register-list-query.js.map +1 -1
- package/dist/cli/register-mutation.js +17 -4
- package/dist/cli/register-mutation.js.map +1 -1
- package/dist/cli/register-setup.js +1 -1
- package/dist/cli/register-setup.js.map +1 -1
- package/dist/core/history/history.js +32 -11
- package/dist/core/history/history.js.map +1 -1
- package/dist/core/item/item-format.d.ts +2 -2
- package/dist/core/item/item-format.js +16 -16
- package/dist/core/item/item-format.js.map +1 -1
- package/dist/core/schema/runtime-field-filters.js +1 -1
- package/dist/core/schema/runtime-field-filters.js.map +1 -1
- package/dist/core/schema/runtime-field-values.js +2 -2
- package/dist/core/schema/runtime-field-values.js.map +1 -1
- package/dist/core/schema/runtime-schema.d.ts +1 -1
- package/dist/core/schema/runtime-schema.js +3 -3
- package/dist/core/schema/runtime-schema.js.map +1 -1
- package/dist/core/search/cache.js +7 -21
- package/dist/core/search/cache.js.map +1 -1
- package/dist/core/search/corpus.d.ts +13 -0
- package/dist/core/search/corpus.js +74 -0
- package/dist/core/search/corpus.js.map +1 -0
- package/dist/core/search/embedding-batches.js +90 -30
- package/dist/core/search/embedding-batches.js.map +1 -1
- package/dist/core/sentry/instrument.d.ts +3 -1
- package/dist/core/sentry/instrument.js +93 -9
- package/dist/core/sentry/instrument.js.map +1 -1
- package/dist/core/shared/constants.d.ts +1 -1
- package/dist/core/shared/constants.js +1 -1
- package/dist/core/shared/constants.js.map +1 -1
- package/dist/core/store/front-matter-cache.d.ts +1 -1
- package/dist/core/store/front-matter-cache.js +13 -13
- package/dist/core/store/front-matter-cache.js.map +1 -1
- package/dist/core/store/item-format-migration.js +5 -2
- package/dist/core/store/item-format-migration.js.map +1 -1
- package/dist/core/store/item-store.js +16 -15
- package/dist/core/store/item-store.js.map +1 -1
- package/dist/core/store/paths.js +1 -1
- package/dist/core/store/paths.js.map +1 -1
- package/dist/core/store/settings.js +6 -1
- package/dist/core/store/settings.js.map +1 -1
- package/dist/core/test/item-test-run-tracking.js +2 -2
- package/dist/core/test/item-test-run-tracking.js.map +1 -1
- package/dist/mcp/server.d.ts +2 -0
- package/dist/mcp/server.js +405 -0
- package/dist/mcp/server.js.map +1 -0
- package/dist/pi/native.d.ts +5 -0
- package/dist/pi/native.js +183 -0
- package/dist/pi/native.js.map +1 -0
- package/dist/sdk/cli-contracts.d.ts +3 -1
- package/dist/sdk/cli-contracts.js +67 -2
- package/dist/sdk/cli-contracts.js.map +1 -1
- package/dist/types.d.ts +10 -2
- package/dist/types.js.map +1 -1
- package/docs/AGENT_GUIDE.md +15 -0
- package/docs/ARCHITECTURE.md +2 -2
- package/docs/CLAUDE_CODE_PLUGIN.md +186 -0
- package/docs/CODEX_PLUGIN.md +33 -0
- package/docs/COMMANDS.md +6 -2
- package/docs/CONFIGURATION.md +2 -8
- package/docs/EXTENSIONS.md +1 -0
- package/docs/PI_PACKAGE.md +56 -0
- package/docs/QUICKSTART.md +1 -0
- package/docs/README.md +30 -1
- package/docs/RELEASING.md +4 -2
- package/docs/SDK.md +3 -2
- package/marketplace.json +34 -0
- package/package.json +38 -4
- package/plugins/pm-cli-claude/.claude-plugin/plugin.json +23 -0
- package/plugins/pm-cli-claude/.mcp.json +12 -0
- package/plugins/pm-cli-claude/README.md +184 -0
- package/plugins/pm-cli-claude/agents/pm-coordinator.md +48 -0
- package/plugins/pm-cli-claude/commands/pm-audit.md +39 -0
- package/plugins/pm-cli-claude/commands/pm-calendar.md +41 -0
- package/plugins/pm-cli-claude/commands/pm-close-task.md +20 -0
- package/plugins/pm-cli-claude/commands/pm-developer.md +38 -0
- package/plugins/pm-cli-claude/commands/pm-init.md +44 -0
- package/plugins/pm-cli-claude/commands/pm-list.md +39 -0
- package/plugins/pm-cli-claude/commands/pm-new.md +36 -0
- package/plugins/pm-cli-claude/commands/pm-planner.md +51 -0
- package/plugins/pm-cli-claude/commands/pm-release.md +41 -0
- package/plugins/pm-cli-claude/commands/pm-search.md +21 -0
- package/plugins/pm-cli-claude/commands/pm-start-task.md +27 -0
- package/plugins/pm-cli-claude/commands/pm-status.md +15 -0
- package/plugins/pm-cli-claude/commands/pm-triage.md +35 -0
- package/plugins/pm-cli-claude/commands/pm-workflow.md +49 -0
- package/plugins/pm-cli-claude/hooks/hooks.json +17 -0
- package/plugins/pm-cli-claude/hooks/session-start.mjs +55 -0
- package/plugins/pm-cli-claude/scripts/pm-mcp-server.mjs +60 -0
- package/plugins/pm-cli-claude/skills/pm-audit/SKILL.md +88 -0
- package/plugins/pm-cli-claude/skills/pm-developer/SKILL.md +116 -0
- package/plugins/pm-cli-claude/skills/pm-planner/SKILL.md +118 -0
- package/plugins/pm-cli-claude/skills/pm-release/SKILL.md +83 -0
- package/plugins/pm-cli-claude/skills/pm-workflow/SKILL.md +148 -0
- package/plugins/pm-cli-codex/.codex-plugin/plugin.json +45 -0
- package/plugins/pm-cli-codex/.mcp.json +14 -0
- package/plugins/pm-cli-codex/README.md +30 -0
- package/plugins/pm-cli-codex/assets/pm-cli-small.svg +4 -0
- package/plugins/pm-cli-codex/commands/pm-audit.md +8 -0
- package/plugins/pm-cli-codex/commands/pm-close-task.md +9 -0
- package/plugins/pm-cli-codex/commands/pm-start-task.md +9 -0
- package/plugins/pm-cli-codex/scripts/pm-mcp-server.mjs +54 -0
- package/plugins/pm-cli-codex/skills/pm-auditor/SKILL.md +21 -0
- package/plugins/pm-cli-codex/skills/pm-auditor/agents/openai.yaml +6 -0
- package/plugins/pm-cli-codex/skills/pm-native/SKILL.md +57 -0
- package/plugins/pm-cli-codex/skills/pm-native/agents/openai.yaml +6 -0
- package/plugins/pm-cli-codex/skills/pm-release/SKILL.md +19 -0
- package/plugins/pm-cli-codex/skills/pm-release/agents/openai.yaml +6 -0
package/dist/types.d.ts
CHANGED
|
@@ -145,6 +145,10 @@ export interface RuntimeStatusDefinition {
|
|
|
145
145
|
}
|
|
146
146
|
export interface RuntimeFieldDefinition {
|
|
147
147
|
key: string;
|
|
148
|
+
metadata_key?: string;
|
|
149
|
+
/**
|
|
150
|
+
* @deprecated Use metadata_key.
|
|
151
|
+
*/
|
|
148
152
|
front_matter_key?: string;
|
|
149
153
|
cli_flag?: string;
|
|
150
154
|
cli_aliases?: string[];
|
|
@@ -195,7 +199,7 @@ export interface ItemTestRunSummary {
|
|
|
195
199
|
linked_tests?: number;
|
|
196
200
|
fail_on_skipped_triggered?: boolean;
|
|
197
201
|
}
|
|
198
|
-
export interface
|
|
202
|
+
export interface ItemMetadata {
|
|
199
203
|
id: string;
|
|
200
204
|
title: string;
|
|
201
205
|
description: string;
|
|
@@ -258,8 +262,12 @@ export interface ItemFrontMatter {
|
|
|
258
262
|
close_reason?: string;
|
|
259
263
|
[key: string]: unknown;
|
|
260
264
|
}
|
|
265
|
+
/**
|
|
266
|
+
* @deprecated Use ItemMetadata.
|
|
267
|
+
*/
|
|
268
|
+
export type ItemFrontMatter = ItemMetadata;
|
|
261
269
|
export interface ItemDocument {
|
|
262
|
-
|
|
270
|
+
metadata: ItemMetadata;
|
|
263
271
|
body: string;
|
|
264
272
|
}
|
|
265
273
|
export interface HistoryPatchOp {
|
package/dist/types.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"/","sources":["types.ts"],"names":[],"mappings":"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","sourcesContent":["export const BUILTIN_ITEM_TYPE_VALUES = [\n \"Epic\",\n \"Feature\",\n \"Task\",\n \"Chore\",\n \"Issue\",\n \"Decision\",\n \"Event\",\n \"Reminder\",\n \"Milestone\",\n \"Meeting\",\n] as const;\nexport const ITEM_TYPE_VALUES = BUILTIN_ITEM_TYPE_VALUES;\nexport type BuiltinItemType = (typeof BUILTIN_ITEM_TYPE_VALUES)[number];\nexport type ItemType = string;\n\nexport const STATUS_VALUES = [\n \"draft\",\n \"open\",\n \"in_progress\",\n \"blocked\",\n \"closed\",\n \"canceled\",\n] as const;\nexport type ItemStatus = string;\n\nexport const RUNTIME_STATUS_ROLE_VALUES = [\n \"draft\",\n \"active\",\n \"blocked\",\n \"terminal\",\n \"terminal_done\",\n \"terminal_canceled\",\n \"default_open\",\n \"default_close\",\n \"default_cancel\",\n] as const;\nexport type RuntimeStatusRole = (typeof RUNTIME_STATUS_ROLE_VALUES)[number];\n\nexport const RUNTIME_FIELD_TYPE_VALUES = [\"string\", \"number\", \"boolean\", \"string_array\"] as const;\nexport type RuntimeFieldType = (typeof RUNTIME_FIELD_TYPE_VALUES)[number];\n\nexport const RUNTIME_FIELD_COMMAND_VALUES = [\"create\", \"update\", \"update_many\", \"list\", \"search\", \"calendar\", \"context\"] as const;\nexport type RuntimeFieldCommand = (typeof RUNTIME_FIELD_COMMAND_VALUES)[number];\n\nexport const RUNTIME_UNKNOWN_FIELD_POLICY_VALUES = [\"allow\", \"warn\", \"reject\"] as const;\nexport type RuntimeUnknownFieldPolicy = (typeof RUNTIME_UNKNOWN_FIELD_POLICY_VALUES)[number];\n\nexport const DEPENDENCY_KIND_VALUES = [\n \"blocks\",\n \"parent\",\n \"child\",\n \"parent_child\",\n \"child_of\",\n \"related\",\n \"related_to\",\n \"discovered_from\",\n \"blocked_by\",\n \"incident_from\",\n \"epic\",\n \"supersedes\",\n \"task\",\n] as const;\nexport type DependencyKind = (typeof DEPENDENCY_KIND_VALUES)[number];\n\nexport const SCOPE_VALUES = [\"project\", \"global\"] as const;\nexport type LinkScope = (typeof SCOPE_VALUES)[number];\n\nexport const RISK_VALUES = [\"low\", \"medium\", \"high\", \"critical\"] as const;\nexport type RiskLevel = (typeof RISK_VALUES)[number];\n\nexport const ISSUE_SEVERITY_VALUES = [\"low\", \"medium\", \"high\", \"critical\"] as const;\nexport type IssueSeverity = (typeof ISSUE_SEVERITY_VALUES)[number];\n\nexport const CONFIDENCE_TEXT_VALUES = [\"low\", \"medium\", \"high\"] as const;\nexport type ConfidenceTextLevel = (typeof CONFIDENCE_TEXT_VALUES)[number];\nexport type ConfidenceValue = number | ConfidenceTextLevel;\n\nexport const ITEM_FORMAT_VALUES = [\"toon\", \"json_markdown\"] as const;\nexport type ItemFormat = (typeof ITEM_FORMAT_VALUES)[number];\n\nexport const SPRINT_RELEASE_FORMAT_POLICY_VALUES = [\"warn\", \"strict_error\"] as const;\nexport type SprintReleaseFormatPolicy = (typeof SPRINT_RELEASE_FORMAT_POLICY_VALUES)[number];\nexport const PARENT_REFERENCE_POLICY_VALUES = [\"warn\", \"strict_error\"] as const;\nexport type ParentReferencePolicy = (typeof PARENT_REFERENCE_POLICY_VALUES)[number];\nexport const VALIDATE_METADATA_PROFILE_VALUES = [\"core\", \"strict\", \"custom\"] as const;\nexport type ValidateMetadataProfile = (typeof VALIDATE_METADATA_PROFILE_VALUES)[number];\nexport const GOVERNANCE_PRESET_VALUES = [\"minimal\", \"default\", \"strict\", \"custom\"] as const;\nexport type GovernancePreset = (typeof GOVERNANCE_PRESET_VALUES)[number];\nexport const GOVERNANCE_OWNERSHIP_ENFORCEMENT_VALUES = [\"none\", \"warn\", \"strict\"] as const;\nexport type GovernanceOwnershipEnforcement = (typeof GOVERNANCE_OWNERSHIP_ENFORCEMENT_VALUES)[number];\nexport const GOVERNANCE_CREATE_MODE_DEFAULT_VALUES = [\"progressive\", \"strict\"] as const;\nexport type GovernanceCreateModeDefault = (typeof GOVERNANCE_CREATE_MODE_DEFAULT_VALUES)[number];\nexport const GOVERNANCE_CLOSE_VALIDATION_DEFAULT_VALUES = [\"off\", \"warn\", \"strict\"] as const;\nexport type GovernanceCloseValidationDefault = (typeof GOVERNANCE_CLOSE_VALIDATION_DEFAULT_VALUES)[number];\nexport const VALIDATE_METADATA_REQUIRED_FIELD_VALUES = [\n \"author\",\n \"acceptance_criteria\",\n \"estimated_minutes\",\n \"close_reason\",\n \"reviewer\",\n \"risk\",\n \"confidence\",\n \"sprint\",\n \"release\",\n] as const;\nexport type ValidateMetadataRequiredField = (typeof VALIDATE_METADATA_REQUIRED_FIELD_VALUES)[number];\n\nexport const RECURRENCE_FREQUENCY_VALUES = [\"daily\", \"weekly\", \"monthly\", \"yearly\"] as const;\nexport type RecurrenceFrequency = (typeof RECURRENCE_FREQUENCY_VALUES)[number];\n\nexport const RECURRENCE_WEEKDAY_VALUES = [\"mon\", \"tue\", \"wed\", \"thu\", \"fri\", \"sat\", \"sun\"] as const;\nexport type RecurrenceWeekday = (typeof RECURRENCE_WEEKDAY_VALUES)[number];\n\nexport interface Dependency {\n id: string;\n kind: DependencyKind;\n created_at: string;\n author?: string;\n source_kind?: string;\n}\n\nexport interface Comment {\n created_at: string;\n author: string;\n text: string;\n}\n\nexport interface LogNote {\n created_at: string;\n author: string;\n text: string;\n}\n\nexport interface LinkedFile {\n path: string;\n scope: LinkScope;\n note?: string;\n}\n\nexport interface LinkedTest {\n command?: string;\n path?: string;\n scope: LinkScope;\n timeout_seconds?: number;\n pm_context_mode?: \"schema\" | \"tracker\" | \"auto\";\n env_set?: Record<string, string>;\n env_clear?: string[];\n shared_host_safe?: boolean;\n assert_stdout_contains?: string[];\n assert_stdout_regex?: string[];\n assert_stderr_contains?: string[];\n assert_stderr_regex?: string[];\n assert_stdout_min_lines?: number;\n assert_json_field_equals?: Record<string, string>;\n assert_json_field_gte?: Record<string, number>;\n note?: string;\n}\n\nexport interface LinkedDoc {\n path: string;\n scope: LinkScope;\n note?: string;\n}\n\nexport interface Reminder {\n at: string;\n text: string;\n}\n\nexport interface RecurrenceRule {\n freq: RecurrenceFrequency;\n interval?: number;\n count?: number;\n until?: string;\n by_weekday?: RecurrenceWeekday[];\n by_month_day?: number[];\n exdates?: string[];\n}\n\nexport interface CalendarEvent {\n start_at: string;\n end_at?: string;\n title?: string;\n description?: string;\n location?: string;\n all_day?: boolean;\n timezone?: string;\n recurrence?: RecurrenceRule;\n}\n\nexport interface ItemTypeOptionDefinition {\n key: string;\n values: string[];\n required?: boolean;\n aliases?: string[];\n description?: string;\n}\n\nexport interface ItemTypeCommandOptionPolicy {\n command: \"create\" | \"update\";\n option: string;\n required?: boolean;\n visible?: boolean;\n enabled?: boolean;\n}\n\nexport interface ItemTypeDefinition {\n name: string;\n folder?: string;\n aliases?: string[];\n required_create_fields?: string[];\n required_create_repeatables?: string[];\n options?: ItemTypeOptionDefinition[];\n command_option_policies?: ItemTypeCommandOptionPolicy[];\n}\n\nexport interface RuntimeStatusDefinition {\n id: string;\n aliases?: string[];\n roles?: RuntimeStatusRole[];\n description?: string;\n order?: number;\n}\n\nexport interface RuntimeFieldDefinition {\n key: string;\n front_matter_key?: string;\n cli_flag?: string;\n cli_aliases?: string[];\n description?: string;\n type?: RuntimeFieldType;\n commands?: RuntimeFieldCommand[];\n repeatable?: boolean;\n required?: boolean;\n required_on_create?: boolean;\n required_types?: string[];\n allow_unset?: boolean;\n}\n\nexport interface RuntimeWorkflowDefinition {\n draft_status?: string;\n open_status?: string;\n in_progress_status?: string;\n blocked_status?: string;\n close_status?: string;\n canceled_status?: string;\n}\n\nexport interface RuntimeSchemaFileConfig {\n types?: string;\n statuses?: string;\n fields?: string;\n workflows?: string;\n}\n\nexport interface RuntimeSchemaSettings {\n version: number;\n files: RuntimeSchemaFileConfig;\n statuses: RuntimeStatusDefinition[];\n fields: RuntimeFieldDefinition[];\n workflow: RuntimeWorkflowDefinition;\n unknown_field_policy: RuntimeUnknownFieldPolicy;\n}\n\nexport interface ItemTestRunSummary {\n run_id: string;\n kind: \"test\" | \"test-all\";\n status: \"passed\" | \"failed\" | \"stopped\" | \"canceled\";\n started_at: string;\n finished_at: string;\n recorded_at: string;\n attempt?: number;\n resumed_from?: string;\n passed: number;\n failed: number;\n skipped: number;\n items?: number;\n linked_tests?: number;\n fail_on_skipped_triggered?: boolean;\n}\n\nexport interface ItemFrontMatter {\n id: string;\n title: string;\n description: string;\n type: ItemType;\n source_type?: string;\n type_options?: Record<string, string>;\n status: ItemStatus;\n priority: 0 | 1 | 2 | 3 | 4;\n tags: string[];\n created_at: string;\n updated_at: string;\n deadline?: string;\n reminders?: Reminder[];\n events?: CalendarEvent[];\n closed_at?: string;\n assignee?: string;\n source_owner?: string;\n author?: string;\n estimated_minutes?: number;\n acceptance_criteria?: string;\n design?: string;\n external_ref?: string;\n definition_of_ready?: string;\n order?: number;\n goal?: string;\n objective?: string;\n value?: string;\n impact?: string;\n outcome?: string;\n why_now?: string;\n parent?: string;\n reviewer?: string;\n risk?: \"low\" | \"medium\" | \"high\" | \"critical\";\n confidence?: ConfidenceValue;\n sprint?: string;\n release?: string;\n blocked_by?: string;\n blocked_reason?: string;\n unblock_note?: string;\n reporter?: string;\n severity?: IssueSeverity;\n environment?: string;\n repro_steps?: string;\n resolution?: string;\n expected_result?: string;\n actual_result?: string;\n affected_version?: string;\n fixed_version?: string;\n component?: string;\n regression?: boolean;\n customer_impact?: string;\n dependencies?: Dependency[];\n comments?: Comment[];\n notes?: LogNote[];\n learnings?: LogNote[];\n files?: LinkedFile[];\n tests?: LinkedTest[];\n test_runs?: ItemTestRunSummary[];\n docs?: LinkedDoc[];\n close_reason?: string;\n [key: string]: unknown;\n}\n\nexport interface ItemDocument {\n front_matter: ItemFrontMatter;\n body: string;\n}\n\nexport interface HistoryPatchOp {\n op: \"add\" | \"remove\" | \"replace\" | \"move\" | \"copy\" | \"test\";\n path: string;\n from?: string;\n value?: unknown;\n}\n\nexport interface HistoryEntry {\n ts: string;\n author: string;\n op: string;\n patch: HistoryPatchOp[];\n before_hash: string;\n after_hash: string;\n message?: string;\n}\n\nexport const CONTEXT_DEPTH_VALUES = [\"brief\", \"standard\", \"deep\"] as const;\nexport type ContextDepth = (typeof CONTEXT_DEPTH_VALUES)[number];\n\nexport const CONTEXT_SECTION_VALUES = [\n \"hierarchy\",\n \"activity\",\n \"progress\",\n \"blockers\",\n \"files\",\n \"workload\",\n \"staleness\",\n \"tests\",\n] as const;\nexport type ContextSectionName = (typeof CONTEXT_SECTION_VALUES)[number];\n\nexport interface ContextSectionSettings {\n hierarchy: boolean;\n activity: boolean;\n progress: boolean;\n blockers: boolean;\n files: boolean;\n workload: boolean;\n staleness: boolean;\n tests: boolean;\n}\n\nexport interface ContextSettings {\n default_depth: ContextDepth;\n activity_limit: number;\n stale_threshold_days: number;\n sections: ContextSectionSettings;\n}\n\nexport interface GovernanceSettings {\n preset: GovernancePreset;\n ownership_enforcement: GovernanceOwnershipEnforcement;\n create_mode_default: GovernanceCreateModeDefault;\n close_validation_default: GovernanceCloseValidationDefault;\n parent_reference: ParentReferencePolicy;\n metadata_profile: ValidateMetadataProfile;\n force_required_for_stale_lock: boolean;\n}\n\nexport interface PmSettings {\n version: number;\n id_prefix: string;\n author_default: string;\n item_format: ItemFormat;\n locks: {\n ttl_seconds: number;\n };\n output: {\n default_format: \"toon\" | \"json\";\n };\n history: {\n missing_stream: \"auto_create\" | \"strict_error\";\n };\n validation: {\n sprint_release_format: SprintReleaseFormatPolicy;\n parent_reference: ParentReferencePolicy;\n metadata_profile: ValidateMetadataProfile;\n metadata_required_fields: ValidateMetadataRequiredField[];\n lifecycle_stale_blocker_reason_patterns: string[];\n lifecycle_closure_like_blocked_reason_patterns: string[];\n lifecycle_closure_like_resolution_patterns: string[];\n lifecycle_closure_like_actual_result_patterns: string[];\n };\n governance: GovernanceSettings;\n workflow: {\n definition_of_done: string[];\n };\n testing: {\n record_results_to_items: boolean;\n };\n telemetry: {\n enabled: boolean;\n first_run_prompt_completed: boolean;\n capture_level: \"minimal\" | \"redacted\" | \"max\";\n endpoint: string;\n installation_id: string;\n retention_days: number;\n };\n item_types: {\n definitions: ItemTypeDefinition[];\n };\n schema: RuntimeSchemaSettings;\n extensions: {\n enabled: string[];\n disabled: string[];\n };\n search: {\n score_threshold: number;\n hybrid_semantic_weight: number;\n max_results: number;\n embedding_model: string;\n embedding_batch_size: number;\n scanner_max_batch_retries: number;\n provider?: string;\n tuning?: {\n title_exact_bonus?: number;\n title_weight?: number;\n description_weight?: number;\n tags_weight?: number;\n status_weight?: number;\n body_weight?: number;\n comments_weight?: number;\n notes_weight?: number;\n learnings_weight?: number;\n dependencies_weight?: number;\n linked_content_weight?: number;\n };\n };\n providers: {\n openai: {\n base_url: string;\n api_key: string;\n model: string;\n };\n ollama: {\n base_url: string;\n model: string;\n };\n };\n context: ContextSettings;\n vector_store: {\n adapter?: string;\n qdrant: {\n url: string;\n api_key: string;\n };\n lancedb: {\n path: string;\n };\n };\n}\n"]}
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"/","sources":["types.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,wBAAwB,GAAG;IACtC,MAAM;IACN,SAAS;IACT,MAAM;IACN,OAAO;IACP,OAAO;IACP,UAAU;IACV,OAAO;IACP,UAAU;IACV,WAAW;IACX,SAAS;CACD,CAAC;AACX,MAAM,CAAC,MAAM,gBAAgB,GAAG,wBAAwB,CAAC;AAIzD,MAAM,CAAC,MAAM,aAAa,GAAG;IAC3B,OAAO;IACP,MAAM;IACN,aAAa;IACb,SAAS;IACT,QAAQ;IACR,UAAU;CACF,CAAC;AAGX,MAAM,CAAC,MAAM,0BAA0B,GAAG;IACxC,OAAO;IACP,QAAQ;IACR,SAAS;IACT,UAAU;IACV,eAAe;IACf,mBAAmB;IACnB,cAAc;IACd,eAAe;IACf,gBAAgB;CACR,CAAC;AAGX,MAAM,CAAC,MAAM,yBAAyB,GAAG,CAAC,QAAQ,EAAE,QAAQ,EAAE,SAAS,EAAE,cAAc,CAAU,CAAC;AAGlG,MAAM,CAAC,MAAM,4BAA4B,GAAG,CAAC,QAAQ,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,EAAE,QAAQ,EAAE,UAAU,EAAE,SAAS,CAAU,CAAC;AAGlI,MAAM,CAAC,MAAM,mCAAmC,GAAG,CAAC,OAAO,EAAE,MAAM,EAAE,QAAQ,CAAU,CAAC;AAGxF,MAAM,CAAC,MAAM,sBAAsB,GAAG;IACpC,QAAQ;IACR,QAAQ;IACR,OAAO;IACP,cAAc;IACd,UAAU;IACV,SAAS;IACT,YAAY;IACZ,iBAAiB;IACjB,YAAY;IACZ,eAAe;IACf,MAAM;IACN,YAAY;IACZ,MAAM;CACE,CAAC;AAGX,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,SAAS,EAAE,QAAQ,CAAU,CAAC;AAG3D,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,KAAK,EAAE,QAAQ,EAAE,MAAM,EAAE,UAAU,CAAU,CAAC;AAG1E,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,KAAK,EAAE,QAAQ,EAAE,MAAM,EAAE,UAAU,CAAU,CAAC;AAGpF,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,KAAK,EAAE,QAAQ,EAAE,MAAM,CAAU,CAAC;AAIzE,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,MAAM,EAAE,eAAe,CAAU,CAAC;AAGrE,MAAM,CAAC,MAAM,mCAAmC,GAAG,CAAC,MAAM,EAAE,cAAc,CAAU,CAAC;AAErF,MAAM,CAAC,MAAM,8BAA8B,GAAG,CAAC,MAAM,EAAE,cAAc,CAAU,CAAC;AAEhF,MAAM,CAAC,MAAM,gCAAgC,GAAG,CAAC,MAAM,EAAE,QAAQ,EAAE,QAAQ,CAAU,CAAC;AAEtF,MAAM,CAAC,MAAM,wBAAwB,GAAG,CAAC,SAAS,EAAE,SAAS,EAAE,QAAQ,EAAE,QAAQ,CAAU,CAAC;AAE5F,MAAM,CAAC,MAAM,uCAAuC,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,QAAQ,CAAU,CAAC;AAE3F,MAAM,CAAC,MAAM,qCAAqC,GAAG,CAAC,aAAa,EAAE,QAAQ,CAAU,CAAC;AAExF,MAAM,CAAC,MAAM,0CAA0C,GAAG,CAAC,KAAK,EAAE,MAAM,EAAE,QAAQ,CAAU,CAAC;AAE7F,MAAM,CAAC,MAAM,uCAAuC,GAAG;IACrD,QAAQ;IACR,qBAAqB;IACrB,mBAAmB;IACnB,cAAc;IACd,UAAU;IACV,MAAM;IACN,YAAY;IACZ,QAAQ;IACR,SAAS;CACD,CAAC;AAGX,MAAM,CAAC,MAAM,2BAA2B,GAAG,CAAC,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,QAAQ,CAAU,CAAC;AAG7F,MAAM,CAAC,MAAM,yBAAyB,GAAG,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,CAAU,CAAC;AA0QpG,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,OAAO,EAAE,UAAU,EAAE,MAAM,CAAU,CAAC;AAG3E,MAAM,CAAC,MAAM,sBAAsB,GAAG;IACpC,WAAW;IACX,UAAU;IACV,UAAU;IACV,UAAU;IACV,OAAO;IACP,UAAU;IACV,WAAW;IACX,OAAO;CACC,CAAC","sourcesContent":["export const BUILTIN_ITEM_TYPE_VALUES = [\n \"Epic\",\n \"Feature\",\n \"Task\",\n \"Chore\",\n \"Issue\",\n \"Decision\",\n \"Event\",\n \"Reminder\",\n \"Milestone\",\n \"Meeting\",\n] as const;\nexport const ITEM_TYPE_VALUES = BUILTIN_ITEM_TYPE_VALUES;\nexport type BuiltinItemType = (typeof BUILTIN_ITEM_TYPE_VALUES)[number];\nexport type ItemType = string;\n\nexport const STATUS_VALUES = [\n \"draft\",\n \"open\",\n \"in_progress\",\n \"blocked\",\n \"closed\",\n \"canceled\",\n] as const;\nexport type ItemStatus = string;\n\nexport const RUNTIME_STATUS_ROLE_VALUES = [\n \"draft\",\n \"active\",\n \"blocked\",\n \"terminal\",\n \"terminal_done\",\n \"terminal_canceled\",\n \"default_open\",\n \"default_close\",\n \"default_cancel\",\n] as const;\nexport type RuntimeStatusRole = (typeof RUNTIME_STATUS_ROLE_VALUES)[number];\n\nexport const RUNTIME_FIELD_TYPE_VALUES = [\"string\", \"number\", \"boolean\", \"string_array\"] as const;\nexport type RuntimeFieldType = (typeof RUNTIME_FIELD_TYPE_VALUES)[number];\n\nexport const RUNTIME_FIELD_COMMAND_VALUES = [\"create\", \"update\", \"update_many\", \"list\", \"search\", \"calendar\", \"context\"] as const;\nexport type RuntimeFieldCommand = (typeof RUNTIME_FIELD_COMMAND_VALUES)[number];\n\nexport const RUNTIME_UNKNOWN_FIELD_POLICY_VALUES = [\"allow\", \"warn\", \"reject\"] as const;\nexport type RuntimeUnknownFieldPolicy = (typeof RUNTIME_UNKNOWN_FIELD_POLICY_VALUES)[number];\n\nexport const DEPENDENCY_KIND_VALUES = [\n \"blocks\",\n \"parent\",\n \"child\",\n \"parent_child\",\n \"child_of\",\n \"related\",\n \"related_to\",\n \"discovered_from\",\n \"blocked_by\",\n \"incident_from\",\n \"epic\",\n \"supersedes\",\n \"task\",\n] as const;\nexport type DependencyKind = (typeof DEPENDENCY_KIND_VALUES)[number];\n\nexport const SCOPE_VALUES = [\"project\", \"global\"] as const;\nexport type LinkScope = (typeof SCOPE_VALUES)[number];\n\nexport const RISK_VALUES = [\"low\", \"medium\", \"high\", \"critical\"] as const;\nexport type RiskLevel = (typeof RISK_VALUES)[number];\n\nexport const ISSUE_SEVERITY_VALUES = [\"low\", \"medium\", \"high\", \"critical\"] as const;\nexport type IssueSeverity = (typeof ISSUE_SEVERITY_VALUES)[number];\n\nexport const CONFIDENCE_TEXT_VALUES = [\"low\", \"medium\", \"high\"] as const;\nexport type ConfidenceTextLevel = (typeof CONFIDENCE_TEXT_VALUES)[number];\nexport type ConfidenceValue = number | ConfidenceTextLevel;\n\nexport const ITEM_FORMAT_VALUES = [\"toon\", \"json_markdown\"] as const;\nexport type ItemFormat = (typeof ITEM_FORMAT_VALUES)[number];\n\nexport const SPRINT_RELEASE_FORMAT_POLICY_VALUES = [\"warn\", \"strict_error\"] as const;\nexport type SprintReleaseFormatPolicy = (typeof SPRINT_RELEASE_FORMAT_POLICY_VALUES)[number];\nexport const PARENT_REFERENCE_POLICY_VALUES = [\"warn\", \"strict_error\"] as const;\nexport type ParentReferencePolicy = (typeof PARENT_REFERENCE_POLICY_VALUES)[number];\nexport const VALIDATE_METADATA_PROFILE_VALUES = [\"core\", \"strict\", \"custom\"] as const;\nexport type ValidateMetadataProfile = (typeof VALIDATE_METADATA_PROFILE_VALUES)[number];\nexport const GOVERNANCE_PRESET_VALUES = [\"minimal\", \"default\", \"strict\", \"custom\"] as const;\nexport type GovernancePreset = (typeof GOVERNANCE_PRESET_VALUES)[number];\nexport const GOVERNANCE_OWNERSHIP_ENFORCEMENT_VALUES = [\"none\", \"warn\", \"strict\"] as const;\nexport type GovernanceOwnershipEnforcement = (typeof GOVERNANCE_OWNERSHIP_ENFORCEMENT_VALUES)[number];\nexport const GOVERNANCE_CREATE_MODE_DEFAULT_VALUES = [\"progressive\", \"strict\"] as const;\nexport type GovernanceCreateModeDefault = (typeof GOVERNANCE_CREATE_MODE_DEFAULT_VALUES)[number];\nexport const GOVERNANCE_CLOSE_VALIDATION_DEFAULT_VALUES = [\"off\", \"warn\", \"strict\"] as const;\nexport type GovernanceCloseValidationDefault = (typeof GOVERNANCE_CLOSE_VALIDATION_DEFAULT_VALUES)[number];\nexport const VALIDATE_METADATA_REQUIRED_FIELD_VALUES = [\n \"author\",\n \"acceptance_criteria\",\n \"estimated_minutes\",\n \"close_reason\",\n \"reviewer\",\n \"risk\",\n \"confidence\",\n \"sprint\",\n \"release\",\n] as const;\nexport type ValidateMetadataRequiredField = (typeof VALIDATE_METADATA_REQUIRED_FIELD_VALUES)[number];\n\nexport const RECURRENCE_FREQUENCY_VALUES = [\"daily\", \"weekly\", \"monthly\", \"yearly\"] as const;\nexport type RecurrenceFrequency = (typeof RECURRENCE_FREQUENCY_VALUES)[number];\n\nexport const RECURRENCE_WEEKDAY_VALUES = [\"mon\", \"tue\", \"wed\", \"thu\", \"fri\", \"sat\", \"sun\"] as const;\nexport type RecurrenceWeekday = (typeof RECURRENCE_WEEKDAY_VALUES)[number];\n\nexport interface Dependency {\n id: string;\n kind: DependencyKind;\n created_at: string;\n author?: string;\n source_kind?: string;\n}\n\nexport interface Comment {\n created_at: string;\n author: string;\n text: string;\n}\n\nexport interface LogNote {\n created_at: string;\n author: string;\n text: string;\n}\n\nexport interface LinkedFile {\n path: string;\n scope: LinkScope;\n note?: string;\n}\n\nexport interface LinkedTest {\n command?: string;\n path?: string;\n scope: LinkScope;\n timeout_seconds?: number;\n pm_context_mode?: \"schema\" | \"tracker\" | \"auto\";\n env_set?: Record<string, string>;\n env_clear?: string[];\n shared_host_safe?: boolean;\n assert_stdout_contains?: string[];\n assert_stdout_regex?: string[];\n assert_stderr_contains?: string[];\n assert_stderr_regex?: string[];\n assert_stdout_min_lines?: number;\n assert_json_field_equals?: Record<string, string>;\n assert_json_field_gte?: Record<string, number>;\n note?: string;\n}\n\nexport interface LinkedDoc {\n path: string;\n scope: LinkScope;\n note?: string;\n}\n\nexport interface Reminder {\n at: string;\n text: string;\n}\n\nexport interface RecurrenceRule {\n freq: RecurrenceFrequency;\n interval?: number;\n count?: number;\n until?: string;\n by_weekday?: RecurrenceWeekday[];\n by_month_day?: number[];\n exdates?: string[];\n}\n\nexport interface CalendarEvent {\n start_at: string;\n end_at?: string;\n title?: string;\n description?: string;\n location?: string;\n all_day?: boolean;\n timezone?: string;\n recurrence?: RecurrenceRule;\n}\n\nexport interface ItemTypeOptionDefinition {\n key: string;\n values: string[];\n required?: boolean;\n aliases?: string[];\n description?: string;\n}\n\nexport interface ItemTypeCommandOptionPolicy {\n command: \"create\" | \"update\";\n option: string;\n required?: boolean;\n visible?: boolean;\n enabled?: boolean;\n}\n\nexport interface ItemTypeDefinition {\n name: string;\n folder?: string;\n aliases?: string[];\n required_create_fields?: string[];\n required_create_repeatables?: string[];\n options?: ItemTypeOptionDefinition[];\n command_option_policies?: ItemTypeCommandOptionPolicy[];\n}\n\nexport interface RuntimeStatusDefinition {\n id: string;\n aliases?: string[];\n roles?: RuntimeStatusRole[];\n description?: string;\n order?: number;\n}\n\nexport interface RuntimeFieldDefinition {\n key: string;\n metadata_key?: string;\n /**\n * @deprecated Use metadata_key.\n */\n front_matter_key?: string;\n cli_flag?: string;\n cli_aliases?: string[];\n description?: string;\n type?: RuntimeFieldType;\n commands?: RuntimeFieldCommand[];\n repeatable?: boolean;\n required?: boolean;\n required_on_create?: boolean;\n required_types?: string[];\n allow_unset?: boolean;\n}\n\nexport interface RuntimeWorkflowDefinition {\n draft_status?: string;\n open_status?: string;\n in_progress_status?: string;\n blocked_status?: string;\n close_status?: string;\n canceled_status?: string;\n}\n\nexport interface RuntimeSchemaFileConfig {\n types?: string;\n statuses?: string;\n fields?: string;\n workflows?: string;\n}\n\nexport interface RuntimeSchemaSettings {\n version: number;\n files: RuntimeSchemaFileConfig;\n statuses: RuntimeStatusDefinition[];\n fields: RuntimeFieldDefinition[];\n workflow: RuntimeWorkflowDefinition;\n unknown_field_policy: RuntimeUnknownFieldPolicy;\n}\n\nexport interface ItemTestRunSummary {\n run_id: string;\n kind: \"test\" | \"test-all\";\n status: \"passed\" | \"failed\" | \"stopped\" | \"canceled\";\n started_at: string;\n finished_at: string;\n recorded_at: string;\n attempt?: number;\n resumed_from?: string;\n passed: number;\n failed: number;\n skipped: number;\n items?: number;\n linked_tests?: number;\n fail_on_skipped_triggered?: boolean;\n}\n\nexport interface ItemMetadata {\n id: string;\n title: string;\n description: string;\n type: ItemType;\n source_type?: string;\n type_options?: Record<string, string>;\n status: ItemStatus;\n priority: 0 | 1 | 2 | 3 | 4;\n tags: string[];\n created_at: string;\n updated_at: string;\n deadline?: string;\n reminders?: Reminder[];\n events?: CalendarEvent[];\n closed_at?: string;\n assignee?: string;\n source_owner?: string;\n author?: string;\n estimated_minutes?: number;\n acceptance_criteria?: string;\n design?: string;\n external_ref?: string;\n definition_of_ready?: string;\n order?: number;\n goal?: string;\n objective?: string;\n value?: string;\n impact?: string;\n outcome?: string;\n why_now?: string;\n parent?: string;\n reviewer?: string;\n risk?: \"low\" | \"medium\" | \"high\" | \"critical\";\n confidence?: ConfidenceValue;\n sprint?: string;\n release?: string;\n blocked_by?: string;\n blocked_reason?: string;\n unblock_note?: string;\n reporter?: string;\n severity?: IssueSeverity;\n environment?: string;\n repro_steps?: string;\n resolution?: string;\n expected_result?: string;\n actual_result?: string;\n affected_version?: string;\n fixed_version?: string;\n component?: string;\n regression?: boolean;\n customer_impact?: string;\n dependencies?: Dependency[];\n comments?: Comment[];\n notes?: LogNote[];\n learnings?: LogNote[];\n files?: LinkedFile[];\n tests?: LinkedTest[];\n test_runs?: ItemTestRunSummary[];\n docs?: LinkedDoc[];\n close_reason?: string;\n [key: string]: unknown;\n}\n\n/**\n * @deprecated Use ItemMetadata.\n */\nexport type ItemFrontMatter = ItemMetadata;\n\nexport interface ItemDocument {\n metadata: ItemMetadata;\n body: string;\n}\n\nexport interface HistoryPatchOp {\n op: \"add\" | \"remove\" | \"replace\" | \"move\" | \"copy\" | \"test\";\n path: string;\n from?: string;\n value?: unknown;\n}\n\nexport interface HistoryEntry {\n ts: string;\n author: string;\n op: string;\n patch: HistoryPatchOp[];\n before_hash: string;\n after_hash: string;\n message?: string;\n}\n\nexport const CONTEXT_DEPTH_VALUES = [\"brief\", \"standard\", \"deep\"] as const;\nexport type ContextDepth = (typeof CONTEXT_DEPTH_VALUES)[number];\n\nexport const CONTEXT_SECTION_VALUES = [\n \"hierarchy\",\n \"activity\",\n \"progress\",\n \"blockers\",\n \"files\",\n \"workload\",\n \"staleness\",\n \"tests\",\n] as const;\nexport type ContextSectionName = (typeof CONTEXT_SECTION_VALUES)[number];\n\nexport interface ContextSectionSettings {\n hierarchy: boolean;\n activity: boolean;\n progress: boolean;\n blockers: boolean;\n files: boolean;\n workload: boolean;\n staleness: boolean;\n tests: boolean;\n}\n\nexport interface ContextSettings {\n default_depth: ContextDepth;\n activity_limit: number;\n stale_threshold_days: number;\n sections: ContextSectionSettings;\n}\n\nexport interface GovernanceSettings {\n preset: GovernancePreset;\n ownership_enforcement: GovernanceOwnershipEnforcement;\n create_mode_default: GovernanceCreateModeDefault;\n close_validation_default: GovernanceCloseValidationDefault;\n parent_reference: ParentReferencePolicy;\n metadata_profile: ValidateMetadataProfile;\n force_required_for_stale_lock: boolean;\n}\n\nexport interface PmSettings {\n version: number;\n id_prefix: string;\n author_default: string;\n item_format: ItemFormat;\n locks: {\n ttl_seconds: number;\n };\n output: {\n default_format: \"toon\" | \"json\";\n };\n history: {\n missing_stream: \"auto_create\" | \"strict_error\";\n };\n validation: {\n sprint_release_format: SprintReleaseFormatPolicy;\n parent_reference: ParentReferencePolicy;\n metadata_profile: ValidateMetadataProfile;\n metadata_required_fields: ValidateMetadataRequiredField[];\n lifecycle_stale_blocker_reason_patterns: string[];\n lifecycle_closure_like_blocked_reason_patterns: string[];\n lifecycle_closure_like_resolution_patterns: string[];\n lifecycle_closure_like_actual_result_patterns: string[];\n };\n governance: GovernanceSettings;\n workflow: {\n definition_of_done: string[];\n };\n testing: {\n record_results_to_items: boolean;\n };\n telemetry: {\n enabled: boolean;\n first_run_prompt_completed: boolean;\n capture_level: \"minimal\" | \"redacted\" | \"max\";\n endpoint: string;\n installation_id: string;\n retention_days: number;\n };\n item_types: {\n definitions: ItemTypeDefinition[];\n };\n schema: RuntimeSchemaSettings;\n extensions: {\n enabled: string[];\n disabled: string[];\n };\n search: {\n score_threshold: number;\n hybrid_semantic_weight: number;\n max_results: number;\n embedding_model: string;\n embedding_batch_size: number;\n scanner_max_batch_retries: number;\n provider?: string;\n tuning?: {\n title_exact_bonus?: number;\n title_weight?: number;\n description_weight?: number;\n tags_weight?: number;\n status_weight?: number;\n body_weight?: number;\n comments_weight?: number;\n notes_weight?: number;\n learnings_weight?: number;\n dependencies_weight?: number;\n linked_content_weight?: number;\n };\n };\n providers: {\n openai: {\n base_url: string;\n api_key: string;\n model: string;\n };\n ollama: {\n base_url: string;\n model: string;\n };\n };\n context: ContextSettings;\n vector_store: {\n adapter?: string;\n qdrant: {\n url: string;\n api_key: string;\n };\n lancedb: {\n path: string;\n };\n };\n}\n"]}
|
package/docs/AGENT_GUIDE.md
CHANGED
|
@@ -11,6 +11,7 @@ pm context --limit 10
|
|
|
11
11
|
pm search "<request keywords>" --limit 10
|
|
12
12
|
pm list-open --limit 20
|
|
13
13
|
pm list-in-progress --limit 20
|
|
14
|
+
pm guide workflows
|
|
14
15
|
```
|
|
15
16
|
|
|
16
17
|
If a relevant item exists, reuse it. If not, create a parent lineage, then create and claim the child implementation item.
|
|
@@ -94,9 +95,22 @@ pm release <item-id>
|
|
|
94
95
|
| Low-noise machine contracts | `pm contracts --command <command> --flags-only --json` |
|
|
95
96
|
| Timeline | `pm activity --id <id> --limit 20` |
|
|
96
97
|
| Dependencies | `pm deps <id> --format tree` |
|
|
98
|
+
| Local docs routing | `pm guide <topic>` |
|
|
97
99
|
|
|
98
100
|
Default TOON output is preferred for model-readable loops. Use `--json` only when strict parsing is needed.
|
|
99
101
|
|
|
102
|
+
## Guide Routing for Agents
|
|
103
|
+
|
|
104
|
+
Use `pm guide` as the local progressive-disclosure router before opening large documents:
|
|
105
|
+
|
|
106
|
+
```bash
|
|
107
|
+
pm guide
|
|
108
|
+
pm guide quickstart
|
|
109
|
+
pm guide commands --depth standard
|
|
110
|
+
pm guide skills --depth deep --format markdown
|
|
111
|
+
pm guide release --json
|
|
112
|
+
```
|
|
113
|
+
|
|
100
114
|
## Ownership Rules
|
|
101
115
|
|
|
102
116
|
- Claim before heavy edits.
|
|
@@ -109,6 +123,7 @@ Default TOON output is preferred for model-readable loops. Use `--json` only whe
|
|
|
109
123
|
|
|
110
124
|
- Keep [README](../README.md) short.
|
|
111
125
|
- Put details in focused docs under `docs/`.
|
|
126
|
+
- Keep reusable workflow prompts in `.agents/skills/*` and route via `pm guide skills`.
|
|
112
127
|
- Use relative links such as `[Command Reference](COMMANDS.md)`.
|
|
113
128
|
- Add tracker references near the top of new docs when a task created the change.
|
|
114
129
|
- Link docs back to the active item with `pm docs`.
|
package/docs/ARCHITECTURE.md
CHANGED
|
@@ -125,7 +125,7 @@ body: |
|
|
|
125
125
|
Implementation notes.
|
|
126
126
|
```
|
|
127
127
|
|
|
128
|
-
|
|
128
|
+
Legacy JSON-front-matter markdown files are read only for one-way migration into TOON. Runtime internals use `metadata` as the item metadata model key.
|
|
129
129
|
|
|
130
130
|
Built-in item types:
|
|
131
131
|
|
|
@@ -223,7 +223,7 @@ Search supports:
|
|
|
223
223
|
- semantic mode, when an embedding provider and vector store are available
|
|
224
224
|
- hybrid mode, combining keyword and semantic results
|
|
225
225
|
|
|
226
|
-
Keyword scoring uses weighted fields such as title, description, tags, status, body, comments, notes, learnings, and dependencies.
|
|
226
|
+
Keyword scoring uses weighted fields such as title, description, tags, status, body, comments, notes, learnings, reminders, events, and dependencies. Semantic indexing uses the same core corpus so calendar-heavy work remains discoverable through normal search and reindex flows.
|
|
227
227
|
|
|
228
228
|
Runtime semantic components can come from built-ins or extensions:
|
|
229
229
|
|
|
@@ -0,0 +1,186 @@
|
|
|
1
|
+
# pm CLI — Claude Code Plugin
|
|
2
|
+
|
|
3
|
+
Native pm integration for Claude Code via the Model Context Protocol (MCP). Claude can use all pm operations as native tools — no shell invocation, no context switching.
|
|
4
|
+
|
|
5
|
+
## Architecture
|
|
6
|
+
|
|
7
|
+
```
|
|
8
|
+
pm-cli/ (repo root)
|
|
9
|
+
├── .claude-plugin/
|
|
10
|
+
│ └── marketplace.json # Root marketplace catalog — read by /plugin marketplace add
|
|
11
|
+
├── plugins/pm-cli-claude/
|
|
12
|
+
│ ├── .claude-plugin/
|
|
13
|
+
│ │ └── plugin.json # Claude Code plugin manifest (name: "pm-cli")
|
|
14
|
+
│ ├── .mcp.json # MCP server config using ${CLAUDE_PLUGIN_ROOT}
|
|
15
|
+
│ ├── skills/
|
|
16
|
+
│ │ ├── pm-workflow/ # Auto-invoked: orient → claim → implement → close
|
|
17
|
+
│ │ ├── pm-developer/ # Developer execution loop with evidence requirements
|
|
18
|
+
│ │ ├── pm-release/ # Release gate sequence and evidence linking
|
|
19
|
+
│ │ ├── pm-audit/ # Comprehensive audit suite
|
|
20
|
+
│ │ └── pm-planner/ # Planning: decompose, prioritize, triage
|
|
21
|
+
│ ├── commands/
|
|
22
|
+
│ │ ├── pm-status.md # /pm-status
|
|
23
|
+
│ │ ├── pm-start-task.md # /pm-start-task [id|keywords]
|
|
24
|
+
│ │ ├── pm-close-task.md # /pm-close-task [id]
|
|
25
|
+
│ │ ├── pm-triage.md # /pm-triage <request>
|
|
26
|
+
│ │ ├── pm-audit.md # /pm-audit
|
|
27
|
+
│ │ ├── pm-search.md # /pm-search <query>
|
|
28
|
+
│ │ ├── pm-new.md # /pm-new <title>
|
|
29
|
+
│ │ ├── pm-list.md # /pm-list [filter]
|
|
30
|
+
│ │ └── pm-calendar.md # /pm-calendar [view]
|
|
31
|
+
│ ├── hooks/
|
|
32
|
+
│ │ ├── hooks.json # SessionStart hook definition
|
|
33
|
+
│ │ └── session-start.mjs # Injects pm context at session start
|
|
34
|
+
│ ├── agents/
|
|
35
|
+
│ │ └── pm-coordinator.md # Subagent for multi-item coordination
|
|
36
|
+
│ ├── scripts/
|
|
37
|
+
│ │ └── pm-mcp-server.mjs # MCP server launcher (repo → npx fallback)
|
|
38
|
+
│ └── README.md # User-facing installation guide
|
|
39
|
+
└── scripts/
|
|
40
|
+
└── smoke-claude-plugin.mjs # Full plugin smoke test (run in CI)
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
The MCP server itself lives at `src/mcp/server.ts` (compiled to `dist/mcp/server.js`) and is bundled with the npm package as the `pm-mcp` binary.
|
|
44
|
+
|
|
45
|
+
## MCP Server Tools
|
|
46
|
+
|
|
47
|
+
The server exposes 18 native tools that call pm library functions directly:
|
|
48
|
+
|
|
49
|
+
| Tool | pm Operation | Key Args |
|
|
50
|
+
|------|-------------|----------|
|
|
51
|
+
| `pm_context` | `pm context` | `options.limit`, `options.depth` |
|
|
52
|
+
| `pm_search` | `pm search` | `query` (required), `options.limit` |
|
|
53
|
+
| `pm_list` | `pm list` | `options.status`, `options.type`, `options.limit` |
|
|
54
|
+
| `pm_get` | `pm get` | `id` (required) |
|
|
55
|
+
| `pm_create` | `pm create` | `options.title`, `options.description`, `options.type` |
|
|
56
|
+
| `pm_update` | `pm update` | `id` (required), `options.*` |
|
|
57
|
+
| `pm_claim` | `pm claim` | `id` (required), `force` |
|
|
58
|
+
| `pm_release` | `pm release` | `id` (required), `force` |
|
|
59
|
+
| `pm_close` | `pm close` | `id` (required), `reason` (required) |
|
|
60
|
+
| `pm_comments` | `pm comments` | `id` (required), `options.add` |
|
|
61
|
+
| `pm_files` | `pm files` | `id` (required), `options.add`, `options.remove` |
|
|
62
|
+
| `pm_docs` | `pm docs` | `id` (required), `options.add`, `options.remove` |
|
|
63
|
+
| `pm_test` | `pm test` | `id` (required), `options.add`, `options.run` |
|
|
64
|
+
| `pm_validate` | `pm validate` | `options.checkResolution`, `options.checkFiles` |
|
|
65
|
+
| `pm_health` | `pm health` | `options.checkOnly` |
|
|
66
|
+
| `pm_contracts` | `pm contracts` | `options.command`, `options.json` |
|
|
67
|
+
| `pm_guide` | `pm guide` | `options.topic`, `options.depth` |
|
|
68
|
+
| `pm_run` | any pm action | `action` (required), `id`, `query`, `reason`, `options.*` |
|
|
69
|
+
|
|
70
|
+
All tools accept `cwd` (workspace directory), `path` (pm data root override), and `author` (mutation author).
|
|
71
|
+
|
|
72
|
+
## Installation Methods
|
|
73
|
+
|
|
74
|
+
### 1. Plugin marketplace (recommended — full feature set)
|
|
75
|
+
|
|
76
|
+
Add the pm-cli GitHub repo as a marketplace source, then install:
|
|
77
|
+
|
|
78
|
+
```
|
|
79
|
+
/plugin marketplace add unbraind/pm-cli
|
|
80
|
+
/plugin install pm-cli@pm-cli
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
This clones the repo, reads `.claude-plugin/marketplace.json` at the root, installs the plugin from `./plugins/pm-cli-claude/`, and configures the MCP server, 5 skills, 9 slash commands, and the session hook automatically.
|
|
84
|
+
|
|
85
|
+
### 2. Global MCP via Claude Code CLI (MCP tools only)
|
|
86
|
+
|
|
87
|
+
```bash
|
|
88
|
+
claude mcp add --transport stdio pm-cli-native -- npx -y @unbrained/pm-cli pm-mcp
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
Gives you the 18 MCP tools without skills or slash commands.
|
|
92
|
+
|
|
93
|
+
### 3. Direct project `.mcp.json` (project-scoped MCP only)
|
|
94
|
+
|
|
95
|
+
Add to the project's `.mcp.json`:
|
|
96
|
+
|
|
97
|
+
```json
|
|
98
|
+
{
|
|
99
|
+
"mcpServers": {
|
|
100
|
+
"pm-cli-native": {
|
|
101
|
+
"command": "node",
|
|
102
|
+
"args": ["./plugins/pm-cli-claude/scripts/pm-mcp-server.mjs"],
|
|
103
|
+
"env": { "PM_AUTHOR": "claude-code-agent" }
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
The repo root `.mcp.json` uses this approach — activates automatically when Claude Code opens this repository.
|
|
110
|
+
|
|
111
|
+
## MCP Server Launcher
|
|
112
|
+
|
|
113
|
+
`plugins/pm-cli-claude/scripts/pm-mcp-server.mjs` resolves the server in order:
|
|
114
|
+
|
|
115
|
+
1. `PM_CLI_MCP_SERVER` env var (explicit override)
|
|
116
|
+
2. `dist/mcp/server.js` walking up from the launcher (repo checkout)
|
|
117
|
+
3. `npx -y @unbrained/pm-cli@latest pm-mcp` (npm-installed fallback)
|
|
118
|
+
|
|
119
|
+
This means the plugin works both from a repo checkout and from an npm-cached plugin install.
|
|
120
|
+
|
|
121
|
+
## Session Start Hook
|
|
122
|
+
|
|
123
|
+
`hooks/session-start.mjs` runs at the start of each Claude Code session. It:
|
|
124
|
+
|
|
125
|
+
1. Checks for `.agents/pm/settings.json` in the current workspace.
|
|
126
|
+
2. Exits silently if pm is not initialized.
|
|
127
|
+
3. Runs `pm context --limit 5 --json` with a 5-second timeout.
|
|
128
|
+
4. Injects a compact status line into the session context.
|
|
129
|
+
|
|
130
|
+
Example injection:
|
|
131
|
+
```
|
|
132
|
+
pm tracker: 3 in_progress, 2 open
|
|
133
|
+
• [pm-xxxx] Fix authentication bug (in_progress)
|
|
134
|
+
• [pm-yyyy] Add calendar feature (in_progress)
|
|
135
|
+
• [pm-zzzz] Update docs (open)
|
|
136
|
+
Use pm_context tool or /pm-status for full details.
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
## Testing the Plugin
|
|
140
|
+
|
|
141
|
+
### Full Claude Code plugin smoke test (runs in CI)
|
|
142
|
+
|
|
143
|
+
```bash
|
|
144
|
+
node scripts/smoke-claude-plugin.mjs
|
|
145
|
+
# or:
|
|
146
|
+
pnpm smoke:claude-plugin
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
Verifies: file structure (23 files), manifest name consistency, MCP initialize, 18 tools present, full workflow (init → create → claim → update → link files/docs/tests → get → context → search → validate → health), and session-start hook.
|
|
150
|
+
|
|
151
|
+
### MCP server smoke test
|
|
152
|
+
|
|
153
|
+
```bash
|
|
154
|
+
node scripts/smoke-codex-plugin-mcp.mjs
|
|
155
|
+
# or:
|
|
156
|
+
pnpm smoke:codex-plugin
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
### Validate manifests
|
|
160
|
+
|
|
161
|
+
```bash
|
|
162
|
+
claude plugin validate .claude-plugin/marketplace.json
|
|
163
|
+
claude plugin validate plugins/pm-cli-claude/.claude-plugin/plugin.json
|
|
164
|
+
```
|
|
165
|
+
|
|
166
|
+
### Manual verification
|
|
167
|
+
|
|
168
|
+
After installing the plugin:
|
|
169
|
+
|
|
170
|
+
1. Start Claude Code: `claude` (in a pm-initialized directory)
|
|
171
|
+
2. Ask: "What's the current pm project status?"
|
|
172
|
+
→ Verify Claude uses `pm_context` (not Bash)
|
|
173
|
+
3. Try `/pm-status` — active items + calendar
|
|
174
|
+
4. Try `/pm-search authentication` — search results
|
|
175
|
+
5. Try `/pm-new Fix the login timeout bug` — duplicate-checked create
|
|
176
|
+
6. Try `/pm-start-task pm-xxxx` — claim and start
|
|
177
|
+
7. Try `/pm-calendar week` — upcoming deadlines
|
|
178
|
+
8. Try `/pm-close-task pm-xxxx` — verify, evidence, close
|
|
179
|
+
|
|
180
|
+
## Compatibility
|
|
181
|
+
|
|
182
|
+
| pm-cli version | Plugin version | Claude Code version |
|
|
183
|
+
|---------------|----------------|---------------------|
|
|
184
|
+
| 2026.5.x+ | 1.0.0 | Any current |
|
|
185
|
+
|
|
186
|
+
The MCP server uses JSON-RPC 2.0 over stdio with protocol version `2025-06-18`.
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# Codex Plugin
|
|
2
|
+
|
|
3
|
+
pm-cli ships a repo-local Codex plugin at [`plugins/pm-cli-codex`](../plugins/pm-cli-codex/README.md).
|
|
4
|
+
|
|
5
|
+
## Install From This Repo
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
codex plugin marketplace add .
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
Restart Codex and install **pm CLI** from the `pm CLI Local` marketplace.
|
|
12
|
+
|
|
13
|
+
## What It Provides
|
|
14
|
+
|
|
15
|
+
- `pm-cli-native` MCP server for structured pm operations without invoking the `pm` shell command
|
|
16
|
+
- narrow tools for common loops: context, search, list, get, create, update, claim, release, close, comments, files, docs, tests, validate, health, contracts, and guide
|
|
17
|
+
- `pm_run` for the rest of the pm surface, including calendar, activity, aggregate, dedupe-audit, normalize, reindex, extensions, templates, history, stats, gc, and test-runs controls
|
|
18
|
+
- skills for native tracking, audits, and release workflows
|
|
19
|
+
- command prompts for start, close, and audit flows
|
|
20
|
+
|
|
21
|
+
## Native MCP Notes
|
|
22
|
+
|
|
23
|
+
The plugin launcher uses the local repository build when `dist/mcp/server.js` is present. When the plugin is cached outside the repo, it falls back to:
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
npx -y @unbrained/pm-cli@latest pm-mcp
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
The fallback starts the package MCP server, not the `pm` CLI command. Tool calls import pm command modules and return JSON-compatible structured results.
|
|
30
|
+
|
|
31
|
+
## Safety
|
|
32
|
+
|
|
33
|
+
For real repository tracking, leave `path` unset so pm uses the repository `.agents/pm` root. For tests, use a sandbox `cwd` or `path` and isolate `PM_GLOBAL_PATH`.
|
package/docs/COMMANDS.md
CHANGED
|
@@ -6,12 +6,14 @@ This is a task-oriented command guide. For exact flags, use runtime help because
|
|
|
6
6
|
pm <command> --help
|
|
7
7
|
pm <command> --help --json
|
|
8
8
|
pm contracts --command <command> --flags-only --json
|
|
9
|
+
pm guide commands --depth standard
|
|
9
10
|
```
|
|
10
11
|
|
|
11
12
|
## Agent Quick Context
|
|
12
13
|
|
|
13
14
|
- Prefer `pm context`, `pm search`, and narrow list commands before mutation.
|
|
14
15
|
- Prefer TOON for reading and `--json` for strict parsing.
|
|
16
|
+
- Use `pm guide <topic>` for local docs routing before opening deeper pages.
|
|
15
17
|
- Use `pm contracts` for machine clients.
|
|
16
18
|
- Every mutation writes history.
|
|
17
19
|
|
|
@@ -30,7 +32,7 @@ Tracked documentation work: [pm-1sb2](../.agents/pm/tasks/pm-1sb2.toon).
|
|
|
30
32
|
| History | `history`, `activity`, `restore`, `stats` | inspect and recover item state |
|
|
31
33
|
| Calendar | `calendar`, `cal` | project deadlines, reminders, and events |
|
|
32
34
|
| Extensions | `extension`, extension command groups | install, manage, and run extension commands |
|
|
33
|
-
| Machines | `contracts`, `completion`, `help` |
|
|
35
|
+
| Machines | `guide`, `contracts`, `completion`, `help` | local docs routing plus command contracts and shell helpers |
|
|
34
36
|
|
|
35
37
|
## Bootstrap
|
|
36
38
|
|
|
@@ -118,11 +120,13 @@ pm release <id> --allow-audit-release --author <you>
|
|
|
118
120
|
|
|
119
121
|
```bash
|
|
120
122
|
pm comments <id> "Implemented command parsing fix."
|
|
123
|
+
printf '%s\n' '## Verification summary' '- Linux pass' '- macOS pass' | pm comments <id> --stdin
|
|
124
|
+
pm comments <id> --file docs/release-evidence.md
|
|
121
125
|
pm notes <id> --add "Keep renderer changes isolated to TOON output."
|
|
122
126
|
pm learnings <id> --add "Use runtime contracts instead of duplicating flag lists."
|
|
123
127
|
```
|
|
124
128
|
|
|
125
|
-
Use comments for progress and evidence, notes for implementation context, and learnings for durable future guidance.
|
|
129
|
+
Use comments for progress and evidence, notes for implementation context, and learnings for durable future guidance. For comments, choose exactly one input source (`[text]`, `--add`, `--stdin`, or `--file`) per invocation.
|
|
126
130
|
|
|
127
131
|
## Linked Artifacts
|
|
128
132
|
|
package/docs/CONFIGURATION.md
CHANGED
|
@@ -40,7 +40,7 @@ Precedence:
|
|
|
40
40
|
|---------|---------|
|
|
41
41
|
| `id_prefix` | generated item ID prefix, default `pm-` |
|
|
42
42
|
| `author_default` | fallback mutation author |
|
|
43
|
-
| `item_format` | `toon`
|
|
43
|
+
| `item_format` | item storage format (`toon` writes; legacy markdown is read/migrate only) |
|
|
44
44
|
| `output.default_format` | default renderer, usually `toon` |
|
|
45
45
|
| `locks.ttl_seconds` | stale lock threshold |
|
|
46
46
|
| `history.missing_stream` | `auto_create` or `strict_error` |
|
|
@@ -70,13 +70,7 @@ TOON is the default:
|
|
|
70
70
|
pm config project set item-format --format toon
|
|
71
71
|
```
|
|
72
72
|
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
```bash
|
|
76
|
-
pm config project set item-format --format json_markdown
|
|
77
|
-
```
|
|
78
|
-
|
|
79
|
-
Changing item format runs migration on item files. History stays JSONL.
|
|
73
|
+
Markdown item files are treated as legacy migration input only. Mutations always write TOON files, and history stays JSONL.
|
|
80
74
|
|
|
81
75
|
## Output Format
|
|
82
76
|
|
package/docs/EXTENSIONS.md
CHANGED
|
@@ -9,6 +9,7 @@ Extensions add commands, schema, renderers, importers/exporters, search adapters
|
|
|
9
9
|
- Declare only the capabilities your extension uses.
|
|
10
10
|
- Run `pm extension doctor --detail deep --trace` for activation failures.
|
|
11
11
|
- Use `--no-extensions` to isolate core behavior during incident triage.
|
|
12
|
+
- Use `pm guide extensions --depth standard` for local docs routing.
|
|
12
13
|
|
|
13
14
|
Tracked documentation work: [pm-1sb2](../.agents/pm/tasks/pm-1sb2.toon).
|
|
14
15
|
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
# Pi Native Package
|
|
2
|
+
|
|
3
|
+
pm-cli ships an official Pi package so Pi can use pm through a native extension instead of shelling out to the `pm` CLI.
|
|
4
|
+
|
|
5
|
+
## Install
|
|
6
|
+
|
|
7
|
+
After the package is published:
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
pi install npm:@unbrained/pm-cli
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
If you install an unscoped npm alias, use the same Pi syntax, for example `pi install npm:pm-cli`. The published package in this repository is `@unbrained/pm-cli`.
|
|
14
|
+
|
|
15
|
+
From a local checkout:
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
pnpm build
|
|
19
|
+
pi install -l .
|
|
20
|
+
# or try without writing settings
|
|
21
|
+
pi --no-extensions -e .
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
`pnpm build` is required for local checkouts because the Pi extension imports the compiled native integration from `dist/pi/native.js`.
|
|
25
|
+
|
|
26
|
+
## Package Resources
|
|
27
|
+
|
|
28
|
+
The root `package.json` declares the Pi manifest:
|
|
29
|
+
|
|
30
|
+
- `pi.extensions`: `.pi/extensions/pm-cli/index.js`
|
|
31
|
+
- `pi.skills`: `.pi/skills`
|
|
32
|
+
- `pi.prompts`: `.pi/prompts`
|
|
33
|
+
|
|
34
|
+
The extension registers:
|
|
35
|
+
|
|
36
|
+
- native `pm` tool using pm command modules directly, not the `pm` shell command
|
|
37
|
+
- `/pm-context`, `/pm-start`, `/pm-close`, and `/pm-actions` helper commands
|
|
38
|
+
- status footer entry `pm native`
|
|
39
|
+
|
|
40
|
+
## Native Tool Usage
|
|
41
|
+
|
|
42
|
+
Use the Pi `pm` tool with an `action` field. Examples:
|
|
43
|
+
|
|
44
|
+
```json
|
|
45
|
+
{ "action": "context", "limit": 10 }
|
|
46
|
+
{ "action": "search", "query": "pi extension", "limit": 10 }
|
|
47
|
+
{ "action": "start-task", "id": "pm-1234", "author": "pi-agent" }
|
|
48
|
+
{ "action": "files", "id": "pm-1234", "add": ["path=src/file.ts,scope=project,note=implementation"], "author": "pi-agent" }
|
|
49
|
+
{ "action": "close-task", "id": "pm-1234", "text": "Verified and complete", "author": "pi-agent", "validateClose": "warn" }
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
For real project tracking, leave `path` unset. For tests, set `path` to a sandbox pm root and isolate `PM_GLOBAL_PATH`.
|
|
53
|
+
|
|
54
|
+
## Supported Surface
|
|
55
|
+
|
|
56
|
+
The native integration covers the core pm action set exposed by the SDK contracts: init/config/extensions, item creation and lifecycle, list/search/context/calendar/activity, files/docs/deps/tests, validation/health/gc/contracts, templates, test-runs, and guide workflows.
|
package/docs/QUICKSTART.md
CHANGED
|
@@ -9,6 +9,7 @@ Use this page to get from a clean repository to a tracked, verified item.
|
|
|
9
9
|
- Claim before implementation.
|
|
10
10
|
- Link changed files, docs, and tests to the item.
|
|
11
11
|
- Close only after evidence is recorded.
|
|
12
|
+
- Use `pm guide quickstart` or `pm guide workflows` when you need local docs routing.
|
|
12
13
|
|
|
13
14
|
Tracked documentation work: [pm-1sb2](../.agents/pm/tasks/pm-1sb2.toon).
|
|
14
15
|
|
package/docs/README.md
CHANGED
|
@@ -2,6 +2,18 @@
|
|
|
2
2
|
|
|
3
3
|
This directory is the public documentation home for `pm-cli`. It is organized for progressive disclosure: read the smallest page that answers the current question, then follow links only when more detail is needed.
|
|
4
4
|
|
|
5
|
+
## CLI Guide Router
|
|
6
|
+
|
|
7
|
+
`pm guide` exposes the same documentation routes from inside the CLI:
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
pm guide
|
|
11
|
+
pm guide quickstart
|
|
12
|
+
pm guide commands --depth standard
|
|
13
|
+
pm guide sdk --depth deep --format markdown
|
|
14
|
+
pm guide release --json
|
|
15
|
+
```
|
|
16
|
+
|
|
5
17
|
## Read Path
|
|
6
18
|
|
|
7
19
|
| Reader | First page | Then read |
|
|
@@ -10,7 +22,9 @@ This directory is the public documentation home for `pm-cli`. It is organized fo
|
|
|
10
22
|
| Coding agent | [Agent Guide](AGENT_GUIDE.md) | [Configuration](CONFIGURATION.md), then command help |
|
|
11
23
|
| Maintainer | [Contributing](../CONTRIBUTING.md) | [Testing](TESTING.md), [Releasing](RELEASING.md), [Architecture](ARCHITECTURE.md) |
|
|
12
24
|
| Extension author | [Extensions](EXTENSIONS.md) | [SDK](SDK.md), [starter extension](examples/starter-extension/README.md) |
|
|
13
|
-
|
|
|
25
|
+
| Pi user | [Pi Package](PI_PACKAGE.md) | [Agent Guide](AGENT_GUIDE.md), then [Command Reference](COMMANDS.md) |
|
|
26
|
+
| Codex user | [Codex Plugin](CODEX_PLUGIN.md) | [Agent Guide](AGENT_GUIDE.md), then [Command Reference](COMMANDS.md) |
|
|
27
|
+
| Machine client | `pm guide commands` | [Command Reference](COMMANDS.md#machine-contracts), then `pm contracts --json` |
|
|
14
28
|
|
|
15
29
|
## Documentation Map
|
|
16
30
|
|
|
@@ -22,9 +36,24 @@ This directory is the public documentation home for `pm-cli`. It is organized fo
|
|
|
22
36
|
- [Architecture](ARCHITECTURE.md) - contributor internals: storage, mutation flow, search, extensions, and command contracts.
|
|
23
37
|
- [Extensions](EXTENSIONS.md) - runtime extension lifecycle and API reference.
|
|
24
38
|
- [SDK](SDK.md) - public import surfaces and typed authoring examples.
|
|
39
|
+
- [Pi Package](PI_PACKAGE.md) - official Pi package install, native tool, skills, prompts, and workflows.
|
|
40
|
+
- [Codex Plugin](CODEX_PLUGIN.md) - native MCP plugin install, tools, skills, and safety notes.
|
|
25
41
|
- [Releasing](RELEASING.md) - maintainer release checklist and failure handling.
|
|
26
42
|
- [starter extension](examples/starter-extension/README.md) - compact extension scaffold reference.
|
|
27
43
|
|
|
44
|
+
## Guide Topic Map
|
|
45
|
+
|
|
46
|
+
| `pm guide` topic | Primary docs |
|
|
47
|
+
|------------------|--------------|
|
|
48
|
+
| `quickstart` | [Quickstart](QUICKSTART.md), [Command Reference](COMMANDS.md) |
|
|
49
|
+
| `commands` | [Command Reference](COMMANDS.md), [Configuration](CONFIGURATION.md) |
|
|
50
|
+
| `workflows` | [Agent Guide](AGENT_GUIDE.md), [Testing](TESTING.md) |
|
|
51
|
+
| `sdk` | [SDK](SDK.md), [Architecture](ARCHITECTURE.md) |
|
|
52
|
+
| `extensions` | [Extensions](EXTENSIONS.md), [starter extension](examples/starter-extension/README.md) |
|
|
53
|
+
| `skills` | [Agent Guide](AGENT_GUIDE.md) plus `.agents/skills/*` |
|
|
54
|
+
| `harnesses` | [Agent Guide](AGENT_GUIDE.md) plus `.agents/skills/HARNESS_COMPATIBILITY.md` |
|
|
55
|
+
| `release` | [Releasing](RELEASING.md), [CHANGELOG](../CHANGELOG.md) |
|
|
56
|
+
|
|
28
57
|
Community files:
|
|
29
58
|
|
|
30
59
|
- [Contributing](../CONTRIBUTING.md)
|
package/docs/RELEASING.md
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
# Releasing `@unbrained/pm-cli`
|
|
2
2
|
|
|
3
3
|
This page is for maintainers cutting npm and GitHub releases. It assumes release work is tracked with `pm`.
|
|
4
|
+
For local progressive-disclosure routing, use `pm guide release`.
|
|
4
5
|
|
|
5
6
|
## Agent Quick Context
|
|
6
7
|
|
|
@@ -9,6 +10,7 @@ This page is for maintainers cutting npm and GitHub releases. It assumes release
|
|
|
9
10
|
- Publishing is owned by the tag-driven GitHub Actions release workflow.
|
|
10
11
|
- Do not run manual `npm publish`.
|
|
11
12
|
- Run local parity gates before pushing release tags.
|
|
13
|
+
- Use `pm guide release --json` for machine-readable release docs routing.
|
|
12
14
|
|
|
13
15
|
Tracked documentation work: [pm-1sb2](../.agents/pm/tasks/pm-1sb2.toon).
|
|
14
16
|
|
|
@@ -64,7 +66,7 @@ The pipeline performs:
|
|
|
64
66
|
|
|
65
67
|
1. change detection + one-release-per-day guard
|
|
66
68
|
2. version bump + changelog promotion from `[Unreleased]`
|
|
67
|
-
3. strict gates (build, typecheck, coverage, static quality, compatibility, security, smoke checks, reliability gate)
|
|
69
|
+
3. strict gates (build, typecheck, docs/skills freshness, coverage, static quality, compatibility, security, smoke checks, reliability gate)
|
|
68
70
|
4. release note generation from changelog + pm evidence
|
|
69
71
|
5. commit and tag creation (plus optional push)
|
|
70
72
|
|
|
@@ -85,7 +87,7 @@ Minimum coverage:
|
|
|
85
87
|
- parent and dependency links
|
|
86
88
|
- comments, notes, learnings, body, reminders, events
|
|
87
89
|
- linked files, docs, and tests
|
|
88
|
-
-
|
|
90
|
+
- legacy markdown item files (including external YAML wrappers before JSON front matter) migrating cleanly to TOON
|
|
89
91
|
- closed issue metadata and history drift checks
|
|
90
92
|
- current-build write mutation and item-count preservation
|
|
91
93
|
|
package/docs/SDK.md
CHANGED
|
@@ -7,6 +7,7 @@ The public SDK is exported from `@unbrained/pm-cli/sdk`. Use it for extension au
|
|
|
7
7
|
- Primary import: `@unbrained/pm-cli/sdk`.
|
|
8
8
|
- Runtime extension lifecycle is documented in [Extensions](EXTENSIONS.md).
|
|
9
9
|
- Exact command/action contracts are available through `pm contracts`.
|
|
10
|
+
- Local deep-dive routing is available through `pm guide sdk --depth deep`.
|
|
10
11
|
|
|
11
12
|
Tracked documentation work: [pm-1sb2](../.agents/pm/tasks/pm-1sb2.toon).
|
|
12
13
|
|
|
@@ -144,8 +145,8 @@ export default defineExtension({
|
|
|
144
145
|
name: "example-search",
|
|
145
146
|
async query(context) {
|
|
146
147
|
return context.documents
|
|
147
|
-
.filter((doc) => doc.
|
|
148
|
-
.map((doc) => ({ id: doc.
|
|
148
|
+
.filter((doc) => doc.metadata.title?.toLowerCase().includes(context.query.toLowerCase()))
|
|
149
|
+
.map((doc) => ({ id: doc.metadata.id, score: 0.5, matched_fields: ["title"] }));
|
|
149
150
|
},
|
|
150
151
|
});
|
|
151
152
|
},
|