Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>rule42 CockpitNew to Visual Studio Code? Get it now.
rule42 Cockpit

rule42 Cockpit

Rule42

|
123 installs
| (0) | Free
Cockpit extension for the rule42 system: bootstrap, orchestration, TCS, cockpit UI, and agent runner.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

ANDL Extension

Note: This directory is a migration copy of the original andl/ extension. UI/UX must remain identical. Internals will be rewired to call the new backend services (orchestrator-svc, project-state-svc) without changing commands, views, or settings.

Agentic-Native Development Lifecycle (ANDL) extension for VS Code. It provides a local Transactional Context Store (TCS), a Cockpit webview to manage Units of Work (UOWs), GitHub Task Bus sync, personas, and early governance/reporting agents.

Features

  • Cockpit webview (React + VS Code Webview UI Toolkit) for:

    • Task Bus Monitor (Kanban): Pending/In Progress/Blocked/Review/Done with drag-and-drop priority for Pending.
    • Context & Changelog Explorer with Instructions and Artifacts.
    • Agent & Persona Management (view/edit personas).
    • Manual Protocol Sender: in Agents tab, choose recipients, subject, and body to post a protocol-formatted comment to a GitHub issue.
    • Project GitHub status hint: next to the project selector, Cockpit displays the bound owner/repo (parsed from the project URL) and whether a per‑project token is stored (key icon when set; warning when missing).
    • Cockpit V1 is the single UI. V2 experiments and Activity Bar views have been removed per product decision.
  • GitHub Issues Task Bus:

    • Sync labeled issues into TCS; webhook listener for live updates.
    • Protocol-formatted comments for state changes.
  • Reporting:

    • Weekly Status Reports generated from TCS with a template, optional commit to repo.
    • Scheduler with settings and manual commands.
  • Governance:

    • PolicyEngine (YAML) and @qa agent scaffold with a reusable CI workflow.
    • GitOps governance gate: automated branch/commit/push/PR runs after shell/tests when enabled; policies are validated first (waivers honored per project); PR creation falls back to a dry-run if owner/repo is unset.
    • Waivers: Path-scoped exceptions to policy with reason/expiry; managed in Cockpit → Governance and persisted in TCS; violations display inline waiver badges and scanner source badges (e.g., Local JSON).
    • PR linkback: When GitOps opens a PR, Cockpit shows a banner with the PR URL and quick actions.
  • Toolkit (UOW 3.17): Extension integrates andl-core ToolkitService v2 for tool governance and future third‑party tool discovery; available tools can be surfaced in prompts (behind flags) and gated by risk.

    • Core parity: local adapters mirror core built-ins; unsafe tools (shell, raw RAG) remain disabled by default and require explicit settings/governance to enable.
    • Enriched manifest metadata (schema v2) in AI Config → Toolkits: Plugin provenance (short id), Risk level badge (low/medium/high), Confirm requirement (yes/no), Lifecycle (Registered/Updated relative ages with tooltip timestamps), and parameter / implementation hash abbreviations (first 8 chars, tooltip shows full hash). Columns collapse gracefully when enrichment is unavailable.
    • Status semantics (ready, lazy, persisted) and refresh behavior documented in docs/toolkit-statuses.md.
  • Agentic loop & Run panel:

    • Brief an Instruction to assemble a contextual Agent Briefing Packet.
    • Optional iterative AgentLoop applies structured EDIT_PLAN actions, runs tests/shell, and streams Plan/Result per iteration to the Run panel.
    • Settings control automation (edits/shell/tests/git) and loop (enabled/maxIterations). Final Output persists in the panel. No auto-hide.
    • Assistant tab (3.11): Copilot-style prompt + model picker with live Thought/Action/Observation/Final transcript. Uses local RAG when enabled.
  • Unified Settings Console (centralized configuration):

    • Tabs: Project, Automation, Chat, Budget, Cognitive, Routing, Governance, Briefing, Memory (RAG/LTM stats), Telemetry, Ops, Rules, Raw JSON.
    • New Ops tab centralizes operational & infrastructure settings: Weekly Reporting, Daily Reflector, Remote Services (orchestrator/state endpoints + auth + tenant), Webhook Listener (port/secret), Runtime & Gating (sync bus, AI bridge, invocation gating mode, telemetry sample rate, Cockpit SaaS base URL, LTM storage path override), and Global GitHub defaults (owner/repo/token fallbacks).
    • Approvals scheduling (escalate, warn, auto‑cancel, interval, escalateTo) integrated into Governance card with persistence and background scheduler.
    • Status badges (live preview) for next Weekly Report run, next Reflector run, telemetry sampling rate, AI Bridge on/off, and Sync bus state.
    • Raw JSON tab allows advanced direct editing of the full normalized settings payload (with refresh, load, format helpers) and immediate diff-safe serialization.

Settings‑First Configuration (No bundled AI Config webview)

The ANDL extension ships without any configuration webviews. Use VS Code Settings and SecretStorage:

  • Credentials:
    • ANDL: Set/Update Secret (andl.secrets.set)
    • ANDL: List Stored Secrets (andl.secrets.list)
    • ANDL: Delete Secret (andl.secrets.delete)
  • External Toolkit Providers (OpenAPI):
    • Add OpenAPI 3.x URLs to andl.ai.openapiProviders in Settings (User or Workspace scope).
    • Force refresh: ANDL: Refresh Toolkit Catalog (andl.ai.refreshToolkitCatalog).
  • Model selection & routing:
    • Configure andl.defaultModel, andl.routing.personaModelMap, andl.routing.kindModelMap, and andl.ai.excludedModels in Settings.

Optional: You may install an external “AI Config” extension to get a graphical UI, but it’s not required. The ANDL extension will discover providers and tools purely from Settings.

