@stravica-ai/digital-operator-pa 0.1.0
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/LICENSE +21 -0
- package/README.md +170 -0
- package/bin/desk +9 -0
- package/bin/distill +2 -0
- package/bin/estate-sync +2 -0
- package/bin/launch +2 -0
- package/bin/memory-sync +2 -0
- package/bin/migrate-inspect +2 -0
- package/bin/pa +2 -0
- package/bin/pa-coordinator-hook +2 -0
- package/bin/pa-init +2 -0
- package/bin/research +2 -0
- package/bin/scheduler +2 -0
- package/bin/secrets +2 -0
- package/bin/slice +2 -0
- package/bin/smoke +9 -0
- package/bin/sync +2 -0
- package/dist/engineering-pa-cli/README.md +205 -0
- package/dist/engineering-pa-cli/bin/estate-sync +2 -0
- package/dist/engineering-pa-cli/bin/launch +2 -0
- package/dist/engineering-pa-cli/bin/pa +2 -0
- package/dist/engineering-pa-cli/bin/pa-coordinator-hook +12 -0
- package/dist/engineering-pa-cli/bin/research +2 -0
- package/dist/engineering-pa-cli/bin/scheduler +2 -0
- package/dist/engineering-pa-cli/bin/secrets +2 -0
- package/dist/engineering-pa-cli/bin/smoke +9 -0
- package/dist/engineering-pa-cli/bin/sync +2 -0
- package/dist/engineering-pa-cli/config/coordinator-allowlist.json +118 -0
- package/dist/engineering-pa-cli/docs/coordinator-hook.md +211 -0
- package/dist/engineering-pa-cli/docs/estate-sync.md +412 -0
- package/dist/engineering-pa-cli/docs/gsc.md +175 -0
- package/dist/engineering-pa-cli/docs/lint-linkedin.md +139 -0
- package/dist/engineering-pa-cli/docs/secrets.md +221 -0
- package/dist/engineering-pa-cli/docs/smoke.md +113 -0
- package/dist/engineering-pa-cli/docs/staging-alias.md +114 -0
- package/dist/engineering-pa-cli/index.mjs +17 -0
- package/dist/engineering-pa-cli/package.json +37 -0
- package/dist/engineering-pa-cli/src/autonomy/cli.mjs +329 -0
- package/dist/engineering-pa-cli/src/autonomy/envelope.mjs +301 -0
- package/dist/engineering-pa-cli/src/coordinator-hook/cli.mjs +140 -0
- package/dist/engineering-pa-cli/src/coordinator-hook/config.mjs +134 -0
- package/dist/engineering-pa-cli/src/coordinator-hook/message.mjs +47 -0
- package/dist/engineering-pa-cli/src/coordinator-hook/policy.mjs +211 -0
- package/dist/engineering-pa-cli/src/coordinator-hook/repo-root.mjs +44 -0
- package/dist/engineering-pa-cli/src/coordinator-hook/self.mjs +30 -0
- package/dist/engineering-pa-cli/src/environment/cli.mjs +287 -0
- package/dist/engineering-pa-cli/src/environment/probes.mjs +302 -0
- package/dist/engineering-pa-cli/src/gsc/auth.mjs +148 -0
- package/dist/engineering-pa-cli/src/gsc/cli.mjs +93 -0
- package/dist/engineering-pa-cli/src/gsc/cloudflare.mjs +318 -0
- package/dist/engineering-pa-cli/src/gsc/commands/add-property.mjs +70 -0
- package/dist/engineering-pa-cli/src/gsc/commands/list-properties.mjs +33 -0
- package/dist/engineering-pa-cli/src/gsc/commands/pull-analytics.mjs +130 -0
- package/dist/engineering-pa-cli/src/gsc/commands/submit-sitemap.mjs +41 -0
- package/dist/engineering-pa-cli/src/gsc/commands/verify-via-cf-dns.mjs +189 -0
- package/dist/engineering-pa-cli/src/knowledge/call-log.mjs +59 -0
- package/dist/engineering-pa-cli/src/knowledge/cli.mjs +242 -0
- package/dist/engineering-pa-cli/src/knowledge/eval.mjs +446 -0
- package/dist/engineering-pa-cli/src/knowledge/formatters.mjs +331 -0
- package/dist/engineering-pa-cli/src/knowledge/graph.mjs +710 -0
- package/dist/engineering-pa-cli/src/launch/README.md +214 -0
- package/dist/engineering-pa-cli/src/launch/cli.mjs +51 -0
- package/dist/engineering-pa-cli/src/launch/commands/launch.mjs +106 -0
- package/dist/engineering-pa-cli/src/launch/identity.mjs +43 -0
- package/dist/engineering-pa-cli/src/launch/planner.mjs +44 -0
- package/dist/engineering-pa-cli/src/launch/repo-root.mjs +53 -0
- package/dist/engineering-pa-cli/src/launch/runner.mjs +147 -0
- package/dist/engineering-pa-cli/src/launch/task-loader.mjs +85 -0
- package/dist/engineering-pa-cli/src/lint/cli.mjs +61 -0
- package/dist/engineering-pa-cli/src/lint/commands/linkedin.mjs +133 -0
- package/dist/engineering-pa-cli/src/lint/detectors.mjs +90 -0
- package/dist/engineering-pa-cli/src/lint/linter.mjs +69 -0
- package/dist/engineering-pa-cli/src/lint/reporter.mjs +32 -0
- package/dist/engineering-pa-cli/src/lint/rules.mjs +132 -0
- package/dist/engineering-pa-cli/src/pa/cli.mjs +369 -0
- package/dist/engineering-pa-cli/src/pa/doc-groups.mjs +164 -0
- package/dist/engineering-pa-cli/src/pa/io.mjs +80 -0
- package/dist/engineering-pa-cli/src/pa/project-cli.mjs +385 -0
- package/dist/engineering-pa-cli/src/pa/projects.mjs +352 -0
- package/dist/engineering-pa-cli/src/pa/repo-root.mjs +64 -0
- package/dist/engineering-pa-cli/src/pa/session.mjs +254 -0
- package/dist/engineering-pa-cli/src/pa/work-cli.mjs +164 -0
- package/dist/engineering-pa-cli/src/pa/work.mjs +196 -0
- package/dist/engineering-pa-cli/src/pa/workstreams.mjs +201 -0
- package/dist/engineering-pa-cli/src/research/README.md +360 -0
- package/dist/engineering-pa-cli/src/research/briefs/extractor.md +103 -0
- package/dist/engineering-pa-cli/src/research/briefs/searcher.md +113 -0
- package/dist/engineering-pa-cli/src/research/briefs/synthesizer.md +124 -0
- package/dist/engineering-pa-cli/src/research/briefs/verifier.md +86 -0
- package/dist/engineering-pa-cli/src/research/cli.mjs +141 -0
- package/dist/engineering-pa-cli/src/research/commands/gates.mjs +176 -0
- package/dist/engineering-pa-cli/src/research/commands/list.mjs +56 -0
- package/dist/engineering-pa-cli/src/research/commands/mark.mjs +97 -0
- package/dist/engineering-pa-cli/src/research/commands/paths.mjs +69 -0
- package/dist/engineering-pa-cli/src/research/commands/prune.mjs +86 -0
- package/dist/engineering-pa-cli/src/research/commands/run.mjs +94 -0
- package/dist/engineering-pa-cli/src/research/commands/show.mjs +43 -0
- package/dist/engineering-pa-cli/src/research/docs/operator-present-flow.md +120 -0
- package/dist/engineering-pa-cli/src/research/format.mjs +59 -0
- package/dist/engineering-pa-cli/src/research/promote.mjs +260 -0
- package/dist/engineering-pa-cli/src/research/schema/finding.schema.json +55 -0
- package/dist/engineering-pa-cli/src/research/schema/gates.schema.json +34 -0
- package/dist/engineering-pa-cli/src/research/schema/manifest.schema.json +59 -0
- package/dist/engineering-pa-cli/src/research/schema/plan.schema.json +41 -0
- package/dist/engineering-pa-cli/src/research/schema/sources.schema.json +31 -0
- package/dist/engineering-pa-cli/src/research/store/findings.mjs +61 -0
- package/dist/engineering-pa-cli/src/research/store/gates.mjs +73 -0
- package/dist/engineering-pa-cli/src/research/store/index.mjs +312 -0
- package/dist/engineering-pa-cli/src/research/store/manifest.mjs +56 -0
- package/dist/engineering-pa-cli/src/research/store/plan.mjs +59 -0
- package/dist/engineering-pa-cli/src/research/store/sources.mjs +44 -0
- package/dist/engineering-pa-cli/src/research/store/validate.mjs +92 -0
- package/dist/engineering-pa-cli/src/research/workflows/research-normal.js +573 -0
- package/dist/engineering-pa-cli/src/scheduler/cli.mjs +197 -0
- package/dist/engineering-pa-cli/src/secrets/cli.mjs +254 -0
- package/dist/engineering-pa-cli/src/secrets/commands/backup-template.mjs +67 -0
- package/dist/engineering-pa-cli/src/secrets/commands/backup.mjs +85 -0
- package/dist/engineering-pa-cli/src/secrets/commands/delete.mjs +58 -0
- package/dist/engineering-pa-cli/src/secrets/commands/find.mjs +36 -0
- package/dist/engineering-pa-cli/src/secrets/commands/get.mjs +49 -0
- package/dist/engineering-pa-cli/src/secrets/commands/init.mjs +69 -0
- package/dist/engineering-pa-cli/src/secrets/commands/list.mjs +37 -0
- package/dist/engineering-pa-cli/src/secrets/commands/rotate.mjs +46 -0
- package/dist/engineering-pa-cli/src/secrets/commands/set.mjs +123 -0
- package/dist/engineering-pa-cli/src/secrets/commands/status.mjs +146 -0
- package/dist/engineering-pa-cli/src/secrets/commands/vaults.mjs +57 -0
- package/dist/engineering-pa-cli/src/secrets/commands/verify.mjs +143 -0
- package/dist/engineering-pa-cli/src/secrets/vault.mjs +766 -0
- package/dist/engineering-pa-cli/src/smoke/checks.mjs +199 -0
- package/dist/engineering-pa-cli/src/smoke/cli.mjs +108 -0
- package/dist/engineering-pa-cli/src/smoke/commands/run.mjs +237 -0
- package/dist/engineering-pa-cli/src/smoke/runner.mjs +191 -0
- package/dist/engineering-pa-cli/src/staging-alias/cli.mjs +91 -0
- package/dist/engineering-pa-cli/src/staging-alias/cloudflare.mjs +380 -0
- package/dist/engineering-pa-cli/src/staging-alias/commands/list.mjs +36 -0
- package/dist/engineering-pa-cli/src/staging-alias/commands/set.mjs +188 -0
- package/dist/engineering-pa-cli/src/staging-alias/commands/status.mjs +113 -0
- package/dist/engineering-pa-cli/src/staging-alias/commands/unset.mjs +95 -0
- package/dist/engineering-pa-cli/src/staging-alias/sites.mjs +105 -0
- package/dist/engineering-pa-cli/src/sync/cli.mjs +151 -0
- package/dist/engineering-pa-cli/src/sync/git.mjs +149 -0
- package/dist/engineering-pa-cli/src/sync/lock.mjs +30 -0
- package/dist/engineering-pa-cli/src/sync/regenerated-artifacts.mjs +114 -0
- package/dist/engineering-pa-cli/src/sync/registry-scope.mjs +260 -0
- package/dist/engineering-pa-cli/src/sync/run.mjs +531 -0
- package/dist/engineering-pa-cli/src/sync/runner.mjs +62 -0
- package/dist/engineering-pa-cli/src/sync/runs-digest.mjs +138 -0
- package/dist/engineering-pa-core/README.md +60 -0
- package/dist/engineering-pa-core/bin/desk +9 -0
- package/dist/engineering-pa-core/bin/distill +2 -0
- package/dist/engineering-pa-core/bin/memory-sync +2 -0
- package/dist/engineering-pa-core/bin/slice +2 -0
- package/dist/engineering-pa-core/docs/autonomy-envelope-tracker.md +111 -0
- package/dist/engineering-pa-core/docs/blueprints/README.md +45 -0
- package/dist/engineering-pa-core/docs/blueprints/docker-services/blueprint.md +168 -0
- package/dist/engineering-pa-core/docs/blueprints/git-identity/blueprint.md +116 -0
- package/dist/engineering-pa-core/docs/blueprints/ideas/custom-workspace-views.md +9 -0
- package/dist/engineering-pa-core/docs/blueprints/ideas/knowledge-domain-patterns.md +15 -0
- package/dist/engineering-pa-core/docs/blueprints/ideas/office-integration.md +11 -0
- package/dist/engineering-pa-core/docs/blueprints/ideas/team-scaling.md +9 -0
- package/dist/engineering-pa-core/docs/blueprints/ideas/work-personal-separation.md +9 -0
- package/dist/engineering-pa-core/docs/blueprints/scheduled-distillation/blueprint.md +129 -0
- package/dist/engineering-pa-core/docs/blueprints/tool-integration/blueprint.md +110 -0
- package/dist/engineering-pa-core/docs/commands/init.md +159 -0
- package/dist/engineering-pa-core/docs/commands/schedule.md +98 -0
- package/dist/engineering-pa-core/docs/commands/upgrade.md +67 -0
- package/dist/engineering-pa-core/docs/entity-location-map.md +93 -0
- package/dist/engineering-pa-core/docs/knowledge-scaffold.md +121 -0
- package/dist/engineering-pa-core/docs/lock.md +155 -0
- package/dist/engineering-pa-core/docs/memory-sync.md +28 -0
- package/dist/engineering-pa-core/docs/pa-operating-model.md +457 -0
- package/dist/engineering-pa-core/docs/scheduling.md +35 -0
- package/dist/engineering-pa-core/docs/standards/README.md +24 -0
- package/dist/engineering-pa-core/docs/standards/briefing-contract.md +161 -0
- package/dist/engineering-pa-core/docs/standards/tooling.md +240 -0
- package/dist/engineering-pa-core/docs/tools/distill.md +230 -0
- package/dist/engineering-pa-core/docs/tools/memory-sync.md +98 -0
- package/dist/engineering-pa-core/docs/tools/scheduler.md +243 -0
- package/dist/engineering-pa-core/docs/tools/slice.md +150 -0
- package/dist/engineering-pa-core/docs/upstream-issue-filing.md +88 -0
- package/dist/engineering-pa-core/docs/working-directory.md +29 -0
- package/dist/engineering-pa-core/docs/workspace-operations.md +46 -0
- package/dist/engineering-pa-core/index.mjs +21 -0
- package/dist/engineering-pa-core/knowledge/README.md +53 -0
- package/dist/engineering-pa-core/knowledge/canonical/.gitkeep +0 -0
- package/dist/engineering-pa-core/knowledge/content-voice/README.md +64 -0
- package/dist/engineering-pa-core/knowledge/content-voice/banned-ai-tells-baseline.md +133 -0
- package/dist/engineering-pa-core/knowledge/content-voice/banned-ai-tells-shape.md +58 -0
- package/dist/engineering-pa-core/knowledge/content-voice/banned-ai-tells-taxonomy.md +33 -0
- package/dist/engineering-pa-core/knowledge/content-voice/content-pipeline-routing.md +58 -0
- package/dist/engineering-pa-core/knowledge/content-voice/new-tell-capture-procedure.md +40 -0
- package/dist/engineering-pa-core/knowledge/content-voice/voice-guide-shape.md +43 -0
- package/dist/engineering-pa-core/knowledge/delegation-dispatch/README.md +34 -0
- package/dist/engineering-pa-core/knowledge/delegation-dispatch/briefing-contract.md +77 -0
- package/dist/engineering-pa-core/knowledge/delegation-dispatch/delegation-modes.md +84 -0
- package/dist/engineering-pa-core/knowledge/delegation-dispatch/dispatch-envelope.md +238 -0
- package/dist/engineering-pa-core/knowledge/delegation-dispatch/task-groups-and-orchestrators.md +62 -0
- package/dist/engineering-pa-core/knowledge/delegation-dispatch/team-improvement-loop.md +48 -0
- package/dist/engineering-pa-core/knowledge/delegation-dispatch/tool-development-policy.md +48 -0
- package/dist/engineering-pa-core/knowledge/engineering-discipline/README.md +33 -0
- package/dist/engineering-pa-core/knowledge/engineering-discipline/blast-radius-and-safety.md +50 -0
- package/dist/engineering-pa-core/knowledge/engineering-discipline/investigate-root-causes.md +48 -0
- package/dist/engineering-pa-core/knowledge/engineering-discipline/role-ladder.md +57 -0
- package/dist/engineering-pa-core/knowledge/engineering-discipline/verify-runtime-behaviour.md +53 -0
- package/dist/engineering-pa-core/knowledge/engineering-discipline/worktree-isolation.md +50 -0
- package/dist/engineering-pa-core/knowledge/knowledge-memory/README.md +33 -0
- package/dist/engineering-pa-core/knowledge/knowledge-memory/claude-md-hygiene.md +47 -0
- package/dist/engineering-pa-core/knowledge/knowledge-memory/journal-and-self-improvement.md +53 -0
- package/dist/engineering-pa-core/knowledge/knowledge-memory/knowledge-retrieval-discipline.md +62 -0
- package/dist/engineering-pa-core/knowledge/knowledge-memory/librarian-synthesis-mandate.md +56 -0
- package/dist/engineering-pa-core/knowledge/knowledge-memory/staging-and-observations.md +58 -0
- package/dist/engineering-pa-core/knowledge/operator-interface/README.md +32 -0
- package/dist/engineering-pa-core/knowledge/operator-interface/communication-style.md +33 -0
- package/dist/engineering-pa-core/knowledge/operator-interface/escalation-and-correction.md +45 -0
- package/dist/engineering-pa-core/knowledge/operator-interface/push-back-discipline.md +42 -0
- package/dist/engineering-pa-core/knowledge/operator-interface/session-boot-and-end.md +56 -0
- package/dist/engineering-pa-core/knowledge/platform-tooling/README.md +37 -0
- package/dist/engineering-pa-core/knowledge/platform-tooling/desk-cli-reference.md +52 -0
- package/dist/engineering-pa-core/knowledge/platform-tooling/environment-awareness.md +91 -0
- package/dist/engineering-pa-core/knowledge/platform-tooling/mcp-servers-catalogue.md +52 -0
- package/dist/engineering-pa-core/knowledge/platform-tooling/pa-cli-reference.md +55 -0
- package/dist/engineering-pa-core/knowledge/platform-tooling/scheduling-and-launchd.md +56 -0
- package/dist/engineering-pa-core/knowledge/platform-tooling/tool-discovery-discipline.md +49 -0
- package/dist/engineering-pa-core/knowledge/platform-tooling/working-directory-vs-project-root.md +43 -0
- package/dist/engineering-pa-core/knowledge/platform-tooling/workspace-server.md +51 -0
- package/dist/engineering-pa-core/knowledge/raw/.gitkeep +0 -0
- package/dist/engineering-pa-core/knowledge/scaffold/domains.json +5 -0
- package/dist/engineering-pa-core/knowledge/schema/.gitkeep +0 -0
- package/dist/engineering-pa-core/knowledge/work-management/README.md +33 -0
- package/dist/engineering-pa-core/knowledge/work-management/desk-cli.md +84 -0
- package/dist/engineering-pa-core/knowledge/work-management/progress-md.md +48 -0
- package/dist/engineering-pa-core/knowledge/work-management/projects.md +64 -0
- package/dist/engineering-pa-core/knowledge/work-management/spawn-log.md +48 -0
- package/dist/engineering-pa-core/knowledge/work-management/work-items.md +67 -0
- package/dist/engineering-pa-core/package.json +26 -0
- package/dist/engineering-pa-core/roles/agent-ops/definition.md +79 -0
- package/dist/engineering-pa-core/roles/dispatch-briefer/definition.md +195 -0
- package/dist/engineering-pa-core/roles/librarian/definition.md +176 -0
- package/dist/engineering-pa-core/roles/pa/definition.md +93 -0
- package/dist/engineering-pa-core/roles/system-admin/definition.md +106 -0
- package/dist/engineering-pa-core/roles/tool-developer/definition.md +116 -0
- package/dist/engineering-pa-core/roles/writer/definition.md +130 -0
- package/dist/engineering-pa-core/schema/autonomy-envelope.schema.json +61 -0
- package/dist/engineering-pa-core/schema/project.json +114 -0
- package/dist/engineering-pa-core/schema/schedule.json +63 -0
- package/dist/engineering-pa-core/schema/work-item.json +92 -0
- package/dist/engineering-pa-core/src/config/pa-package-name.mjs +30 -0
- package/dist/engineering-pa-core/src/desk/cli.mjs +95 -0
- package/dist/engineering-pa-core/src/desk/commands.mjs +398 -0
- package/dist/engineering-pa-core/src/desk/format.mjs +84 -0
- package/dist/engineering-pa-core/src/desk/repo.mjs +172 -0
- package/dist/engineering-pa-core/src/desk/team-scope.mjs +142 -0
- package/dist/engineering-pa-core/src/distill/cli.mjs +112 -0
- package/dist/engineering-pa-core/src/distill/prereqs.mjs +171 -0
- package/dist/engineering-pa-core/src/distill/prompt.mjs +74 -0
- package/dist/engineering-pa-core/src/distill/run.mjs +230 -0
- package/dist/engineering-pa-core/src/distill/runner.mjs +86 -0
- package/dist/engineering-pa-core/src/distill/staging.mjs +59 -0
- package/dist/engineering-pa-core/src/knowledge/retrieval/backlink-indexer.mjs +154 -0
- package/dist/engineering-pa-core/src/knowledge/retrieval/graph-builder.mjs +186 -0
- package/dist/engineering-pa-core/src/knowledge/retrieval/index-builder.mjs +225 -0
- package/dist/engineering-pa-core/src/knowledge/retrieval/query.mjs +263 -0
- package/dist/engineering-pa-core/src/lock/lock.mjs +202 -0
- package/dist/engineering-pa-core/src/memory-sync/cli-support.mjs +12 -0
- package/dist/engineering-pa-core/src/memory-sync/cli.mjs +56 -0
- package/dist/engineering-pa-core/src/memory-sync/commands/pull.mjs +44 -0
- package/dist/engineering-pa-core/src/memory-sync/commands/push.mjs +46 -0
- package/dist/engineering-pa-core/src/memory-sync/mirror.mjs +114 -0
- package/dist/engineering-pa-core/src/memory-sync/repo.mjs +65 -0
- package/dist/engineering-pa-core/src/scheduler/detect.mjs +111 -0
- package/dist/engineering-pa-core/src/scheduler/host.mjs +38 -0
- package/dist/engineering-pa-core/src/scheduler/index.mjs +13 -0
- package/dist/engineering-pa-core/src/scheduler/install.mjs +854 -0
- package/dist/engineering-pa-core/src/scheduler/list.mjs +168 -0
- package/dist/engineering-pa-core/src/scheduler/remove.mjs +176 -0
- package/dist/engineering-pa-core/src/scheduler/verify.mjs +435 -0
- package/dist/engineering-pa-core/src/session-boot/autonomy-injection.mjs +84 -0
- package/dist/engineering-pa-core/src/slice/cli.mjs +139 -0
- package/dist/engineering-pa-core/src/slice/inputs.mjs +174 -0
- package/dist/engineering-pa-core/src/slice/prompt.mjs +94 -0
- package/dist/engineering-pa-core/src/slice/prompts/dave-boot.md +91 -0
- package/dist/engineering-pa-core/src/slice/run.mjs +334 -0
- package/dist/engineering-pa-core-extensions-atlassian/README.md +31 -0
- package/dist/engineering-pa-core-extensions-atlassian/index.mjs +9 -0
- package/dist/engineering-pa-core-extensions-atlassian/package.json +19 -0
- package/dist/engineering-pa-core-extensions-n8n/README.md +29 -0
- package/dist/engineering-pa-core-extensions-n8n/index.mjs +8 -0
- package/dist/engineering-pa-core-extensions-n8n/package.json +19 -0
- package/dist/engineering-pa-librarian/README.md +38 -0
- package/dist/engineering-pa-librarian/index.mjs +12 -0
- package/dist/engineering-pa-librarian/package.json +19 -0
- package/dist/engineering-pa-migrate-inspect/README.md +131 -0
- package/dist/engineering-pa-migrate-inspect/bin/migrate-inspect +2 -0
- package/dist/engineering-pa-migrate-inspect/package.json +21 -0
- package/dist/engineering-pa-migrate-inspect/src/age-key-migrate.mjs +83 -0
- package/dist/engineering-pa-migrate-inspect/src/cli.mjs +97 -0
- package/dist/engineering-pa-migrate-inspect/src/inspector.mjs +237 -0
- package/dist/engineering-pa-migrate-inspect/src/platforms/linux.mjs +87 -0
- package/dist/engineering-pa-migrate-inspect/src/platforms/macos.mjs +105 -0
- package/dist/engineering-pa-migrate-inspect/src/runner.mjs +87 -0
- package/dist/engineering-pa-runbook/README.md +103 -0
- package/dist/engineering-pa-runbook/package.json +18 -0
- package/dist/engineering-pa-runbook/reference/dex-template.runbook.json +66 -0
- package/dist/engineering-pa-runbook/reference/hq-dave.runbook.json +69 -0
- package/dist/engineering-pa-runbook/reference/smarthome01.runbook.json +92 -0
- package/dist/engineering-pa-runbook/schema/inspection.schema.json +113 -0
- package/dist/engineering-pa-runbook/schema/runbook.schema.json +67 -0
- package/dist/engineering-pa-runbook/src/validator.mjs +167 -0
- package/dist/engineering-pa-scaffold/README.md +164 -0
- package/dist/engineering-pa-scaffold/bin/pa-init +2 -0
- package/dist/engineering-pa-scaffold/index.mjs +42 -0
- package/dist/engineering-pa-scaffold/package.json +22 -0
- package/dist/engineering-pa-scaffold/src/cli.mjs +115 -0
- package/dist/engineering-pa-scaffold/src/commands/init.mjs +169 -0
- package/dist/engineering-pa-scaffold/src/generator.mjs +354 -0
- package/dist/engineering-pa-scaffold/src/prompts.mjs +125 -0
- package/dist/engineering-pa-scaffold/src/runner.mjs +142 -0
- package/dist/engineering-pa-scaffold/templates/CLAUDE.md.template +196 -0
- package/dist/engineering-pa-scaffold/templates/operator-README.md.template +44 -0
- package/dist/engineering-pa-types-engineering/README.md +35 -0
- package/dist/engineering-pa-types-engineering/docs/commands/product-build.md +120 -0
- package/dist/engineering-pa-types-engineering/index.mjs +9 -0
- package/dist/engineering-pa-types-engineering/package.json +19 -0
- package/dist/engineering-pa-types-engineering/roles/product-engineer/definition.md +650 -0
- package/dist/engineering-pa-types-engineering/roles/product-engineer/templates/build-spec.md +82 -0
- package/dist/engineering-pa-types-engineering/roles/product-engineer/templates/preflight-checklist.md +158 -0
- package/dist/engineering-pa-types-engineering/roles/product-engineer/templates/worker-brief.md +130 -0
- package/dist/engineering-pa-workspace/README.md +197 -0
- package/dist/engineering-pa-workspace/app/assets/md.js +187 -0
- package/dist/engineering-pa-workspace/app/assets/modal.js +120 -0
- package/dist/engineering-pa-workspace/app/assets/theme.css +132 -0
- package/dist/engineering-pa-workspace/app/assets/theme.js +159 -0
- package/dist/engineering-pa-workspace/app/banner.js +320 -0
- package/dist/engineering-pa-workspace/app/delegations.html +345 -0
- package/dist/engineering-pa-workspace/app/home.html +1060 -0
- package/dist/engineering-pa-workspace/app/index.html +361 -0
- package/dist/engineering-pa-workspace/app/knowledge-map.html +163 -0
- package/dist/engineering-pa-workspace/app/knowledge.html +304 -0
- package/dist/engineering-pa-workspace/app/nav.json +75 -0
- package/dist/engineering-pa-workspace/app/notes.html +199 -0
- package/dist/engineering-pa-workspace/app/onboarding.html +592 -0
- package/dist/engineering-pa-workspace/app/profile.html +243 -0
- package/dist/engineering-pa-workspace/app/project-detail.html +432 -0
- package/dist/engineering-pa-workspace/app/projects.html +297 -0
- package/dist/engineering-pa-workspace/app/repos.html +598 -0
- package/dist/engineering-pa-workspace/app/schedules.html +486 -0
- package/dist/engineering-pa-workspace/app/secrets.html +164 -0
- package/dist/engineering-pa-workspace/app/staging.html +319 -0
- package/dist/engineering-pa-workspace/app/tasks.html +465 -0
- package/dist/engineering-pa-workspace/app/vendor/chart.umd.min.js +21 -0
- package/dist/engineering-pa-workspace/app/viewer.html +116 -0
- package/dist/engineering-pa-workspace/docs/DAEMON.md +104 -0
- package/dist/engineering-pa-workspace/docs/page-blueprint.md +286 -0
- package/dist/engineering-pa-workspace/docs/status-mon.md +168 -0
- package/dist/engineering-pa-workspace/index.mjs +12 -0
- package/dist/engineering-pa-workspace/nav.json.example +8 -0
- package/dist/engineering-pa-workspace/package.json +27 -0
- package/dist/engineering-pa-workspace/src/api.mjs +2086 -0
- package/dist/engineering-pa-workspace/src/install-daemon.mjs +573 -0
- package/dist/engineering-pa-workspace/src/nav.mjs +190 -0
- package/dist/engineering-pa-workspace/src/secrets-api.mjs +175 -0
- package/dist/engineering-pa-workspace/src/server.mjs +516 -0
- package/dist/engineering-pa-workspace/src/status-mon/poll.mjs +220 -0
- package/dist/engineering-pa-workspace/src/status-mon/poller.mjs +113 -0
- package/dist/engineering-pa-workspace/src/status-mon/run.mjs +133 -0
- package/dist/engineering-pa-workspace/src/supervisor.mjs +264 -0
- package/dist/engineering-pa-workspace/src/ws.mjs +633 -0
- package/index.mjs +60 -0
- package/package.json +58 -0
- package/templates/banned-ai-tells.md +102 -0
- package/templates/purpose.md +105 -0
- package/templates/voice-guide.md +98 -0
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="UTF-8">
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
6
|
+
<title>Document Viewer</title>
|
|
7
|
+
<script>(function(){try{var t=localStorage.getItem('dave.theme');document.documentElement.dataset.theme=(t==='light'||t==='dark')?t:'dark';}catch(_){document.documentElement.dataset.theme='dark';}})();</script>
|
|
8
|
+
<link rel="stylesheet" href="/core/tools/workspace/app/assets/theme.css">
|
|
9
|
+
<script src="/core/tools/workspace/app/assets/theme.js" defer></script>
|
|
10
|
+
<style>
|
|
11
|
+
* { margin: 0; padding: 0; box-sizing: border-box; }
|
|
12
|
+
body { font-family: 'SF Mono', 'JetBrains Mono', 'Fira Code', 'Cascadia Code', monospace; background: var(--bg); color: var(--text); line-height: 1.7; }
|
|
13
|
+
.toolbar { position: sticky; top: 0; background: var(--bg-surface); border-bottom: 1px solid var(--border); padding: 0.6rem 1.5rem; display: flex; align-items: center; gap: 0.75rem; z-index: 10; }
|
|
14
|
+
.back-btn { background: var(--bg-highlight); border: 1px solid var(--border); border-radius: 4px; padding: 0.3rem 0.7rem; color: var(--accent); font-family: inherit; font-size: 0.8rem; cursor: pointer; text-decoration: none; transition: border-color 0.12s; }
|
|
15
|
+
.back-btn:hover { border-color: var(--accent); }
|
|
16
|
+
.breadcrumb { color: var(--text-dim); font-size: 0.75rem; }
|
|
17
|
+
.breadcrumb span { color: var(--text); }
|
|
18
|
+
/* Prose surface: humanist sans for long-form reading. The toolbar keeps
|
|
19
|
+
* the inherited monospace (it's chrome, not content), and code / pre /
|
|
20
|
+
* plain-text within .content explicitly opt back to monospace below.
|
|
21
|
+
* Base size bumps to 16px (vs the body's ~14px monospace) since at this
|
|
22
|
+
* column width the operator reads continuous prose for minutes at a time. */
|
|
23
|
+
.content {
|
|
24
|
+
max-width: 760px;
|
|
25
|
+
margin: 0 auto;
|
|
26
|
+
padding: 2rem;
|
|
27
|
+
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Inter', 'Helvetica Neue', Helvetica, Arial, sans-serif;
|
|
28
|
+
font-size: 16px;
|
|
29
|
+
line-height: 1.7;
|
|
30
|
+
}
|
|
31
|
+
.content h1 { color: var(--purple); font-size: 1.8rem; margin: 1.5rem 0 0.75rem; border-bottom: 1px solid var(--border); padding-bottom: 0.4rem; line-height: 1.25; }
|
|
32
|
+
.content h2 { color: var(--accent); font-size: 1.4rem; margin: 1.3rem 0 0.6rem; line-height: 1.3; }
|
|
33
|
+
.content h3 { color: var(--cyan); font-size: 1.15rem; margin: 1.1rem 0 0.5rem; line-height: 1.35; }
|
|
34
|
+
.content h4 { color: var(--text-bright); font-size: 1rem; margin: 1rem 0 0.4rem; line-height: 1.4; }
|
|
35
|
+
.content p { margin: 0.6rem 0; }
|
|
36
|
+
.content a { color: var(--accent); text-decoration: none; }
|
|
37
|
+
.content a:hover { text-decoration: underline; }
|
|
38
|
+
/* Bold = scan-anchor. Writers use **bold** to highlight key phrases for
|
|
39
|
+
* skim-readers. Render in the indigo emphasis colour (theme-aware via
|
|
40
|
+
* --emphasis) so the eye finds it at a glance — the prior "slightly
|
|
41
|
+
* brighter text" was indistinguishable from body. .content em (italic)
|
|
42
|
+
* is locked to the body colour: italic is for titles / foreign terms,
|
|
43
|
+
* not emphasis. */
|
|
44
|
+
.content strong { color: var(--emphasis); font-weight: 700; }
|
|
45
|
+
.content em { color: var(--text); font-style: italic; }
|
|
46
|
+
.content code { background: var(--bg-surface); color: var(--orange); padding: 0.15rem 0.35rem; border-radius: 3px; font-size: 0.9em; font-family: 'SF Mono', 'JetBrains Mono', 'Fira Code', 'Cascadia Code', monospace; }
|
|
47
|
+
.content pre { background: var(--bg-surface); border: 1px solid var(--border); border-radius: 6px; padding: 1rem; overflow-x: auto; margin: 0.8rem 0; }
|
|
48
|
+
.content pre code { background: none; color: var(--text); padding: 0; font-size: 0.85rem; font-family: 'SF Mono', 'JetBrains Mono', 'Fira Code', 'Cascadia Code', monospace; }
|
|
49
|
+
.content ul, .content ol { margin: 0.5rem 0 0.5rem 1.5rem; }
|
|
50
|
+
.content li { margin: 0.25rem 0; }
|
|
51
|
+
.content blockquote { border-left: 3px solid var(--accent); margin: 0.8rem 0; padding: 0.4rem 0 0.4rem 1rem; color: var(--text-dim); background: var(--bg-surface); border-radius: 0 4px 4px 0; }
|
|
52
|
+
.content hr { border: none; border-top: 1px solid var(--border); margin: 1.5rem 0; }
|
|
53
|
+
.content table { border-collapse: collapse; margin: 0.8rem 0; width: 100%; }
|
|
54
|
+
.content th, .content td { border: 1px solid var(--border); padding: 0.4rem 0.7rem; text-align: left; font-size: 0.85rem; }
|
|
55
|
+
.content th { background: var(--bg-highlight); color: var(--text-bright); }
|
|
56
|
+
.content td { background: var(--bg-surface); }
|
|
57
|
+
.empty-state { color: var(--text-dim); font-size: 0.85rem; padding: 3rem; text-align: center; }
|
|
58
|
+
.plain-text { white-space: pre-wrap; font-size: 0.85rem; background: var(--bg-surface); border: 1px solid var(--border); border-radius: 6px; padding: 1.5rem; font-family: 'SF Mono', 'JetBrains Mono', 'Fira Code', 'Cascadia Code', monospace; }
|
|
59
|
+
</style>
|
|
60
|
+
<script src="/banner.js" defer></script>
|
|
61
|
+
</head>
|
|
62
|
+
<body>
|
|
63
|
+
<div id="global-banner"></div>
|
|
64
|
+
<div class="toolbar">
|
|
65
|
+
<a class="back-btn" id="back-btn" onclick="goBack()">Back</a>
|
|
66
|
+
<div class="breadcrumb" id="breadcrumb">No document selected.</div>
|
|
67
|
+
</div>
|
|
68
|
+
<div class="content" id="content"><div class="empty-state">No document selected.</div></div>
|
|
69
|
+
<noscript><div style="padding:2rem; color:#a1a1aa; text-align:center;">Enable JavaScript to view documents.</div></noscript>
|
|
70
|
+
<script src="/core/tools/workspace/app/assets/md.js"></script>
|
|
71
|
+
<script>
|
|
72
|
+
// Return to the previous page via browser history. Both the iframe's own
|
|
73
|
+
// history (from frame.src assignments by the shell) and the parent's hash
|
|
74
|
+
// history carry the navigation trail — stepping both keeps them in sync so
|
|
75
|
+
// the address bar and the iframe content both revert together.
|
|
76
|
+
function goBack() {
|
|
77
|
+
// Use the joint session history: one back() pops the top-most entry,
|
|
78
|
+
// which for a shell-iframe nav is the last frame.src + parent hash pair.
|
|
79
|
+
// window.history inside the iframe walks the joint history in modern
|
|
80
|
+
// browsers, so a single call is sufficient. We guard with a try/catch
|
|
81
|
+
// so a cross-origin parent never blocks navigation.
|
|
82
|
+
try {
|
|
83
|
+
if (window.parent && window.parent !== window) {
|
|
84
|
+
window.parent.history.back();
|
|
85
|
+
return;
|
|
86
|
+
}
|
|
87
|
+
} catch (_e) { /* fall through */ }
|
|
88
|
+
window.history.back();
|
|
89
|
+
}
|
|
90
|
+
function esc(s) { var el = document.createElement('span'); el.textContent = s; return el.innerHTML; }
|
|
91
|
+
var params = new URLSearchParams(window.location.search);
|
|
92
|
+
var filePath = params.get('file');
|
|
93
|
+
if (filePath) {
|
|
94
|
+
var parts = filePath.split('/');
|
|
95
|
+
var breadHtml = parts.map(function(p, i) { return i === parts.length - 1 ? '<span>' + esc(p) + '</span>' : esc(p); }).join(' / ');
|
|
96
|
+
document.getElementById('breadcrumb').innerHTML = breadHtml;
|
|
97
|
+
document.title = parts[parts.length - 1] || 'Document Viewer';
|
|
98
|
+
var contentEl = document.getElementById('content');
|
|
99
|
+
contentEl.innerHTML = '<div class="empty-state">Loading...</div>';
|
|
100
|
+
var isMarkdown = /\.(md|markdown)$/i.test(filePath);
|
|
101
|
+
fetch('/__api/file?path=' + encodeURIComponent(filePath)).then(function(r) {
|
|
102
|
+
if (!r.ok) throw new Error('File not found');
|
|
103
|
+
return r.text();
|
|
104
|
+
}).then(function(text) {
|
|
105
|
+
var body = text;
|
|
106
|
+
try { var j = JSON.parse(text); if (typeof j.content === 'string') body = j.content; } catch (e) { /* raw text */ }
|
|
107
|
+
if (isMarkdown && typeof window.renderMd === 'function') {
|
|
108
|
+
contentEl.innerHTML = renderMd(body);
|
|
109
|
+
} else {
|
|
110
|
+
contentEl.innerHTML = '<div class="plain-text">' + esc(body) + '</div>';
|
|
111
|
+
}
|
|
112
|
+
}).catch(function(err) { contentEl.innerHTML = '<div class="empty-state">Could not load document: ' + esc(err.message) + '</div>'; });
|
|
113
|
+
}
|
|
114
|
+
</script>
|
|
115
|
+
</body>
|
|
116
|
+
</html>
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
# Workspace daemon installer
|
|
2
|
+
|
|
3
|
+
Install the workspace server as a supervised always-on daemon via the host's native service manager. The daemon auto-starts at login and auto-restarts on crash.
|
|
4
|
+
|
|
5
|
+
## Status
|
|
6
|
+
|
|
7
|
+
- macOS (launchd LaunchAgent): supported
|
|
8
|
+
- Linux (systemd --user): supported
|
|
9
|
+
- Windows: not implemented; prints an explicit error (exit 2). Use `node core/tools/workspace/ws.mjs start` manually.
|
|
10
|
+
|
|
11
|
+
## Why a separate tool
|
|
12
|
+
|
|
13
|
+
The scheduler at `core/tools/scheduler/` installs time-triggered jobs (cron, launchd StartCalendarInterval, systemd timers). A daemon is continuous-supervision: `KeepAlive=true` / `Restart=always` / `RunAtLoad=true` / `WantedBy=default.target`. Different primitives, different shape. Rather than fold both into one abstraction, this installer is a sibling tool with a narrow surface.
|
|
14
|
+
|
|
15
|
+
## Why the daemon bypasses ws.mjs
|
|
16
|
+
|
|
17
|
+
`ws.mjs start` double-forks and detaches (it is a user-facing CLI daemoniser). If launchd or systemd invoked `ws.mjs start`, the service manager would see the initial parent exit immediately after fork and interpret it as a crashed service — triggering an infinite restart loop.
|
|
18
|
+
|
|
19
|
+
The installer writes plist/unit files that invoke `server.mjs` **directly**, in the foreground, with the flags `ws.mjs` would have passed: `--no-timeout --port N --no-open`. The service manager supervises the real server process.
|
|
20
|
+
|
|
21
|
+
## Commands
|
|
22
|
+
|
|
23
|
+
```
|
|
24
|
+
node core/tools/workspace/install-daemon.mjs install [--port N] [--dry-run]
|
|
25
|
+
node core/tools/workspace/install-daemon.mjs uninstall [--dry-run]
|
|
26
|
+
node core/tools/workspace/install-daemon.mjs status
|
|
27
|
+
node core/tools/workspace/install-daemon.mjs --help
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
### install
|
|
31
|
+
|
|
32
|
+
Writes the plist (macOS) or unit file (Linux), then loads / enables it so the daemon starts immediately and at every subsequent login. Idempotent: repeating `install` unloads the existing service first, rewrites the file, then reloads — safe to run after changing the port in `operator/config/preferences.json` or after upgrading Node.
|
|
33
|
+
|
|
34
|
+
Port precedence:
|
|
35
|
+
1. `--port N` CLI flag
|
|
36
|
+
2. `operator/config/preferences.json` field `workspacePort`
|
|
37
|
+
3. Default `4200`
|
|
38
|
+
|
|
39
|
+
### uninstall
|
|
40
|
+
|
|
41
|
+
Unloads / disables the service and removes the plist / unit file. Safe to run when nothing is installed.
|
|
42
|
+
|
|
43
|
+
### status
|
|
44
|
+
|
|
45
|
+
Reports whether the plist / unit file exists on disk and whether the service is currently running.
|
|
46
|
+
|
|
47
|
+
### --dry-run
|
|
48
|
+
|
|
49
|
+
Prints what `install` / `uninstall` would do — including the full plist / unit contents for `install` — without touching the filesystem or the service manager. Use before running `install` on a new host to review the paths.
|
|
50
|
+
|
|
51
|
+
## File locations
|
|
52
|
+
|
|
53
|
+
| Platform | Service file | Stdout log | Stderr log |
|
|
54
|
+
|---|---|---|---|
|
|
55
|
+
| macOS | `~/Library/LaunchAgents/com.dave.workspace.plist` | `~/Library/Logs/dave-workspace.log` | `~/Library/Logs/dave-workspace.err.log` |
|
|
56
|
+
| Linux | `~/.config/systemd/user/dave-workspace.service` | `~/.local/state/dave/workspace.log` | `~/.local/state/dave/workspace.err.log` |
|
|
57
|
+
|
|
58
|
+
The macOS label is `com.dave.workspace`. The systemd unit name is `dave-workspace.service`.
|
|
59
|
+
|
|
60
|
+
## Reinstall workflow
|
|
61
|
+
|
|
62
|
+
Port changes or Node version changes require re-install:
|
|
63
|
+
|
|
64
|
+
```bash
|
|
65
|
+
node core/tools/workspace/install-daemon.mjs install # picks up new state
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
No explicit uninstall-then-install needed — the installer unloads any existing instance before writing the new file.
|
|
69
|
+
|
|
70
|
+
To fully remove:
|
|
71
|
+
|
|
72
|
+
```bash
|
|
73
|
+
node core/tools/workspace/install-daemon.mjs uninstall
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
## Exit codes
|
|
77
|
+
|
|
78
|
+
| Code | Meaning |
|
|
79
|
+
|---|---|
|
|
80
|
+
| 0 | OK |
|
|
81
|
+
| 1 | Usage error (bad flag, unknown command) |
|
|
82
|
+
| 2 | Unsupported platform, or logical failure (e.g. status on an absent service) |
|
|
83
|
+
| 3 | Transport failure (the `launchctl` / `systemctl` call itself errored) |
|
|
84
|
+
|
|
85
|
+
## Coexistence with `ws.mjs start`
|
|
86
|
+
|
|
87
|
+
The supervised daemon and the `ws.mjs start` CLI both bind the same port. Only one should run at a time. If `ws.mjs start` is already running when you install the daemon, the install will succeed but the daemon process will exit immediately with a port conflict and launchd/systemd will restart it in a loop until the conflicting process is stopped. Graceful handover:
|
|
88
|
+
|
|
89
|
+
```bash
|
|
90
|
+
node core/tools/workspace/ws.mjs stop # stop the manual instance
|
|
91
|
+
node core/tools/workspace/install-daemon.mjs install # daemon takes over
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
## Tests
|
|
95
|
+
|
|
96
|
+
```bash
|
|
97
|
+
node --test core/tools/workspace/install-daemon.test.mjs
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
Tests cover the pure builders (plist / unit file generation), port resolution, platform routing, and dry-run output. They never invoke `launchctl` / `systemctl` for real — real install/uninstall mutates host state and is verified by the operator.
|
|
101
|
+
|
|
102
|
+
## Tooling standard
|
|
103
|
+
|
|
104
|
+
Node-only, zero deps, `node:test`, camelCase JSON, README as contract. See [`core/knowledge/standards/tooling.md`](../../knowledge/standards/tooling.md). Windows support is an explicit-error stub rather than a silent no-op, per the cross-platform parity rule.
|
|
@@ -0,0 +1,286 @@
|
|
|
1
|
+
# Workspace Page Blueprint
|
|
2
|
+
|
|
3
|
+
How to add a custom page to the workspace using the operator extension system. This blueprint covers the full lifecycle from project creation through to a pull request.
|
|
4
|
+
|
|
5
|
+
This is the **extension-page** blueprint — it never touches core. If you are adding a page that belongs in core itself (because every deployed PA should have it), follow the same steps but target `core/tools/workspace/app/` + `core/tools/workspace/nav.mjs` instead of `operator/extensions/workspace/`, and add a test alongside `core/tools/workspace/regression.test.mjs`.
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
## What it does
|
|
9
|
+
|
|
10
|
+
Creates a new workspace page that displays data in the workspace UI. The page is added via the extension mechanism — no core files are touched. Includes an API endpoint for dynamic data, an HTML page following the workspace design system, navigation registration, Playwright verification, and a clean PR.
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
## When to use
|
|
14
|
+
|
|
15
|
+
- The operator asks for a new workspace page, dashboard, or view
|
|
16
|
+
- The operator asks to display information in the workspace
|
|
17
|
+
- Any request that maps to "show me X in the workspace"
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
## Prerequisites
|
|
21
|
+
|
|
22
|
+
- Workspace server is running (`node core/tools/workspace/ws.mjs status`)
|
|
23
|
+
- The data source is identified (existing tool, API, OS data, or project data)
|
|
24
|
+
- The `operator/extensions/workspace/` directory exists
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
## Pre-flight
|
|
28
|
+
|
|
29
|
+
Before starting, check for leftover state from a previous attempt:
|
|
30
|
+
|
|
31
|
+
1. If `operator/extensions/workspace/{name}.html` exists, delete it
|
|
32
|
+
2. If `operator/extensions/workspace/api.mjs` has routes for `/__api/{name}`, remove them
|
|
33
|
+
3. If `operator/extensions/workspace/nav.json` has an entry with `"id": "{name}"`, remove it
|
|
34
|
+
4. If `projects/{page-name}/` exists, delete the directory
|
|
35
|
+
5. Delete any work items associated with the previous attempt
|
|
36
|
+
6. Restart workspace if any extension files were removed: `node core/tools/workspace/ws.mjs restart --no-open`
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
## Architecture
|
|
40
|
+
|
|
41
|
+
The workspace extension system is convention-based:
|
|
42
|
+
|
|
43
|
+
| File | Purpose |
|
|
44
|
+
|------|---------|
|
|
45
|
+
| `operator/extensions/workspace/{name}.html` | Page HTML (served at `/{name}.html`) |
|
|
46
|
+
| `operator/extensions/workspace/api.mjs` | API routes (export `register(addRoute)`) |
|
|
47
|
+
| `operator/extensions/workspace/nav.json` | Navigation entries (merged with core nav) |
|
|
48
|
+
|
|
49
|
+
Extension files take precedence over core files. The server auto-reloads on file changes — no restart needed for content updates, only for `api.mjs` changes.
|
|
50
|
+
|
|
51
|
+
### API handler signature
|
|
52
|
+
|
|
53
|
+
```javascript
|
|
54
|
+
function handler(req, res, url, repoRoot) {
|
|
55
|
+
const body = JSON.stringify(data);
|
|
56
|
+
res.writeHead(200, { 'Content-Type': 'application/json', 'Content-Length': Buffer.byteLength(body) });
|
|
57
|
+
res.end(body);
|
|
58
|
+
}
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
### Nav entry schema
|
|
62
|
+
|
|
63
|
+
```json
|
|
64
|
+
{
|
|
65
|
+
"id": "unique-id",
|
|
66
|
+
"label": "Display Label",
|
|
67
|
+
"href": "/{name}.html",
|
|
68
|
+
"section": "Extensions"
|
|
69
|
+
}
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
### Design system
|
|
73
|
+
|
|
74
|
+
Pages use the workspace dark theme. Key CSS variables:
|
|
75
|
+
|
|
76
|
+
```
|
|
77
|
+
--bg: #1a1b26 --bg-surface: #1f2335 --bg-highlight: #292e42
|
|
78
|
+
--border: #3b4261 --text: #c0caf5 --text-dim: #565f89
|
|
79
|
+
--text-bright: #e0e6ff --accent: #7aa2f7 --green: #9ece6a
|
|
80
|
+
--yellow: #e0af68 --red: #f7768e --purple: #bb9af7
|
|
81
|
+
--cyan: #7dcfff --orange: #ff9e64
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
Common patterns: `.card` for panels, `.stat-row` for label/value pairs, `.bar-container`/`.bar-fill` for progress bars, `.grid` for responsive two-column layout. Use `esc()` for XSS prevention. Use `cache: 'no-store'` on fetch calls.
|
|
85
|
+
|
|
86
|
+
|
|
87
|
+
## Steps
|
|
88
|
+
|
|
89
|
+
### Step 1 — Create project
|
|
90
|
+
|
|
91
|
+
Create a project to track this work:
|
|
92
|
+
|
|
93
|
+
```
|
|
94
|
+
projects/{page-name}/project.json
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
Fields: `id` = page name slug, `category` = `"feature"`, `status` = `"planned"`, `priority` = `1`, `lead` = the PA's name, `owner` = the operator's name. Summary should describe what the page displays and why.
|
|
98
|
+
|
|
99
|
+
|
|
100
|
+
### Step 2 — Research data source
|
|
101
|
+
|
|
102
|
+
Before building, identify the data:
|
|
103
|
+
|
|
104
|
+
1. Check if an existing tool, report, or API already produces the required data
|
|
105
|
+
2. Check `operator/extensions/tools/` for relevant tools
|
|
106
|
+
3. Check `projects/*/reports/` for existing reports
|
|
107
|
+
4. Determine what data structure the page needs
|
|
108
|
+
5. Note any data that requires shell commands, file reads, or external calls
|
|
109
|
+
|
|
110
|
+
Create a work item: `"Research data sources for {page-name} page"` — status `in-progress`.
|
|
111
|
+
|
|
112
|
+
Output: a clear list of data fields, their sources, and the JSON structure the API will return.
|
|
113
|
+
|
|
114
|
+
Mark the work item `done` and set `completedAt` when research is complete.
|
|
115
|
+
|
|
116
|
+
|
|
117
|
+
### Step 3 — Plan implementation
|
|
118
|
+
|
|
119
|
+
Create work items for the remaining steps. All work items should have `projectId` set to the project ID and `owner`/`assignee` set appropriately.
|
|
120
|
+
|
|
121
|
+
Typical breakdown:
|
|
122
|
+
|
|
123
|
+
| # | Work item | Assignee |
|
|
124
|
+
|---|-----------|----------|
|
|
125
|
+
| 1 | Implement API endpoint | tool-developer (via delegation) |
|
|
126
|
+
| 2 | Implement HTML page | tool-developer (via delegation) |
|
|
127
|
+
| 3 | Register navigation entry | PA |
|
|
128
|
+
| 4 | Test page with Playwright | PA |
|
|
129
|
+
| 5 | Create PR | PA |
|
|
130
|
+
|
|
131
|
+
Update project status to `in-progress`.
|
|
132
|
+
|
|
133
|
+
Create a feature branch before beginning implementation:
|
|
134
|
+
|
|
135
|
+
```bash
|
|
136
|
+
git checkout -b feature/{name}-page
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
All implementation work happens on this branch.
|
|
140
|
+
|
|
141
|
+
|
|
142
|
+
### Step 4 — Implement API endpoint
|
|
143
|
+
|
|
144
|
+
**Delegate to tool-developer role** using the 8-section briefing contract (Goal, Trace, Context, Tools and sources, Boundaries, Output format, Done when, Escalation rule — use these exact headings).
|
|
145
|
+
|
|
146
|
+
The API endpoint goes in `operator/extensions/workspace/api.mjs`. If this file already exists (other extension pages), the worker must ADD the new route to the existing `register()` function — not replace the file.
|
|
147
|
+
|
|
148
|
+
Key requirements for the brief:
|
|
149
|
+
- Handler must return JSON with proper Content-Type and Content-Length headers
|
|
150
|
+
- Handler must catch errors and return `{ error: message }` with status 500
|
|
151
|
+
- Use only Node.js built-in modules (no external dependencies)
|
|
152
|
+
- Shell commands via `execSync` must have a timeout (3000ms)
|
|
153
|
+
- The response shape must match the data structure from Step 2
|
|
154
|
+
|
|
155
|
+
Update the work item to `in-progress` before dispatching, `done` with `completedAt` when complete.
|
|
156
|
+
|
|
157
|
+
|
|
158
|
+
### Step 5 — Implement HTML page
|
|
159
|
+
|
|
160
|
+
**Delegate to tool-developer role** using the 8-section briefing contract. Can be dispatched in parallel with Step 4 if the API contract is defined.
|
|
161
|
+
|
|
162
|
+
The page goes at `operator/extensions/workspace/{name}.html`.
|
|
163
|
+
|
|
164
|
+
Key requirements for the brief:
|
|
165
|
+
- Standalone HTML file with embedded `<style>` and `<script>` (no external deps)
|
|
166
|
+
- Use the workspace design system CSS variables (provided in Architecture section above)
|
|
167
|
+
- Fetch data from `/__api/{name}` with `cache: 'no-store'`
|
|
168
|
+
- Include an `esc()` function for XSS prevention — all dynamic text must be escaped
|
|
169
|
+
- Include loading state and error handling
|
|
170
|
+
- Include a refresh button and last-updated timestamp
|
|
171
|
+
- Responsive layout: `.grid` with 2 columns on desktop, 1 on mobile
|
|
172
|
+
- Use `.card`, `.stat-row`, `.bar-container`/`.bar-fill` patterns as appropriate
|
|
173
|
+
- Title format: `{Page Name} — Workspace`
|
|
174
|
+
|
|
175
|
+
Update the work item to `in-progress` before dispatching, `done` with `completedAt` when complete.
|
|
176
|
+
|
|
177
|
+
|
|
178
|
+
### Step 6 — Register navigation
|
|
179
|
+
|
|
180
|
+
Create or update `operator/extensions/workspace/nav.json`:
|
|
181
|
+
|
|
182
|
+
```json
|
|
183
|
+
[
|
|
184
|
+
{
|
|
185
|
+
"id": "{name}",
|
|
186
|
+
"label": "{Display Name}",
|
|
187
|
+
"href": "/{name}.html",
|
|
188
|
+
"section": "Extensions"
|
|
189
|
+
}
|
|
190
|
+
]
|
|
191
|
+
```
|
|
192
|
+
|
|
193
|
+
If the file already exists, merge the new entry with existing entries (preserve existing, append new).
|
|
194
|
+
|
|
195
|
+
Update the work item `done` with `completedAt`.
|
|
196
|
+
|
|
197
|
+
|
|
198
|
+
### Step 7 — Restart workspace and verify
|
|
199
|
+
|
|
200
|
+
```bash
|
|
201
|
+
node core/tools/workspace/ws.mjs restart --no-open
|
|
202
|
+
```
|
|
203
|
+
|
|
204
|
+
Verify the server started successfully and the page is accessible:
|
|
205
|
+
|
|
206
|
+
- Check server status: `node core/tools/workspace/ws.mjs status`
|
|
207
|
+
- Verify the API endpoint returns data: `curl -s http://127.0.0.1:{port}/__api/{name} | head -c 200`
|
|
208
|
+
- Verify the page is served: `curl -s -o /dev/null -w '%{http_code}' http://127.0.0.1:{port}/{name}.html`
|
|
209
|
+
|
|
210
|
+
|
|
211
|
+
### Step 8 — Test with Playwright
|
|
212
|
+
|
|
213
|
+
Use the Playwright MCP browser tools to verify the page through the full workspace framework:
|
|
214
|
+
|
|
215
|
+
1. Navigate to `http://127.0.0.1:{port}/core/tools/workspace/app/index.html` (the framework shell, not the bare page)
|
|
216
|
+
2. Verify the navigation sidebar contains the new page link (look for the label in the "Extensions" section)
|
|
217
|
+
3. Click the navigation link to load the page inside the framework
|
|
218
|
+
4. Wait for data to load (the loading message should disappear)
|
|
219
|
+
5. Optionally take a screenshot for verification — **do not commit screenshots**; they are ephemeral
|
|
220
|
+
6. Check for console errors (ignore favicon 404)
|
|
221
|
+
7. Verify key data elements are present on the page
|
|
222
|
+
|
|
223
|
+
If tests fail, fix the issue and re-verify. Do not proceed until the page renders correctly within the framework.
|
|
224
|
+
|
|
225
|
+
Update the testing work item `done` with `completedAt`.
|
|
226
|
+
|
|
227
|
+
|
|
228
|
+
### Step 9 — Open for the operator
|
|
229
|
+
|
|
230
|
+
Open the page in the browser via the full workspace framework (with sidebar and shell), not the bare iframe URL:
|
|
231
|
+
|
|
232
|
+
```bash
|
|
233
|
+
open http://127.0.0.1:{port}/core/tools/workspace/app/index.html
|
|
234
|
+
```
|
|
235
|
+
|
|
236
|
+
Never use the direct page URL (e.g. `/{name}.html`) — always go through the framework shell so navigation and chrome are visible.
|
|
237
|
+
|
|
238
|
+
|
|
239
|
+
### Step 10 — Create PR
|
|
240
|
+
|
|
241
|
+
1. Stage only the extension files and project/work files (branch was created in Step 3):
|
|
242
|
+
- `operator/extensions/workspace/{name}.html`
|
|
243
|
+
- `operator/extensions/workspace/api.mjs`
|
|
244
|
+
- `operator/extensions/workspace/nav.json`
|
|
245
|
+
- `projects/{name}/project.json`
|
|
246
|
+
- `work/w-*.json` (relevant work items only)
|
|
247
|
+
2. Commit with a descriptive message
|
|
248
|
+
3. Push and create PR via `gh pr create`
|
|
249
|
+
4. Update project status to `done` and set `shipped` date
|
|
250
|
+
|
|
251
|
+
Update the PR work item `done` with `completedAt`.
|
|
252
|
+
|
|
253
|
+
|
|
254
|
+
## Verification
|
|
255
|
+
|
|
256
|
+
The blueprint is complete when:
|
|
257
|
+
|
|
258
|
+
- [ ] Project exists in `projects/` with status `done`
|
|
259
|
+
- [ ] All work items have status `done` and `completedAt` set
|
|
260
|
+
- [ ] The page loads at `/{name}.html` in the workspace
|
|
261
|
+
- [ ] The API returns valid JSON at `/__api/{name}`
|
|
262
|
+
- [ ] Navigation shows the new page in the sidebar
|
|
263
|
+
- [ ] Playwright verification confirms correct rendering within the framework shell
|
|
264
|
+
- [ ] PR is open with all changes
|
|
265
|
+
- [ ] No core files were modified
|
|
266
|
+
|
|
267
|
+
|
|
268
|
+
## Rollback
|
|
269
|
+
|
|
270
|
+
If the blueprint fails mid-execution:
|
|
271
|
+
|
|
272
|
+
1. Delete the extension files: `{name}.html`, entries from `api.mjs` and `nav.json`
|
|
273
|
+
2. Restart workspace: `node core/tools/workspace/ws.mjs restart --no-open`
|
|
274
|
+
3. Delete work items and project directory
|
|
275
|
+
4. The extension system is stateless — removing files fully reverts the change
|
|
276
|
+
|
|
277
|
+
|
|
278
|
+
## Adapting for core pages
|
|
279
|
+
|
|
280
|
+
If you are shipping a page as part of core (rather than an operator extension), the structure mirrors this blueprint with three differences:
|
|
281
|
+
|
|
282
|
+
1. **File locations** — page HTML lives under `core/tools/workspace/app/`, API routes go in `core/tools/workspace/api.mjs`, navigation registration happens in `core/tools/workspace/nav.mjs` (not `nav.json`).
|
|
283
|
+
2. **Tests** — core pages must ship a regression test alongside `core/tools/workspace/regression.test.mjs` and a Playwright e2e spec in `core/tools/workspace/e2e/`.
|
|
284
|
+
3. **PR target** — PR goes to the core repo (Stravica/dave upstream), not the operator fork. Respect the no-leak rule: zero operator content in a core PR.
|
|
285
|
+
|
|
286
|
+
Everything else — design system, handler signature, API shape, verification — is identical.
|