@blxzer/pactile 0.5.0 → 0.6.0-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +612 -563
- package/LICENSE +235 -235
- package/README.md +108 -105
- package/README.zh-CN.md +105 -105
- package/bin/compat-warning.js +11 -11
- package/bin/cstl.js +6 -6
- package/bin/pactile.js +3 -3
- package/bin/smart-search.js +38 -38
- package/dist/cli/index.d.ts.map +1 -1
- package/dist/cli/index.js +79 -30
- package/dist/cli/index.js.map +1 -1
- package/dist/commands/codex.d.ts +3 -0
- package/dist/commands/codex.d.ts.map +1 -0
- package/dist/commands/codex.js +54 -0
- package/dist/commands/codex.js.map +1 -0
- package/dist/commands/context.d.ts +3 -0
- package/dist/commands/context.d.ts.map +1 -0
- package/dist/commands/context.js +272 -0
- package/dist/commands/context.js.map +1 -0
- package/dist/commands/init.d.ts +0 -20
- package/dist/commands/init.d.ts.map +1 -1
- package/dist/commands/init.js +285 -456
- package/dist/commands/init.js.map +1 -1
- package/dist/commands/migrate.js +1 -1
- package/dist/commands/migrate.js.map +1 -1
- package/dist/commands/parallel.d.ts +2 -0
- package/dist/commands/parallel.d.ts.map +1 -0
- package/dist/commands/parallel.js +26 -0
- package/dist/commands/parallel.js.map +1 -0
- package/dist/commands/pi.d.ts +3 -0
- package/dist/commands/pi.d.ts.map +1 -0
- package/dist/commands/pi.js +94 -0
- package/dist/commands/pi.js.map +1 -0
- package/dist/commands/session.d.ts +2 -0
- package/dist/commands/session.d.ts.map +1 -0
- package/dist/commands/session.js +169 -0
- package/dist/commands/session.js.map +1 -0
- package/dist/commands/task.d.ts +3 -0
- package/dist/commands/task.d.ts.map +1 -0
- package/dist/commands/task.js +1026 -0
- package/dist/commands/task.js.map +1 -0
- package/dist/commands/update.d.ts +3 -1
- package/dist/commands/update.d.ts.map +1 -1
- package/dist/commands/update.js +130 -47
- package/dist/commands/update.js.map +1 -1
- package/dist/commands/workflow.d.ts.map +1 -1
- package/dist/commands/workflow.js +1 -2
- package/dist/commands/workflow.js.map +1 -1
- package/dist/configurators/index.d.ts +5 -51
- package/dist/configurators/index.d.ts.map +1 -1
- package/dist/configurators/index.js +9 -140
- package/dist/configurators/index.js.map +1 -1
- package/dist/configurators/shared.d.ts +7 -66
- package/dist/configurators/shared.d.ts.map +1 -1
- package/dist/configurators/shared.js +17 -262
- package/dist/configurators/shared.js.map +1 -1
- package/dist/configurators/workflow.d.ts +5 -6
- package/dist/configurators/workflow.d.ts.map +1 -1
- package/dist/configurators/workflow.js +11 -39
- package/dist/configurators/workflow.js.map +1 -1
- package/dist/constants/paths.d.ts +1 -5
- package/dist/constants/paths.d.ts.map +1 -1
- package/dist/constants/paths.js +1 -5
- package/dist/constants/paths.js.map +1 -1
- package/dist/core/compat/environment.d.ts +43 -0
- package/dist/core/compat/environment.d.ts.map +1 -0
- package/dist/core/compat/environment.js +91 -0
- package/dist/core/compat/environment.js.map +1 -0
- package/dist/core/compat/index.d.ts +2 -0
- package/dist/core/compat/index.d.ts.map +1 -0
- package/dist/core/compat/index.js +2 -0
- package/dist/core/compat/index.js.map +1 -0
- package/dist/core/index.d.ts +4 -0
- package/dist/core/index.d.ts.map +1 -0
- package/dist/core/index.js +6 -0
- package/dist/core/index.js.map +1 -0
- package/dist/core/pactile/capability.d.ts +65 -0
- package/dist/core/pactile/capability.d.ts.map +1 -0
- package/dist/core/pactile/capability.js +199 -0
- package/dist/core/pactile/capability.js.map +1 -0
- package/dist/core/pactile/index.d.ts +15 -0
- package/dist/core/pactile/index.d.ts.map +1 -0
- package/dist/core/pactile/index.js +13 -0
- package/dist/core/pactile/index.js.map +1 -0
- package/dist/core/pactile/lifecycle.d.ts +106 -0
- package/dist/core/pactile/lifecycle.d.ts.map +1 -0
- package/dist/core/pactile/lifecycle.js +607 -0
- package/dist/core/pactile/lifecycle.js.map +1 -0
- package/dist/core/pactile/middleware/index.d.ts +3 -0
- package/dist/core/pactile/middleware/index.d.ts.map +1 -0
- package/dist/core/pactile/middleware/index.js +2 -0
- package/dist/core/pactile/middleware/index.js.map +1 -0
- package/dist/core/pactile/middleware/redaction.d.ts +4 -0
- package/dist/core/pactile/middleware/redaction.d.ts.map +1 -0
- package/dist/core/pactile/middleware/redaction.js +34 -0
- package/dist/core/pactile/middleware/redaction.js.map +1 -0
- package/dist/core/pactile/middleware/resolver.d.ts +62 -0
- package/dist/core/pactile/middleware/resolver.d.ts.map +1 -0
- package/dist/core/pactile/middleware/resolver.js +803 -0
- package/dist/core/pactile/middleware/resolver.js.map +1 -0
- package/dist/core/pactile/projection.d.ts +81 -0
- package/dist/core/pactile/projection.d.ts.map +1 -0
- package/dist/core/pactile/projection.js +399 -0
- package/dist/core/pactile/projection.js.map +1 -0
- package/dist/core/pactile/provider.d.ts +81 -0
- package/dist/core/pactile/provider.d.ts.map +1 -0
- package/dist/core/pactile/provider.js +313 -0
- package/dist/core/pactile/provider.js.map +1 -0
- package/dist/core/pactile/runtime.d.ts +56 -0
- package/dist/core/pactile/runtime.d.ts.map +1 -0
- package/dist/core/pactile/runtime.js +176 -0
- package/dist/core/pactile/runtime.js.map +1 -0
- package/dist/core/pactile/tile-compiler-types.d.ts +32 -0
- package/dist/core/pactile/tile-compiler-types.d.ts.map +1 -0
- package/dist/core/pactile/tile-compiler-types.js +2 -0
- package/dist/core/pactile/tile-compiler-types.js.map +1 -0
- package/dist/core/pactile/tile.d.ts +71 -0
- package/dist/core/pactile/tile.d.ts.map +1 -0
- package/dist/core/pactile/tile.js +228 -0
- package/dist/core/pactile/tile.js.map +1 -0
- package/dist/core/pactile/trace-runtime/index.d.ts +38 -0
- package/dist/core/pactile/trace-runtime/index.d.ts.map +1 -0
- package/dist/core/pactile/trace-runtime/index.js +292 -0
- package/dist/core/pactile/trace-runtime/index.js.map +1 -0
- package/dist/core/pactile/trace.d.ts +42 -0
- package/dist/core/pactile/trace.d.ts.map +1 -0
- package/dist/core/pactile/trace.js +221 -0
- package/dist/core/pactile/trace.js.map +1 -0
- package/dist/core/pactile/validation.d.ts +91 -0
- package/dist/core/pactile/validation.d.ts.map +1 -0
- package/dist/core/pactile/validation.js +301 -0
- package/dist/core/pactile/validation.js.map +1 -0
- package/dist/core/task/adapter-middleware.d.ts +122 -0
- package/dist/core/task/adapter-middleware.d.ts.map +1 -0
- package/dist/core/task/adapter-middleware.js +476 -0
- package/dist/core/task/adapter-middleware.js.map +1 -0
- package/dist/core/task/compat.d.ts +7 -0
- package/dist/core/task/compat.d.ts.map +1 -0
- package/dist/core/task/compat.js +2 -0
- package/dist/core/task/compat.js.map +1 -0
- package/dist/core/task/contract-migrate.d.ts +29 -0
- package/dist/core/task/contract-migrate.d.ts.map +1 -0
- package/dist/core/task/contract-migrate.js +207 -0
- package/dist/core/task/contract-migrate.js.map +1 -0
- package/dist/core/task/full-quality.d.ts +89 -0
- package/dist/core/task/full-quality.d.ts.map +1 -0
- package/dist/core/task/full-quality.js +379 -0
- package/dist/core/task/full-quality.js.map +1 -0
- package/dist/core/task/index.d.ts +32 -0
- package/dist/core/task/index.d.ts.map +1 -0
- package/dist/core/task/index.js +20 -0
- package/dist/core/task/index.js.map +1 -0
- package/dist/core/task/kernel-cli.d.ts +51 -0
- package/dist/core/task/kernel-cli.d.ts.map +1 -0
- package/dist/core/task/kernel-cli.js +301 -0
- package/dist/core/task/kernel-cli.js.map +1 -0
- package/dist/core/task/kernel-contract.d.ts +164 -0
- package/dist/core/task/kernel-contract.d.ts.map +1 -0
- package/dist/core/task/kernel-contract.js +475 -0
- package/dist/core/task/kernel-contract.js.map +1 -0
- package/dist/core/task/kernel-store.d.ts +130 -0
- package/dist/core/task/kernel-store.d.ts.map +1 -0
- package/dist/core/task/kernel-store.js +905 -0
- package/dist/core/task/kernel-store.js.map +1 -0
- package/dist/core/task/kernel-surface.d.ts +70 -0
- package/dist/core/task/kernel-surface.d.ts.map +1 -0
- package/dist/core/task/kernel-surface.js +121 -0
- package/dist/core/task/kernel-surface.js.map +1 -0
- package/dist/core/task/lite-context-pack.d.ts +71 -0
- package/dist/core/task/lite-context-pack.d.ts.map +1 -0
- package/dist/core/task/lite-context-pack.js +175 -0
- package/dist/core/task/lite-context-pack.js.map +1 -0
- package/dist/core/task/ondemand-topology.d.ts +108 -0
- package/dist/core/task/ondemand-topology.d.ts.map +1 -0
- package/dist/core/task/ondemand-topology.js +456 -0
- package/dist/core/task/ondemand-topology.js.map +1 -0
- package/dist/core/task/p36-artifact-migrate.d.ts +58 -0
- package/dist/core/task/p36-artifact-migrate.d.ts.map +1 -0
- package/dist/core/task/p36-artifact-migrate.js +293 -0
- package/dist/core/task/p36-artifact-migrate.js.map +1 -0
- package/dist/core/task/p36-wave-c.d.ts +39 -0
- package/dist/core/task/p36-wave-c.d.ts.map +1 -0
- package/dist/core/task/p36-wave-c.js +100 -0
- package/dist/core/task/p36-wave-c.js.map +1 -0
- package/dist/core/task/paths.d.ts +37 -0
- package/dist/core/task/paths.d.ts.map +1 -0
- package/dist/core/task/paths.js +49 -0
- package/dist/core/task/paths.js.map +1 -0
- package/dist/core/task/phase.d.ts +27 -0
- package/dist/core/task/phase.d.ts.map +1 -0
- package/dist/core/task/phase.js +24 -0
- package/dist/core/task/phase.js.map +1 -0
- package/dist/core/task/records.d.ts +48 -0
- package/dist/core/task/records.d.ts.map +1 -0
- package/dist/core/task/records.js +100 -0
- package/dist/core/task/records.js.map +1 -0
- package/dist/core/task/schema.d.ts +77 -0
- package/dist/core/task/schema.d.ts.map +1 -0
- package/dist/core/task/schema.js +220 -0
- package/dist/core/task/schema.js.map +1 -0
- package/dist/core/testing/index.d.ts +2 -0
- package/dist/core/testing/index.d.ts.map +1 -0
- package/dist/core/testing/index.js +4 -0
- package/dist/core/testing/index.js.map +1 -0
- package/dist/migrations/manifests/0.1.0.json +9 -9
- package/dist/migrations/manifests/0.1.1.json +9 -9
- package/dist/migrations/manifests/0.1.2.json +9 -9
- package/dist/migrations/manifests/0.1.3.json +9 -9
- package/dist/migrations/manifests/0.1.4.json +9 -9
- package/dist/migrations/manifests/0.2.1.json +9 -9
- package/dist/migrations/manifests/0.2.10.json +374 -374
- package/dist/migrations/manifests/0.2.2.json +8 -8
- package/dist/migrations/manifests/0.2.3.json +9 -9
- package/dist/migrations/manifests/0.2.4.json +8 -8
- package/dist/migrations/manifests/0.2.5.json +8 -8
- package/dist/migrations/manifests/0.2.6.json +8 -8
- package/dist/migrations/manifests/0.2.7.json +8 -8
- package/dist/migrations/manifests/0.2.8.json +9 -9
- package/dist/migrations/manifests/0.2.9.json +9 -9
- package/dist/migrations/manifests/0.3.0.json +89 -89
- package/dist/migrations/manifests/0.3.1.json +32 -32
- package/dist/migrations/manifests/0.3.2.json +16 -16
- package/dist/migrations/manifests/0.3.3.json +9 -9
- package/dist/migrations/manifests/0.3.4.json +9 -9
- package/dist/migrations/manifests/0.3.5.json +9 -9
- package/dist/migrations/manifests/0.3.6.json +9 -9
- package/dist/migrations/manifests/0.4.0.json +9 -9
- package/dist/migrations/manifests/0.4.1.json +9 -9
- package/dist/migrations/manifests/0.4.2.json +9 -9
- package/dist/migrations/manifests/0.4.3.json +9 -9
- package/dist/migrations/manifests/0.5.0-beta.0.json +9 -9
- package/dist/migrations/manifests/0.5.0-beta.1.json +9 -9
- package/dist/migrations/manifests/0.5.0-beta.2.json +8 -8
- package/dist/migrations/manifests/0.5.0-beta.3.json +8 -8
- package/dist/migrations/manifests/0.5.0-beta.4.json +9 -9
- package/dist/migrations/manifests/0.5.0-beta.5.json +9 -9
- package/dist/migrations/manifests/0.5.0.json +9 -0
- package/dist/migrations/manifests/0.6.0-beta.1.json +35 -0
- package/dist/migrations/manifests/0.6.0-beta.2.json +9 -0
- package/dist/migrations/manifests/0.6.0.json +9 -0
- package/dist/pactile/adapters/codex/index.js +1 -1
- package/dist/pactile/adapters/codex/index.js.map +1 -1
- package/dist/pactile/adapters/index.d.ts +0 -1
- package/dist/pactile/adapters/index.d.ts.map +1 -1
- package/dist/pactile/adapters/index.js +0 -1
- package/dist/pactile/adapters/index.js.map +1 -1
- package/dist/pactile/adoption/bindings.d.ts +1 -1
- package/dist/pactile/adoption/bindings.d.ts.map +1 -1
- package/dist/pactile/adoption/bindings.js +1 -1
- package/dist/pactile/adoption/bindings.js.map +1 -1
- package/dist/pactile/adoption/inventory.d.ts +1 -1
- package/dist/pactile/adoption/inventory.d.ts.map +1 -1
- package/dist/pactile/adoption/inventory.js +1 -1
- package/dist/pactile/adoption/inventory.js.map +1 -1
- package/dist/pactile/adoption/safety.js +1 -1
- package/dist/pactile/adoption/safety.js.map +1 -1
- package/dist/pactile/adoption/workflow.d.ts +1 -1
- package/dist/pactile/adoption/workflow.d.ts.map +1 -1
- package/dist/pactile/adoption/workflow.js +1 -1
- package/dist/pactile/adoption/workflow.js.map +1 -1
- package/dist/pactile/codex/bridge.d.ts +71 -0
- package/dist/pactile/codex/bridge.d.ts.map +1 -0
- package/dist/pactile/codex/bridge.js +271 -0
- package/dist/pactile/codex/bridge.js.map +1 -0
- package/dist/pactile/compat/init-context.js +1 -1
- package/dist/pactile/compat/init-context.js.map +1 -1
- package/dist/pactile/compat/node-entry-migration.d.ts +3 -0
- package/dist/pactile/compat/node-entry-migration.d.ts.map +1 -0
- package/dist/pactile/compat/node-entry-migration.js +25 -0
- package/dist/pactile/compat/node-entry-migration.js.map +1 -0
- package/dist/pactile/exit/receipt.js +1 -1
- package/dist/pactile/exit/receipt.js.map +1 -1
- package/dist/pactile/exit/service.d.ts +1 -1
- package/dist/pactile/exit/service.d.ts.map +1 -1
- package/dist/pactile/exit/service.js +1 -3
- package/dist/pactile/exit/service.js.map +1 -1
- package/dist/pactile/lifecycle/command-runner.d.ts +1 -1
- package/dist/pactile/lifecycle/command-runner.d.ts.map +1 -1
- package/dist/pactile/lifecycle/command-runner.js +1 -3
- package/dist/pactile/lifecycle/command-runner.js.map +1 -1
- package/dist/pactile/lifecycle/default-adapters.d.ts.map +1 -1
- package/dist/pactile/lifecycle/default-adapters.js +8 -32
- package/dist/pactile/lifecycle/default-adapters.js.map +1 -1
- package/dist/pactile/lifecycle/orchestrator.d.ts +1 -1
- package/dist/pactile/lifecycle/orchestrator.d.ts.map +1 -1
- package/dist/pactile/lifecycle/orchestrator.js +1 -1
- package/dist/pactile/lifecycle/orchestrator.js.map +1 -1
- package/dist/pactile/lifecycle/project-files.d.ts.map +1 -1
- package/dist/pactile/lifecycle/project-files.js +4 -1
- package/dist/pactile/lifecycle/project-files.js.map +1 -1
- package/dist/pactile/middleware/manifest-loader.d.ts +1 -1
- package/dist/pactile/middleware/manifest-loader.d.ts.map +1 -1
- package/dist/pactile/middleware/manifest-loader.js +1 -1
- package/dist/pactile/middleware/manifest-loader.js.map +1 -1
- package/dist/pactile/migration/transaction.d.ts +1 -1
- package/dist/pactile/migration/transaction.d.ts.map +1 -1
- package/dist/pactile/migration/transaction.js +1 -1
- package/dist/pactile/migration/transaction.js.map +1 -1
- package/dist/pactile/parallel/batch.d.ts +41 -0
- package/dist/pactile/parallel/batch.d.ts.map +1 -0
- package/dist/pactile/parallel/batch.js +190 -0
- package/dist/pactile/parallel/batch.js.map +1 -0
- package/dist/pactile/parallel/policy.d.ts +18 -0
- package/dist/pactile/parallel/policy.d.ts.map +1 -0
- package/dist/pactile/parallel/policy.js +174 -0
- package/dist/pactile/parallel/policy.js.map +1 -0
- package/dist/pactile/pi/bridge.d.ts +51 -0
- package/dist/pactile/pi/bridge.d.ts.map +1 -0
- package/dist/pactile/pi/bridge.js +353 -0
- package/dist/pactile/pi/bridge.js.map +1 -0
- package/dist/pactile/pi/rpc.d.ts +41 -0
- package/dist/pactile/pi/rpc.d.ts.map +1 -0
- package/dist/pactile/pi/rpc.js +219 -0
- package/dist/pactile/pi/rpc.js.map +1 -0
- package/dist/pactile/projection/planner.d.ts +1 -1
- package/dist/pactile/projection/planner.d.ts.map +1 -1
- package/dist/pactile/projection/planner.js +1 -1
- package/dist/pactile/projection/planner.js.map +1 -1
- package/dist/pactile/projection/shared/index.js +1 -1
- package/dist/pactile/projection/shared/index.js.map +1 -1
- package/dist/pactile/projection/store.js +1 -1
- package/dist/pactile/projection/store.js.map +1 -1
- package/dist/pactile/providers/probes.d.ts +2 -2
- package/dist/pactile/providers/probes.d.ts.map +1 -1
- package/dist/pactile/providers/probes.js +0 -6
- package/dist/pactile/providers/probes.js.map +1 -1
- package/dist/pactile/registry.d.ts +1 -8
- package/dist/pactile/registry.d.ts.map +1 -1
- package/dist/pactile/registry.js +8 -25
- package/dist/pactile/registry.js.map +1 -1
- package/dist/pactile/retrieval/envelope.d.ts +19 -0
- package/dist/pactile/retrieval/envelope.d.ts.map +1 -0
- package/dist/pactile/retrieval/envelope.js +115 -0
- package/dist/pactile/retrieval/envelope.js.map +1 -0
- package/dist/pactile/retrieval/evidence.js +1 -1
- package/dist/pactile/retrieval/evidence.js.map +1 -1
- package/dist/pactile/retrieval/pack.d.ts +9 -0
- package/dist/pactile/retrieval/pack.d.ts.map +1 -0
- package/dist/pactile/retrieval/pack.js +300 -0
- package/dist/pactile/retrieval/pack.js.map +1 -0
- package/dist/pactile/retrieval/planner.d.ts +1 -1
- package/dist/pactile/retrieval/planner.d.ts.map +1 -1
- package/dist/pactile/retrieval/planner.js +1 -1
- package/dist/pactile/retrieval/planner.js.map +1 -1
- package/dist/pactile/retrieval/types.d.ts +1 -1
- package/dist/pactile/retrieval/types.d.ts.map +1 -1
- package/dist/pactile/runtime/json-api.d.ts +1 -1
- package/dist/pactile/runtime/json-api.js +1 -1
- package/dist/pactile/runtime/paths.js +1 -1
- package/dist/pactile/runtime/paths.js.map +1 -1
- package/dist/pactile/runtime/stores.d.ts +1 -1
- package/dist/pactile/runtime/stores.d.ts.map +1 -1
- package/dist/pactile/runtime/stores.js +1 -1
- package/dist/pactile/runtime/stores.js.map +1 -1
- package/dist/pactile/runtime/unicode-nfc-data.d.ts +1 -1
- package/dist/pactile/runtime/unicode-nfc-data.js +1 -1
- package/dist/pactile/task/config.d.ts +9 -0
- package/dist/pactile/task/config.d.ts.map +1 -0
- package/dist/pactile/task/config.js +103 -0
- package/dist/pactile/task/config.js.map +1 -0
- package/dist/pactile/task/context.d.ts +19 -0
- package/dist/pactile/task/context.d.ts.map +1 -0
- package/dist/pactile/task/context.js +117 -0
- package/dist/pactile/task/context.js.map +1 -0
- package/dist/pactile/task/guards.d.ts +21 -0
- package/dist/pactile/task/guards.d.ts.map +1 -0
- package/dist/pactile/task/guards.js +232 -0
- package/dist/pactile/task/guards.js.map +1 -0
- package/dist/pactile/task/scaffold.d.ts +6 -0
- package/dist/pactile/task/scaffold.d.ts.map +1 -0
- package/dist/pactile/task/scaffold.js +57 -0
- package/dist/pactile/task/scaffold.js.map +1 -0
- package/dist/pactile/task/session-memory.d.ts +2 -0
- package/dist/pactile/task/session-memory.d.ts.map +1 -0
- package/dist/pactile/task/session-memory.js +123 -0
- package/dist/pactile/task/session-memory.js.map +1 -0
- package/dist/pactile/task/session-pack.d.ts +3 -0
- package/dist/pactile/task/session-pack.d.ts.map +1 -0
- package/dist/pactile/task/session-pack.js +139 -0
- package/dist/pactile/task/session-pack.js.map +1 -0
- package/dist/pactile/task/session.d.ts +13 -0
- package/dist/pactile/task/session.d.ts.map +1 -0
- package/dist/pactile/task/session.js +105 -0
- package/dist/pactile/task/session.js.map +1 -0
- package/dist/pactile/task/strategy.d.ts +24 -0
- package/dist/pactile/task/strategy.d.ts.map +1 -0
- package/dist/pactile/task/strategy.js +136 -0
- package/dist/pactile/task/strategy.js.map +1 -0
- package/dist/pactile/task/task-map.d.ts +35 -0
- package/dist/pactile/task/task-map.d.ts.map +1 -0
- package/dist/pactile/task/task-map.js +217 -0
- package/dist/pactile/task/task-map.js.map +1 -0
- package/dist/pactile/task/workflow-phase.d.ts +3 -0
- package/dist/pactile/task/workflow-phase.d.ts.map +1 -0
- package/dist/pactile/task/workflow-phase.js +56 -0
- package/dist/pactile/task/workflow-phase.js.map +1 -0
- package/dist/pactile/tiles/catalog.d.ts +1 -1
- package/dist/pactile/tiles/catalog.d.ts.map +1 -1
- package/dist/pactile/tiles/catalog.js +1 -1
- package/dist/pactile/tiles/catalog.js.map +1 -1
- package/dist/pactile/tiles/compiler.d.ts +1 -1
- package/dist/pactile/tiles/compiler.d.ts.map +1 -1
- package/dist/pactile/tiles/compiler.js +1 -1
- package/dist/pactile/tiles/compiler.js.map +1 -1
- package/dist/pactile/tiles/content/ondemand/index.d.ts +2 -2
- package/dist/pactile/tiles/content/ondemand/index.d.ts.map +1 -1
- package/dist/pactile/tiles/content/ondemand/index.js +2 -16
- package/dist/pactile/tiles/content/ondemand/index.js.map +1 -1
- package/dist/pactile/tiles/loader.d.ts +1 -1
- package/dist/pactile/tiles/loader.d.ts.map +1 -1
- package/dist/pactile/tiles/loader.js +1 -1
- package/dist/pactile/tiles/loader.js.map +1 -1
- package/dist/templates/common/bundled-skills/pactile-check/SKILL.md +161 -161
- package/dist/templates/common/bundled-skills/pactile-check/references/fowler-12-smells.md +28 -28
- package/dist/templates/common/bundled-skills/pactile-handoff/SKILL.md +117 -117
- package/dist/templates/common/bundled-skills/pactile-meta/SKILL.md +75 -75
- package/dist/templates/common/bundled-skills/pactile-meta/references/customize-local/add-project-local-conventions.md +83 -83
- package/dist/templates/common/bundled-skills/pactile-meta/references/customize-local/change-agents.md +5 -47
- package/dist/templates/common/bundled-skills/pactile-meta/references/customize-local/change-context-loading.md +79 -84
- package/dist/templates/common/bundled-skills/pactile-meta/references/customize-local/change-hooks.md +5 -57
- package/dist/templates/common/bundled-skills/pactile-meta/references/customize-local/change-skills-or-commands.md +7 -77
- package/dist/templates/common/bundled-skills/pactile-meta/references/customize-local/change-spec-structure.md +83 -83
- package/dist/templates/common/bundled-skills/pactile-meta/references/customize-local/change-task-lifecycle.md +82 -88
- package/dist/templates/common/bundled-skills/pactile-meta/references/customize-local/change-workflow.md +65 -65
- package/dist/templates/common/bundled-skills/pactile-meta/references/customize-local/overview.md +12 -55
- package/dist/templates/common/bundled-skills/pactile-meta/references/local-architecture/context-injection.md +68 -68
- package/dist/templates/common/bundled-skills/pactile-meta/references/local-architecture/generated-files.md +7 -83
- package/dist/templates/common/bundled-skills/pactile-meta/references/local-architecture/overview.md +7 -51
- package/dist/templates/common/bundled-skills/pactile-meta/references/local-architecture/spec-system.md +102 -102
- package/dist/templates/common/bundled-skills/pactile-meta/references/local-architecture/task-system.md +138 -133
- package/dist/templates/common/bundled-skills/pactile-meta/references/local-architecture/workflow.md +75 -75
- package/dist/templates/common/bundled-skills/pactile-meta/references/local-architecture/workspace-memory.md +71 -71
- package/dist/templates/common/bundled-skills/pactile-meta/references/platform-files/agents.md +7 -69
- package/dist/templates/common/bundled-skills/pactile-meta/references/platform-files/hooks-and-settings.md +7 -59
- package/dist/templates/common/bundled-skills/pactile-meta/references/platform-files/overview.md +5 -45
- package/dist/templates/common/bundled-skills/pactile-meta/references/platform-files/platform-map.md +9 -45
- package/dist/templates/common/bundled-skills/pactile-meta/references/platform-files/skills-and-commands.md +7 -108
- package/dist/templates/common/bundled-skills/pactile-micro-grill/SKILL.md +68 -68
- package/dist/templates/common/bundled-skills/pactile-skill-creator/SKILL.md +47 -47
- package/dist/templates/common/bundled-skills/pactile-skill-creator/references/authoring-rules.md +170 -170
- package/dist/templates/common/bundled-skills/pactile-skill-creator/references/general-authoring.md +189 -189
- package/dist/templates/common/bundled-skills/pactile-skill-creator/references/pactile-skill-locations.md +11 -52
- package/dist/templates/common/bundled-skills/pactile-skill-creator/references/review-checklist.md +52 -52
- package/dist/templates/common/bundled-skills/pactile-spec-bootstrap/SKILL.md +41 -41
- package/dist/templates/common/bundled-skills/pactile-spec-bootstrap/references/mcp-setup.md +18 -90
- package/dist/templates/common/bundled-skills/pactile-spec-bootstrap/references/repository-analysis.md +41 -59
- package/dist/templates/common/bundled-skills/pactile-spec-bootstrap/references/spec-task-planning.md +61 -61
- package/dist/templates/common/bundled-skills/pactile-spec-bootstrap/references/spec-writing.md +70 -70
- package/dist/templates/common/bundled-skills/smart-search-cli/SKILL.md +393 -393
- package/dist/templates/common/bundled-skills/smart-search-cli/agents/openai.yaml +3 -3
- package/dist/templates/common/bundled-skills/smart-search-cli/examples/batch-search.md +98 -98
- package/dist/templates/common/bundled-skills/smart-search-cli/examples/evidence-gathering.md +89 -89
- package/dist/templates/common/bundled-skills/smart-search-cli/references/cli-contract.md +323 -323
- package/dist/templates/common/commands/continue.md +60 -62
- package/dist/templates/common/commands/finish-work.md +84 -82
- package/dist/templates/common/commands/start.md +66 -66
- package/dist/templates/common/index.d.ts +0 -20
- package/dist/templates/common/index.d.ts.map +1 -1
- package/dist/templates/common/index.js +0 -16
- package/dist/templates/common/index.js.map +1 -1
- package/dist/templates/common/skills/before-dev.md +35 -35
- package/dist/templates/common/skills/brainstorm.md +204 -204
- package/dist/templates/common/skills/break-loop.md +125 -125
- package/dist/templates/common/skills/update-spec.md +363 -363
- package/dist/templates/extract.d.ts +1 -8
- package/dist/templates/extract.d.ts.map +1 -1
- package/dist/templates/extract.js +0 -31
- package/dist/templates/extract.js.map +1 -1
- package/dist/templates/markdown/agents.md +14 -14
- package/dist/templates/markdown/framework/artifact-locale-guide.md.txt +93 -93
- package/dist/templates/markdown/framework/codex-worker-dispatch.md.txt +9 -0
- package/dist/templates/markdown/framework/dogfood-only-surfaces.md.txt +7 -28
- package/dist/templates/markdown/framework/execution-strategy.md.txt +14 -45
- package/dist/templates/markdown/framework/index.md.txt +20 -31
- package/dist/templates/markdown/framework/injection-budget-guide.md.txt +7 -111
- package/dist/templates/markdown/framework/middleware-protocol.md.txt +139 -238
- package/dist/templates/markdown/framework/parallel-first-execution.md.txt +116 -116
- package/dist/templates/markdown/framework/prd-grill-frontier.md.txt +105 -105
- package/dist/templates/markdown/framework/release-boundary.md.txt +30 -30
- package/dist/templates/markdown/framework/retrieval-daily-guide.md.txt +9 -199
- package/dist/templates/markdown/framework/upgrade.md.txt +15 -15
- package/dist/templates/markdown/framework/verification-strength-guide.md.txt +185 -185
- package/dist/templates/markdown/gitignore.txt +15 -15
- package/dist/templates/markdown/index.d.ts +1 -5
- package/dist/templates/markdown/index.d.ts.map +1 -1
- package/dist/templates/markdown/index.js +3 -23
- package/dist/templates/markdown/index.js.map +1 -1
- package/dist/templates/markdown/spec/backend/database-guidelines.md.txt +51 -51
- package/dist/templates/markdown/spec/backend/directory-structure.md.txt +54 -54
- package/dist/templates/markdown/spec/backend/error-handling.md.txt +51 -51
- package/dist/templates/markdown/spec/backend/index.md.txt +38 -38
- package/dist/templates/markdown/spec/backend/logging-guidelines.md.txt +51 -51
- package/dist/templates/markdown/spec/backend/quality-guidelines.md.txt +51 -51
- package/dist/templates/markdown/spec/frontend/component-guidelines.md.txt +59 -59
- package/dist/templates/markdown/spec/frontend/directory-structure.md.txt +54 -54
- package/dist/templates/markdown/spec/frontend/hook-guidelines.md.txt +51 -51
- package/dist/templates/markdown/spec/frontend/index.md.txt +39 -39
- package/dist/templates/markdown/spec/frontend/quality-guidelines.md.txt +51 -51
- package/dist/templates/markdown/spec/frontend/state-management.md.txt +51 -51
- package/dist/templates/markdown/spec/frontend/type-safety.md.txt +51 -51
- package/dist/templates/markdown/spec/guides/code-reuse-thinking-guide.md.txt +174 -174
- package/dist/templates/markdown/spec/guides/cross-layer-thinking-guide.md.txt +162 -162
- package/dist/templates/markdown/spec/guides/cross-platform-thinking-guide.md.txt +17 -634
- package/dist/templates/markdown/spec/guides/debug-loop-guide.md.txt +227 -227
- package/dist/templates/markdown/spec/guides/durable-learning-decision-guide.md.txt +75 -75
- package/dist/templates/markdown/spec/guides/e2e-walkthrough-guide.md.txt +88 -93
- package/dist/templates/markdown/spec/guides/index.md.txt +131 -131
- package/dist/templates/markdown/spec/guides/prototype-guide.md.txt +137 -139
- package/dist/templates/markdown/spec/guides/test-discipline-guide.md.txt +179 -179
- package/dist/templates/markdown/workspace-index.md +122 -125
- package/dist/templates/markdown/worktree.yaml.txt +58 -58
- package/dist/templates/pactile/CONTEXT.md +101 -113
- package/dist/templates/pactile/config/execution-strategy-rules.json +30 -31
- package/dist/templates/pactile/config.yaml +111 -130
- package/dist/templates/pactile/docs/adr/README.md +21 -21
- package/dist/templates/pactile/gitignore.txt +35 -35
- package/dist/templates/pactile/index.d.ts +3 -127
- package/dist/templates/pactile/index.d.ts.map +1 -1
- package/dist/templates/pactile/index.js +13 -298
- package/dist/templates/pactile/index.js.map +1 -1
- package/dist/templates/pactile/modules/approval-personal/contract.md +43 -43
- package/dist/templates/pactile/modules/close-basic/contract.md +37 -37
- package/dist/templates/pactile/modules/context-progressive/contract.md +44 -44
- package/dist/templates/pactile/modules/debug-recovery/contract.md +44 -44
- package/dist/templates/pactile/modules/define-basic/contract.md +39 -39
- package/dist/templates/pactile/modules/define-extended/contract.md +45 -45
- package/dist/templates/pactile/modules/execute-agent/contract.md +38 -38
- package/dist/templates/pactile/modules/independent-check/contract.md +35 -35
- package/dist/templates/pactile/modules/index.json +127 -133
- package/dist/templates/pactile/modules/intake-basic/contract.md +34 -34
- package/dist/templates/pactile/modules/observability-local/contract.md +31 -31
- package/dist/templates/pactile/modules/parent-child/contract.md +45 -45
- package/dist/templates/pactile/modules/personal-memory/contract.md +55 -55
- package/dist/templates/pactile/modules/retention-storage/contract.md +43 -43
- package/dist/templates/pactile/modules/retrieval-extended/contract.md +78 -77
- package/dist/templates/pactile/modules/session-transfer/contract.md +41 -41
- package/dist/templates/pactile/modules/spec-learning/contract.md +50 -50
- package/dist/templates/pactile/modules/vcs-integration/contract.md +46 -46
- package/dist/templates/pactile/modules/verify-basic/contract.md +38 -38
- package/dist/templates/pactile/modules/worker-orchestration/contract.md +47 -47
- package/dist/templates/pactile/scripts/retrieval_probe_matrix_template.json +43 -43
- package/dist/templates/pactile/tasks/locale/en/default-prd.md +27 -27
- package/dist/templates/pactile/tasks/locale/zh/default-prd.md +27 -27
- package/dist/templates/pactile/tasks/templates/release-execution/design.md +60 -60
- package/dist/templates/pactile/tasks/templates/release-execution/handoff-template.md +28 -28
- package/dist/templates/pactile/tasks/templates/release-execution/implement.md +28 -28
- package/dist/templates/pactile/tasks/templates/release-execution/prd.md +30 -30
- package/dist/templates/pactile/tasks/templates/release-readiness/design.md +49 -49
- package/dist/templates/pactile/tasks/templates/release-readiness/handoff-template.md +38 -38
- package/dist/templates/pactile/tasks/templates/release-readiness/implement.md +28 -28
- package/dist/templates/pactile/tasks/templates/release-readiness/prd.md +30 -30
- package/dist/templates/pactile/workflow.md +65 -64
- package/dist/types/ai-tools.d.ts +12 -13
- package/dist/types/ai-tools.d.ts.map +1 -1
- package/dist/types/ai-tools.js +15 -14
- package/dist/types/ai-tools.js.map +1 -1
- package/dist/utils/codebase-retrieval-router.d.ts +1 -1
- package/dist/utils/codebase-retrieval-router.d.ts.map +1 -1
- package/dist/utils/cwd-guard.js +1 -1
- package/dist/utils/cwd-guard.js.map +1 -1
- package/dist/utils/developer.d.ts +5 -0
- package/dist/utils/developer.d.ts.map +1 -0
- package/dist/utils/developer.js +38 -0
- package/dist/utils/developer.js.map +1 -0
- package/dist/utils/git-root.d.ts +3 -0
- package/dist/utils/git-root.d.ts.map +1 -0
- package/dist/utils/git-root.js +24 -0
- package/dist/utils/git-root.js.map +1 -0
- package/dist/utils/local-date.d.ts +3 -0
- package/dist/utils/local-date.d.ts.map +1 -0
- package/dist/utils/local-date.js +8 -0
- package/dist/utils/local-date.js.map +1 -0
- package/dist/utils/manifest-prune.d.ts +5 -4
- package/dist/utils/manifest-prune.d.ts.map +1 -1
- package/dist/utils/manifest-prune.js +11 -21
- package/dist/utils/manifest-prune.js.map +1 -1
- package/dist/utils/p36-upgrade.d.ts +1 -1
- package/dist/utils/p36-upgrade.d.ts.map +1 -1
- package/dist/utils/p36-upgrade.js +1 -1
- package/dist/utils/p36-upgrade.js.map +1 -1
- package/dist/utils/post-update-smoke.d.ts +1 -4
- package/dist/utils/post-update-smoke.d.ts.map +1 -1
- package/dist/utils/post-update-smoke.js +13 -25
- package/dist/utils/post-update-smoke.js.map +1 -1
- package/dist/utils/project-capabilities.d.ts +2 -17
- package/dist/utils/project-capabilities.d.ts.map +1 -1
- package/dist/utils/project-capabilities.js +14 -119
- package/dist/utils/project-capabilities.js.map +1 -1
- package/dist/utils/readiness.d.ts +14 -0
- package/dist/utils/readiness.d.ts.map +1 -1
- package/dist/utils/readiness.js +61 -30
- package/dist/utils/readiness.js.map +1 -1
- package/dist/utils/retrieval-execution-telemetry.d.ts +1 -1
- package/dist/utils/retrieval-execution-telemetry.d.ts.map +1 -1
- package/dist/utils/retrieval-result-ranking.d.ts +1 -1
- package/dist/utils/retrieval-result-ranking.d.ts.map +1 -1
- package/dist/utils/retrieval-tool-classification.d.ts +1 -1
- package/dist/utils/retrieval-tool-classification.d.ts.map +1 -1
- package/dist/utils/task-json.d.ts +3 -3
- package/dist/utils/task-json.d.ts.map +1 -1
- package/dist/utils/task-json.js +3 -3
- package/dist/utils/task-json.js.map +1 -1
- package/dist/utils/template-hash.d.ts +4 -0
- package/dist/utils/template-hash.d.ts.map +1 -1
- package/dist/utils/template-hash.js +1 -1
- package/dist/utils/template-hash.js.map +1 -1
- package/dist/utils/update-rollout-report.d.ts +9 -0
- package/dist/utils/update-rollout-report.d.ts.map +1 -1
- package/dist/utils/update-rollout-report.js +14 -1
- package/dist/utils/update-rollout-report.js.map +1 -1
- package/package.json +22 -11
- package/scripts/postinstall.js +6 -6
- package/dist/commands/channel/adapters/claude.d.ts +0 -29
- package/dist/commands/channel/adapters/claude.d.ts.map +0 -1
- package/dist/commands/channel/adapters/claude.js +0 -203
- package/dist/commands/channel/adapters/claude.js.map +0 -1
- package/dist/commands/channel/adapters/codex.d.ts +0 -85
- package/dist/commands/channel/adapters/codex.d.ts.map +0 -1
- package/dist/commands/channel/adapters/codex.js +0 -505
- package/dist/commands/channel/adapters/codex.js.map +0 -1
- package/dist/commands/channel/adapters/index.d.ts +0 -84
- package/dist/commands/channel/adapters/index.d.ts.map +0 -1
- package/dist/commands/channel/adapters/index.js +0 -115
- package/dist/commands/channel/adapters/index.js.map +0 -1
- package/dist/commands/channel/adapters/types.d.ts +0 -33
- package/dist/commands/channel/adapters/types.d.ts.map +0 -1
- package/dist/commands/channel/adapters/types.js +0 -2
- package/dist/commands/channel/adapters/types.js.map +0 -1
- package/dist/commands/channel/agent-loader.d.ts +0 -32
- package/dist/commands/channel/agent-loader.d.ts.map +0 -1
- package/dist/commands/channel/agent-loader.js +0 -154
- package/dist/commands/channel/agent-loader.js.map +0 -1
- package/dist/commands/channel/context-loader.d.ts +0 -26
- package/dist/commands/channel/context-loader.d.ts.map +0 -1
- package/dist/commands/channel/context-loader.js +0 -290
- package/dist/commands/channel/context-loader.js.map +0 -1
- package/dist/commands/channel/context.d.ts +0 -16
- package/dist/commands/channel/context.d.ts.map +0 -1
- package/dist/commands/channel/context.js +0 -83
- package/dist/commands/channel/context.js.map +0 -1
- package/dist/commands/channel/create.d.ts +0 -27
- package/dist/commands/channel/create.d.ts.map +0 -1
- package/dist/commands/channel/create.js +0 -39
- package/dist/commands/channel/create.js.map +0 -1
- package/dist/commands/channel/dev-parse-trace.d.ts +0 -14
- package/dist/commands/channel/dev-parse-trace.d.ts.map +0 -1
- package/dist/commands/channel/dev-parse-trace.js +0 -70
- package/dist/commands/channel/dev-parse-trace.js.map +0 -1
- package/dist/commands/channel/guard.d.ts +0 -150
- package/dist/commands/channel/guard.d.ts.map +0 -1
- package/dist/commands/channel/guard.js +0 -475
- package/dist/commands/channel/guard.js.map +0 -1
- package/dist/commands/channel/index.d.ts +0 -3
- package/dist/commands/channel/index.d.ts.map +0 -1
- package/dist/commands/channel/index.js +0 -531
- package/dist/commands/channel/index.js.map +0 -1
- package/dist/commands/channel/interrupt.d.ts +0 -10
- package/dist/commands/channel/interrupt.d.ts.map +0 -1
- package/dist/commands/channel/interrupt.js +0 -22
- package/dist/commands/channel/interrupt.js.map +0 -1
- package/dist/commands/channel/kill.d.ts +0 -7
- package/dist/commands/channel/kill.d.ts.map +0 -1
- package/dist/commands/channel/kill.js +0 -121
- package/dist/commands/channel/kill.js.map +0 -1
- package/dist/commands/channel/list.d.ts +0 -17
- package/dist/commands/channel/list.d.ts.map +0 -1
- package/dist/commands/channel/list.js +0 -233
- package/dist/commands/channel/list.js.map +0 -1
- package/dist/commands/channel/messages.d.ts +0 -15
- package/dist/commands/channel/messages.d.ts.map +0 -1
- package/dist/commands/channel/messages.js +0 -245
- package/dist/commands/channel/messages.js.map +0 -1
- package/dist/commands/channel/rm.d.ts +0 -27
- package/dist/commands/channel/rm.d.ts.map +0 -1
- package/dist/commands/channel/rm.js +0 -216
- package/dist/commands/channel/rm.js.map +0 -1
- package/dist/commands/channel/run.d.ts +0 -30
- package/dist/commands/channel/run.d.ts.map +0 -1
- package/dist/commands/channel/run.js +0 -130
- package/dist/commands/channel/run.js.map +0 -1
- package/dist/commands/channel/send.d.ts +0 -11
- package/dist/commands/channel/send.d.ts.map +0 -1
- package/dist/commands/channel/send.js +0 -24
- package/dist/commands/channel/send.js.map +0 -1
- package/dist/commands/channel/spawn.d.ts +0 -40
- package/dist/commands/channel/spawn.d.ts.map +0 -1
- package/dist/commands/channel/spawn.js +0 -242
- package/dist/commands/channel/spawn.js.map +0 -1
- package/dist/commands/channel/store/events.d.ts +0 -39
- package/dist/commands/channel/store/events.d.ts.map +0 -1
- package/dist/commands/channel/store/events.js +0 -87
- package/dist/commands/channel/store/events.js.map +0 -1
- package/dist/commands/channel/store/filter.d.ts +0 -3
- package/dist/commands/channel/store/filter.d.ts.map +0 -1
- package/dist/commands/channel/store/filter.js +0 -2
- package/dist/commands/channel/store/filter.js.map +0 -1
- package/dist/commands/channel/store/lock.d.ts +0 -23
- package/dist/commands/channel/store/lock.d.ts.map +0 -1
- package/dist/commands/channel/store/lock.js +0 -99
- package/dist/commands/channel/store/lock.js.map +0 -1
- package/dist/commands/channel/store/paths.d.ts +0 -63
- package/dist/commands/channel/store/paths.d.ts.map +0 -1
- package/dist/commands/channel/store/paths.js +0 -247
- package/dist/commands/channel/store/paths.js.map +0 -1
- package/dist/commands/channel/store/schema.d.ts +0 -27
- package/dist/commands/channel/store/schema.d.ts.map +0 -1
- package/dist/commands/channel/store/schema.js +0 -34
- package/dist/commands/channel/store/schema.js.map +0 -1
- package/dist/commands/channel/store/thread-state.d.ts +0 -5
- package/dist/commands/channel/store/thread-state.d.ts.map +0 -1
- package/dist/commands/channel/store/thread-state.js +0 -16
- package/dist/commands/channel/store/thread-state.js.map +0 -1
- package/dist/commands/channel/store/watch.d.ts +0 -19
- package/dist/commands/channel/store/watch.d.ts.map +0 -1
- package/dist/commands/channel/store/watch.js +0 -146
- package/dist/commands/channel/store/watch.js.map +0 -1
- package/dist/commands/channel/supervisor/idle.d.ts +0 -46
- package/dist/commands/channel/supervisor/idle.d.ts.map +0 -1
- package/dist/commands/channel/supervisor/idle.js +0 -72
- package/dist/commands/channel/supervisor/idle.js.map +0 -1
- package/dist/commands/channel/supervisor/inbox.d.ts +0 -30
- package/dist/commands/channel/supervisor/inbox.d.ts.map +0 -1
- package/dist/commands/channel/supervisor/inbox.js +0 -160
- package/dist/commands/channel/supervisor/inbox.js.map +0 -1
- package/dist/commands/channel/supervisor/shutdown.d.ts +0 -68
- package/dist/commands/channel/supervisor/shutdown.d.ts.map +0 -1
- package/dist/commands/channel/supervisor/shutdown.js +0 -146
- package/dist/commands/channel/supervisor/shutdown.js.map +0 -1
- package/dist/commands/channel/supervisor/stdout.d.ts +0 -51
- package/dist/commands/channel/supervisor/stdout.d.ts.map +0 -1
- package/dist/commands/channel/supervisor/stdout.js +0 -121
- package/dist/commands/channel/supervisor/stdout.js.map +0 -1
- package/dist/commands/channel/supervisor/turns.d.ts +0 -31
- package/dist/commands/channel/supervisor/turns.d.ts.map +0 -1
- package/dist/commands/channel/supervisor/turns.js +0 -45
- package/dist/commands/channel/supervisor/turns.js.map +0 -1
- package/dist/commands/channel/supervisor/warning.d.ts +0 -48
- package/dist/commands/channel/supervisor/warning.d.ts.map +0 -1
- package/dist/commands/channel/supervisor/warning.js +0 -77
- package/dist/commands/channel/supervisor/warning.js.map +0 -1
- package/dist/commands/channel/supervisor.d.ts +0 -59
- package/dist/commands/channel/supervisor.d.ts.map +0 -1
- package/dist/commands/channel/supervisor.js +0 -345
- package/dist/commands/channel/supervisor.js.map +0 -1
- package/dist/commands/channel/text-body.d.ts +0 -13
- package/dist/commands/channel/text-body.d.ts.map +0 -1
- package/dist/commands/channel/text-body.js +0 -47
- package/dist/commands/channel/text-body.js.map +0 -1
- package/dist/commands/channel/threads.d.ts +0 -39
- package/dist/commands/channel/threads.d.ts.map +0 -1
- package/dist/commands/channel/threads.js +0 -106
- package/dist/commands/channel/threads.js.map +0 -1
- package/dist/commands/channel/title.d.ts +0 -12
- package/dist/commands/channel/title.d.ts.map +0 -1
- package/dist/commands/channel/title.js +0 -24
- package/dist/commands/channel/title.js.map +0 -1
- package/dist/commands/channel/wait.d.ts +0 -17
- package/dist/commands/channel/wait.d.ts.map +0 -1
- package/dist/commands/channel/wait.js +0 -75
- package/dist/commands/channel/wait.js.map +0 -1
- package/dist/commands/validate-rules.d.ts +0 -6
- package/dist/commands/validate-rules.d.ts.map +0 -1
- package/dist/commands/validate-rules.js +0 -33
- package/dist/commands/validate-rules.js.map +0 -1
- package/dist/configurators/cursor.d.ts +0 -21
- package/dist/configurators/cursor.d.ts.map +0 -1
- package/dist/configurators/cursor.js +0 -51
- package/dist/configurators/cursor.js.map +0 -1
- package/dist/pactile/adapters/cursor/index.d.ts +0 -60
- package/dist/pactile/adapters/cursor/index.d.ts.map +0 -1
- package/dist/pactile/adapters/cursor/index.js +0 -186
- package/dist/pactile/adapters/cursor/index.js.map +0 -1
- package/dist/templates/common/optional-skills/chrome-cdp/SKILL.md +0 -179
- package/dist/templates/common/optional-skills/chrome-cdp/examples/fetch-hook-api-capture.md +0 -149
- package/dist/templates/common/optional-skills/chrome-cdp/scripts/cdp.mjs +0 -904
- package/dist/templates/cursor/agents/pactile-check.md +0 -58
- package/dist/templates/cursor/agents/pactile-implement.md +0 -56
- package/dist/templates/cursor/agents/pactile-research.md +0 -51
- package/dist/templates/cursor/commands/handoff.md +0 -101
- package/dist/templates/cursor/fixtures/expected-rules.d.ts +0 -14
- package/dist/templates/cursor/fixtures/expected-rules.d.ts.map +0 -1
- package/dist/templates/cursor/fixtures/expected-rules.js +0 -20
- package/dist/templates/cursor/fixtures/expected-rules.js.map +0 -1
- package/dist/templates/cursor/hooks.json +0 -52
- package/dist/templates/cursor/index.d.ts +0 -19
- package/dist/templates/cursor/index.d.ts.map +0 -1
- package/dist/templates/cursor/index.js +0 -19
- package/dist/templates/cursor/index.js.map +0 -1
- package/dist/templates/cursor/rules/pactile-bootstrap.mdc +0 -18
- package/dist/templates/cursor/worktrees.json +0 -11
- package/dist/templates/markdown/framework/cursor-context-injection-guide.md.txt +0 -85
- package/dist/templates/markdown/framework/cursor-native-modes-guide.md.txt +0 -239
- package/dist/templates/markdown/framework/cursor-semantic-compliance.md.txt +0 -41
- package/dist/templates/markdown/framework/cursor-subagent-policy.md.txt +0 -90
- package/dist/templates/markdown/framework/internal-skills-cursor-reachability.md.txt +0 -45
- package/dist/templates/markdown/prompts/run-semantic-slice-12.md.txt +0 -25
- package/dist/templates/pactile/modules/candidate-pool/contract.md +0 -37
- package/dist/templates/pactile/pool/README.md +0 -149
- package/dist/templates/pactile/pool/items/.gitkeep +0 -0
- package/dist/templates/pactile/pool/plan.md +0 -50
- package/dist/templates/pactile/scripts/__init__.py +0 -5
- package/dist/templates/pactile/scripts/add_session.py +0 -547
- package/dist/templates/pactile/scripts/build_context_pack.py +0 -17
- package/dist/templates/pactile/scripts/build_retrieval_pack.py +0 -376
- package/dist/templates/pactile/scripts/codegraph_session_smoke.py +0 -76
- package/dist/templates/pactile/scripts/common/__init__.py +0 -103
- package/dist/templates/pactile/scripts/common/active_task.py +0 -576
- package/dist/templates/pactile/scripts/common/adapter_middleware.py +0 -1373
- package/dist/templates/pactile/scripts/common/artifact_locale.py +0 -303
- package/dist/templates/pactile/scripts/common/artifact_search.py +0 -587
- package/dist/templates/pactile/scripts/common/cli_adapter.py +0 -135
- package/dist/templates/pactile/scripts/common/cli_environment.py +0 -155
- package/dist/templates/pactile/scripts/common/codebase_retrieval_router.py +0 -1339
- package/dist/templates/pactile/scripts/common/config.py +0 -497
- package/dist/templates/pactile/scripts/common/context_pack.py +0 -371
- package/dist/templates/pactile/scripts/common/cursor_retrieval_env.py +0 -31
- package/dist/templates/pactile/scripts/common/developer.py +0 -190
- package/dist/templates/pactile/scripts/common/execution_strategy.py +0 -268
- package/dist/templates/pactile/scripts/common/full_quality.py +0 -237
- package/dist/templates/pactile/scripts/common/git.py +0 -37
- package/dist/templates/pactile/scripts/common/git_context.py +0 -198
- package/dist/templates/pactile/scripts/common/injection_budget.py +0 -317
- package/dist/templates/pactile/scripts/common/io.py +0 -37
- package/dist/templates/pactile/scripts/common/kernel_command.py +0 -369
- package/dist/templates/pactile/scripts/common/lite_context.py +0 -280
- package/dist/templates/pactile/scripts/common/log.py +0 -45
- package/dist/templates/pactile/scripts/common/ondemand_topology.py +0 -419
- package/dist/templates/pactile/scripts/common/packages_context.py +0 -239
- package/dist/templates/pactile/scripts/common/pactile_config.py +0 -131
- package/dist/templates/pactile/scripts/common/parallel_declaration.py +0 -369
- package/dist/templates/pactile/scripts/common/parent_orchestration.py +0 -1198
- package/dist/templates/pactile/scripts/common/paths.py +0 -756
- package/dist/templates/pactile/scripts/common/pool_refs.py +0 -119
- package/dist/templates/pactile/scripts/common/pool_slice.py +0 -269
- package/dist/templates/pactile/scripts/common/pool_store.py +0 -766
- package/dist/templates/pactile/scripts/common/project_file_stats.py +0 -91
- package/dist/templates/pactile/scripts/common/retrieval_adapter_metadata.py +0 -943
- package/dist/templates/pactile/scripts/common/retrieval_agent_instructions.py +0 -123
- package/dist/templates/pactile/scripts/common/retrieval_evidence.py +0 -915
- package/dist/templates/pactile/scripts/common/retrieval_pack.py +0 -422
- package/dist/templates/pactile/scripts/common/retrieval_pack_context.py +0 -122
- package/dist/templates/pactile/scripts/common/retrieval_plan_gate.py +0 -61
- package/dist/templates/pactile/scripts/common/retrieval_result_ranking.py +0 -104
- package/dist/templates/pactile/scripts/common/retrieval_tool_classification.py +0 -166
- package/dist/templates/pactile/scripts/common/safe_commit.py +0 -285
- package/dist/templates/pactile/scripts/common/semantic_plan_gate.py +0 -53
- package/dist/templates/pactile/scripts/common/session_context.py +0 -1213
- package/dist/templates/pactile/scripts/common/session_memory.py +0 -386
- package/dist/templates/pactile/scripts/common/session_pack.py +0 -886
- package/dist/templates/pactile/scripts/common/smart_search_evidence.py +0 -514
- package/dist/templates/pactile/scripts/common/smart_search_resolve.py +0 -150
- package/dist/templates/pactile/scripts/common/subagent_dispatch.py +0 -592
- package/dist/templates/pactile/scripts/common/task_context.py +0 -241
- package/dist/templates/pactile/scripts/common/task_dashboard.py +0 -286
- package/dist/templates/pactile/scripts/common/task_dependencies.py +0 -648
- package/dist/templates/pactile/scripts/common/task_gates.py +0 -2478
- package/dist/templates/pactile/scripts/common/task_map.py +0 -703
- package/dist/templates/pactile/scripts/common/task_queue.py +0 -188
- package/dist/templates/pactile/scripts/common/task_store.py +0 -2252
- package/dist/templates/pactile/scripts/common/task_utils.py +0 -274
- package/dist/templates/pactile/scripts/common/tasks.py +0 -231
- package/dist/templates/pactile/scripts/common/test_adapter_middleware.py +0 -199
- package/dist/templates/pactile/scripts/common/test_depends_mode_block.py +0 -509
- package/dist/templates/pactile/scripts/common/test_full_quality.py +0 -197
- package/dist/templates/pactile/scripts/common/test_kernel_command.py +0 -336
- package/dist/templates/pactile/scripts/common/test_lite_path.py +0 -190
- package/dist/templates/pactile/scripts/common/test_observable_defaults.py +0 -141
- package/dist/templates/pactile/scripts/common/test_ondemand_topology.py +0 -237
- package/dist/templates/pactile/scripts/common/test_parallel_declaration.py +0 -264
- package/dist/templates/pactile/scripts/common/test_pool_slice.py +0 -198
- package/dist/templates/pactile/scripts/common/test_pool_store.py +0 -452
- package/dist/templates/pactile/scripts/common/test_retrieval_arbitration.py +0 -331
- package/dist/templates/pactile/scripts/common/test_task_dashboard.py +0 -155
- package/dist/templates/pactile/scripts/common/test_task_dependencies.py +0 -329
- package/dist/templates/pactile/scripts/common/test_task_store_kernel_patch.py +0 -163
- package/dist/templates/pactile/scripts/common/types.py +0 -110
- package/dist/templates/pactile/scripts/common/workflow_phase.py +0 -194
- package/dist/templates/pactile/scripts/compile_session_pack.py +0 -15
- package/dist/templates/pactile/scripts/cursor_retrieval_probe.py +0 -64
- package/dist/templates/pactile/scripts/cursor_retrieval_probe_prompt.md +0 -33
- package/dist/templates/pactile/scripts/generate_dispatch_prompt.py +0 -182
- package/dist/templates/pactile/scripts/get_context.py +0 -19
- package/dist/templates/pactile/scripts/get_developer.py +0 -26
- package/dist/templates/pactile/scripts/hooks/linear_sync.py +0 -243
- package/dist/templates/pactile/scripts/init_developer.py +0 -51
- package/dist/templates/pactile/scripts/injection_budget_probe.py +0 -69
- package/dist/templates/pactile/scripts/pool.py +0 -237
- package/dist/templates/pactile/scripts/rank_retrieval_candidates.py +0 -98
- package/dist/templates/pactile/scripts/route_codebase_retrieval.py +0 -72
- package/dist/templates/pactile/scripts/run_smart_search.py +0 -12
- package/dist/templates/pactile/scripts/score_evidence.py +0 -131
- package/dist/templates/pactile/scripts/search_artifacts.py +0 -13
- package/dist/templates/pactile/scripts/search_memory.py +0 -12
- package/dist/templates/pactile/scripts/spec_health_outcomes.py +0 -160
- package/dist/templates/pactile/scripts/task.py +0 -1118
- package/dist/templates/pactile/scripts/verify_evidence_probe.py +0 -138
- package/dist/templates/shared-hooks/event-bridge.py +0 -121
- package/dist/templates/shared-hooks/index.d.ts +0 -50
- package/dist/templates/shared-hooks/index.d.ts.map +0 -1
- package/dist/templates/shared-hooks/index.js +0 -96
- package/dist/templates/shared-hooks/index.js.map +0 -1
- package/dist/templates/shared-hooks/inject-retrieval-plan.py +0 -217
- package/dist/templates/shared-hooks/inject-shell-session-context.py +0 -183
- package/dist/templates/shared-hooks/inject-subagent-context.py +0 -267
- package/dist/templates/shared-hooks/inject-workflow-state.py +0 -106
- package/dist/templates/shared-hooks/rename-session-for-task.py +0 -231
- package/dist/templates/shared-hooks/research-end-retrieval-pack.py +0 -345
- package/dist/templates/shared-hooks/session-start.py +0 -355
- package/dist/templates/shared-hooks/spec-write-audit.py +0 -173
- package/dist/utils/mirror-check.d.ts +0 -22
- package/dist/utils/mirror-check.d.ts.map +0 -1
- package/dist/utils/mirror-check.js +0 -90
- package/dist/utils/mirror-check.js.map +0 -1
- package/dist/utils/validate-rules.d.ts +0 -21
- package/dist/utils/validate-rules.d.ts.map +0 -1
- package/dist/utils/validate-rules.js +0 -88
- package/dist/utils/validate-rules.js.map +0 -1
|
@@ -1,1213 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env python3
|
|
2
|
-
"""
|
|
3
|
-
Session context generation (default + record modes).
|
|
4
|
-
|
|
5
|
-
Provides:
|
|
6
|
-
get_context_json - JSON output for default mode
|
|
7
|
-
get_context_text - Text output for default mode
|
|
8
|
-
get_context_record_json - JSON for record mode
|
|
9
|
-
get_context_text_record - Text for record mode
|
|
10
|
-
output_json - Print JSON
|
|
11
|
-
output_text - Print text
|
|
12
|
-
"""
|
|
13
|
-
|
|
14
|
-
from __future__ import annotations
|
|
15
|
-
|
|
16
|
-
import json
|
|
17
|
-
import os
|
|
18
|
-
import re
|
|
19
|
-
import subprocess
|
|
20
|
-
from pathlib import Path
|
|
21
|
-
|
|
22
|
-
from .active_task import resolve_context_key
|
|
23
|
-
from .artifact_locale import artifact_locale_summary, resolve_artifact_locale
|
|
24
|
-
from .config import get_git_packages, get_journal_snippet_enabled
|
|
25
|
-
from .git import run_git
|
|
26
|
-
from .packages_context import get_packages_section
|
|
27
|
-
from .tasks import iter_active_tasks, load_task, get_all_statuses, children_progress
|
|
28
|
-
from .task_dashboard import render_task_dashboard
|
|
29
|
-
from .paths import (
|
|
30
|
-
DIR_SCRIPTS,
|
|
31
|
-
DIR_SPEC,
|
|
32
|
-
DIR_TASKS,
|
|
33
|
-
DIR_WORKFLOW,
|
|
34
|
-
DIR_WORKSPACE,
|
|
35
|
-
count_lines,
|
|
36
|
-
get_active_journal_file,
|
|
37
|
-
get_selected_task,
|
|
38
|
-
get_selected_task_source,
|
|
39
|
-
get_developer,
|
|
40
|
-
get_repo_root,
|
|
41
|
-
get_tasks_dir,
|
|
42
|
-
)
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
# =============================================================================
|
|
46
|
-
# Helpers
|
|
47
|
-
# =============================================================================
|
|
48
|
-
|
|
49
|
-
_PACKAGE_NAME = "@blxzer/pactile"
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
def _resolve_python_command() -> str:
|
|
53
|
-
"""Pick the platform-appropriate python command.
|
|
54
|
-
|
|
55
|
-
Mirrors test resolvePython() (win32 prefers python, POSIX prefers
|
|
56
|
-
python3) so rendered guidance matches what integration tests assert.
|
|
57
|
-
"""
|
|
58
|
-
candidates = ["python", "python3"] if os.name == "nt" else ["python3", "python"]
|
|
59
|
-
for exe in candidates:
|
|
60
|
-
try:
|
|
61
|
-
subprocess.run(
|
|
62
|
-
[exe, "--version"],
|
|
63
|
-
capture_output=True,
|
|
64
|
-
timeout=2,
|
|
65
|
-
check=True,
|
|
66
|
-
)
|
|
67
|
-
return exe
|
|
68
|
-
except (OSError, subprocess.SubprocessError):
|
|
69
|
-
continue
|
|
70
|
-
return "python"
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
_PYTHON_CMD = _resolve_python_command()
|
|
74
|
-
_UPDATE_CHECK_TIMEOUT_SECONDS = 1.0
|
|
75
|
-
_VERSION_RE = re.compile(
|
|
76
|
-
r"^\s*(\d+)(?:\.(\d+))?(?:\.(\d+))?(?:-([0-9A-Za-z.-]+))?\s*$"
|
|
77
|
-
)
|
|
78
|
-
_VERSION_TOKEN_RE = re.compile(r"\b\d+(?:\.\d+){1,2}(?:-[0-9A-Za-z.-]+)?\b")
|
|
79
|
-
_POLYREPO_IGNORED_DIRS = {
|
|
80
|
-
"node_modules",
|
|
81
|
-
"target",
|
|
82
|
-
"dist",
|
|
83
|
-
"build",
|
|
84
|
-
"out",
|
|
85
|
-
"bin",
|
|
86
|
-
"obj",
|
|
87
|
-
"vendor",
|
|
88
|
-
"coverage",
|
|
89
|
-
"tmp",
|
|
90
|
-
"__pycache__",
|
|
91
|
-
}
|
|
92
|
-
_POLYREPO_SCAN_MAX_DEPTH = 2
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
def _is_git_worktree(path: Path) -> bool:
|
|
96
|
-
"""Return True when path is inside a Git worktree."""
|
|
97
|
-
rc, out, _ = run_git(["rev-parse", "--is-inside-work-tree"], cwd=path)
|
|
98
|
-
return rc == 0 and out.strip().lower() == "true"
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
def _parse_recent_commits(log_output: str) -> list[dict]:
|
|
102
|
-
"""Parse `git log --oneline` output into structured commit entries."""
|
|
103
|
-
commits = []
|
|
104
|
-
for line in log_output.splitlines():
|
|
105
|
-
if not line.strip():
|
|
106
|
-
continue
|
|
107
|
-
parts = line.split(" ", 1)
|
|
108
|
-
if len(parts) >= 2:
|
|
109
|
-
commits.append({"hash": parts[0], "message": parts[1]})
|
|
110
|
-
elif len(parts) == 1:
|
|
111
|
-
commits.append({"hash": parts[0], "message": ""})
|
|
112
|
-
return commits
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
def _collect_git_repo_info(name: str, rel_path: str, repo_dir: Path) -> dict | None:
|
|
116
|
-
"""Collect Git status for one known repository directory."""
|
|
117
|
-
if not (repo_dir / ".git").exists():
|
|
118
|
-
return None
|
|
119
|
-
|
|
120
|
-
_, branch_out, _ = run_git(["branch", "--show-current"], cwd=repo_dir)
|
|
121
|
-
branch = branch_out.strip() or "unknown"
|
|
122
|
-
|
|
123
|
-
_, status_out, _ = run_git(["status", "--porcelain"], cwd=repo_dir)
|
|
124
|
-
changes = len([l for l in status_out.splitlines() if l.strip()])
|
|
125
|
-
|
|
126
|
-
_, log_out, _ = run_git(["log", "--oneline", "-5"], cwd=repo_dir)
|
|
127
|
-
|
|
128
|
-
return {
|
|
129
|
-
"name": name,
|
|
130
|
-
"path": rel_path,
|
|
131
|
-
"branch": branch,
|
|
132
|
-
"isClean": changes == 0,
|
|
133
|
-
"uncommittedChanges": changes,
|
|
134
|
-
"recentCommits": _parse_recent_commits(log_out),
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
def _collect_root_git_info(repo_root: Path) -> dict:
|
|
139
|
-
"""Collect root Git info without pretending a non-Git root is clean."""
|
|
140
|
-
if not _is_git_worktree(repo_root):
|
|
141
|
-
return {
|
|
142
|
-
"isRepo": False,
|
|
143
|
-
"branch": "",
|
|
144
|
-
"isClean": False,
|
|
145
|
-
"uncommittedChanges": 0,
|
|
146
|
-
"recentCommits": [],
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
_, branch_out, _ = run_git(["branch", "--show-current"], cwd=repo_root)
|
|
150
|
-
branch = branch_out.strip() or "unknown"
|
|
151
|
-
|
|
152
|
-
_, status_out, _ = run_git(["status", "--porcelain"], cwd=repo_root)
|
|
153
|
-
status_lines = [line for line in status_out.splitlines() if line.strip()]
|
|
154
|
-
|
|
155
|
-
_, short_out, _ = run_git(["status", "--short"], cwd=repo_root)
|
|
156
|
-
|
|
157
|
-
_, log_out, _ = run_git(["log", "--oneline", "-5"], cwd=repo_root)
|
|
158
|
-
|
|
159
|
-
return {
|
|
160
|
-
"isRepo": True,
|
|
161
|
-
"branch": branch,
|
|
162
|
-
"isClean": len(status_lines) == 0,
|
|
163
|
-
"uncommittedChanges": len(status_lines),
|
|
164
|
-
"statusShort": short_out.splitlines(),
|
|
165
|
-
"recentCommits": _parse_recent_commits(log_out),
|
|
166
|
-
}
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
def _discover_child_git_repos(repo_root: Path) -> list[tuple[str, str]]:
|
|
170
|
-
"""Discover child Git repositories using the init-time polyrepo heuristic."""
|
|
171
|
-
found: list[str] = []
|
|
172
|
-
|
|
173
|
-
def is_candidate_dir(path: Path) -> bool:
|
|
174
|
-
name = path.name
|
|
175
|
-
return not name.startswith(".") and name not in _POLYREPO_IGNORED_DIRS
|
|
176
|
-
|
|
177
|
-
def scan(rel_dir: Path, depth: int) -> None:
|
|
178
|
-
if depth >= _POLYREPO_SCAN_MAX_DEPTH:
|
|
179
|
-
return
|
|
180
|
-
abs_dir = repo_root / rel_dir
|
|
181
|
-
try:
|
|
182
|
-
children = sorted(abs_dir.iterdir(), key=lambda p: p.name)
|
|
183
|
-
except OSError:
|
|
184
|
-
return
|
|
185
|
-
|
|
186
|
-
for child in children:
|
|
187
|
-
if not child.is_dir() or not is_candidate_dir(child):
|
|
188
|
-
continue
|
|
189
|
-
|
|
190
|
-
child_rel = (
|
|
191
|
-
rel_dir / child.name if rel_dir != Path(".") else Path(child.name)
|
|
192
|
-
)
|
|
193
|
-
if (child / ".git").exists():
|
|
194
|
-
found.append(child_rel.as_posix())
|
|
195
|
-
continue
|
|
196
|
-
scan(child_rel, depth + 1)
|
|
197
|
-
|
|
198
|
-
scan(Path("."), 0)
|
|
199
|
-
if len(found) < 2:
|
|
200
|
-
return []
|
|
201
|
-
return [(path.replace("/", "_"), path) for path in sorted(found)]
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
def _collect_package_git_info(
|
|
205
|
-
repo_root: Path,
|
|
206
|
-
discover_unconfigured: bool = False,
|
|
207
|
-
) -> list[dict]:
|
|
208
|
-
"""Collect Git status for independent package repositories.
|
|
209
|
-
|
|
210
|
-
Packages marked with ``git: true`` in config.yaml are authoritative.
|
|
211
|
-
When the Pactile root is not a Git repo and no configured package repos are
|
|
212
|
-
available, optionally fall back to the bounded polyrepo child scan.
|
|
213
|
-
|
|
214
|
-
Returns:
|
|
215
|
-
List of dicts with keys: name, path, branch, isClean,
|
|
216
|
-
uncommittedChanges, recentCommits.
|
|
217
|
-
Empty list if no git-repo packages are configured.
|
|
218
|
-
"""
|
|
219
|
-
git_pkgs = get_git_packages(repo_root)
|
|
220
|
-
result = []
|
|
221
|
-
for pkg_name, pkg_path in git_pkgs.items():
|
|
222
|
-
pkg_dir = repo_root / pkg_path
|
|
223
|
-
info = _collect_git_repo_info(pkg_name, pkg_path, pkg_dir)
|
|
224
|
-
if info is not None:
|
|
225
|
-
result.append(info)
|
|
226
|
-
|
|
227
|
-
if result or not discover_unconfigured:
|
|
228
|
-
return result
|
|
229
|
-
|
|
230
|
-
discovered = []
|
|
231
|
-
for pkg_name, pkg_path in _discover_child_git_repos(repo_root):
|
|
232
|
-
info = _collect_git_repo_info(pkg_name, pkg_path, repo_root / pkg_path)
|
|
233
|
-
if info is not None:
|
|
234
|
-
discovered.append(info)
|
|
235
|
-
return discovered
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
def _append_root_git_context(lines: list[str], root_git_info: dict) -> None:
|
|
239
|
-
"""Append root Git status without misleading non-Git roots."""
|
|
240
|
-
lines.append("## GIT STATUS")
|
|
241
|
-
if not root_git_info["isRepo"]:
|
|
242
|
-
lines.append("Root is not a Git repository.")
|
|
243
|
-
lines.append("Run Git commands from the package repository paths listed below.")
|
|
244
|
-
else:
|
|
245
|
-
lines.append(f"Branch: {root_git_info['branch']}")
|
|
246
|
-
if root_git_info["isClean"]:
|
|
247
|
-
lines.append("Working directory: Clean")
|
|
248
|
-
else:
|
|
249
|
-
lines.append(
|
|
250
|
-
f"Working directory: {root_git_info['uncommittedChanges']} "
|
|
251
|
-
"uncommitted change(s)"
|
|
252
|
-
)
|
|
253
|
-
lines.append("")
|
|
254
|
-
lines.append("Changes:")
|
|
255
|
-
for line in root_git_info.get("statusShort", [])[:10]:
|
|
256
|
-
lines.append(line)
|
|
257
|
-
lines.append("")
|
|
258
|
-
|
|
259
|
-
lines.append("## RECENT COMMITS")
|
|
260
|
-
if not root_git_info["isRepo"]:
|
|
261
|
-
lines.append(
|
|
262
|
-
"Root has no Git commit history because it is not a Git repository."
|
|
263
|
-
)
|
|
264
|
-
elif root_git_info["recentCommits"]:
|
|
265
|
-
for commit in root_git_info["recentCommits"]:
|
|
266
|
-
lines.append(f"{commit['hash']} {commit['message']}")
|
|
267
|
-
else:
|
|
268
|
-
lines.append("(no commits)")
|
|
269
|
-
lines.append("")
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
def _append_package_git_context(lines: list[str], package_git_info: list[dict]) -> None:
|
|
273
|
-
"""Append Git status and recent commits for package repositories."""
|
|
274
|
-
for pkg in package_git_info:
|
|
275
|
-
lines.append(f"## GIT STATUS ({pkg['name']}: {pkg['path']})")
|
|
276
|
-
lines.append(f"Branch: {pkg['branch']}")
|
|
277
|
-
if pkg["isClean"]:
|
|
278
|
-
lines.append("Working directory: Clean")
|
|
279
|
-
else:
|
|
280
|
-
lines.append(
|
|
281
|
-
f"Working directory: {pkg['uncommittedChanges']} uncommitted change(s)"
|
|
282
|
-
)
|
|
283
|
-
lines.append("")
|
|
284
|
-
lines.append(f"## RECENT COMMITS ({pkg['name']}: {pkg['path']})")
|
|
285
|
-
if pkg["recentCommits"]:
|
|
286
|
-
for commit in pkg["recentCommits"]:
|
|
287
|
-
lines.append(f"{commit['hash']} {commit['message']}")
|
|
288
|
-
else:
|
|
289
|
-
lines.append("(no commits)")
|
|
290
|
-
lines.append("")
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
def _read_project_version(repo_root: Path) -> str | None:
|
|
294
|
-
try:
|
|
295
|
-
version = (repo_root / DIR_WORKFLOW / ".version").read_text(
|
|
296
|
-
encoding="utf-8"
|
|
297
|
-
).strip()
|
|
298
|
-
except OSError:
|
|
299
|
-
return None
|
|
300
|
-
return version or None
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
def _fetch_pactile_version_output() -> str | None:
|
|
304
|
-
try:
|
|
305
|
-
result = subprocess.run(
|
|
306
|
-
["pactile", "--version"],
|
|
307
|
-
capture_output=True,
|
|
308
|
-
text=True,
|
|
309
|
-
encoding="utf-8",
|
|
310
|
-
errors="replace",
|
|
311
|
-
timeout=_UPDATE_CHECK_TIMEOUT_SECONDS,
|
|
312
|
-
)
|
|
313
|
-
except (OSError, subprocess.SubprocessError, TimeoutError):
|
|
314
|
-
return None
|
|
315
|
-
|
|
316
|
-
if result.returncode != 0:
|
|
317
|
-
return None
|
|
318
|
-
output = f"{result.stdout}\n{result.stderr}".strip()
|
|
319
|
-
return output or None
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
def _extract_available_update_version(output: str) -> str | None:
|
|
323
|
-
update_match = re.search(
|
|
324
|
-
r"Pactile update available:\s*"
|
|
325
|
-
r"(?P<current>\S+)\s*(?:→|->)\s*(?P<latest>\S+)",
|
|
326
|
-
output,
|
|
327
|
-
)
|
|
328
|
-
if update_match:
|
|
329
|
-
return update_match.group("latest").strip()
|
|
330
|
-
candidates = _VERSION_TOKEN_RE.findall(output)
|
|
331
|
-
return candidates[-1] if candidates else None
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
def _resolve_available_update_version() -> str | None:
|
|
335
|
-
output = _fetch_pactile_version_output()
|
|
336
|
-
if not output:
|
|
337
|
-
return None
|
|
338
|
-
return _extract_available_update_version(output)
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
def _parse_version(version: str) -> tuple[tuple[int, int, int], tuple[str, ...] | None] | None:
|
|
342
|
-
match = _VERSION_RE.match(version)
|
|
343
|
-
if not match:
|
|
344
|
-
return None
|
|
345
|
-
major, minor, patch, prerelease = match.groups()
|
|
346
|
-
numbers = (int(major), int(minor or "0"), int(patch or "0"))
|
|
347
|
-
prerelease_parts = tuple(prerelease.split(".")) if prerelease else None
|
|
348
|
-
return numbers, prerelease_parts
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
def _compare_prerelease(
|
|
352
|
-
left: tuple[str, ...] | None,
|
|
353
|
-
right: tuple[str, ...] | None,
|
|
354
|
-
) -> int:
|
|
355
|
-
if left is None and right is None:
|
|
356
|
-
return 0
|
|
357
|
-
if left is None:
|
|
358
|
-
return 1
|
|
359
|
-
if right is None:
|
|
360
|
-
return -1
|
|
361
|
-
|
|
362
|
-
for left_part, right_part in zip(left, right):
|
|
363
|
-
if left_part == right_part:
|
|
364
|
-
continue
|
|
365
|
-
left_numeric = left_part.isdigit()
|
|
366
|
-
right_numeric = right_part.isdigit()
|
|
367
|
-
if left_numeric and right_numeric:
|
|
368
|
-
left_int = int(left_part)
|
|
369
|
-
right_int = int(right_part)
|
|
370
|
-
return (left_int > right_int) - (left_int < right_int)
|
|
371
|
-
if left_numeric:
|
|
372
|
-
return -1
|
|
373
|
-
if right_numeric:
|
|
374
|
-
return 1
|
|
375
|
-
return (left_part > right_part) - (left_part < right_part)
|
|
376
|
-
|
|
377
|
-
return (len(left) > len(right)) - (len(left) < len(right))
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
def _compare_versions(left: str, right: str) -> int | None:
|
|
381
|
-
parsed_left = _parse_version(left)
|
|
382
|
-
parsed_right = _parse_version(right)
|
|
383
|
-
if parsed_left is None or parsed_right is None:
|
|
384
|
-
return None
|
|
385
|
-
|
|
386
|
-
left_numbers, left_prerelease = parsed_left
|
|
387
|
-
right_numbers, right_prerelease = parsed_right
|
|
388
|
-
if left_numbers != right_numbers:
|
|
389
|
-
return (left_numbers > right_numbers) - (left_numbers < right_numbers)
|
|
390
|
-
return _compare_prerelease(left_prerelease, right_prerelease)
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
def _update_marker_path(repo_root: Path) -> Path:
|
|
394
|
-
context_key = resolve_context_key()
|
|
395
|
-
if not context_key:
|
|
396
|
-
terminal_key = os.environ.get("TERM_SESSION_ID", "").strip()
|
|
397
|
-
context_key = terminal_key or f"ppid-{os.getppid()}"
|
|
398
|
-
safe_key = re.sub(r"[^A-Za-z0-9._-]+", "_", context_key).strip("._-")
|
|
399
|
-
if not safe_key:
|
|
400
|
-
safe_key = "session"
|
|
401
|
-
return (
|
|
402
|
-
repo_root
|
|
403
|
-
/ DIR_WORKFLOW
|
|
404
|
-
/ ".runtime"
|
|
405
|
-
/ f"update-check-{safe_key[:160]}.marker"
|
|
406
|
-
)
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
def _mark_update_check_attempted(repo_root: Path) -> bool:
|
|
410
|
-
marker_path = _update_marker_path(repo_root)
|
|
411
|
-
if marker_path.exists():
|
|
412
|
-
return False
|
|
413
|
-
try:
|
|
414
|
-
marker_path.parent.mkdir(parents=True, exist_ok=True)
|
|
415
|
-
marker_path.write_text("checked\n", encoding="utf-8")
|
|
416
|
-
except OSError:
|
|
417
|
-
pass
|
|
418
|
-
return True
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
def _get_update_hint(repo_root: Path) -> str | None:
|
|
422
|
-
marker_path = _update_marker_path(repo_root)
|
|
423
|
-
if marker_path.exists():
|
|
424
|
-
return None
|
|
425
|
-
|
|
426
|
-
current_version = _read_project_version(repo_root)
|
|
427
|
-
if not current_version:
|
|
428
|
-
return None
|
|
429
|
-
|
|
430
|
-
latest_version = _resolve_available_update_version()
|
|
431
|
-
if not latest_version:
|
|
432
|
-
return None
|
|
433
|
-
|
|
434
|
-
_mark_update_check_attempted(repo_root)
|
|
435
|
-
comparison = _compare_versions(current_version, latest_version)
|
|
436
|
-
if comparison is None or comparison >= 0:
|
|
437
|
-
return None
|
|
438
|
-
|
|
439
|
-
return (
|
|
440
|
-
f"Pactile update available: {current_version} -> {latest_version}, "
|
|
441
|
-
"run pactile upgrade"
|
|
442
|
-
)
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
def _quote_command_value(value: str) -> str:
|
|
446
|
-
return value.replace("\\", "\\\\").replace('"', '\\"')
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
def _artifact_search_command(query: str = "<topic>") -> str:
|
|
450
|
-
return (
|
|
451
|
-
f"{_PYTHON_CMD} ./{DIR_WORKFLOW}/{DIR_SCRIPTS}/search_artifacts.py "
|
|
452
|
-
f'--query "{_quote_command_value(query)}" --json'
|
|
453
|
-
)
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
def _session_memory_command(query: str = "<topic>") -> str:
|
|
457
|
-
return (
|
|
458
|
-
f"{_PYTHON_CMD} ./{DIR_WORKFLOW}/{DIR_SCRIPTS}/search_memory.py "
|
|
459
|
-
f'--query "{_quote_command_value(query)}" --json'
|
|
460
|
-
)
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
def _smart_search_evidence_command(question: str = "<question>") -> str:
|
|
464
|
-
return (
|
|
465
|
-
f"{_PYTHON_CMD} ./{DIR_WORKFLOW}/{DIR_SCRIPTS}/run_smart_search.py "
|
|
466
|
-
f'"{_quote_command_value(question)}" --intent deep-research --json'
|
|
467
|
-
)
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
def _query_tokens(*values: object) -> list[str]:
|
|
471
|
-
tokens: list[str] = []
|
|
472
|
-
seen: set[str] = set()
|
|
473
|
-
for value in values:
|
|
474
|
-
if not value:
|
|
475
|
-
continue
|
|
476
|
-
for raw_token in re.findall(r"[\w.-]+", str(value)):
|
|
477
|
-
token = raw_token.strip("._-")
|
|
478
|
-
if not token:
|
|
479
|
-
continue
|
|
480
|
-
key = token.lower()
|
|
481
|
-
if key in seen:
|
|
482
|
-
continue
|
|
483
|
-
seen.add(key)
|
|
484
|
-
tokens.append(token)
|
|
485
|
-
if len(tokens) >= 8:
|
|
486
|
-
return tokens
|
|
487
|
-
return tokens
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
def _selected_task_query(selected_task: str, task_info: object | None) -> str:
|
|
491
|
-
if task_info:
|
|
492
|
-
tokens = _query_tokens(
|
|
493
|
-
getattr(task_info, "title", ""),
|
|
494
|
-
getattr(task_info, "name", ""),
|
|
495
|
-
getattr(task_info, "package", ""),
|
|
496
|
-
getattr(task_info, "description", ""),
|
|
497
|
-
)
|
|
498
|
-
else:
|
|
499
|
-
tokens = _query_tokens(Path(selected_task).name)
|
|
500
|
-
return " ".join(tokens) if tokens else selected_task
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
def _recommendation(
|
|
504
|
-
source: str,
|
|
505
|
-
priority: int,
|
|
506
|
-
confidence: str,
|
|
507
|
-
reason: str,
|
|
508
|
-
action: str,
|
|
509
|
-
reference: str,
|
|
510
|
-
) -> dict[str, object]:
|
|
511
|
-
return {
|
|
512
|
-
"source": source,
|
|
513
|
-
"priority": priority,
|
|
514
|
-
"confidence": confidence,
|
|
515
|
-
"reason": reason,
|
|
516
|
-
"action": action,
|
|
517
|
-
"reference": reference,
|
|
518
|
-
}
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
def _resolve_selected_task_dir(repo_root: Path, selected_task: str) -> Path:
|
|
522
|
-
task_path = Path(selected_task)
|
|
523
|
-
if task_path.is_absolute():
|
|
524
|
-
return task_path
|
|
525
|
-
return repo_root / task_path
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
def _selected_task_artifacts(
|
|
529
|
-
repo_root: Path,
|
|
530
|
-
selected_task: str | None,
|
|
531
|
-
) -> dict[str, object] | None:
|
|
532
|
-
if not selected_task:
|
|
533
|
-
return None
|
|
534
|
-
|
|
535
|
-
task_dir = _resolve_selected_task_dir(repo_root, selected_task)
|
|
536
|
-
research_dir = task_dir / "research"
|
|
537
|
-
research_count = 0
|
|
538
|
-
if research_dir.is_dir():
|
|
539
|
-
research_count = len([p for p in research_dir.glob("*.md") if p.is_file()])
|
|
540
|
-
|
|
541
|
-
return {
|
|
542
|
-
"taskPath": selected_task,
|
|
543
|
-
"prd": (task_dir / "prd.md").is_file(),
|
|
544
|
-
"design": (task_dir / "design.md").is_file(),
|
|
545
|
-
"implement": (task_dir / "implement.md").is_file(),
|
|
546
|
-
"research": research_dir.is_dir(),
|
|
547
|
-
"researchCount": research_count,
|
|
548
|
-
"verify": (task_dir / "verify.md").is_file(),
|
|
549
|
-
}
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
def _get_retrieval_guide(
|
|
553
|
-
repo_root: Path,
|
|
554
|
-
selected_task: str | None,
|
|
555
|
-
) -> dict[str, object]:
|
|
556
|
-
guide: dict[str, object] = {
|
|
557
|
-
"artifactSearch": {
|
|
558
|
-
"command": _artifact_search_command(),
|
|
559
|
-
"purpose": (
|
|
560
|
-
"Find durable Pactile specs, tasks, research, verification "
|
|
561
|
-
"notes, and workspace journals."
|
|
562
|
-
),
|
|
563
|
-
},
|
|
564
|
-
"sessionMemory": {
|
|
565
|
-
"command": _session_memory_command(),
|
|
566
|
-
"purpose": (
|
|
567
|
-
"Find reusable session history, prior decisions, and recent "
|
|
568
|
-
"work context from local workspace journals."
|
|
569
|
-
),
|
|
570
|
-
},
|
|
571
|
-
"smartSearchEvidence": {
|
|
572
|
-
"command": _smart_search_evidence_command(),
|
|
573
|
-
"purpose": (
|
|
574
|
-
"Explicitly run Smart Search and save a task-local evidence "
|
|
575
|
-
"manifest for source-backed research."
|
|
576
|
-
),
|
|
577
|
-
},
|
|
578
|
-
"codebaseEvidence": (
|
|
579
|
-
"Treat adapter output as candidate evidence until current source, "
|
|
580
|
-
"Git, or validation confirms it."
|
|
581
|
-
),
|
|
582
|
-
"evidenceSinks": {
|
|
583
|
-
"exploratory": "selected task research/*.md",
|
|
584
|
-
"final": "selected task verify.md",
|
|
585
|
-
},
|
|
586
|
-
}
|
|
587
|
-
selected_artifacts = _selected_task_artifacts(repo_root, selected_task)
|
|
588
|
-
if selected_artifacts is not None:
|
|
589
|
-
guide["selectedTaskArtifacts"] = selected_artifacts
|
|
590
|
-
guide["recommendations"] = _get_retrieval_recommendations(
|
|
591
|
-
repo_root,
|
|
592
|
-
selected_task,
|
|
593
|
-
selected_artifacts,
|
|
594
|
-
)
|
|
595
|
-
return guide
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
def _get_retrieval_recommendations(
|
|
599
|
-
repo_root: Path,
|
|
600
|
-
selected_task: str | None,
|
|
601
|
-
selected_artifacts: dict[str, object] | None = None,
|
|
602
|
-
) -> list[dict[str, object]]:
|
|
603
|
-
if not selected_task:
|
|
604
|
-
return []
|
|
605
|
-
|
|
606
|
-
task_dir = _resolve_selected_task_dir(repo_root, selected_task)
|
|
607
|
-
task_info = load_task(task_dir)
|
|
608
|
-
artifacts = (
|
|
609
|
-
selected_artifacts
|
|
610
|
-
or _selected_task_artifacts(repo_root, selected_task)
|
|
611
|
-
or {}
|
|
612
|
-
)
|
|
613
|
-
query = _selected_task_query(selected_task, task_info)
|
|
614
|
-
recommendations: list[dict[str, object]] = []
|
|
615
|
-
|
|
616
|
-
has_local_artifacts = any(
|
|
617
|
-
bool(artifacts.get(key))
|
|
618
|
-
for key in ("prd", "design", "implement", "research", "verify")
|
|
619
|
-
)
|
|
620
|
-
if has_local_artifacts:
|
|
621
|
-
recommendations.append(
|
|
622
|
-
_recommendation(
|
|
623
|
-
"task-artifacts",
|
|
624
|
-
100,
|
|
625
|
-
"high",
|
|
626
|
-
"Selected task has local planning or evidence artifacts; read them first.",
|
|
627
|
-
"Read selected task prd.md, design.md, implement.md, research/*.md, and verify.md as present.",
|
|
628
|
-
selected_task,
|
|
629
|
-
)
|
|
630
|
-
)
|
|
631
|
-
|
|
632
|
-
recommendations.extend(
|
|
633
|
-
[
|
|
634
|
-
_recommendation(
|
|
635
|
-
"artifact-search",
|
|
636
|
-
90,
|
|
637
|
-
"high",
|
|
638
|
-
"Search durable Pactile specs, tasks, research, and verification notes for related context.",
|
|
639
|
-
_artifact_search_command(query),
|
|
640
|
-
selected_task,
|
|
641
|
-
),
|
|
642
|
-
_recommendation(
|
|
643
|
-
"session-memory",
|
|
644
|
-
80,
|
|
645
|
-
"medium",
|
|
646
|
-
"Search local session history for prior decisions and recent related work.",
|
|
647
|
-
_session_memory_command(query),
|
|
648
|
-
f"{DIR_WORKFLOW}/{DIR_WORKSPACE}/",
|
|
649
|
-
),
|
|
650
|
-
]
|
|
651
|
-
)
|
|
652
|
-
|
|
653
|
-
if bool(artifacts.get("research")):
|
|
654
|
-
smart_priority = 55
|
|
655
|
-
smart_confidence = "low"
|
|
656
|
-
smart_reason = (
|
|
657
|
-
"Research artifacts already exist; run Smart Search only for current external source gaps."
|
|
658
|
-
)
|
|
659
|
-
else:
|
|
660
|
-
smart_priority = 70
|
|
661
|
-
smart_confidence = "medium"
|
|
662
|
-
smart_reason = (
|
|
663
|
-
"No selected-task research artifacts are present; capture explicit external evidence when needed."
|
|
664
|
-
)
|
|
665
|
-
|
|
666
|
-
recommendations.extend(
|
|
667
|
-
[
|
|
668
|
-
_recommendation(
|
|
669
|
-
"smart-search",
|
|
670
|
-
smart_priority,
|
|
671
|
-
smart_confidence,
|
|
672
|
-
smart_reason,
|
|
673
|
-
_smart_search_evidence_command(query),
|
|
674
|
-
f"{selected_task}/research/smart-search/",
|
|
675
|
-
),
|
|
676
|
-
_recommendation(
|
|
677
|
-
"codebase-evidence",
|
|
678
|
-
60,
|
|
679
|
-
"medium",
|
|
680
|
-
"Confirm candidate codebase evidence against current source, Git state, or validation.",
|
|
681
|
-
"Inspect current source and run focused validation before treating codebase retrieval as proof.",
|
|
682
|
-
"current source tree",
|
|
683
|
-
),
|
|
684
|
-
]
|
|
685
|
-
)
|
|
686
|
-
|
|
687
|
-
recommendations.sort(
|
|
688
|
-
key=lambda item: (-int(item["priority"]), str(item["source"]))
|
|
689
|
-
)
|
|
690
|
-
return recommendations
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
def _present_missing(value: object) -> str:
|
|
694
|
-
return "present" if bool(value) else "missing"
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
def _append_retrieval_recommendations(
|
|
698
|
-
lines: list[str],
|
|
699
|
-
recommendations: list[dict[str, object]],
|
|
700
|
-
) -> None:
|
|
701
|
-
if not recommendations:
|
|
702
|
-
return
|
|
703
|
-
lines.append("Retrieval recommendations:")
|
|
704
|
-
for index, recommendation in enumerate(recommendations, start=1):
|
|
705
|
-
source = recommendation.get("source", "")
|
|
706
|
-
confidence = recommendation.get("confidence", "")
|
|
707
|
-
priority = recommendation.get("priority", "")
|
|
708
|
-
reason = recommendation.get("reason", "")
|
|
709
|
-
lines.append(f"{index}. {source} [{confidence}] priority {priority}: {reason}")
|
|
710
|
-
lines.append(f" Action: {recommendation.get('action', '')}")
|
|
711
|
-
lines.append(f" Reference: {recommendation.get('reference', '')}")
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
def _append_retrieval_guide(
|
|
715
|
-
lines: list[str],
|
|
716
|
-
repo_root: Path,
|
|
717
|
-
selected_task: str | None,
|
|
718
|
-
) -> None:
|
|
719
|
-
lines.append("## RETRIEVAL GUIDE")
|
|
720
|
-
lines.append(f"Artifact search: {_artifact_search_command()}")
|
|
721
|
-
lines.append(f"Session memory: {_session_memory_command()}")
|
|
722
|
-
lines.append(f"Smart Search evidence: {_smart_search_evidence_command()}")
|
|
723
|
-
lines.append(
|
|
724
|
-
"Use artifact search for durable Pactile specs, tasks, research, "
|
|
725
|
-
"verification notes, and workspace journals."
|
|
726
|
-
)
|
|
727
|
-
lines.append(
|
|
728
|
-
"Use session memory for reusable prior decisions and recent work "
|
|
729
|
-
"recorded in local workspace journals."
|
|
730
|
-
)
|
|
731
|
-
lines.append(
|
|
732
|
-
"Run Smart Search evidence only when external/current source evidence is "
|
|
733
|
-
"needed; it writes a task-local manifest under research/smart-search/."
|
|
734
|
-
)
|
|
735
|
-
lines.append(
|
|
736
|
-
"Codebase evidence: adapter output is candidate evidence until current "
|
|
737
|
-
"source, Git, or validation confirms it."
|
|
738
|
-
)
|
|
739
|
-
|
|
740
|
-
if selected_task:
|
|
741
|
-
lines.append(
|
|
742
|
-
f"Evidence sinks: {selected_task}/research/*.md for exploratory "
|
|
743
|
-
f"chains; {selected_task}/verify.md for final proof."
|
|
744
|
-
)
|
|
745
|
-
artifacts = _selected_task_artifacts(repo_root, selected_task)
|
|
746
|
-
if artifacts:
|
|
747
|
-
research_count = int(artifacts.get("researchCount", 0))
|
|
748
|
-
research_state = (
|
|
749
|
-
f"{research_count} markdown file(s)"
|
|
750
|
-
if research_count
|
|
751
|
-
else _present_missing(artifacts.get("research"))
|
|
752
|
-
)
|
|
753
|
-
lines.append("Selected-task artifacts:")
|
|
754
|
-
lines.append(f"- prd.md: {_present_missing(artifacts.get('prd'))}")
|
|
755
|
-
lines.append(f"- design.md: {_present_missing(artifacts.get('design'))}")
|
|
756
|
-
lines.append(
|
|
757
|
-
f"- implement.md: {_present_missing(artifacts.get('implement'))}"
|
|
758
|
-
)
|
|
759
|
-
lines.append(f"- research/: {research_state}")
|
|
760
|
-
lines.append(f"- verify.md: {_present_missing(artifacts.get('verify'))}")
|
|
761
|
-
_append_retrieval_recommendations(
|
|
762
|
-
lines,
|
|
763
|
-
_get_retrieval_recommendations(repo_root, selected_task, artifacts),
|
|
764
|
-
)
|
|
765
|
-
else:
|
|
766
|
-
lines.append(
|
|
767
|
-
"Evidence sinks: task research/*.md for exploratory chains; task "
|
|
768
|
-
"verify.md for final proof."
|
|
769
|
-
)
|
|
770
|
-
lines.append("")
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
# =============================================================================
|
|
774
|
-
# JSON Output
|
|
775
|
-
# =============================================================================
|
|
776
|
-
|
|
777
|
-
def get_context_json(repo_root: Path | None = None) -> dict:
|
|
778
|
-
"""Get context as a dictionary.
|
|
779
|
-
|
|
780
|
-
Args:
|
|
781
|
-
repo_root: Repository root path. Defaults to auto-detected.
|
|
782
|
-
|
|
783
|
-
Returns:
|
|
784
|
-
Context dictionary.
|
|
785
|
-
"""
|
|
786
|
-
if repo_root is None:
|
|
787
|
-
repo_root = get_repo_root()
|
|
788
|
-
|
|
789
|
-
developer = get_developer(repo_root)
|
|
790
|
-
tasks_dir = get_tasks_dir(repo_root)
|
|
791
|
-
journal_file = get_active_journal_file(repo_root)
|
|
792
|
-
|
|
793
|
-
journal_lines = 0
|
|
794
|
-
journal_relative = ""
|
|
795
|
-
if journal_file and developer:
|
|
796
|
-
journal_lines = count_lines(journal_file)
|
|
797
|
-
journal_relative = (
|
|
798
|
-
f"{DIR_WORKFLOW}/{DIR_WORKSPACE}/{developer}/{journal_file.name}"
|
|
799
|
-
)
|
|
800
|
-
|
|
801
|
-
root_git_info = _collect_root_git_info(repo_root)
|
|
802
|
-
|
|
803
|
-
# Tasks
|
|
804
|
-
tasks = [
|
|
805
|
-
{
|
|
806
|
-
"dir": t.dir_name,
|
|
807
|
-
"name": t.name,
|
|
808
|
-
"status": t.status,
|
|
809
|
-
"children": list(t.children),
|
|
810
|
-
"parent": t.parent,
|
|
811
|
-
}
|
|
812
|
-
for t in iter_active_tasks(tasks_dir)
|
|
813
|
-
]
|
|
814
|
-
|
|
815
|
-
# Package git repos (independent sub-repositories)
|
|
816
|
-
pkg_git_info = _collect_package_git_info(
|
|
817
|
-
repo_root,
|
|
818
|
-
discover_unconfigured=not root_git_info["isRepo"],
|
|
819
|
-
)
|
|
820
|
-
selected_task = get_selected_task(repo_root)
|
|
821
|
-
|
|
822
|
-
result = {
|
|
823
|
-
"developer": developer or "",
|
|
824
|
-
"artifactLocale": resolve_artifact_locale(
|
|
825
|
-
repo_root / selected_task if selected_task else None,
|
|
826
|
-
repo_root,
|
|
827
|
-
),
|
|
828
|
-
"git": {
|
|
829
|
-
"isRepo": root_git_info["isRepo"],
|
|
830
|
-
"branch": root_git_info["branch"],
|
|
831
|
-
"isClean": root_git_info["isClean"],
|
|
832
|
-
"uncommittedChanges": root_git_info["uncommittedChanges"],
|
|
833
|
-
"recentCommits": root_git_info["recentCommits"],
|
|
834
|
-
},
|
|
835
|
-
"tasks": {
|
|
836
|
-
"active": tasks,
|
|
837
|
-
"directory": f"{DIR_WORKFLOW}/{DIR_TASKS}",
|
|
838
|
-
},
|
|
839
|
-
"journal": {
|
|
840
|
-
"file": journal_relative,
|
|
841
|
-
"lines": journal_lines,
|
|
842
|
-
"nearLimit": journal_lines > 1800,
|
|
843
|
-
},
|
|
844
|
-
"retrievalGuide": _get_retrieval_guide(repo_root, selected_task),
|
|
845
|
-
}
|
|
846
|
-
|
|
847
|
-
if pkg_git_info:
|
|
848
|
-
result["packageGit"] = pkg_git_info
|
|
849
|
-
|
|
850
|
-
if get_journal_snippet_enabled(repo_root):
|
|
851
|
-
result["journal"]["snippet"] = _resolve_journal_snippet(
|
|
852
|
-
repo_root,
|
|
853
|
-
journal_file,
|
|
854
|
-
developer,
|
|
855
|
-
)
|
|
856
|
-
|
|
857
|
-
return result
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
def _resolve_journal_snippet(
|
|
861
|
-
repo_root: Path,
|
|
862
|
-
journal_file: Path | None,
|
|
863
|
-
developer: str | None,
|
|
864
|
-
) -> str:
|
|
865
|
-
if not journal_file or not developer:
|
|
866
|
-
return ""
|
|
867
|
-
try:
|
|
868
|
-
from .session_memory import get_latest_journal_summary
|
|
869
|
-
except ImportError:
|
|
870
|
-
return ""
|
|
871
|
-
return get_latest_journal_summary(journal_file, repo_root, developer)
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
def output_json(repo_root: Path | None = None) -> None:
|
|
875
|
-
"""Output context in JSON format.
|
|
876
|
-
|
|
877
|
-
Args:
|
|
878
|
-
repo_root: Repository root path. Defaults to auto-detected.
|
|
879
|
-
"""
|
|
880
|
-
context = get_context_json(repo_root)
|
|
881
|
-
print(json.dumps(context, indent=2, ensure_ascii=False))
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
# =============================================================================
|
|
885
|
-
# Text Output
|
|
886
|
-
# =============================================================================
|
|
887
|
-
|
|
888
|
-
def get_context_text(repo_root: Path | None = None) -> str:
|
|
889
|
-
"""Get context as formatted text.
|
|
890
|
-
|
|
891
|
-
Args:
|
|
892
|
-
repo_root: Repository root path. Defaults to auto-detected.
|
|
893
|
-
|
|
894
|
-
Returns:
|
|
895
|
-
Formatted text output.
|
|
896
|
-
"""
|
|
897
|
-
if repo_root is None:
|
|
898
|
-
repo_root = get_repo_root()
|
|
899
|
-
|
|
900
|
-
lines = []
|
|
901
|
-
lines.append("========================================")
|
|
902
|
-
lines.append("SESSION CONTEXT")
|
|
903
|
-
lines.append("========================================")
|
|
904
|
-
lines.append("")
|
|
905
|
-
|
|
906
|
-
developer = get_developer(repo_root)
|
|
907
|
-
|
|
908
|
-
# Developer section
|
|
909
|
-
lines.append("## DEVELOPER")
|
|
910
|
-
if not developer:
|
|
911
|
-
lines.append(
|
|
912
|
-
f"ERROR: Not initialized. Run: python ./{DIR_WORKFLOW}/{DIR_SCRIPTS}/init_developer.py <name>"
|
|
913
|
-
)
|
|
914
|
-
return "\n".join(lines)
|
|
915
|
-
|
|
916
|
-
lines.append(f"Name: {developer}")
|
|
917
|
-
lines.append(artifact_locale_summary(repo_root))
|
|
918
|
-
lines.append("")
|
|
919
|
-
|
|
920
|
-
root_git_info = _collect_root_git_info(repo_root)
|
|
921
|
-
_append_root_git_context(lines, root_git_info)
|
|
922
|
-
|
|
923
|
-
# Package git repos — independent sub-repositories
|
|
924
|
-
_append_package_git_context(
|
|
925
|
-
lines,
|
|
926
|
-
_collect_package_git_info(
|
|
927
|
-
repo_root,
|
|
928
|
-
discover_unconfigured=not root_git_info["isRepo"],
|
|
929
|
-
),
|
|
930
|
-
)
|
|
931
|
-
|
|
932
|
-
# Selected task
|
|
933
|
-
lines.append("## SELECTED TASK")
|
|
934
|
-
selected_task = get_selected_task(repo_root)
|
|
935
|
-
if selected_task:
|
|
936
|
-
selected_task_dir = repo_root / selected_task
|
|
937
|
-
source_type, context_key, _ = get_selected_task_source(repo_root)
|
|
938
|
-
lines.append(f"Path: {selected_task}")
|
|
939
|
-
lines.append(
|
|
940
|
-
f"Source: {source_type}" + (f":{context_key}" if context_key else "")
|
|
941
|
-
)
|
|
942
|
-
|
|
943
|
-
ct = load_task(selected_task_dir)
|
|
944
|
-
if ct:
|
|
945
|
-
lines.append(f"Name: {ct.name}")
|
|
946
|
-
lines.append(f"Status: {ct.status}")
|
|
947
|
-
lines.append(f"Created: {ct.raw.get('createdAt', 'unknown')}")
|
|
948
|
-
if ct.description:
|
|
949
|
-
lines.append(f"Description: {ct.description}")
|
|
950
|
-
|
|
951
|
-
# Check for prd.md
|
|
952
|
-
prd_file = selected_task_dir / "prd.md"
|
|
953
|
-
if prd_file.is_file():
|
|
954
|
-
lines.append("")
|
|
955
|
-
lines.append("[!] This task has prd.md - read it for task details")
|
|
956
|
-
else:
|
|
957
|
-
lines.append("(none)")
|
|
958
|
-
lines.append("")
|
|
959
|
-
|
|
960
|
-
_append_retrieval_guide(lines, repo_root, selected_task)
|
|
961
|
-
|
|
962
|
-
lines.append("## TASK DASHBOARD")
|
|
963
|
-
lines.extend(render_task_dashboard(repo_root).splitlines())
|
|
964
|
-
lines.append("")
|
|
965
|
-
|
|
966
|
-
# Active tasks
|
|
967
|
-
lines.append("## ACTIVE TASKS")
|
|
968
|
-
tasks_dir = get_tasks_dir(repo_root)
|
|
969
|
-
task_count = 0
|
|
970
|
-
|
|
971
|
-
# Collect all task data for hierarchy display
|
|
972
|
-
all_tasks = {t.dir_name: t for t in iter_active_tasks(tasks_dir)}
|
|
973
|
-
all_statuses = {name: t.status for name, t in all_tasks.items()}
|
|
974
|
-
|
|
975
|
-
def _print_task_tree(name: str, indent: int = 0) -> None:
|
|
976
|
-
nonlocal task_count
|
|
977
|
-
t = all_tasks[name]
|
|
978
|
-
progress = children_progress(t.children, all_statuses)
|
|
979
|
-
prefix = " " * indent
|
|
980
|
-
lines.append(f"{prefix}- {name}/ ({t.status}){progress} @{t.assignee or '-'}")
|
|
981
|
-
task_count += 1
|
|
982
|
-
for child in t.children:
|
|
983
|
-
if child in all_tasks:
|
|
984
|
-
_print_task_tree(child, indent + 1)
|
|
985
|
-
|
|
986
|
-
for dir_name in sorted(all_tasks.keys()):
|
|
987
|
-
if not all_tasks[dir_name].parent:
|
|
988
|
-
_print_task_tree(dir_name)
|
|
989
|
-
|
|
990
|
-
if task_count == 0:
|
|
991
|
-
lines.append("(no active tasks)")
|
|
992
|
-
lines.append(f"Total: {task_count} active task(s)")
|
|
993
|
-
lines.append("")
|
|
994
|
-
|
|
995
|
-
# My tasks
|
|
996
|
-
lines.append("## MY TASKS (Assigned to me)")
|
|
997
|
-
my_task_count = 0
|
|
998
|
-
|
|
999
|
-
for t in all_tasks.values():
|
|
1000
|
-
if t.assignee == developer and t.status != "done":
|
|
1001
|
-
progress = children_progress(t.children, all_statuses)
|
|
1002
|
-
lines.append(f"- [{t.priority}] {t.title} ({t.status}){progress}")
|
|
1003
|
-
my_task_count += 1
|
|
1004
|
-
|
|
1005
|
-
if my_task_count == 0:
|
|
1006
|
-
lines.append("(no tasks assigned to you)")
|
|
1007
|
-
lines.append("")
|
|
1008
|
-
|
|
1009
|
-
# Journal file
|
|
1010
|
-
lines.append("## JOURNAL FILE")
|
|
1011
|
-
journal_file = get_active_journal_file(repo_root)
|
|
1012
|
-
if journal_file:
|
|
1013
|
-
journal_lines = count_lines(journal_file)
|
|
1014
|
-
relative = f"{DIR_WORKFLOW}/{DIR_WORKSPACE}/{developer}/{journal_file.name}"
|
|
1015
|
-
lines.append(f"Active file: {relative}")
|
|
1016
|
-
lines.append(f"Line count: {journal_lines} / 2000")
|
|
1017
|
-
if journal_lines > 1800:
|
|
1018
|
-
lines.append("[!] WARNING: Approaching 2000 line limit!")
|
|
1019
|
-
if get_journal_snippet_enabled(repo_root):
|
|
1020
|
-
snippet = _resolve_journal_snippet(repo_root, journal_file, developer)
|
|
1021
|
-
if snippet:
|
|
1022
|
-
lines.append(f"Recent snippet: {snippet}")
|
|
1023
|
-
else:
|
|
1024
|
-
lines.append("No journal file found")
|
|
1025
|
-
lines.append("")
|
|
1026
|
-
|
|
1027
|
-
# Packages
|
|
1028
|
-
packages_text = get_packages_section(repo_root)
|
|
1029
|
-
if packages_text:
|
|
1030
|
-
lines.append(packages_text)
|
|
1031
|
-
lines.append("")
|
|
1032
|
-
|
|
1033
|
-
# Paths
|
|
1034
|
-
lines.append("## PATHS")
|
|
1035
|
-
lines.append(f"Workspace: {DIR_WORKFLOW}/{DIR_WORKSPACE}/{developer}/")
|
|
1036
|
-
lines.append(f"Tasks: {DIR_WORKFLOW}/{DIR_TASKS}/")
|
|
1037
|
-
lines.append(f"Spec: {DIR_WORKFLOW}/{DIR_SPEC}/")
|
|
1038
|
-
lines.append("")
|
|
1039
|
-
|
|
1040
|
-
lines.append("========================================")
|
|
1041
|
-
|
|
1042
|
-
return "\n".join(lines)
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
# =============================================================================
|
|
1046
|
-
# Record Mode
|
|
1047
|
-
# =============================================================================
|
|
1048
|
-
|
|
1049
|
-
def get_context_record_json(repo_root: Path | None = None) -> dict:
|
|
1050
|
-
"""Get record-mode context as a dictionary.
|
|
1051
|
-
|
|
1052
|
-
Focused on: my active tasks, git status, selected task.
|
|
1053
|
-
"""
|
|
1054
|
-
if repo_root is None:
|
|
1055
|
-
repo_root = get_repo_root()
|
|
1056
|
-
|
|
1057
|
-
developer = get_developer(repo_root)
|
|
1058
|
-
tasks_dir = get_tasks_dir(repo_root)
|
|
1059
|
-
|
|
1060
|
-
root_git_info = _collect_root_git_info(repo_root)
|
|
1061
|
-
|
|
1062
|
-
# My tasks (single pass — collect statuses and filter by assignee)
|
|
1063
|
-
all_tasks_list = list(iter_active_tasks(tasks_dir))
|
|
1064
|
-
all_statuses = {t.dir_name: t.status for t in all_tasks_list}
|
|
1065
|
-
|
|
1066
|
-
my_tasks = []
|
|
1067
|
-
for t in all_tasks_list:
|
|
1068
|
-
if t.assignee == developer:
|
|
1069
|
-
done = sum(
|
|
1070
|
-
1 for c in t.children
|
|
1071
|
-
if all_statuses.get(c) in ("completed", "done")
|
|
1072
|
-
)
|
|
1073
|
-
my_tasks.append({
|
|
1074
|
-
"dir": t.dir_name,
|
|
1075
|
-
"title": t.title,
|
|
1076
|
-
"status": t.status,
|
|
1077
|
-
"priority": t.priority,
|
|
1078
|
-
"children": list(t.children),
|
|
1079
|
-
"childrenDone": done,
|
|
1080
|
-
"parent": t.parent,
|
|
1081
|
-
"meta": t.meta,
|
|
1082
|
-
})
|
|
1083
|
-
|
|
1084
|
-
# Selected task
|
|
1085
|
-
selected_task_info = None
|
|
1086
|
-
selected_task = get_selected_task(repo_root)
|
|
1087
|
-
if selected_task:
|
|
1088
|
-
source_type, context_key, _ = get_selected_task_source(repo_root)
|
|
1089
|
-
ct = load_task(repo_root / selected_task)
|
|
1090
|
-
if ct:
|
|
1091
|
-
selected_task_info = {
|
|
1092
|
-
"path": selected_task,
|
|
1093
|
-
"name": ct.name,
|
|
1094
|
-
"status": ct.status,
|
|
1095
|
-
"source": source_type,
|
|
1096
|
-
"contextKey": context_key,
|
|
1097
|
-
}
|
|
1098
|
-
|
|
1099
|
-
# Package git repos
|
|
1100
|
-
pkg_git_info = _collect_package_git_info(
|
|
1101
|
-
repo_root,
|
|
1102
|
-
discover_unconfigured=not root_git_info["isRepo"],
|
|
1103
|
-
)
|
|
1104
|
-
|
|
1105
|
-
result = {
|
|
1106
|
-
"developer": developer or "",
|
|
1107
|
-
"git": {
|
|
1108
|
-
"isRepo": root_git_info["isRepo"],
|
|
1109
|
-
"branch": root_git_info["branch"],
|
|
1110
|
-
"isClean": root_git_info["isClean"],
|
|
1111
|
-
"uncommittedChanges": root_git_info["uncommittedChanges"],
|
|
1112
|
-
"recentCommits": root_git_info["recentCommits"],
|
|
1113
|
-
},
|
|
1114
|
-
"myTasks": my_tasks,
|
|
1115
|
-
"selectedTask": selected_task_info,
|
|
1116
|
-
}
|
|
1117
|
-
|
|
1118
|
-
if pkg_git_info:
|
|
1119
|
-
result["packageGit"] = pkg_git_info
|
|
1120
|
-
|
|
1121
|
-
return result
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
def get_context_text_record(repo_root: Path | None = None) -> str:
|
|
1125
|
-
"""Get context as formatted text for record-session mode.
|
|
1126
|
-
|
|
1127
|
-
Focused output: MY ACTIVE TASKS first (with [!!!] emphasis),
|
|
1128
|
-
then GIT STATUS, RECENT COMMITS, SELECTED TASK.
|
|
1129
|
-
"""
|
|
1130
|
-
if repo_root is None:
|
|
1131
|
-
repo_root = get_repo_root()
|
|
1132
|
-
|
|
1133
|
-
lines: list[str] = []
|
|
1134
|
-
lines.append("========================================")
|
|
1135
|
-
lines.append("SESSION CONTEXT (RECORD MODE)")
|
|
1136
|
-
lines.append("========================================")
|
|
1137
|
-
lines.append("")
|
|
1138
|
-
|
|
1139
|
-
developer = get_developer(repo_root)
|
|
1140
|
-
if not developer:
|
|
1141
|
-
lines.append(
|
|
1142
|
-
f"ERROR: Not initialized. Run: python ./{DIR_WORKFLOW}/{DIR_SCRIPTS}/init_developer.py <name>"
|
|
1143
|
-
)
|
|
1144
|
-
return "\n".join(lines)
|
|
1145
|
-
|
|
1146
|
-
# MY ACTIVE TASKS — first and prominent
|
|
1147
|
-
lines.append(f"## [!!!] MY ACTIVE TASKS (Assigned to {developer})")
|
|
1148
|
-
lines.append("[!] Review whether any should be archived before recording this session.")
|
|
1149
|
-
lines.append("")
|
|
1150
|
-
|
|
1151
|
-
tasks_dir = get_tasks_dir(repo_root)
|
|
1152
|
-
my_task_count = 0
|
|
1153
|
-
|
|
1154
|
-
# Single pass — collect all tasks and filter by assignee
|
|
1155
|
-
all_statuses = get_all_statuses(tasks_dir)
|
|
1156
|
-
|
|
1157
|
-
for t in iter_active_tasks(tasks_dir):
|
|
1158
|
-
if t.assignee == developer:
|
|
1159
|
-
progress = children_progress(t.children, all_statuses)
|
|
1160
|
-
lines.append(f"- [{t.priority}] {t.title} ({t.status}){progress} — {t.dir_name}")
|
|
1161
|
-
my_task_count += 1
|
|
1162
|
-
|
|
1163
|
-
if my_task_count == 0:
|
|
1164
|
-
lines.append("(no active tasks assigned to you)")
|
|
1165
|
-
lines.append("")
|
|
1166
|
-
|
|
1167
|
-
root_git_info = _collect_root_git_info(repo_root)
|
|
1168
|
-
_append_root_git_context(lines, root_git_info)
|
|
1169
|
-
|
|
1170
|
-
# Package git repos — independent sub-repositories
|
|
1171
|
-
_append_package_git_context(
|
|
1172
|
-
lines,
|
|
1173
|
-
_collect_package_git_info(
|
|
1174
|
-
repo_root,
|
|
1175
|
-
discover_unconfigured=not root_git_info["isRepo"],
|
|
1176
|
-
),
|
|
1177
|
-
)
|
|
1178
|
-
|
|
1179
|
-
# SELECTED TASK
|
|
1180
|
-
lines.append("## SELECTED TASK")
|
|
1181
|
-
selected_task = get_selected_task(repo_root)
|
|
1182
|
-
if selected_task:
|
|
1183
|
-
source_type, context_key, _ = get_selected_task_source(repo_root)
|
|
1184
|
-
lines.append(f"Path: {selected_task}")
|
|
1185
|
-
lines.append(
|
|
1186
|
-
f"Source: {source_type}" + (f":{context_key}" if context_key else "")
|
|
1187
|
-
)
|
|
1188
|
-
ct = load_task(repo_root / selected_task)
|
|
1189
|
-
if ct:
|
|
1190
|
-
lines.append(f"Name: {ct.name}")
|
|
1191
|
-
lines.append(f"Status: {ct.status}")
|
|
1192
|
-
else:
|
|
1193
|
-
lines.append("(none)")
|
|
1194
|
-
lines.append("")
|
|
1195
|
-
|
|
1196
|
-
lines.append("========================================")
|
|
1197
|
-
|
|
1198
|
-
return "\n".join(lines)
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
def output_text(repo_root: Path | None = None) -> None:
|
|
1202
|
-
"""Output context in text format.
|
|
1203
|
-
|
|
1204
|
-
Args:
|
|
1205
|
-
repo_root: Repository root path. Defaults to auto-detected.
|
|
1206
|
-
"""
|
|
1207
|
-
if repo_root is None:
|
|
1208
|
-
repo_root = get_repo_root()
|
|
1209
|
-
update_hint = _get_update_hint(repo_root)
|
|
1210
|
-
if update_hint:
|
|
1211
|
-
print(update_hint)
|
|
1212
|
-
print("")
|
|
1213
|
-
print(get_context_text(repo_root))
|