Phase 2 – Resilience & Multi‑Provider Wiring (Backend Alignment)

Resilience controls are configured via Settings (no UI panel required) and respected by the shared @andl/ai-client when invoking real providers:

  • Retry Policy: andl.ai.retry.* (enable, maxAttempts, baseDelayMs, maxDelayMs, jitter) with exponential backoff (+/‑50% jitter)
  • Adaptive Fallback Chain: andl.ai.fallback.* (enabled + ordered chainOrder array; default: anthropic → openai → gemini → stub)
  • Model‑aware Fallback Map: andl.ai.fallback.modelMap (per‑model alternates tried in order before advancing to the next provider; editor available under the Fallback tab)
  • Concurrency Limiter: andl.ai.concurrency.maxConcurrent (global live invocation cap – excess callers queue)
  • Circuit Breaker: andl.ai.circuit.failureThreshold, andl.ai.circuit.halfOpenAfterMs (opens after N consecutive failures; half‑open probes after cooldown)

Credentials are no longer configured via settings keys. See the Credentials Management section below for SecretStorage-only guidance and commands.

Invocation gating (Execution Mode) coordinates with the AI Bridge:

Mode Behavior
stub Deterministic offline simulation only (no network)
dry-run Simulated cost/flow; providers not called (still exercises routing & resilience scaffolding)
live Real provider calls honoring retry/fallback/concurrency/circuit settings

When credentials are omitted a provider automatically degrades to simulation for resilience tests. The fallback chain will transparently try the next configured provider until one succeeds or all fail (emitting a summarized telemetry event internally).

Settings Keys (additive to earlier sections):

andl.ai.retry.enabled
andl.ai.retry.maxAttempts
andl.ai.retry.baseDelayMs
andl.ai.retry.maxDelayMs
andl.ai.retry.jitter
andl.ai.fallback.enabled
andl.ai.fallback.chainOrder   # ["anthropic","openai","gemini","stub"] default
andl.ai.fallback.modelMap     # { "provider/modelA": ["provider/modelB","provider/modelC"], ... }
andl.ai.concurrency.maxConcurrent
andl.ai.circuit.failureThreshold
andl.ai.circuit.halfOpenAfterMs
// Provider credentials are stored exclusively in SecretStorage and are not represented as settings keys.

These keys live under the unified Settings schema and are persisted as regular VS Code user settings. Provider credentials are stored exclusively in VS Code SecretStorage (never in settings). The AI Config webview normalizes inputs and re‑reads canonical state after apply to reflect coercions.

Operational Guidance:

  • Raise maxAttempts cautiously; prefer a smaller baseDelayMs to keep tail latency bounded.
  • Keep chainOrder short; place lowest latency / highest reliability earlier, and include stub last for graceful degradation during demos.
  • Tune maxConcurrent relative to provider rate limits; a low threshold (3‑6) prevents burst throttling while allowing parallel plan/distill operations.
  • Increase halfOpenAfterMs when a provider experiences systemic incidents to reduce probe noise.

Telemetry (internal output channel – PII free): emits fallback summary events (fallback.summary) and abort reasons (abort.budget, abort.circuit) tying into budgeting/governance.

Planned (post‑Phase 2 UI enhancements): visual fallback chain editor, live circuit state badge, and per‑provider health latencies.

Phase 7 – Attachments & Tool Mode Streaming (AI Client Integration)

Internal alignment with the shared @andl/ai-client Phase 7 feature set:

  • Attachment pipeline: Cockpit / Assistant invocation path now forwards selected local files (size & mime filtered) to the AI Bridge. Minimal text extraction (DOCX/PPTX XML, plain text passthrough) is performed upstream; summaries + counts flow through invoke.attachments telemetry.
  • Tool Mode orchestration: New multi‑phase (e.g. deepResearch: plan → gather → synthesize) streaming surfaced in the Assistant transcript with incremental phase markers. Cancellation propagates instantly via AbortSignal (Stop button / dispose) halting downstream provider calls.
  • Telemetry enrichment: tool.start, granular tool.progress (per phase partials), tool.end, and a consolidated tool.metrics event now include per‑phase timings, token usage (simulated in stub mode), and a latency histogram JSON for quick distribution inspection.

Phase C.1 – Structured Telemetry (Core Completion)

Phase C introduces a unified structured telemetry layer shared between the extension and the webview / ai-client bridge. Core events are emitted with:

  • correlationId: Per event flow root (start/end pairs share the same id).
  • configHash: Stable hash of the active AI Config (ordered stringify + rolling 32‑bit) enabling drift detection across sessions.
  • origin: extension or webview for provenance.
  • Latency / size metrics: latencyMs, argsSize, resultSize, querySize, chars, etc.

Implemented Event Taxonomy (Phase C.1 core):

tool.detail.start / tool.detail.end    # Tool manifest/detail resolution timing
tool.exec.start / tool.exec.end        # Actual tool execution wrapper
memory.rag.query.start / end           # Semantic code search (RAG) queries
memory.ltm.query.start / end           # Long-term memory vector recalls
proactive.stage.start / end            # Proactive staged context assembly
settings.apply.start / end             # Bulk settings apply from webview
ui.tabSwitch                           # AI Config navigation tab changes
gating.modeChange                      # Execution mode (stub|dry-run|live) updates (sync + explicit set paths)
invoke.* (ai-client)                   # Model invocation lifecycle (start/chunk/end/retry/fallback/circuit/cache)
tool.* (ai-client tool modes)          # Tool mode orchestration phases & metrics

Correlation Propagation:

  • Extension stamps correlationId and configHash into model invocation metadata (AiBridge proxy) so downstream invoke.start/end receive the same configuration context.
  • Tool / memory / proactive events use distinct correlation roots (purpose: isolate latencies per operation) while still sharing configHash for cross-event grouping.

