Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
89 commits
Select commit Hold shift + click to select a range
6c05886
fix: Address critical AI agent audit findings
AlexU-A Mar 26, 2026
06a16fb
fix: Remap test scenario agent and tool IDs to match actual config
AlexU-A Mar 26, 2026
ea28a63
docs: Add CLAUDE.md project guide for Claude Code
AlexU-A Mar 26, 2026
8874179
chore: Minor gitignore cleanup
AlexU-A Mar 26, 2026
32f708a
docs: Add audit report, demo screenshots, and handoff notes
AlexU-A Mar 26, 2026
c98d6ba
docs: Add Claude Code skills for Canvas AI testing and observability
AlexU-A Mar 26, 2026
9469760
docs: Update README with audit results, demo screenshots, and skill l…
AlexU-A Mar 27, 2026
2f9aff5
docs: Move audit and handoff docs from .omc/ to docs/ for sharing
AlexU-A Mar 27, 2026
7f248f4
refactor: DI for GoogleAnalytics.php, remove 'vibe coded' comment
AlexU-A Mar 27, 2026
d006d61
docs: Add 4 workstream plans and ai_agents module research
AlexU-A Mar 27, 2026
23ac46f
docs: Revise all 4 workstream plans based on proposal-critic feedback
AlexU-A Mar 27, 2026
5e0c635
docs: WS1 Phase 0 baseline — 253K tokens per page build
AlexU-A Mar 27, 2026
6192697
feat: WS1 token efficiency — layout scoping module, config optimizati…
AlexU-A Mar 27, 2026
0b299d4
docs: upstream contribution strategy for Canvas AI token efficiency
AlexU-A Mar 28, 2026
0833339
docs: post-critic v2 — 4 new ADRs, fix all meta-critic findings
AlexU-A Mar 28, 2026
192fb57
docs: add parallel track schedule to ADR-008 and handoff note
AlexU-A Mar 28, 2026
5bc2640
feat: ADR-008 three parallel tracks — scoping fixes, P4 direct edit, …
AlexU-A Mar 28, 2026
a62ff1c
fix: DirectEditController populates component prop map for validation
AlexU-A Mar 29, 2026
8e97042
feat: tiered deterministic edit routing proposal + fix "make" keyword…
AlexU-A Mar 29, 2026
6c3f1ca
refactor: address all drupal-critic findings + add unit tests
AlexU-A Mar 29, 2026
3f7f1d7
feat: dynamic ComponentSchemaLoader + intent test manifests + live me…
AlexU-A Mar 29, 2026
c943e37
fix: 52% token reduction — fix parser to strip 86K ai_context on loop…
AlexU-A Mar 29, 2026
9dc60d1
fix: update ContextScopingSubscriber fingerprints to match rendered c…
AlexU-A Mar 29, 2026
41b8d23
docs: WS1 measurement results — 101K to 31K tokens (69% reduction)
AlexU-A Mar 29, 2026
6691d44
feat: auto-generated fingerprints for context scoping — no hardcoded …
AlexU-A Mar 29, 2026
ab79bb2
feat: Tier 1 cold-start fix + Tier 2 compound deterministic editing
AlexU-A Mar 29, 2026
3db135e
test: browser regression for direct-edit Tiers 1+2 + ADR-010
AlexU-A Mar 29, 2026
6bb8ab7
feat: region index for cross-region awareness in scoped layouts
AlexU-A Mar 29, 2026
c1c7f96
feat: context envelope builder for component-level scoping (ADR-006)
AlexU-A Mar 29, 2026
9b4f258
docs: fix slop in region scoping proposal + finalize upstream issue d…
AlexU-A Mar 29, 2026
74b5966
Merge pull request #3 from fosterinteractive/codex/direct-edit-ui-int…
AlexU-A Mar 29, 2026
8499ff3
Merge pull request #7 from fosterinteractive/feat/region-index-cross-…
AlexU-A Mar 29, 2026
f2664bc
Merge pull request #8 from fosterinteractive/chore/upstream-issue-filing
AlexU-A Mar 29, 2026
8600cda
Merge pull request #5 from fosterinteractive/feat/context-envelopes
AlexU-A Mar 29, 2026
a8177a5
docs: reframe upstream comments for Dries/catch audience alignment
AlexU-A Mar 29, 2026
3daf770
docs: Baseline 3.0 plan — revised after triple meta-critic review
AlexU-A Mar 29, 2026
134bbff
feat: Phase 0 — telemetry + schema loader expansion for Baseline 3.0
AlexU-A Mar 29, 2026
cba20dc
Merge pull request #9 from fosterinteractive/feat/baseline-3.0-phase-0
AlexU-A Mar 29, 2026
7428ee9
feat: Phase 1 -- bare value type inference for deterministic edits
AlexU-A Mar 29, 2026
8965ce3
feat: Phase 2 -- boolean toggle patterns for deterministic edits
AlexU-A Mar 29, 2026
1f60732
Merge pull request #10 from fosterinteractive/feat/baseline-3.0-phase-1
AlexU-A Mar 29, 2026
7c0afab
feat: Phase 3 -- relative adjustments via enum ordinal navigation
AlexU-A Mar 29, 2026
2980845
Merge pull request #11 from fosterinteractive/feat/baseline-3.0-phase-3
AlexU-A Mar 29, 2026
b3ecdf6
docs: handoff note for Baseline 3.0 session
AlexU-A Mar 29, 2026
7057e0c
fix: semantic filtering for non-toggle booleans + perf regression tests
AlexU-A Mar 29, 2026
06ed389
fix: code bugs + upstream comment revision with evidence matrix
AlexU-A Mar 30, 2026
6ba92c3
docs: show-and-prove execution plan, patch architecture, and handoff
AlexU-A Mar 30, 2026
66d8257
fix: P0 bugs -- is_numeric filter, duplicate text_align, hardcoded le…
AlexU-A Mar 30, 2026
dd61628
feat: P2 benchmark -- direct-edit latency N=10 and hit rate measurement
AlexU-A Mar 30, 2026
76fdba6
feat: P3/P4/P5 -- E2E test suite, contribution patches, demo package,…
AlexU-A Mar 30, 2026
e8dc053
feat: AI path benchmark -- 16.4s mean latency, 430x slower than direc…
AlexU-A Mar 30, 2026
e8f6331
feat: interactive pitch deck for Canvas direct-edit contribution
AlexU-A Mar 30, 2026
99d7abf
refactor: dynamic theme, config telemetry, reset patterns, edge case …
AlexU-A Mar 30, 2026
3c74abc
feat: bare value alias index + config-driven synonym verbs
AlexU-A Mar 30, 2026
d279cd0
docs: update session 2 handoff with complete results and next steps
AlexU-A Mar 30, 2026
6316b77
fix: address 10 meta-critic findings for upstream filing readiness
AlexU-A Mar 30, 2026
a5357fb
docs: add final filing texts for P1, P2, and P4 upstream contributions
AlexU-A Mar 30, 2026
1e9ac5f
docs: add experimental collection path for P4 per maintainer feedback
AlexU-A Mar 30, 2026
d8999d8
docs: record P2 filed as drupal.org #3582288
AlexU-A Mar 30, 2026
a613a4e
feat: add ai_agents_canvas_direct_edit module with Tool plugin and ke…
AlexU-A Mar 31, 2026
e5e0743
feat: add DirectEditController HTTP bridge for canvas direct edit
AlexU-A Mar 31, 2026
423b8d1
test: add 36 controller kernel tests and fix configFactory naming con…
AlexU-A Mar 31, 2026
63033b9
feat: add 7 Canvas MCP tool plugins (4 read, 3 write)
AlexU-A Mar 31, 2026
df66dea
docs: add spec-kitty plan for 5 Canvas strategic initiatives
AlexU-A Mar 31, 2026
91645d3
docs: add WP19-WP20 for drupal.org contrib publishing
AlexU-A Mar 31, 2026
ddd229c
feat: WP01+WP02+WP07 — telemetry schema, TelemetryEvent DTO, AI avail…
AlexU-A Mar 31, 2026
59907b0
docs: WP16 research — prompt caching blocked by OpenAI SDK abstraction
AlexU-A Mar 31, 2026
ef0ca83
feat: WP03+WP08+WP09 — TelemetryCollector, Canvas Lite 503, MatchResu…
AlexU-A Mar 31, 2026
f5c3f49
feat: WP04+WP05 — controller telemetry wiring + TelemetryAggregator
AlexU-A Mar 31, 2026
d65048a
feat: WP10 — integrate MatchResult with confidence scoring into Direc…
AlexU-A Mar 31, 2026
a4b57e7
feat: WP06+WP11 — telemetry export/cron/config + ComplexityModelRouter
AlexU-A Mar 31, 2026
d11c9d8
docs: handoff note for strategic initiatives session 1
AlexU-A Mar 31, 2026
920f702
test: fix controller tests for WP04 constructor + telemetry expectations
AlexU-A Apr 1, 2026
8e94aaf
feat: WP12+WP13+WP14+WP15 — complexity metadata + MCP server submodule
AlexU-A Apr 1, 2026
9b7d9c3
docs: handoff note for strategic initiatives session 2
AlexU-A Apr 1, 2026
7c078aa
feat: WP20 — decouple from FinDrop + d.o. contrib prep
AlexU-A Apr 1, 2026
6008a37
refactor: add @api/@internal annotations + service architecture ratio…
AlexU-A Apr 1, 2026
da0c1bd
docs: WP19 publishing steps + Canvas #3549232 follow-up comment
AlexU-A Apr 1, 2026
5510b6a
fix: PHPCS contribution gate violations in MCP submodule + tests
AlexU-A Apr 1, 2026
c819794
fix: add kernel tests to ai_context loop-aware patch (#3582288)
AlexU-A Apr 2, 2026
28acc49
fix: rebase ai_context loop-aware patch on 1.0.x (upstream renamed su…
AlexU-A Apr 2, 2026
39cb7aa
fix: align loop-aware kernel tests with upstream ai_context 1.0.x schema
AlexU-A Apr 2, 2026
63e3394
fix: use docblock annotations in loop-aware tests for PHPUnit 9 compat
AlexU-A Apr 2, 2026
3f1e4af
fix: address review findings across direct-edit and canvas_ai_seo mod…
AlexU-A Apr 2, 2026
f86bd7b
fix: regenerate loop-aware patch for current upstream + add canvas_ai…
AlexU-A Apr 3, 2026
95cdf36
docs: handoff note for strategic initiatives session 3
AlexU-A Apr 3, 2026
fb299c5
refactor: replace non-deterministic AI evaluation with deterministic …
AlexU-A Apr 3, 2026
359594b
docs: remove core-team-review references from handoff and plan docs
AlexU-A Apr 4, 2026
73d3b05
docs: remove all catch-bot references, reattribute to d.o. research
AlexU-A Apr 4, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
119 changes: 119 additions & 0 deletions .claude/skills/ai-observability-module.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,119 @@
---
name: ai-observability-setup
description: Enable and configure the contrib ai_observability module for tracking AI token usage, prompts, and responses
triggers:
- enable observability
- track AI tokens
- AI logging
- ai observability
---

# AI Observability Setup

Enables and configures the contrib `ai_observability` module (part of `drupal/ai`) for tracking all AI API calls, token usage, prompts, and responses.

## What It Does

The `ai_observability` module subscribes to the AI module's Symfony events and logs:
- Provider, model, and operation type for every AI call
- Token usage (input/output/total) from the API response
- Request duration and thread IDs (for tracing agent chains)
- Optionally: full input prompts and output responses
- OpenTelemetry spans and metrics (optional, for production)

## When to Use

- Auditing what Canvas AI agents are sending to Anthropic/OpenAI
- Tracking token costs per agent or per page build
- Debugging agent behavior by inspecting full prompts
- Setting up production monitoring with OpenTelemetry

## Steps

### 1. Enable the module

```bash
ddev drush en ai_observability -y
```

### 2. Configure for audit mode (full logging)

```bash
ddev drush config:set ai_observability.settings log_input true -y
ddev drush config:set ai_observability.settings log_output true -y
ddev drush config:set ai_observability.settings logging_enabled true -y
```

### 3. View logs

```bash
# Watch AI events in real time
ddev drush watchdog:show --type=ai_observability --count=20

# Filter by severity
ddev drush watchdog:show --type=ai_observability --severity=info --count=50
```

### 4. Export config for the recipe

After enabling and configuring:
```bash
ddev drush config:export --destination=/tmp/config-check
cp /tmp/config-check/ai_observability.settings.yml custom_recipes/findrop/config/
```

Then add `ai_observability` to the findrop recipe's install list in `custom_recipes/findrop/recipe.yml`.

### 5. Recommended settings by environment

**Development/Audit** (full visibility):
```yaml
logging_enabled: true
log_input: true
log_output: true
log_tags: {}
otel_enabled: false
```

**Demo** (lightweight):
```yaml
logging_enabled: true
log_input: false
log_output: false
log_tags: {}
otel_enabled: false
```

**Production** (OpenTelemetry):
```yaml
logging_enabled: false
otel_enabled: true
otel_spans: true
otel_spans_store_input: false
otel_spans_store_output: false
otel_metrics: true
```

## What the module logs

Each AI API call produces a log entry with:
- `provider` — anthropic, openai, etc.
- `model` — claude-sonnet-4-6, text-embedding-3-small, etc.
- `operation_type` — chat, chat_with_tools, embeddings, etc.
- `token_usage.total` — total tokens consumed
- `token_usage.input` — input/prompt tokens
- `token_usage.output` — completion tokens
- `provider_request_id` — unique request thread ID
- `provider_request_parent_id` — parent request (for tracing nested agent calls)
- `input` — full prompt text (when log_input is true)
- `output` — full response text (when log_output is true)
- `tags` — contextual tags from the calling code

## Relation to other logging

- `ai.settings.prompt_logging` — The AI module's own prompt logging. Less structured. Prefer `ai_observability`.
- `ai_dashboard` — Operational status block, doesn't log individual calls.

## Admin UI

Settings form at: `/admin/config/ai/observability`
Loading