@geraldmaron/construct 1.0.7 → 1.0.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (147) hide show
  1. package/README.md +20 -17
  2. package/bin/construct +1199 -69
  3. package/commands/work/optimize-prompts.md +1 -1
  4. package/db/schema/007_tags.sql +30 -0
  5. package/db/schema/008_skill_usage.sql +24 -0
  6. package/db/schema/009_scheduler.sql +14 -0
  7. package/examples/internal/roles/architect/bad/clever-plan-without-contracts.md +1 -1
  8. package/examples/internal/roles/architect/golden/explicit-tradeoff-before-plan.md +1 -1
  9. package/examples/internal/roles/engineer/bad/speculative-abstraction.md +1 -1
  10. package/examples/internal/roles/engineer/golden/read-before-write.md +1 -1
  11. package/examples/internal/roles/qa/bad/coverage-theater.md +1 -1
  12. package/examples/internal/roles/qa/golden/regression-gate.md +1 -1
  13. package/examples/seed-observations/decisions.md +1 -1
  14. package/lib/audit-skills.mjs +3 -3
  15. package/lib/auto-docs.mjs +2 -2
  16. package/lib/cli-commands.mjs +276 -122
  17. package/lib/comment-lint.mjs +5 -1
  18. package/lib/completions.mjs +1 -1
  19. package/lib/config/schema.mjs +15 -1
  20. package/lib/contracts/validate.mjs +65 -17
  21. package/lib/distill.mjs +22 -4
  22. package/lib/doc-stamp.mjs +48 -0
  23. package/lib/doctor/watchers/consistency.mjs +62 -12
  24. package/lib/document-extract.mjs +221 -28
  25. package/lib/document-ingest.mjs +2 -0
  26. package/lib/embed/inbox.mjs +48 -3
  27. package/lib/embed/role-framing.mjs +3 -3
  28. package/lib/env-config.mjs +9 -3
  29. package/lib/extractors/calendar.mjs +173 -0
  30. package/lib/extractors/shared/drop-info.mjs +22 -0
  31. package/lib/extractors/transcript.mjs +0 -0
  32. package/lib/gates-audit.mjs +8 -2
  33. package/lib/git-hooks/prepare-commit-msg +1 -1
  34. package/lib/headhunt.mjs +2 -2
  35. package/lib/hooks/agent-tracker.mjs +6 -11
  36. package/lib/hooks/guard-bash.mjs +35 -14
  37. package/lib/hooks/mcp-audit.mjs +12 -0
  38. package/lib/hooks/pre-compact.mjs +92 -5
  39. package/lib/hooks/pre-push-gate.mjs +41 -8
  40. package/lib/hooks/registry-sync.mjs +2 -2
  41. package/lib/hooks/stop-notify.mjs +7 -6
  42. package/lib/host-capabilities.mjs +10 -1
  43. package/lib/hygiene/scan.mjs +141 -0
  44. package/lib/init-unified.mjs +18 -0
  45. package/lib/install/stage-project.mjs +4 -4
  46. package/lib/intake/classify.mjs +222 -55
  47. package/lib/intake/filesystem-queue.mjs +25 -5
  48. package/lib/intake/postgres-queue.mjs +45 -3
  49. package/lib/intake/prepare.mjs +3 -0
  50. package/lib/intake/quarantine.mjs +205 -0
  51. package/lib/knowledge/postgres-search.mjs +132 -0
  52. package/lib/knowledge/search.mjs +14 -4
  53. package/lib/mcp/server.mjs +9 -3
  54. package/lib/mcp/tools/skills.mjs +32 -11
  55. package/lib/mcp/tools/workflow.mjs +1 -1
  56. package/lib/migrations/index.mjs +1 -1
  57. package/lib/model-registry.mjs +1 -1
  58. package/lib/opencode-runtime-plugin.mjs +1 -1
  59. package/lib/orchestration-policy.mjs +4 -4
  60. package/lib/overrides/resolver.mjs +3 -3
  61. package/lib/parity.mjs +4 -4
  62. package/lib/policy/engine.mjs +2 -2
  63. package/lib/profiles/lifecycle.mjs +1 -1
  64. package/lib/prompt-metadata.mjs +4 -4
  65. package/lib/providers/circuit-breaker.mjs +14 -0
  66. package/lib/providers/contract.mjs +67 -3
  67. package/lib/providers/creds.mjs +219 -0
  68. package/lib/providers/scaffold.mjs +107 -0
  69. package/lib/role-preload.mjs +5 -0
  70. package/lib/roles/catalog.mjs +1 -1
  71. package/lib/roles/manifest.mjs +2 -2
  72. package/lib/scheduler/index.mjs +112 -0
  73. package/lib/scheduler/solo.mjs +183 -0
  74. package/lib/server/index.mjs +7 -1
  75. package/lib/server/insights.mjs +14 -12
  76. package/lib/server/langfuse-login.mjs +58 -0
  77. package/lib/server/static/assets/index-ab25c707.js +1 -1
  78. package/lib/{agent-contracts-enforce.mjs → specialist-contracts-enforce.mjs} +4 -4
  79. package/lib/{agent-contracts.mjs → specialist-contracts.mjs} +9 -8
  80. package/lib/{agents → specialists}/postconditions.mjs +3 -3
  81. package/lib/{agents → specialists}/schema.mjs +6 -6
  82. package/lib/status.mjs +13 -11
  83. package/lib/storage/backup.mjs +2 -2
  84. package/lib/tags/lifecycle.mjs +278 -0
  85. package/lib/tags/vocabulary.mjs +140 -0
  86. package/lib/telemetry/otel-tracer.mjs +184 -0
  87. package/lib/telemetry/skill-calls.mjs +73 -12
  88. package/lib/uninstall/uninstall.mjs +1 -1
  89. package/lib/update.mjs +1 -1
  90. package/lib/validator.mjs +57 -56
  91. package/lib/workflows/instantiate.mjs +320 -0
  92. package/package.json +13 -3
  93. package/personas/construct.md +2 -2
  94. package/platforms/claude/CLAUDE.md +1 -1
  95. package/rules/common/no-fabrication.md +1 -1
  96. package/scripts/{sync-agents.mjs → sync-specialists.mjs} +130 -58
  97. package/skills/ai/prompt-optimizer.md +3 -3
  98. package/skills/exploration/dependency-graph-reading.md +98 -0
  99. package/skills/exploration/tracer-bullet-method.md +71 -0
  100. package/skills/exploration/unknown-codebase-onboarding.md +91 -0
  101. package/skills/operating/change-management.md +91 -0
  102. package/skills/operating/incident-response.md +75 -0
  103. package/skills/operating/oncall-rotation.md +95 -0
  104. package/skills/operating/orchestration-reference.md +2 -2
  105. package/skills/strategy/competitive-landscape.md +75 -0
  106. package/skills/strategy/market-research-methods.md +87 -0
  107. package/skills/strategy/narrative-arc.md +77 -0
  108. package/skills/strategy/pricing-positioning.md +94 -0
  109. package/{agents → specialists}/contracts.schema.json +1 -1
  110. package/specialists/policy-inventory.json +160 -0
  111. package/{agents → specialists}/prompts/cx-accessibility.md +1 -1
  112. package/{agents → specialists}/prompts/cx-ai-engineer.md +1 -1
  113. package/{agents → specialists}/prompts/cx-architect.md +1 -1
  114. package/{agents → specialists}/prompts/cx-business-strategist.md +1 -1
  115. package/{agents → specialists}/prompts/cx-data-analyst.md +1 -1
  116. package/{agents → specialists}/prompts/cx-data-engineer.md +1 -1
  117. package/{agents → specialists}/prompts/cx-debugger.md +1 -1
  118. package/{agents → specialists}/prompts/cx-designer.md +1 -1
  119. package/{agents → specialists}/prompts/cx-devil-advocate.md +1 -1
  120. package/{agents → specialists}/prompts/cx-docs-keeper.md +2 -2
  121. package/{agents → specialists}/prompts/cx-engineer.md +2 -2
  122. package/{agents → specialists}/prompts/cx-evaluator.md +1 -1
  123. package/{agents → specialists}/prompts/cx-explorer.md +1 -1
  124. package/{agents → specialists}/prompts/cx-legal-compliance.md +1 -1
  125. package/{agents → specialists}/prompts/cx-operations.md +1 -1
  126. package/{agents → specialists}/prompts/cx-orchestrator.md +2 -2
  127. package/{agents → specialists}/prompts/cx-platform-engineer.md +1 -1
  128. package/{agents → specialists}/prompts/cx-product-manager.md +1 -1
  129. package/{agents → specialists}/prompts/cx-qa.md +1 -1
  130. package/{agents → specialists}/prompts/cx-rd-lead.md +1 -1
  131. package/{agents → specialists}/prompts/cx-release-manager.md +1 -1
  132. package/{agents → specialists}/prompts/cx-researcher.md +1 -1
  133. package/{agents → specialists}/prompts/cx-reviewer.md +2 -2
  134. package/{agents → specialists}/prompts/cx-security.md +1 -1
  135. package/{agents → specialists}/prompts/cx-sre.md +2 -2
  136. package/{agents → specialists}/prompts/cx-test-automation.md +1 -1
  137. package/{agents → specialists}/prompts/cx-trace-reviewer.md +3 -3
  138. package/{agents → specialists}/prompts/cx-ux-researcher.md +1 -1
  139. package/{agents → specialists}/registry.json +651 -423
  140. package/{agents → specialists}/role-manifests.json +8 -8
  141. package/templates/provider-scaffold/health.test.mjs +30 -0
  142. package/templates/provider-scaffold/index.mjs +48 -0
  143. package/templates/workflows/cross-team-handoff.yml +85 -0
  144. package/templates/workflows/engineering-onboarding.yml +77 -0
  145. package/templates/workflows/new-feature.yml +53 -0
  146. /package/{agents → specialists}/contracts.json +0 -0
  147. /package/{agents → specialists}/teams.json +0 -0