Sampling & Export:

  • User setting andl.telemetry.samplingRate (default 1) applies per event; events are dropped early when Math.random() > rate.
  • Optional file export via andl.telemetry.exportEnabled: emits redacted JSONL lines to .andl/structured-telemetry.jsonl with large fields truncated or summarized (string length, array length, object key count).
  • In-memory dev ring buffer (500 events) accessible via command: ANDL: Dump Recent Telemetry (andl._dev.telemetry.dumpRecent).

Performance Thresholds (config):

andl.telemetry.exportEnabled
andl.telemetry.samplingRate
andl.performance.detailLatencyWarnMs
andl.performance.stagingLatencyWarnMs

Design Principles:

  • Non-blocking: telemetry failures are best-effort and never throw.
  • Redaction-first: Potentially large or sensitive payloads are hashed/summarized, not stored verbatim.
  • Evolvable: Event names are namespaced; additive fields are tolerated by downstream consumers.

Quick Debug Workflow:

  1. Set "andl.telemetry.exportEnabled": true and keep sampling at 1 for full fidelity.
  2. Reproduce tool execution or proactive staging.
  3. Run ANDL: Dump Recent Telemetry – inspect ring buffer for expected start/end pairs and latency.
  4. Open the JSONL export to validate redaction (fields show length metadata, not raw content).
  5. Switch execution mode (stub → live) and verify a gating.modeChange event plus new invoke.start events with updated provider provenance.

Planned (future beyond C.1): optional OTEL bridge, live telemetry panel, retention policy & rotation for export file.

Test Coverage (Phase C.1): A Playwright E2E spec (tests/e2e/telemetry/structured-telemetry.spec.ts) validates emission of gating.modeChange, proactive.stage.start/end, and correlated invoke.start/invoke.end pairs (matching correlationId) to guard regressions in structured telemetry plumbing.

  • Safety & budgets: Existing gating (execution mode, risk approvals, budget enforcement) still applies before attachments or tool phases are dispatched. Large / disallowed mime types are skipped with reason codes (internal log only).
  • Backward compatibility: Legacy single‑shot assistant prompts still behave the same when no Tool Mode is selected; attachments list is omitted unless provided.

Phase C.2 – Performance Profiling & Tool Detail Cache

Phase C.2 introduces a lightweight, always‑on in‑memory performance profiler plus targeted caching to keep core interactive operations responsive.

Key components:

  • PerformanceProfiler: Records rolling latency samples (bounded window) for named operations (tool.detail, proactive.staging). Provides histogram buckets + p50/p95/p99 computation.
  • Threshold warnings: Settings andl.performance.detailLatencyWarnMs and andl.performance.stagingLatencyWarnMs (0 = disable). When an observed latency exceeds its threshold, a non‑blocking VS Code warning notification (and structured telemetry field) is emitted to highlight potential regressions early.
  • Tool Detail TTL Cache: ToolDetailCache keyed by tool name caches merged manifest / usage guidance for tool.detail requests. Configured by andl.performance.toolDetailCacheTtlMs (ms; 0 disables). Cache hits short‑circuit recomputation and emit cacheHit: true in tool.detail.end telemetry.
  • Hidden Test Command: andl._test.toolDetailFetch mirrors the normal tool detail resolution path but is deterministic for E2E assertions (cache hit telemetry, profiler sample growth) without needing a full UI flow.

Diagnostics & Inspection:

  • Command ANDL: Diagnostics – Dump Performance Metrics (andl.diagnostics.perfDump) opens a virtual document with the current profiler snapshot: per operation sample count, last N latencies, histogram distribution, and computed percentiles; also echoes active threshold settings and cache TTL.

Operational Guidance:

  • Lower the detailLatencyWarnMs threshold locally during performance tuning to surface regressions early.
  • Set toolDetailCacheTtlMs to 0 while developing new manifests to avoid stale detail data; restore (e.g., 60000) for normal usage to minimize repeated parse/merge overhead.

Telemetry Fields (additions): tool.detail.end now includes cacheHit (boolean) and proactive.stage.end continues to carry latencyMs for profiler correlation. Performance dump command is purely diagnostic (no events emitted).

Phase C.3 – Learned Tool Result Schemas

Phase C.3 adds an opt‑in (default on) Learned Schema Registry that infers structural JSON schema from successful tool executions to improve invocation guidance quality and surface drift between documented and actual results.

Behavior:

  • On a successful tool execution (tool.exec.end with ok: true), the extension (if andl.toolkit.learnSchemas is true) inspects result.data (object/array/primitive) and derives a flattened schema: field -> type (string|number|boolean|object|array|null) plus optional flag (if missing in some examples).
  • The registry persists to .andl/learned-schemas.json in the workspace root (created on first learn). Each tool entry tracks version, fields, examples count, and lastUpdated timestamp.
  • Drift Detection: If a subsequent example introduces a new field or changes a field’s primary type, the tool’s schema version increments and telemetry event tool.schema.learned (drift=true) is emitted (export respects sampling/export toggles).
  • Examples: Only a bounded number of small example snapshots (truncated) are retained to avoid bloat while preserving representative shapes.

Diagnostics:

  • Command ANDL: Diagnostics – Dump Learned Schemas (andl.diagnostics.schemasDump) displays a concise JSON view summarizing each learned tool: name, version, field count, optional fields list, and observed types.
  • Disable learning by setting "andl.toolkit.learnSchemas": false (schema file will be left untouched; no learn attempts performed).

Usage Recommendations:

  • Keep learning enabled during active tool development to rapidly detect undocumented fields.
  • For stable production use, periodically review the dump and consider codifying final schemas in tool manifests to reduce reliance on inference.

