@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,361 @@
|
|
|
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>Engineering Assistant</title>
|
|
7
|
+
<link rel="icon" href="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Crect width='16' height='16' rx='3' fill='%236366f1'/%3E%3Ctext x='8' y='12' font-family='monospace' font-size='11' font-weight='bold' text-anchor='middle' fill='%23121218'%3ED%3C/text%3E%3C/svg%3E">
|
|
8
|
+
<script src="/banner.js" defer></script>
|
|
9
|
+
<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>
|
|
10
|
+
<link rel="stylesheet" href="/core/tools/workspace/app/assets/theme.css">
|
|
11
|
+
<script src="/core/tools/workspace/app/assets/theme.js" defer></script>
|
|
12
|
+
<style>
|
|
13
|
+
* { margin: 0; padding: 0; box-sizing: border-box; }
|
|
14
|
+
html, body { height: 100%; overflow: hidden; }
|
|
15
|
+
body {
|
|
16
|
+
font-family: 'SF Mono', 'JetBrains Mono', 'Fira Code', 'Cascadia Code', monospace;
|
|
17
|
+
background: var(--bg);
|
|
18
|
+
color: var(--text);
|
|
19
|
+
display: flex;
|
|
20
|
+
flex-direction: column;
|
|
21
|
+
}
|
|
22
|
+
/* Global banner pinned at the very top across shell chrome. Slim row,
|
|
23
|
+
no flex-grow — it only takes the height it needs. */
|
|
24
|
+
#global-banner { flex: 0 0 auto; width: 100%; }
|
|
25
|
+
.shell-main { flex: 1 1 auto; display: flex; min-height: 0; }
|
|
26
|
+
.sidebar {
|
|
27
|
+
width: 220px;
|
|
28
|
+
flex-shrink: 0;
|
|
29
|
+
background: var(--bg-surface);
|
|
30
|
+
border-right: 1px solid var(--border);
|
|
31
|
+
display: flex;
|
|
32
|
+
flex-direction: column;
|
|
33
|
+
height: 100%;
|
|
34
|
+
min-height: 0;
|
|
35
|
+
}
|
|
36
|
+
.sidebar-brand {
|
|
37
|
+
padding: 1.25rem 1rem;
|
|
38
|
+
font-size: 1.05rem;
|
|
39
|
+
font-weight: 700;
|
|
40
|
+
color: var(--accent);
|
|
41
|
+
border-bottom: 1px solid var(--border);
|
|
42
|
+
cursor: pointer;
|
|
43
|
+
}
|
|
44
|
+
.sidebar-brand:hover { opacity: 0.85; }
|
|
45
|
+
.sidebar-brand #brand-name {
|
|
46
|
+
display: block;
|
|
47
|
+
font-size: 1.05rem;
|
|
48
|
+
font-weight: 700;
|
|
49
|
+
color: var(--accent);
|
|
50
|
+
}
|
|
51
|
+
.sidebar-brand #brand-subtitle {
|
|
52
|
+
display: block;
|
|
53
|
+
font-size: 0.65rem;
|
|
54
|
+
color: var(--text-dim);
|
|
55
|
+
font-weight: 400;
|
|
56
|
+
margin-top: 0.25rem;
|
|
57
|
+
}
|
|
58
|
+
.sidebar-nav {
|
|
59
|
+
flex: 1;
|
|
60
|
+
padding: 0.75rem 0;
|
|
61
|
+
overflow-y: auto;
|
|
62
|
+
}
|
|
63
|
+
.nav-section {
|
|
64
|
+
padding: 0.5rem 1rem 0.25rem;
|
|
65
|
+
font-size: 0.6rem;
|
|
66
|
+
color: var(--text-dim);
|
|
67
|
+
text-transform: uppercase;
|
|
68
|
+
letter-spacing: 0.08em;
|
|
69
|
+
}
|
|
70
|
+
.nav-item {
|
|
71
|
+
display: block;
|
|
72
|
+
padding: 0.5rem 1rem;
|
|
73
|
+
color: var(--text);
|
|
74
|
+
text-decoration: none;
|
|
75
|
+
font-size: 0.8rem;
|
|
76
|
+
cursor: pointer;
|
|
77
|
+
transition: background 0.12s, color 0.12s;
|
|
78
|
+
border-left: 3px solid transparent;
|
|
79
|
+
}
|
|
80
|
+
.nav-item:hover {
|
|
81
|
+
background: var(--bg-highlight);
|
|
82
|
+
color: var(--text-bright);
|
|
83
|
+
}
|
|
84
|
+
.nav-item.active {
|
|
85
|
+
background: var(--bg-highlight);
|
|
86
|
+
color: var(--accent);
|
|
87
|
+
border-left-color: var(--accent);
|
|
88
|
+
font-weight: 600;
|
|
89
|
+
}
|
|
90
|
+
.content-area {
|
|
91
|
+
flex: 1;
|
|
92
|
+
display: flex;
|
|
93
|
+
flex-direction: column;
|
|
94
|
+
height: 100%;
|
|
95
|
+
min-height: 0;
|
|
96
|
+
}
|
|
97
|
+
.breadcrumb-bar {
|
|
98
|
+
background: var(--bg-surface);
|
|
99
|
+
border-bottom: 1px solid var(--border);
|
|
100
|
+
padding: 0.45rem 1.25rem;
|
|
101
|
+
font-size: 0.7rem;
|
|
102
|
+
color: var(--text-dim);
|
|
103
|
+
display: flex;
|
|
104
|
+
align-items: center;
|
|
105
|
+
gap: 0.4rem;
|
|
106
|
+
min-height: 28px;
|
|
107
|
+
}
|
|
108
|
+
.breadcrumb-bar .crumb { color: var(--text-dim); }
|
|
109
|
+
.breadcrumb-bar .crumb-current { color: var(--text); font-weight: 600; }
|
|
110
|
+
.breadcrumb-bar .crumb-sep { color: var(--border); margin: 0 0.15rem; }
|
|
111
|
+
.content-frame {
|
|
112
|
+
flex: 1;
|
|
113
|
+
border: none;
|
|
114
|
+
width: 100%;
|
|
115
|
+
height: 100%;
|
|
116
|
+
}
|
|
117
|
+
.content-wrap {
|
|
118
|
+
flex: 1;
|
|
119
|
+
position: relative;
|
|
120
|
+
display: flex;
|
|
121
|
+
}
|
|
122
|
+
.frame-loader {
|
|
123
|
+
position: absolute;
|
|
124
|
+
inset: 0;
|
|
125
|
+
display: none;
|
|
126
|
+
align-items: center;
|
|
127
|
+
justify-content: center;
|
|
128
|
+
background: var(--bg);
|
|
129
|
+
color: var(--text-dim);
|
|
130
|
+
font-size: 0.82rem;
|
|
131
|
+
letter-spacing: 0.04em;
|
|
132
|
+
z-index: 10;
|
|
133
|
+
pointer-events: none;
|
|
134
|
+
}
|
|
135
|
+
.frame-loader.visible { display: flex; }
|
|
136
|
+
.frame-loader .dot {
|
|
137
|
+
width: 7px; height: 7px; border-radius: 50%;
|
|
138
|
+
background: var(--accent); margin-left: 0.5rem;
|
|
139
|
+
animation: frame-loader-pulse 1.2s infinite ease-in-out;
|
|
140
|
+
}
|
|
141
|
+
@keyframes frame-loader-pulse {
|
|
142
|
+
0%, 80%, 100% { opacity: 0.25; }
|
|
143
|
+
40% { opacity: 1; }
|
|
144
|
+
}
|
|
145
|
+
</style>
|
|
146
|
+
</head>
|
|
147
|
+
<body>
|
|
148
|
+
<div id="global-banner"></div>
|
|
149
|
+
<div class="shell-main">
|
|
150
|
+
<nav class="sidebar">
|
|
151
|
+
<div class="sidebar-brand" onclick="navigate('/core/tools/workspace/app/home.html')">
|
|
152
|
+
<span id="brand-name">Workspace</span>
|
|
153
|
+
<span id="brand-subtitle">Loading...</span>
|
|
154
|
+
</div>
|
|
155
|
+
<div class="sidebar-nav" id="sidebar-nav">
|
|
156
|
+
<!-- Populated from /__api/nav on load. Fallback below is used if the fetch fails. -->
|
|
157
|
+
<div class="nav-section">Workspace</div>
|
|
158
|
+
<a class="nav-item active" id="nav-home" onclick="navigate('/core/tools/workspace/app/home.html')">Home</a>
|
|
159
|
+
</div>
|
|
160
|
+
</nav>
|
|
161
|
+
<div class="content-area">
|
|
162
|
+
<div class="breadcrumb-bar" id="breadcrumb-bar"><span class="crumb-current">Home</span></div>
|
|
163
|
+
<div class="content-wrap">
|
|
164
|
+
<iframe class="content-frame" id="content-frame"></iframe>
|
|
165
|
+
<div class="frame-loader" id="frame-loader"><span>Loading</span><span class="dot"></span></div>
|
|
166
|
+
</div>
|
|
167
|
+
</div>
|
|
168
|
+
</div><!-- /.shell-main -->
|
|
169
|
+
<script>
|
|
170
|
+
var frame = document.getElementById('content-frame');
|
|
171
|
+
var navItems = [];
|
|
172
|
+
var HOME = '/core/tools/workspace/app/home.html';
|
|
173
|
+
// NAV_MAP (path -> nav-item DOM id) and NAV_LABELS (id -> breadcrumb label)
|
|
174
|
+
// are built from the /__api/nav response. Kept as mutable objects so the
|
|
175
|
+
// fetch handler can replace their contents without changing the references
|
|
176
|
+
// captured by other closures.
|
|
177
|
+
var NAV_MAP = {};
|
|
178
|
+
var NAV_LABELS = {};
|
|
179
|
+
|
|
180
|
+
function renderNav(items) {
|
|
181
|
+
var container = document.getElementById('sidebar-nav');
|
|
182
|
+
// Group in manifest order, preserving first-seen section ordering.
|
|
183
|
+
var sections = [];
|
|
184
|
+
var bySection = {};
|
|
185
|
+
for (var i = 0; i < items.length; i++) {
|
|
186
|
+
var it = items[i];
|
|
187
|
+
var sec = it.section || 'Workspace';
|
|
188
|
+
if (!bySection[sec]) { bySection[sec] = []; sections.push(sec); }
|
|
189
|
+
bySection[sec].push(it);
|
|
190
|
+
}
|
|
191
|
+
var html = '';
|
|
192
|
+
for (var s = 0; s < sections.length; s++) {
|
|
193
|
+
var name = sections[s];
|
|
194
|
+
html += '<div class="nav-section"></div>';
|
|
195
|
+
// Escape section title by assigning via textContent below.
|
|
196
|
+
var group = bySection[name];
|
|
197
|
+
for (var j = 0; j < group.length; j++) {
|
|
198
|
+
var item = group[j];
|
|
199
|
+
html += '<a class="nav-item" id="nav-' + escAttr(item.id) +
|
|
200
|
+
'" data-href="' + escAttr(item.href) + '"></a>';
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
container.innerHTML = html;
|
|
204
|
+
// Fill in text nodes + wire handlers without risking HTML injection from labels.
|
|
205
|
+
var secEls = container.querySelectorAll('.nav-section');
|
|
206
|
+
for (var k = 0; k < secEls.length; k++) secEls[k].textContent = sections[k];
|
|
207
|
+
var anchors = container.querySelectorAll('.nav-item');
|
|
208
|
+
var idx = 0;
|
|
209
|
+
for (var s2 = 0; s2 < sections.length; s2++) {
|
|
210
|
+
var grp = bySection[sections[s2]];
|
|
211
|
+
for (var j2 = 0; j2 < grp.length; j2++) {
|
|
212
|
+
var a = anchors[idx++];
|
|
213
|
+
a.textContent = grp[j2].label;
|
|
214
|
+
(function(href) {
|
|
215
|
+
a.addEventListener('click', function() { navigate(href); });
|
|
216
|
+
})(grp[j2].href);
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
navItems = container.querySelectorAll('.nav-item');
|
|
220
|
+
// Rebuild NAV_MAP and NAV_LABELS.
|
|
221
|
+
for (var key in NAV_MAP) delete NAV_MAP[key];
|
|
222
|
+
for (var lkey in NAV_LABELS) delete NAV_LABELS[lkey];
|
|
223
|
+
for (var m = 0; m < items.length; m++) {
|
|
224
|
+
var mi = items[m];
|
|
225
|
+
var navId = 'nav-' + mi.id;
|
|
226
|
+
NAV_MAP[mi.href] = navId;
|
|
227
|
+
if (Array.isArray(mi.aliases)) {
|
|
228
|
+
for (var ai = 0; ai < mi.aliases.length; ai++) {
|
|
229
|
+
NAV_MAP[mi.aliases[ai]] = navId;
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
NAV_LABELS[navId] = mi.label;
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
function escAttr(s) {
|
|
236
|
+
return String(s).replace(/&/g, '&').replace(/"/g, '"')
|
|
237
|
+
.replace(/</g, '<').replace(/>/g, '>');
|
|
238
|
+
}
|
|
239
|
+
function updateBreadcrumb(path) {
|
|
240
|
+
var bar = document.getElementById('breadcrumb-bar');
|
|
241
|
+
var basePath = path.split('?')[0];
|
|
242
|
+
var navId = NAV_MAP[basePath] || NAV_MAP[path];
|
|
243
|
+
if (basePath.indexOf('project-detail.html') !== -1) {
|
|
244
|
+
var pidMatch = path.match(/[?&]id=([^&]+)/);
|
|
245
|
+
var pid = pidMatch ? decodeURIComponent(pidMatch[1]) : 'Project';
|
|
246
|
+
bar.innerHTML = '<span class="crumb" style="cursor:pointer" onclick="navigate(\'/core/tools/workspace/app/projects.html\')">Projects</span><span class="crumb-sep">/</span><span class="crumb-current">' + pid + '</span>';
|
|
247
|
+
} else if (navId && NAV_LABELS[navId]) {
|
|
248
|
+
bar.innerHTML = '<span class="crumb-current">' + NAV_LABELS[navId] + '</span>';
|
|
249
|
+
} else if (path.indexOf('viewer.html') !== -1) {
|
|
250
|
+
var match = path.match(/[?&]file=([^&]+)/);
|
|
251
|
+
var fileName = match ? decodeURIComponent(match[1]).split('/').pop().replace(/\.md$/, '').replace(/\.json$/, '').replace(/-/g, ' ') : 'Document';
|
|
252
|
+
var parentPage = 'Knowledge';
|
|
253
|
+
if (match) {
|
|
254
|
+
var filePath = decodeURIComponent(match[1]);
|
|
255
|
+
if (filePath.indexOf('operator/notes/') === 0) parentPage = 'Notes';
|
|
256
|
+
else if (filePath.indexOf('projects/') === 0) parentPage = 'Projects';
|
|
257
|
+
}
|
|
258
|
+
bar.innerHTML = '<span class="crumb">' + parentPage + '</span><span class="crumb-sep">/</span><span class="crumb-current">' + fileName + '</span>';
|
|
259
|
+
} else {
|
|
260
|
+
bar.innerHTML = '<span class="crumb-current">Home</span>';
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
var frameLoader = document.getElementById('frame-loader');
|
|
264
|
+
// Show the transient loader when we kick off a navigation and hide it when
|
|
265
|
+
// the iframe finishes loading. This prevents the stale-page-then-pop effect
|
|
266
|
+
// where the browser keeps the previous document visible while the new URL
|
|
267
|
+
// is in flight. Paired with per-page HTML-side loaders so the first paint
|
|
268
|
+
// inside the frame is also a "Loading…" placeholder, never a blank screen.
|
|
269
|
+
if (frame && frameLoader) {
|
|
270
|
+
frame.addEventListener('load', function () { frameLoader.classList.remove('visible'); });
|
|
271
|
+
frame.addEventListener('error', function () { frameLoader.classList.remove('visible'); });
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
function navigate(path) {
|
|
275
|
+
if (frameLoader) frameLoader.classList.add('visible');
|
|
276
|
+
|
|
277
|
+
// Route iframe content changes through location.replace so the iframe
|
|
278
|
+
// does not add a history entry — the top-level hash change below is the
|
|
279
|
+
// sole source of history for shell navigation. Without this, every nav
|
|
280
|
+
// added two entries (frame + hash) and every browser-back triggered
|
|
281
|
+
// hashchange → navigate() → frame.src reassignment → another entry,
|
|
282
|
+
// cascading. On first load, contentWindow.location is about:blank; use
|
|
283
|
+
// frame.src for that one case. After first load, use replace().
|
|
284
|
+
var currentPath = null;
|
|
285
|
+
try {
|
|
286
|
+
var loc = frame.contentWindow && frame.contentWindow.location;
|
|
287
|
+
if (loc && loc.href && loc.href !== 'about:blank') {
|
|
288
|
+
currentPath = loc.pathname + loc.search;
|
|
289
|
+
}
|
|
290
|
+
} catch (e) { /* cross-origin or detached — fall through */ }
|
|
291
|
+
|
|
292
|
+
if (currentPath !== path) {
|
|
293
|
+
try {
|
|
294
|
+
if (frame.src && frame.contentWindow && frame.contentWindow.location) {
|
|
295
|
+
frame.contentWindow.location.replace(path);
|
|
296
|
+
} else {
|
|
297
|
+
frame.src = path;
|
|
298
|
+
}
|
|
299
|
+
} catch (e) {
|
|
300
|
+
frame.src = path;
|
|
301
|
+
}
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
for (var i = 0; i < navItems.length; i++) navItems[i].classList.remove('active');
|
|
305
|
+
var basePath = path.split('?')[0];
|
|
306
|
+
var navId = NAV_MAP[path] || NAV_MAP[basePath];
|
|
307
|
+
if (navId) { var el = document.getElementById(navId); if (el) el.classList.add('active'); }
|
|
308
|
+
updateBreadcrumb(path);
|
|
309
|
+
var newHash = '#' + path;
|
|
310
|
+
if (window.location.hash !== newHash) window.location.hash = newHash;
|
|
311
|
+
}
|
|
312
|
+
window.navigate = navigate;
|
|
313
|
+
function pathFromHash() {
|
|
314
|
+
var h = window.location.hash;
|
|
315
|
+
if (!h || h === '#' || h === '#/') return HOME;
|
|
316
|
+
if (h.startsWith('#/')) return h.slice(1);
|
|
317
|
+
return HOME;
|
|
318
|
+
}
|
|
319
|
+
window.addEventListener('hashchange', function() { navigate(pathFromHash()); });
|
|
320
|
+
|
|
321
|
+
// Fetch nav manifest, render sidebar, then perform initial navigation.
|
|
322
|
+
// On failure, fall back to the minimal hard-coded Home entry already in the DOM.
|
|
323
|
+
fetch('/__api/nav')
|
|
324
|
+
.then(function(r) { return r.json(); })
|
|
325
|
+
.then(function(data) {
|
|
326
|
+
if (data && Array.isArray(data.items) && data.items.length) {
|
|
327
|
+
renderNav(data.items);
|
|
328
|
+
} else {
|
|
329
|
+
// Empty manifest -- keep fallback DOM; seed the maps.
|
|
330
|
+
NAV_MAP[HOME] = 'nav-home';
|
|
331
|
+
NAV_LABELS['nav-home'] = 'Home';
|
|
332
|
+
navItems = document.querySelectorAll('.nav-item');
|
|
333
|
+
}
|
|
334
|
+
})
|
|
335
|
+
.catch(function() {
|
|
336
|
+
// Fallback: seed maps from the static DOM so breadcrumbs + highlight still work.
|
|
337
|
+
NAV_MAP[HOME] = 'nav-home';
|
|
338
|
+
NAV_LABELS['nav-home'] = 'Home';
|
|
339
|
+
navItems = document.querySelectorAll('.nav-item');
|
|
340
|
+
})
|
|
341
|
+
.then(function() { navigate(pathFromHash()); });
|
|
342
|
+
// Load dynamic branding from API
|
|
343
|
+
fetch('/__api/overview').then(function(r) { return r.json(); }).then(function(data) {
|
|
344
|
+
var brandName = document.getElementById('brand-name');
|
|
345
|
+
var brandSub = document.getElementById('brand-subtitle');
|
|
346
|
+
if (data.paName) {
|
|
347
|
+
var name = data.paName;
|
|
348
|
+
var capName = name.charAt(0).toUpperCase() + name.slice(1);
|
|
349
|
+
brandName.textContent = capName;
|
|
350
|
+
document.title = capName + ' — Engineering Assistant';
|
|
351
|
+
} else {
|
|
352
|
+
brandName.textContent = 'Workspace';
|
|
353
|
+
}
|
|
354
|
+
brandSub.textContent = 'Engineering Assistant';
|
|
355
|
+
}).catch(function() {
|
|
356
|
+
document.getElementById('brand-name').textContent = 'Workspace';
|
|
357
|
+
document.getElementById('brand-subtitle').textContent = 'Engineering Assistant';
|
|
358
|
+
});
|
|
359
|
+
</script>
|
|
360
|
+
</body>
|
|
361
|
+
</html>
|
|
@@ -0,0 +1,163 @@
|
|
|
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>Knowledge Map — Workspace</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',monospace; background: var(--bg); color: var(--text); padding: 1.5rem; line-height: 1.6; }
|
|
13
|
+
h1 { color: var(--text-bright); font-size: 1.25rem; margin-bottom: 0.25rem; }
|
|
14
|
+
.subtitle { color: var(--text-dim); font-size: 0.78rem; margin-bottom: 1.25rem; display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }
|
|
15
|
+
.refresh-btn { background: var(--bg-surface); border: 1px solid var(--border); color: var(--text); padding: 0.2rem 0.6rem; border-radius: 4px; font-size: 0.72rem; font-family: inherit; cursor: pointer; }
|
|
16
|
+
.refresh-btn:hover { border-color: var(--accent); color: var(--text-bright); }
|
|
17
|
+
|
|
18
|
+
.metrics-bar { display: flex; flex-wrap: wrap; gap: 0.6rem; background: var(--bg-surface); border: 1px solid var(--border); border-radius: 8px; padding: 0.75rem 1rem; margin-bottom: 1.25rem; }
|
|
19
|
+
.metric { padding: 0 0.9rem; border-right: 1px solid var(--border); display: flex; flex-direction: column; align-items: center; min-width: 90px; }
|
|
20
|
+
.metric:last-child { border-right: none; }
|
|
21
|
+
.metric-value { font-size: 1.45rem; font-weight: 700; color: var(--text-bright); line-height: 1.1; }
|
|
22
|
+
.metric-value.ok { color: var(--green); }
|
|
23
|
+
.metric-value.warn { color: var(--yellow); }
|
|
24
|
+
.metric-value.bad { color: var(--red); }
|
|
25
|
+
.metric-label { font-size: 0.6rem; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.06em; margin-top: 0.2rem; }
|
|
26
|
+
|
|
27
|
+
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 0.8rem; }
|
|
28
|
+
.card { background: var(--bg-surface); border: 1px solid var(--border); border-radius: 8px; padding: 1rem 1.1rem; }
|
|
29
|
+
.card.health-thin { border-color: rgba(187,154,247,0.4); }
|
|
30
|
+
.card.health-warn { border-color: rgba(224,175,104,0.5); }
|
|
31
|
+
.card.health-red { border-color: rgba(247,118,142,0.6); }
|
|
32
|
+
.card h2 { color: var(--text-bright); font-size: 0.95rem; margin-bottom: 0.3rem; display: flex; justify-content: space-between; align-items: center; gap: 0.5rem; }
|
|
33
|
+
.card .meta { color: var(--text-dim); font-size: 0.7rem; margin-bottom: 0.5rem; line-height: 1.5; }
|
|
34
|
+
|
|
35
|
+
.health-badge { font-size: 0.6rem; padding: 0.1rem 0.45rem; border-radius: 3px; text-transform: uppercase; letter-spacing: 0.05em; font-weight: 700; white-space: nowrap; }
|
|
36
|
+
.health-badge.good { background: rgba(158,206,106,0.15); color: var(--green); border: 1px solid rgba(158,206,106,0.3); }
|
|
37
|
+
.health-badge.warn { background: rgba(224,175,104,0.15); color: var(--yellow); border: 1px solid rgba(224,175,104,0.3); }
|
|
38
|
+
.health-badge.red { background: rgba(247,118,142,0.15); color: var(--red); border: 1px solid rgba(247,118,142,0.3); }
|
|
39
|
+
.health-badge.thin { background: rgba(187,154,247,0.15); color: var(--purple); border: 1px solid rgba(187,154,247,0.3); }
|
|
40
|
+
|
|
41
|
+
.stat-row { display: flex; justify-content: space-between; font-size: 0.72rem; padding: 0.2rem 0; border-bottom: 1px dotted var(--bg-highlight); }
|
|
42
|
+
.stat-row:last-child { border-bottom: none; }
|
|
43
|
+
.stat-row .k { color: var(--text-dim); }
|
|
44
|
+
.stat-row .v { color: var(--text); font-weight: 600; }
|
|
45
|
+
|
|
46
|
+
.doc-list { max-height: 200px; overflow-y: auto; margin-top: 0.5rem; padding-top: 0.4rem; border-top: 1px solid var(--bg-highlight); }
|
|
47
|
+
.doc-row { display: flex; justify-content: space-between; gap: 0.5rem; font-size: 0.7rem; padding: 0.18rem 0; }
|
|
48
|
+
.doc-row .doc-path { color: var(--text); flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 0.68rem; }
|
|
49
|
+
.doc-row .doc-age { color: var(--text-dim); font-variant-numeric: tabular-nums; flex-shrink: 0; }
|
|
50
|
+
.doc-row .doc-age.warn { color: var(--yellow); }
|
|
51
|
+
.doc-row .doc-age.red { color: var(--red); }
|
|
52
|
+
.doc-row .doc-bl { color: var(--cyan); flex-shrink: 0; font-size: 0.64rem; }
|
|
53
|
+
|
|
54
|
+
.thresholds { color: var(--text-dim); font-size: 0.68rem; background: var(--bg-highlight); padding: 0.45rem 0.7rem; border-radius: 5px; margin-bottom: 1rem; }
|
|
55
|
+
.thresholds strong { color: var(--text); }
|
|
56
|
+
|
|
57
|
+
.empty { color: var(--text-dim); font-size: 0.82rem; padding: 1rem; text-align: center; font-style: italic; }
|
|
58
|
+
.banner { background: var(--bg-surface); border: 1px solid var(--border); border-radius: 8px; padding: 1.5rem; max-width: 560px; margin: 2rem auto; text-align: center; color: var(--text-dim); }
|
|
59
|
+
|
|
60
|
+
/* Shared loading state */
|
|
61
|
+
.loading { display: flex; align-items: center; justify-content: center; gap: 0.4rem; padding: 2rem; color: var(--text-dim); font-size: 0.82rem; letter-spacing: 0.04em; }
|
|
62
|
+
.loading .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); animation: loading-pulse 1.2s infinite ease-in-out; }
|
|
63
|
+
@keyframes loading-pulse { 0%,80%,100% { opacity: 0.25; } 40% { opacity: 1; } }
|
|
64
|
+
</style>
|
|
65
|
+
<script src="/banner.js" defer></script>
|
|
66
|
+
</head>
|
|
67
|
+
<body>
|
|
68
|
+
<div id="global-banner"></div>
|
|
69
|
+
<h1>Knowledge Map</h1>
|
|
70
|
+
<div class="subtitle">
|
|
71
|
+
<span>Health audit of the knowledge tree: domain coverage, document staleness, backlink graph.</span>
|
|
72
|
+
<button class="refresh-btn" onclick="load()">Refresh</button>
|
|
73
|
+
</div>
|
|
74
|
+
<div id="content"><div class="loading"><span>Loading knowledge map</span><span class="dot"></span></div></div>
|
|
75
|
+
<script>
|
|
76
|
+
function esc(s) { var el = document.createElement('span'); el.textContent = s == null ? '' : String(s); return el.innerHTML; }
|
|
77
|
+
|
|
78
|
+
function ageClass(days, thresholds) {
|
|
79
|
+
if (days == null) return '';
|
|
80
|
+
if (days >= thresholds.staleRedDays) return 'red';
|
|
81
|
+
if (days >= thresholds.staleWarnDays) return 'warn';
|
|
82
|
+
return '';
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
function renderDomains(domains, thresholds) {
|
|
86
|
+
if (!domains.length) return '<div class="empty">No knowledge domains found. Populate <code>operator/knowledge/</code> to get started.</div>';
|
|
87
|
+
var html = '<div class="grid">';
|
|
88
|
+
domains.forEach(function(d) {
|
|
89
|
+
html += '<div class="card health-' + esc(d.health) + '">';
|
|
90
|
+
html += '<h2><span>' + esc(d.name) + '</span><span class="health-badge ' + esc(d.health) + '">' + esc(d.health) + '</span></h2>';
|
|
91
|
+
if (d.description) html += '<div class="meta">' + esc(d.description) + '</div>';
|
|
92
|
+
html += '<div class="stat-row"><span class="k">Documents</span><span class="v">' + d.documentCount + '</span></div>';
|
|
93
|
+
html += '<div class="stat-row"><span class="k">Stale (≥' + thresholds.staleWarnDays + 'd)</span><span class="v" style="color:' + (d.staleCount > 0 ? 'var(--yellow)' : 'var(--text)') + '">' + d.staleCount + '</span></div>';
|
|
94
|
+
html += '<div class="stat-row"><span class="k">Very stale (≥' + thresholds.staleRedDays + 'd)</span><span class="v" style="color:' + (d.redCount > 0 ? 'var(--red)' : 'var(--text)') + '">' + d.redCount + '</span></div>';
|
|
95
|
+
if (d.freshestDoc) {
|
|
96
|
+
html += '<div class="stat-row"><span class="k">Freshest</span><span class="v" style="font-weight:400;font-size:0.66rem">' + (d.freshestDoc.ageDays != null ? d.freshestDoc.ageDays + 'd ago' : '—') + '</span></div>';
|
|
97
|
+
}
|
|
98
|
+
if (d.stalestDoc) {
|
|
99
|
+
var cls = ageClass(d.stalestDoc.ageDays, thresholds);
|
|
100
|
+
html += '<div class="stat-row"><span class="k">Stalest</span><span class="v" style="font-weight:400;font-size:0.66rem;color:' + (cls === 'red' ? 'var(--red)' : cls === 'warn' ? 'var(--yellow)' : 'var(--text)') + '">' + (d.stalestDoc.ageDays != null ? d.stalestDoc.ageDays + 'd ago' : '—') + '</span></div>';
|
|
101
|
+
}
|
|
102
|
+
if (d.docs && d.docs.length) {
|
|
103
|
+
html += '<div class="doc-list">';
|
|
104
|
+
d.docs.slice(0, 8).forEach(function(doc) {
|
|
105
|
+
var cls = ageClass(doc.ageDays, thresholds);
|
|
106
|
+
var pathDisplay = doc.path.replace(/^operator\//, '');
|
|
107
|
+
html += '<div class="doc-row">';
|
|
108
|
+
html += '<span class="doc-path" title="' + esc(doc.path) + '">' + esc(pathDisplay) + '</span>';
|
|
109
|
+
if (doc.backlinkCount > 0) html += '<span class="doc-bl">←' + doc.backlinkCount + '</span>';
|
|
110
|
+
html += '<span class="doc-age ' + cls + '">' + (doc.ageDays != null ? doc.ageDays + 'd' : '—') + '</span>';
|
|
111
|
+
html += '</div>';
|
|
112
|
+
});
|
|
113
|
+
if (d.docs.length > 8) {
|
|
114
|
+
html += '<div class="doc-row"><span class="doc-path" style="font-style:italic;color:var(--text-dim)">… and ' + (d.docs.length - 8) + ' more</span></div>';
|
|
115
|
+
}
|
|
116
|
+
html += '</div>';
|
|
117
|
+
}
|
|
118
|
+
html += '</div>';
|
|
119
|
+
});
|
|
120
|
+
html += '</div>';
|
|
121
|
+
return html;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
function render(data) {
|
|
125
|
+
if (!data.available) {
|
|
126
|
+
document.getElementById('content').innerHTML =
|
|
127
|
+
'<div class="banner"><p>' + esc(data.reason || 'Knowledge tree not found.') + '</p><p>Once you add docs to <code>operator/knowledge/</code>, this page will render a per-domain health audit.</p></div>';
|
|
128
|
+
return;
|
|
129
|
+
}
|
|
130
|
+
var t = data.thresholds || { staleWarnDays: 60, staleRedDays: 120, thinDocs: 3 };
|
|
131
|
+
var s = data.stats || { totalDomains: 0, totalDocuments: 0 };
|
|
132
|
+
var html = '';
|
|
133
|
+
var warnDomains = (data.domains || []).filter(function(d) { return d.health === 'warn' || d.health === 'red'; }).length;
|
|
134
|
+
var thinDomains = (data.domains || []).filter(function(d) { return d.health === 'thin'; }).length;
|
|
135
|
+
|
|
136
|
+
html += '<div class="metrics-bar">';
|
|
137
|
+
html += '<div class="metric"><div class="metric-value">' + s.totalDomains + '</div><div class="metric-label">Domains</div></div>';
|
|
138
|
+
html += '<div class="metric"><div class="metric-value">' + s.totalDocuments + '</div><div class="metric-label">Documents</div></div>';
|
|
139
|
+
html += '<div class="metric"><div class="metric-value ' + (warnDomains > 0 ? 'bad' : 'ok') + '">' + warnDomains + '</div><div class="metric-label">Stale domains</div></div>';
|
|
140
|
+
html += '<div class="metric"><div class="metric-value ' + (thinDomains > 0 ? 'warn' : 'ok') + '">' + thinDomains + '</div><div class="metric-label">Thin domains</div></div>';
|
|
141
|
+
html += '<div class="metric"><div class="metric-value">' + (s.totalBacklinks || 0) + '</div><div class="metric-label">Backlinks</div></div>';
|
|
142
|
+
html += '</div>';
|
|
143
|
+
|
|
144
|
+
html += '<div class="thresholds">Thresholds — <strong>warn ≥' + t.staleWarnDays + 'd</strong>, <strong>red ≥' + t.staleRedDays + 'd</strong>, <strong>thin <' + t.thinDocs + ' docs</strong>. Backlink counts shown as <span style="color:var(--cyan)">←N</span>.</div>';
|
|
145
|
+
|
|
146
|
+
html += renderDomains(data.domains || [], t);
|
|
147
|
+
document.getElementById('content').innerHTML = html;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
function load() {
|
|
151
|
+
document.getElementById('content').innerHTML = '<div class="loading"><span>Loading knowledge map</span><span class="dot"></span></div>';
|
|
152
|
+
fetch('/__api/knowledge-map', { cache: 'no-store' })
|
|
153
|
+
.then(function(r) { return r.json(); })
|
|
154
|
+
.then(render)
|
|
155
|
+
.catch(function(e) {
|
|
156
|
+
document.getElementById('content').innerHTML = '<div class="empty">Unable to load knowledge map: ' + esc(e.message) + '</div>';
|
|
157
|
+
});
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
load();
|
|
161
|
+
</script>
|
|
162
|
+
</body>
|
|
163
|
+
</html>
|