package/README.md CHANGED
@@ -93,7 +93,6 @@ Construct gets smarter on its own. Every session ends with an automatic capture:
93
93
  | `construct init` | Initialize project and start services |
94
94
  | `construct install` | Machine setup: install Docker, cm, and bootstrap config |
95
95
  | `construct intake` | View and process the active profile's intake queue (queue label varies by profile) |
96
- | `construct models` | Manage AI model assignments |
97
96
  | `construct profile` | Manage the active org profile and its lifecycle (draft, promote, archive, health) |
98
97
  | `construct recommendations` | View and manage artifact recommendations |
99
98
  | `construct sandbox` | Isolated tmpdir-based environment for QA / specialist dry-runs |
@@ -105,7 +104,7 @@ Construct gets smarter on its own. Every session ends with an automatic capture:
105
104
 
106
105
  | Command | What it does |
107
106
  |---|---|
108
- | `construct bootstrap` | Import seed observations |
107
+ | `construct bootstrap` | Import seed observation corpus into local memory store for cold-start acceleration |
109
108
  | `construct customer` | Manage customer profiles for product intelligence |
110
109
  | `construct distill` | Distill documents with query-focused chunking |
111
110
  | `construct drop` | Ingest file from Downloads/Desktop |
@@ -116,43 +115,44 @@ Construct gets smarter on its own. Every session ends with an automatic capture:
116
115
  | `construct integrations` | Check and manage external system connections |