File Artifacts:

  • .andl/learned-schemas.json – local persisted learned schemas (ignored by VCS if .andl is gitignored; recommended to ignore for privacy unless sharing intentionally).

Quick Reference (Phase C.2 + C.3 Settings)

andl.performance.detailLatencyWarnMs      # ms threshold for tool detail latency warnings (0=off)
andl.performance.stagingLatencyWarnMs     # ms threshold for proactive staging warnings (0=off)
andl.performance.toolDetailCacheTtlMs     # ms TTL for in-memory tool detail cache (0=disabled)
andl.toolkit.learnSchemas                 # enable learned tool result schemas (boolean)

Troubleshooting:

  • No learned schemas appearing: confirm a tool actually returned a JSON-like data object and that andl.toolkit.learnSchemas is still true in Settings (AI Config tab updates propagate immediately).
  • Cache hit not occurring: ensure consecutive detail requests use identical tool name and TTL not expired; verify TTL > 0 and that you’re not running with a fresh window (cache is in-memory only).

Phase C.4 – Final Deprecation & Cleanup (0.1.8)

Phase C.4 removes the legacy coarse Toolkit gating settings:

andl.toolkit.enableWriteFile
andl.toolkit.enableTaskRun
andl.toolkit.enableHttpFetch
andl.toolkit.enableTerminalRun

These four boolean flags originally acted as broad “on/off” master switches for high‑risk built‑ins (write file, run task, HTTP fetch, terminal run). They have been fully removed from the configuration schema, settings snapshot/apply pipeline, AI Config webview, and telemetry. Any residual values in a user’s settings.json are now ignored by the extension.

Unified Gating Model (post‑C.4):

  • Per‑tool enablement is determined exclusively by andl.toolkit.disabledTools (an allow-by-default, explicit deny list) plus existing higher‑level automation / governance / approval layers.
  • The Toolkits tab now renders only a single Enabled checkbox per tool (with description overrides) – the deprecated coarse gating fieldset and explanatory badges have been removed for clarity.
  • Description overrides (andl.toolkit.toolDescriptions) and usage guidance (andl.toolkit.toolUsageGuidance) are unaffected.

Why the change:

  1. Eliminates duplication (two parallel gating concepts frequently drifted or confused users about precedence).
  2. Encourages precise least‑privilege control (disable only what you actually want off, instead of enabling everything with four master switches).
  3. Simplifies persistence & hashing (config hash no longer varies due to unused booleans) and reduces future maintenance surface.

Migration Guidance:

  • If you previously relied on enable* flags being false to block a capability, add the corresponding tool name to andl.toolkit.disabledTools instead.
  • Typical mappings:
    • enableWriteFile = false → add write_file to disabledTools.
    • enableTaskRun = false → add tasks.run (and optionally specific task wrappers if present).
    • enableHttpFetch = false → add net.http_fetch.
    • enableTerminalRun = false → add terminal.run (or any consolidated exec tool id).
  • No action needed if you had all four flags true; behavior is now equivalent (tools remain enabled unless explicitly disabled).

Breaking Change Note:

  • The removed keys will not be reintroduced. Automated tooling or scripts that attempted to edit these settings should be updated to edit the disabledTools array instead (add/remove entries and reapply settings).
  • Telemetry no longer emits coarse gating deltas; only per‑tool enablement changes are reflected (via settings apply events and subsequent tool detail usage patterns).

Security & Safety Layers (unchanged):

  • Workspace Trust, approvals/governance risk thresholds, and automation feature toggles (andl.automation.*) still collectively gate potentially destructive operations. Disabling a tool via disabledTools remains the fastest explicit hard block.

Post‑C.4 Baseline:

  • Phase C is now complete (C.0–C.4). Future roadmap items shift to Phase D (workflow composition, telemetry dashboards, auto‑correction, retrieval quality) building on this lean baseline.

For historical reference, the prior coarse gating UI has been archived in the repository history; no runtime shim layer remains.

No additional user settings were added for Phase 7; behavior is automatic when the AI Bridge is enabled. Future optional backlog (deferred): alternate provider fallback chain inside multi‑phase orchestration and richer OCR/PDF extraction.

Credentials Management

ANDL stores all provider credentials in VS Code SecretStorage (never in settings.json). This provides:

  • Secure keychain integration (macOS Keychain, Windows Credential Manager, Linux Secret Service)
  • Automatic exclusion from Settings Sync
  • Password-masked UI when viewing

Available Commands

  • ANDL: Set/Update Secret – Store or update a provider API key
  • ANDL: List Stored Secrets – View all stored credential keys (values masked)
  • ANDL: Delete Secret – Remove a credential from SecretStorage

Migration from Old Settings

If you previously stored API keys in settings (e.g., andl.ai.openai.apiKey):

  1. Copy the API key value from settings.json
  2. Run ANDL: Set/Update Secret
  3. Select the provider (OpenAI, Anthropic, Gemini, GitHub Models)
  4. Paste the API key
  5. Remove the old setting from settings.json

