COMPOSR interface

COMPOSR

A modular diagnostics workbench that connects configuration, isolated execution, durable results, and inspectable evidence. COMPOSR turns browser, API, data, and performance utilities into repeatable workflows rather than leaving each investigation in a separate script or browser session.

Role
Product architecture and full-stack implementation
Context
COMPOSR grew from recurring tools I needed for my own work and earlier team workflows, starting with XML-like prompt composition and expanding into a reusable host for diagnostics.
TypeScriptViteFastifyPostgreSQLRedisBullMQPlaywrightLighthouseDocker
problem

Turn recurring work into reusable tools, then preserve the investigation

The original prompt composer wrapped text blocks in XML-like tags to make instructions and their intent clearer. The broader need was recurring personal and team work that kept becoming another script, browser tab, or one-off interface. For diagnostics, a score or chart is not enough: target scope, configuration, execution conditions, failures, and raw evidence must remain connected. COMPOSR gives those tools a shared home and an investigation model that can be revisited.

ownership

Product architecture across the shell and execution system

An earlier workplace prototype is part of the design history, not the source of a retained employer repository: that implementation was lost when the work laptop was wiped. I rebuilt the idea as a personal project from the architecture I remembered. My current work spans the modular TypeScript shell, tool contracts and discovery, the Fastify control plane, queue and persistence adapters, worker execution, shared data exploration, and evidence storage. A new tool supplies its own behavior without reimplementing profiles, run state, jobs, tables, or artifact handling.

constraints

Expensive work and variable environments need explicit boundaries

Browser automation and performance analysis can take longer than an ordinary request and fail independently of the interface. Different tools also need different target policies, inputs, and result shapes. The system therefore separates coordination from execution, records the conditions of a measurement, and retains enough evidence to explain partial or failed runs. Local and self-hosted capabilities are distinct from acceptance for a publicly hosted multi-tenant service.

decisions

Extensibility starts with a contract, not another shell branch

The early host discovered tool directories, preferred a manifest, and attempted fallback discovery when one was absent. The current implementation makes integration more explicit: tools declare manifests, entrypoints, operations, and schemas. Registry validation can quarantine an invalid tool or a missing entrypoint rather than loading it as healthy. The framework-free TypeScript interface uses explicit mount and dispose lifecycles and generated lazy client loaders. New tools join through those contracts instead of requiring tool-specific shell branches. Manifest validation checks integration shape; execution trust remains a separate boundary.

implementation

A diagnostic workflow from scope to retained evidence

  1. Configure scopeChoose targets, policies, and a saved profile
  2. Map the siteCreate a versioned page and transition graph
  3. Plan measurementsSelect transitions or Lighthouse page audits
  4. Execute isolated workQueue jobs and dispatch the appropriate worker
  5. Inspect resultsReview normalized findings and underlying artifacts
  6. Compare and exportKeep configuration, results, and evidence together
An illustrative COMPOSR workflow configures an authorized target scope, maps pages and transitions, plans browser or Lighthouse measurements, dispatches isolated jobs, and retains normalized findings with their supporting artifacts. This describes a reusable workflow rather than a claimed customer engagement or measured production improvement.
implementation

Keep the control plane separate from the work

The API coordinates runs and jobs while specialized workers handle HTTP, browser, Lighthouse, and other workloads. PostgreSQL adapters retain run and artifact metadata, Redis/BullMQ supports durable queued execution, and artifact bytes have their own storage boundary. The shared worker protocol describes claims, heartbeats, progress, completion, and failure independently of a specific queue adapter. An expensive browser task therefore does not have to remain inside the request that submitted it.

implementation

A worker lease is ownership, not a promise that it will finish

Jobs are claimed by a worker for a bounded lease and kept alive by heartbeats. The queue checks ownership, distinguishes retryable from permanent failure, and can recover expired leases while retaining attempt state. Cancellation is a request that the active owner acknowledges, not an assumption that a process instantly disappeared. Checkpoints let participating tools retain completed progress so recovery can continue from a meaningful boundary instead of merely changing a status label back to running.

implementation

Evidence needs an integrity contract too

The artifact store writes atomically and returns size and checksum metadata. It rejects path traversal and oversized data, reports capacity failures, and accepts duplicate delivery only when the durable bytes match. Workers upload evidence before committing checkpoint metadata that refers to it. That keeps the relationship between stored bytes and checkpoint references explicit when delivery, storage, or recovery encounters a failure.

decisions

Measure a defined condition, not an ambiguous impression

Transition profiles make cache state, repetitions, completion conditions, and environment controls explicit. Lighthouse uses its official Node interface in a dedicated worker. Normalized results retain the underlying iterations and findings rather than reducing every investigation to a single score. Browser-transition measurements are labeled synthetic lab evidence; they are not presented as field INP or proof of how all real users experience an application.

constraints

Diagnostic access must be deliberate

A diagnostic worker makes requests on behalf of a configured investigation, so target scope is part of its execution contract. HTTP transport validates network targets and redirects, while browser discovery applies request policies and requires explicit authorization for private targets. Bounded responses, crawl limits, and cancellation cleanup constrain the work. Those controls are specific engineering boundaries, not a substitute for the broader review and deployment gates of a hosted service.

implementation

Exercise the contracts and the real browser boundary

  • Validate manifests and entrypoints, including quarantine and incompatible or missing dependencies.
  • Exercise idempotent enqueueing, lease ownership, heartbeat extension, retry limits, expired leases, and active cancellation with deterministic queue tests.
  • Verify atomic checksummed artifacts, matching-byte replay, traversal refusal, and storage-capacity failure behavior.
  • Use a local synthetic site for actual Playwright transition execution and official Lighthouse audits, including an authenticated fixture whose credential must not enter the result.
  • Keep unit simulations, browser integration evidence, durable database/queue integration, and hosted release acceptance as separate levels of proof.
artifacts

A controlled integration example

Target
Synthetic local site, not a customer or production application
Browser workflow
A real Playwright transition completed with normalized request and runtime evidence
Audit runner
Two official Lighthouse fixture audits, including a bearer-protected page
Evidence hygiene
The protected fixture credential was excluded from the audit result
Regression coverage
A separate deterministic test replays an exported profile and traces a seeded regression to raw evidence
impact

One workbench, reusable investigation infrastructure

COMPOSR demonstrates how distinct technical utilities can share the infrastructure around their work without sharing one giant implementation. Profiles describe intent, jobs describe execution, checkpoints describe recoverable progress, and results retain supporting evidence. The result is a workbench where an investigation can be revisited through its configuration, conditions, and evidence rather than reconstructed from memory and a final score.