117
116
  | `construct knowledge` | Query, index, or add to the project knowledge base |
118
117
  | `construct memory` | Inspect memory layer |
119
- | `construct reflect` | Capture improvement feedback |
118
+ | `construct reflect` | Capture improvement feedback from chat session and update Construct core |
120
119
  | `construct search` | Hybrid search across project state |
121
120
  | `construct storage` | Manage storage backend |
122
- | `construct team` | Team review and templates |
121
+ | `construct tags` | Manage the controlled tag vocabulary (propose, add, deprecate, audit) |
122
+ | `construct team` | Team review and template listing |
123
123
  | `construct wireframe` | Generate wireframes from description |
124
+ | `construct workflow` | Instantiate workflow templates (PRD-to-review chains, onboarding, handoffs) |
124
125
  | `construct workspace` | Manage PM workspaces for multi-PM signal routing |
125
126
 
126
127
  ### Integrations
127
128
 
128
129
  | Command | What it does |
129
130
  |---|---|
130
- | `construct claude:allow` | Manage Claude Code permissions |
131
- | `construct hosts` | Check host capabilities |
132
- | `construct mcp` | Manage MCP integrations |
131
+ | `construct creds` | Manage provider credentials (set, rotate, revoke, list) |
133
132
  | `construct ollama` | Manage local Ollama models |