Commands

  • ANDL: Open Cockpit — opens the webview cockpit.
  • ANDL: Cockpit Smoke Test — seeds demo data and opens the Cockpit.
  • ANDL: Sync Task Bus Now — one-off GitHub sync.
  • ANDL: Start/Stop Webhook Listener — manage local webhook server.
  • ANDL: Set Project Local Path — point a TCS project to a local repo root.
  • ANDL: Brief Agent For Instruction — assemble a Briefing Packet and either open Copilot Chat (clipboard fallback) or run headless via AgentRunner.
  • ANDL: Generate Weekly Status Report — create and optionally commit a report.
  • ANDL: Enable/Disable/Run Weekly Reporting — manage the scheduler.
  • ANDL: UOW Kickoff (@pm) — starts a UOW with the first step assigned and dual-logs to GitHub/TCS.
  • ANDL: UOW Handoff / Finalize (@pm) — completes a step and either hands off to the next agent or finalizes the UOW.
  • ANDL: Set Project GitHub Token — stores a token scoped to a selected TCS project in VS Code Secret Storage.
  • ANDL: Edit Project GitHub Owner/Repo (URL) — updates the project’s GitHub URL used to infer owner/repo per project.
  • ANDL: RAG Reindex All — rebuilds the local workspace index
  • ANDL: RAG Show Stats — displays current index stats
  • ANDL: Enumerate & Diagnose Models — enumerates models and writes diagnostics (also surfaces fallback list)
  • ANDL: Refresh Toolkit Catalog (Force Load Lazy) — forces all lazy toolkit plugins to load, refreshes the AI Config Toolkit tab, and emits enumeration telemetry.
  • ANDL: RAG Reindex All — rebuilds the local workspace index
  • ANDL: RAG Show Stats — displays current index stats

Settings

All extension configuration is surfaced via VS Code Settings (Settings‑First). Key groups (with representative keys) include:

General / Routing / Models:

  • andl.defaultModel
  • andl.routing.personaModelMap, andl.routing.kindModelMap, andl.routing.cheaperModel

Automation & Loop:

  • andl.automation.enabled
  • andl.automation.edits.enabled, andl.automation.edits.toggles.{createFile,editFile,deletePath,renamePath}
  • andl.automation.shell.enabled, andl.automation.tests.enabled
  • andl.automation.git.enabled, git.createBranch, git.baseBranch, git.push, git.openPr
  • andl.automation.loop.enabled, andl.automation.loop.maxIterations

Chat / Prompt & Memory Budgets:

  • andl.chat.persistTranscripts, ragSessionMemory, includeChatTranscript, includeRecentFinal
  • andl.chat.maxRecentContextChars, maxChatTranscriptChars, proactiveRetrieval, proactiveMaxChars
  • andl.chat.promptMaxChars, stagedWarnChars
  • andl.chat.ragRecent.includeInPrompt, andl.chat.ragRecent.maxChars
  • andl.chat.availableToolsInPrompt

RAG & LTM:

  • andl.rag.enabled, includeGlobs, excludeGlobs, embeddingModel, vectorStore.backend, storagePath, topK, evictionPolicy, maxSizeMB, maxChunks, recent.prefer, recent.k
  • andl.ltm.storagePath (LTM override path)
  • Reflector daily scheduler: andl.reflector.enabled, hour, minute

Weekly Reporting:

  • andl.reporting.enabled, dayOfWeek, hour, minute, windowDays

Approvals & Governance:

  • Governance: andl.governance.riskApprovalThreshold, andl.governance.approverHandle
  • Approvals scheduler: andl.approvals.escalateMinutes, autoCancelMinutes, timeoutWarnMinutes, escalateTo, schedulerIntervalMinutes

Toolbox & Tools:

  • andl.toolbox.enabled
  • andl.tools.listFiles.maxResults

Budget:

  • andl.budget.enabled, andl.budget.enforce, andl.budget.enforcePromptMaxChars, andl.budget.maxUsdPerRun
  • andl.budget.rate.inputPerKTokensUsd, andl.budget.rate.outputPerKTokensUsd

Cognitive (Distillation / Critic / Observation):

  • andl.cog.enabled, distillation.mode, distillation.maxChars, observation.maxBuffer, critic.enabled, critic.mode, critic.maxRetries

Runtime & Telemetry:

  • andl.sync.enabled
  • andl.telemetry.sampleRate (0..1 clamped)
  • andl.ai.bridgeEnabled (multi-provider routing)
  • andl.invocation.gatingMode (stub | dry-run | live)
  • andl.cockpit.baseUrl

Remote / Hybrid Mode:

  • andl.remote.orchestratorUrl, andl.remote.stateUrl, andl.remote.authHeader, andl.remote.tenant

Webhook Listener:

  • andl.webhook.port, andl.webhook.secret

GitHub Fallback (global defaults when no per-project binding):

  • andl.github.owner, andl.github.repo, andl.github.token

Briefing Packet Limits:

  • andl.briefing.maxHistoryEntries, andl.briefing.maxContextChars

All keys can be edited via UI cards or (advanced) Raw JSON. Saving triggers a normalized serialization that mirrors extension snapshot/apply handlers. Unknown or extraneous keys are ignored on apply.

Unsafe tools (how to enable)

The extension lists both safe and unsafe tools in the Assistant prompt (Available Tools). Unsafe tools are disabled by default. Enable at your discretion:

  • Edits (apply_edits): set andl.automation.edits.enabled = true and optionally toggle capabilities under andl.automation.edits.toggles (createFile/editFile/renamePath/deletePath). Delete is off by default; set andl.automation.edits.toggles.deletePath = true to allow deletes.
  • Shell (run_shell): set andl.automation.shell.enabled = true.

Notes:

  • Workspace Trust is required to run unsafe tools.
  • Governance/risk checks may still block actions depending on policy.
  • The prompt will annotate disabled tools with a short reason and how to enable.

RAG (andl.rag.*): enable local indexing/embeddings, include/exclude globs, backend, topK, and storage path. You can manage these in Cockpit → Settings under "Workspace RAG (system-wide)" where you can enable/disable at runtime, edit globs/model/backend/topK/storage, and trigger Refresh stats or Reindex now.

Assistant & Telemetry:

  • andl.chat.persistTranscripts — persist Assistant transcripts to global storage (optional, stored locally)
  • Workspace Trust is required to run Assistant and to apply automated edits

Transcript viewer (Cockpit → Settings):

  • When transcript persistence is enabled, a lightweight viewer appears in Settings.
  • Use Refresh list to load saved transcripts and Open to preview the JSON.
  • Use Clear preview to close the current preview.

Environment variables (preferred during early development): GITHUB_OWNER, GITHUB_REPO, GITHUB_TOKEN, ANDL_AUTOMATION_ENABLED.

Per-project GitHub configuration

  • Owner/Repo: inferred from each Project’s git_repository_url (e.g., https://github.com/owner/repo.git). Use “ANDL: Edit Project GitHub Owner/Repo (URL)” to set or correct it.
  • Token: store a token per project using “ANDL: Set Project GitHub Token” (kept in VS Code Secret Storage). If absent, global env/settings token is used.
  • Services (Sync, Governance, Reporting) automatically bind GitHub API calls to the selected project using the inferred owner/repo and stored token when available.
  • UI hint: when a project is selected in Cockpit, the header shows owner/repo with a GitHub icon and a key icon when a per‑project token exists (or a warning icon if not). This provides a quick sanity check of the current GitHub binding.

Testing

  • Unit/integration tests live under andl/src/test.
  • Webview smoke test: npm run test:pw (uses Playwright) — validates Cockpit bundle loads with a stubbed VS Code API. Artifacts are emitted under tmp/pw-results; clean with npm run clean:pw.
  • Optional E2E: ANDL_E2E=1 npm run test:e2e — boots VS Code and looks for the Cockpit webview over CDP. Generates HTML at tmp/pw-results/report.html.
    • Demo scenario covered: approvals pause/resume, Undo Last Apply, and PR linkback banner. See methodology/designs/e2e-demo-report.md.
  • Live GitHub smoke (optional): ANDL_LIVE_GH=1 GITHUB_OWNER=... GITHUB_REPO=... GITHUB_TOKEN=... npm run -s test:pw -- tests/gh/github-live.spec.ts creates/comments/labels/closes a transient issue (label andl-test) and cleans up by closing it.
  • Optional live GitHub PR test: set ANDL_E2E_GH=1 and export GITHUB_TOKEN and GITHUB_OWNER (and optionally GITHUB_REPO as a prefix). This test creates and immediately deletes a throwaway repo and opens a PR in it.

Remote mode (thin client)

The extension can route TCS/journal/run calls to the backend services without changing UI/UX.

Environment variables (set before VS Code launch):

  • ANDL_ORCH_URL — Orchestrator service base URL (enables remote mode when set)
  • ANDL_STATE_URL — Project-state service base URL (optional; defaults to orchestrator base)
  • ANDL_AUTH — Authorization header value (e.g., Bearer ...), passed through to services
  • ANDL_TENANT — Tenant schema header value (x-tenant-schema)

Smoke test for remote adapter (optional):

  1. Build the extension bundle.
  2. Run:
ANDL_ORCH_URL=http://localhost:65315 node scripts/smoke-remote.mjs

End-to-end (no VS Code host):

# From repo root after building services and extension
node scripts/remote-smoke-e2e.mjs

This uses the extension’s remote-only export bundle (dist/remote-export.js) to avoid requiring the VS Code runtime.

It will create a run, fetch it, and add a checkpoint via the adapter.

Hybrid wiring note: When ANDL_ORCH_URL is set, the extension constructs a hybrid TCS that keeps the local SQLite-backed service for existing features while delegating runs, checkpoints, journal writes, agent lookup, and approvals to the backend using a lightweight adapter. UI/UX remains unchanged.

WebSocket client: In remote mode, the extension also maintains a persistent WS connection to the orchestrator to subscribe to run:updates:<id> topics for live updates. This is internal-only; the UI remains unchanged.

AI Bridge & Model Routing (UOW 3.18)

The extension now uses a dynamic AI Bridge that attempts to load the shared @andl/ai-client at runtime (multi‑provider: Copilot, OpenAI, Anthropic, Gemini, stub). If the client package is unavailable it falls back to a lightweight internal Copilot provider.

Routing precedence (when no explicit model is chosen):

  1. Persona model map (andl.routing.personaModelMap[@dev] etc.)
  2. Task kind model map (andl.routing.kindModelMap.assistant / loop / headless / testing)
  3. Cheaper model fallback (andl.routing.cheaperModel) when a cost estimate exceeds budgets (future)
  4. Global default (andl.defaultModel)
  5. First available Copilot model (final fallback)

Environment overrides (set before VS Code launch):

  • ANDL_FORCE_BRIDGE_ENABLED=1 — Force-enable the AI Bridge even if the setting is off.
  • ANDL_FORCE_BRIDGE_DISABLED=1 — Force-disable the Bridge (always use legacy path).
  • ANDL_LM_FORCE_MODEL_ID=<model> — Hard override of all routing; every invocation uses this model id.
  • ANDL_MODEL_PROVIDER_MODE=stub|copilot-only — Force provider selection (stub generates deterministic output; copilot-only skips multi‑provider mux).
  • ANDL_TEST_MODEL_ID=<model> — Used as a fallback model id in tests when routing returns empty.

Resilience keys (Phase 2) also supported via settings/env overrides (settings take precedence). See "Phase 2 – Resilience & Multi‑Provider Wiring" above.

Telemetry events (output channel only, no PII): model.start, sampled model.chunk (first few chunks), model.complete, model.error; the shared client also emits internal route + call events upstream when available.

Phase 11 – Control Center Progress

  • 11.1 (partial): Host bridge beginnings – execution mode apply + enumeration IPC + diagnostics fallback implemented.
  • 11.2–11.9: Placeholder panels scaffolded in AI Config left nav (Providers active; others upcoming).
  • Enforcement status indicator & provider credential panels pending next iterations.

Autonomous Run Log (Cockpit Log Viewer)

Command: ANDL: Open Autonomous Run Log opens a panel that streams raw orchestration events from the internal emitter (JSON lines). Use this for debugging multi‑step agent loops and backend hybrid runs. Close/reopen to reset the view. Events are ephemeral and not persisted.

Webview messaging: stable VS API and test handshake

To make webview tests reliable and avoid race conditions with acquireVsCodeApi:

  • A singleton VS API accessor lives at src/webview/vs.ts. Always use this helper in webview code:
    • import getVS from './vs'
    • const VS = getVS(); VS.postMessage({ type: '...' })
    • The helper exposes the instance on window.__vscodeApi for tests and falls back to a stub when VS API is unavailable (pure browser tests).
  • The webview emits a deterministic andl:ready message after mount. Tests should wait for this signal instead of polling for incidental boot messages.
  • Playwright shim seeds the singleton before loading the bundle:
    • Defines window.acquireVsCodeApi and eagerly sets window.__vscodeApi = acquireVsCodeApi() so the app and tests share the same instance.

This pattern removed flaky postMessage captures in tests and keeps runtime behavior consistent.

Assistant notes (3.13):

  • Requires trusted workspace; will warn otherwise.
  • Emits minimal telemetry (timings/counters) to output channel; no PII.
  • Optional transcript JSON saved under global storage when enabled.

The Assistant tab provides a Copilot-style prompt with a model picker. It streams Thought/Action/Observation/Final events, uses local RAG when enabled, and now layers Hierarchical Conversational Memory (STM/SM/LTM) with proactive context when opted in.

Assistant Operating Manual & Tools

  • When andl.chat.availableToolsInPrompt is enabled, the Assistant prompt includes a concise Operating Manual with principles (observe→search→read→plan→apply), a JSON response contract, and a compact Available Tools list.
  • Preference and safety:
    • Prefer run_task over run_shell when tasks exist.
    • run_shell is gated and blocks meta-chaining by default; only allowlisted binaries are permitted unless explicitly configured.
    • read_file is sandboxed to the workspace/baseDir; attempts to read outside will be rejected.
    • list_files enforces a bounded result count; prefer narrowing via filename/keyword search first.

Notes

  • Phase 13 modularization: shared extension helpers now live under src/extension/shared (telemetry, webview panel, and companion option normalizer). Prefer these over ad-hoc scaffolding when wiring new views; see docs/ai-config-refactor-tracker.md Phase 13 for the migration plan.
  • Governance UOW (3.1) is partially implemented: policies, @qa agent, and workflow exist; CI wiring/integration test pending.
  • Cockpit remediation UOW (3.4) is partially implemented: CSP/resources are fixed and a smoke test exists; a full manual QA pass is pending.
    • Webview tests now use the VS singleton + andl:ready handshake; inline "New Design Doc" and "Propose Change" flows are covered.
  • Per‑project GitHub Settings (UOW 3.8): implemented. Owner/Repo bind per project (read‑only post‑connect), token is stored per‑project in Secret Storage, ANDL main project is auto‑ensured on activation, and seed demo projects can be removed in one click.

Trackers & changelogs

For a single index of all progress trackers, changelogs, and plans, see the top-level README.md section “Progress trackers and changelogs”.

Local Development: pnpm linking & toolkit dist refresh

Toolkit Catalog Refresh & Lazy Plugins

The centralized ai-client toolkit defers some plugin registrations ("lazy plugins") until the first tool invocation to keep activation fast. The command ANDL: Refresh Toolkit Catalog (Force Load Lazy) calls the toolkit service's ensureAllLoaded() method to eagerly load any deferred plugins, guaranteeing that the AI Config webview's Toolkit tab displays the complete catalog. Telemetry events emitted during this process:

  • toolkit.plugin.force_load.start|end|error — per-plugin lifecycle when forcibly loading.
  • toolkit.force_refresh — aggregate result of the manual refresh (loaded, already, failed counts).
  • toolkit.enumeration — snapshot after enumeration: registered vs enriched vs displayed counts and remaining lazy items (should trend to 0 after a force refresh).

You normally don't need to run the refresh; the initial enumeration now calls ensureAllLoaded() automatically. The command is useful for diagnostics or if a plugin failed to load earlier and you fixed its underlying issue without restarting.

When you add or rename files under packages/andl-core/src/toolkit/, the compiled artifacts (dist/toolkit/*.js) must be regenerated and the VS Code extension’s linked dependency refreshed. If you skip this, activation can fail with errors like:

Error: Cannot find module './toolkit/OrchestratorProvider'

The extension now runs a lightweight precompile diagnostic (scripts/check-toolkit-files.mjs) automatically before compile. It WARNs (does not fail) when required toolkit files are missing in the installed andl-core dist.

Required baseline files checked:

  • OrchestratorProvider.js
  • manifestValidator.js
  • formatToolList.js

Typical refresh sequence after adding a new toolkit file:

pnpm -C packages/andl-core -s build            # Rebuild core (emits dist/toolkit/*)
pnpm -C clients/vscode-extension -s install     # (Optional) Refresh local file: link if metadata changed
pnpm -C clients/vscode-extension -s compile     # Triggers precompile check + rebuilds extension bundle

If warnings persist, confirm the new file appears in packages/andl-core/dist/toolkit/ and that node_modules/andl-core/dist/toolkit/ mirrors it. The latter path is what activation require() resolves. You can manually inspect with:

ls packages/andl-core/dist/toolkit
ls clients/vscode-extension/node_modules/andl-core/dist/toolkit

Design goals of the precompile hook:

  • Prevent silent runtime failures after adding new toolkit exports.
  • Keep developer feedback fast (never blocks compile).
  • Provide clear remediation steps (rebuild core → reinstall → compile).

Future enhancements (optional):

  • Auto-trigger a core build when key files are missing (opt-in env flag).
  • Hash comparison to detect staleness (not just presence).

Until then, rely on the warning text and follow the quick three‑step refresh.

Native Module Setup (SQLite / better-sqlite3)

The extension uses better-sqlite3 for local database storage (TCS, settings). This is a native Node.js addon that must be compiled against the correct runtime.

The Problem

VS Code runs on Electron, not standard Node.js. Native modules must be compiled against VS Code's specific Electron version. If you see this error:

Error: The module was compiled against a different Node.js version using
NODE_MODULE_VERSION X. This version of Node.js requires NODE_MODULE_VERSION Y.

This happens because:

  1. pnpm install compiles native modules for your system's Node.js
  2. VS Code's Electron has a different ABI (Application Binary Interface)
  3. The precompiled binary doesn't match, causing the extension to crash

Common triggers:

  • Fresh pnpm install without rebuild
  • VS Code upgrade (new Electron version)
  • Node.js version change (e.g., nvm switch)

Solution A: Rebuild for Electron (Current Approach)

The extension includes a postinstall script that automatically rebuilds better-sqlite3 for Electron:

# Automatic (runs on pnpm install)
pnpm -C clients/vscode-extension install

# Manual rebuild if postinstall failed
node clients/vscode-extension/scripts/rebuild-native.mjs

# Or use the shell script (macOS/Linux)
./clients/vscode-extension/scripts/rebuild-native.sh

Finding VS Code's Electron version:

macOS:

cat "/Applications/Visual Studio Code.app/Contents/Resources/app/package.json" | grep '"electron"'

Or in VS Code: Help → About shows the Electron version.

Rebuild with explicit version:

node clients/vscode-extension/scripts/rebuild-native.mjs 39.2.3

Solution B: Worker Isolation (Recommended for Production)

The recommended approach is to never load SQLite in the Electron process. Instead:

  1. Spawn a dedicated system Node.js worker process
  2. Load better-sqlite3 only in the worker
  3. Communicate via IPC (stdin/stdout JSON protocol)

This completely avoids ABI mismatch because the worker uses your system's Node.js (not Electron).

Reference implementation shape:

  • Worker client module
  • Worker entrypoint module
  • JSON IPC protocol module

Key operational tip (macOS): The extension host may run with a truncated PATH. Support an override like ANDL_INDEXER_WORKER_NODE=/absolute/path/to/node.

Dual-Copy Pattern

To support both Node.js (tests) and Electron (extension) simultaneously:

// package.json
{
  "dependencies": {
    "better-sqlite3": "^12.6.2",
    "better-sqlite3-electron": "npm:better-sqlite3@^12.6.2"
  }
}
  • better-sqlite3 → for plain Node.js (CLI, Vitest tests)
  • better-sqlite3-electron → for VS Code Electron (extension host)

The code tries better-sqlite3-electron first, falling back to better-sqlite3:

let Database;
try {
  Database = require('better-sqlite3-electron');
} catch {
  Database = require('better-sqlite3');
}

Why dual copies? Rebuilding a single install for Electron overwrites the binary and breaks Node.js tests with NODE_MODULE_VERSION mismatch.

Troubleshooting

Symptom Cause Fix
NODE_MODULE_VERSION mismatch Binary compiled for wrong runtime Run node scripts/rebuild-native.mjs
Extension crashes on activation Native module not rebuilt after VS Code upgrade Rebuild native modules
Tests fail but extension works Running tests with Electron-rebuilt binary Use dual-copy pattern or worker isolation
Cannot find module 'better-sqlite3' Dependencies not installed Run pnpm install

Architecture Decision

The ANDL extension currently uses Solution A (rebuild for Electron) with the dual-copy pattern. This works but requires rebuilding after VS Code upgrades.

For maximum reliability, consider migrating to Solution B (worker isolation) in a future phase. See andl-indexer/CONTRIBUTING.md for detailed documentation on the worker isolation approach.

AI Settings Consolidation (M.21)

The deprecation plan for consolidating AI settings into the AI Config webview is documented here:

  • docs/ai-settings-consolidation.md

This outlines which contributes.configuration keys and overlapping Settings Console panels will be removed after a one-release migration window, along with validation steps. No behavior changes are active until that window closes.

New: UOW 3.13 — Hierarchical Conversational Memory (HCM)

Implemented upgrade that layers Short‑Term Memory (STM), Session Memory (SM), and Long‑Term Memory (LTM) over the existing RAG (3.11):

  • 3.13A: STM/SM services with incremental reflective summarization and a Dynamic Prompt Assembler (DPA).
  • 3.13B: File‑backed LTM Knowledge Graph + KnowledgeGraphCurator and an ltm_recall tool; dedup/merge by content hash; Cockpit LTM stats and purge.
  • 3.13C: Proactive Retrieval Engine (RAG + LTM) and an asynchronous Reflector Agent to synthesize Insight nodes; manual "Run Reflector Now" command and daily scheduler.
  • 3.13D: QA, telemetry, and performance budgets (promptMaxChars, stagedWarnChars) with output‑channel telemetry. Optional transcript persistence remains available.

Project Status

  • Envelope 3: UOW 3.10 Done; 3.11A–D Done; 3.13A–D Done; 3.15 A–T Completed. Backlog tracks 3.12 seed demo and hygiene (LTM compaction, perf warnings) and release tasks.

Troubleshooting

  • Duplicate edits when loop is enabled: avoided by skipping the initial non-iterative apply; AgentLoop is the single source of apply operations.
  • Spinner on Brief button: indicates active streaming; clears on loop completion.
  • Workspace not trusted: Assistant, RAG runtime, and automated edits are gated by Workspace Trust. To trust this folder: File > Manage Workspace Trust, mark as Trusted, then reload the window.
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
  • Your Privacy Choices
  • Consumer Health Privacy
© 2026 Microsoft