134
- | `construct plugin` | Manage plugin manifests |
133
+ | `construct providers` | Provider status, circuit-breaker reset, and resource discovery |
135
134
 
136
135
  ### Observability
137
136
 
138
137
  | Command | What it does |
139
138
  |---|---|
140
- | `construct cost` | Token usage and cost breakdown |
141
- | `construct efficiency` | Read efficiency metrics |
142
- | `construct evals` | Evaluator catalog |
143
- | `construct llm-judge` | LLM-as-judge evaluations |
144
- | `construct optimize` | Prompt optimization |
145
- | `construct review` | Agent performance review |
139
+ | `construct efficiency` | Show read efficiency, repeated files, and context-budget guidance |
140
+ | `construct eval-datasets` | Sync scored Langfuse traces into eval datasets for prompt regression testing |
141
+ | `construct evals` | Show evaluator catalog for prompt and agent experiments |
142
+ | `construct llm-judge` | Run LLM-as-a-judge evaluations on unscored traces for continuous quality feedback |
143
+ | `construct optimize` | Prompt optimization using Langfuse trace quality scores |
144
+ | `construct review` | Generate agent performance review from Langfuse trace backend |
145
+ | `construct telemetry` | Query telemetry traces and latency data |
146
+ | `construct telemetry-backfill` | Backfill sparse traces with observations (trace backend) |
146
147
 
147
148
  ### Advanced
148
149
 
149
150
  | Command | What it does |
150
151
  |---|---|
151
- | `construct audit` | Audit Construct internals |
152
152
  | `construct auth:status` | Check auth status |
153
153
  | `construct backup` | System backups |
154
154
  | `construct beads` | Task queue management |
155
- | `construct cleanup` | Clean stale processes |
155
+ | `construct ci` | Local CI mirror: run CI jobs locally or view recent run status |
156
156
  | `construct completions` | Shell completion scripts |
157
157
  | `construct config` | Deployment mode configuration |
158
158
  | `construct diff` | Show agent changes since HEAD |
@@ -160,8 +160,10 @@ Construct gets smarter on its own. Every session ends with an automatic capture:
160
160
  | `construct gates:audit` | Audit policy gates |
161
161
  | `construct hooks:health` | Check hook health |
162
162
  | `construct list` | List all agents |
163
+ | `construct policy` | Show active policy gates with enforcement details |
163
164
  | `construct provider` | Provider management |
164
165
  | `construct role` | Role framework management |
166
+ | `construct scheduler` | Manage scheduled background jobs (tag-mining, doc-hygiene, skill-rollup) |
165
167
  | `construct skills` | Skill relevance detection |
166
168
  | `construct uninstall` | Remove Construct state |
167
169
  | `construct update` | Reinstall this checkout |
@@ -182,10 +184,10 @@ Construct gets smarter on its own. Every session ends with an automatic capture:
182
184
  <!-- AUTO:structure -->
183
185
  ```text
184
186
  construct/
185
- ├── agents Registry and generated platform adapter chains
186
187
  ├── apps User-facing apps shipped from this repo (e.g. apps/docs/, the Fumadocs docs site)
187
188
  ├── bin CLI entrypoint (`construct`)
188
189
  ├── commands Command prompt assets
190
+ ├── config
189
191
  ├── dashboard
190
192
  ├── db
191
193
  ├── deploy
@@ -201,6 +203,7 @@ construct/
201
203
  ├── scripts
202
204
  ├── services
203
205
  ├── skills Reusable domain knowledge files
206
+ ├── specialists
204
207
  ├── templates
205
208
  ├── tests Test suite
206
209
  ```