Skip to content

Capability Router refactor — Phase 0/1 audits, overlay, spec v4 - #21

Merged
chitcommit merged 31 commits into
mainfrom
feat/market-refactor-v2
May 26, 2026
Merged

chitcommit merged 31 commits into
mainfrom
feat/market-refactor-v2

Conversation

@chitcommit

@chitcommit chitcommit commented May 11, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Phase 0 (Freeze & Audit): classified 102 marketplace artifacts + 10 plugin packages. Disposition rollup, environmental-footprint scoring, evidentiary-risk scoring per the capability-governor runbook. Outputs in docs/audits/.
  • Phase 1 (Capability Overlay): generated capabilities.generated.json (102 records on bare JTBD slugs + ChittyCanon URIs per addendum §16) and four views (by-job, by-channel, by-context-cost, by-authority). 23 manual overrides codified at docs/overrides/capability-group-overrides.json. Zero fallback assignments.
  • Spec v4 at docs/architecture/CHITTYMARKET_CAPABILITY_ROUTER.md: canonicalizes bare slugs, codifies ambient-by-intent decoupling, embeds the Phase 0/1 distribution numbers as §7, replaces the JS audit script with the Python view generator as §10, adds §5.4 CI Drift Granularity, expands kill/merge/demote list with concrete artifact IDs.
  • ChittyOS Compliance fixes (F1, F2 from compliance audit): YAML frontmatter added to the new architecture doc; artifact-count drift in CHITTY.md (86+ → 102) and CLAUDE.md (108 → 102) corrected.

Final distribution (102 capabilities): build 29 / connect 22 / govern 15 / ship 12 / workspace 6 / legal 5 / local-lab 5 / agent-runtime 4 / internal 3 / market 1. Execution-class: @chitty/connectors 77, @chitty/workspace 16, @chitty/reasoning 5, @chitty/ambient 4.

Test Plan

  • All 8 generated JSON files parse cleanly (verified pre-PR)
  • capabilities.generated.json schema matches addendum §16 (capability_id URI, capability_group bare slug, execution_class, ontology, authority, runtime_exclusions, discovery, auth_flow)
  • views/by-job.json group counts sum to 102 (29+22+15+12+6+5+5+4+3+1)
  • views/by-channel.json includes claude_code, claude_desktop, codex, openclaw, chatgpt, claude_ai, ch1tty
  • No legacy chitty- prefix in any capability_group slug field
  • Bare slug URI scheme: chittycanon://capability// everywhere
  • docs/overrides/capability-group-overrides.json covers all 23 manual ID→group mappings
  • Architecture doc (CHITTYMARKET_CAPABILITY_ROUTER.md) has canonical YAML frontmatter (status: PENDING, type: architecture, certifier: chittycertify)

Follow-up issues to file (non-blocking for this PR)

  • F3 — Register new ChittyCanon URI namespace chittycanon://capability/* with ChittyCanon. Phase 1 overlay introduces 102 records on this namespace; should be blessed by canonical authority before Phase 2 work depends on it.
  • F4 — File ChittyRegister onboarding packet for chittymarket. Service is not currently in registry.chitty.cc/api/services. CHARTER + the new CAPABILITY_ROUTER spec form the registration packet.
  • F5 — Promote chartered-doc status from DRAFT → PENDING via ChittyCertify review. CHARTER + CHITTY currently status: DRAFT; v4 work + Phase 0/1 deliverables justify promotion.
  • Orchestrator wiringagent.chitty.cc/mcp returns 404 (health endpoint up). Skills-orchestrator skill describes tools that aren't reachable from this session; need orchestrator MCP wired into ~/.claude/.mcp.json to enable cross-channel skill routing per project_skill_orchestrator.md.

Out of scope for this PR

  • Phase 2 (/market UX update to serve canonical cards)
  • Capability-governor gateway (Cloudflare Worker source not yet committed; lives at /tmp/capgov-src/capability-governor-workspace/gateway/)
  • Drain wiring for Codex/Copilot/OpenClaw (becomes a Capability under this taxonomy)

Generated with Claude Code

Summary by CodeRabbit

  • Documentation
    • Added comprehensive capability-router architecture, migration plan, audits, runbook, decision log, governance/strategy follow-ups, and numerous audit/reporting docs; updated Phase 1 capability metrics and overlay details
  • Configuration
    • Added capability-group and evidence-gate override configs; added generated views: by-authority, by-context-cost, and by-job
  • New Features
    • Published an updated marketplace entry for a dispatch plugin
  • Chores
    • Added pre-commit check enforcing evidence-gate policy for non-repudiation capabilities

Review Change Stack

chitcommit and others added 5 commits May 11, 2026 05:12
Capture the UX-driven refactor brief — channels, gateways, taxonomy,
and decision-tree questions — as the seed input for Gemini strategy.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Companion to docs/refactor-prompt.md — the process that governs how we
execute the ChittyMarket refactor and ongoing capability governance.

Includes:
- 4 classification axes + entity mapping (P/L/T/E/A)
- Placement decision matrix with scoring overlay
- Per-channel projection matrix (allow/deny per channel)
- Non-repudiation gate for legal/governance/custody artifacts
- Dual-manifest drift check
- Monthly governance cycle + output package

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
- gemini-strategy-v1.md: captures Gemini Deep Think's first response
  (Canonical Capabilities, execution-boundary taxonomy, kill list).
- gemini-strategy-v1-followup.md: locks in the three open-question
  answers (slim-MCP discovery cheat-sheet, strict canonical semver,
  Ch1tty OAuth for connector auth) and adds governance constraints
  (P/L/T/E/A entity mapping, non-repudiation gate, dual-manifest drift)
  before asking Gemini for round-2 schemas/algorithms.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
- Complete Phase 0 artifact and physical plugin package audits
- Establish chittycanon:// URI schemas and bare JTBD group slugs
- Generate Phase 1 capabilities.generated.json metadata overlay
- Generate capability views (by-job, by-channel, by-context-cost, by-authority)
- Finalize architectural specification for ChittyMarket as a Capability Router
- Set strict discovery, execution class, and zero-trust auth parameters
- Decouple discovery.session_index from execution_class so workspace-resident
  cognitive primitives (chittycontext, checkpoint, sequential-thinking) remain
  ambient by intent

102 real artifacts audited and overlaid. Zero fallbacks (all assigned via
name-rule/category/override). 10 plugin packages mapped to JTBD. 23 manual
overrides for ambiguous ecosystem items.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Incorporates results of Phase 0/1 unified pass:

- canonicalize bare JTBD slugs in schema layer; branded ChittyBuild/ChittyShip
  labels are presentation-only
- add Sequential Thinking and the 3 workspace continuity primitives to the
  @chitty/ambient examples; codify ambient-by-intent as a discovery/context
  posture, not a physical execution location
- replace schema example with full §16 shape: capability_id (URI), legacy_id,
  capability_group (bare), execution_class, ontology, authority, auth_flow,
  runtime_exclusions
- new §7 Phase 0/1 Current Distribution embeds the actual numbers from the
  Phase 0/1 deliverables (102 capabilities, 0 fallback, 4 @chitty/ambient)
- replace the JS audit script with the Python view generator that produced
  the committed views/
- expand kill/merge/demote list with concrete artifact IDs (plugin-sentry,
  plugin-ralph-loop, agent-chittyagent-canon, plugin-chittyhelper/agent/command,
  search-evidence-documents, Supabase, Plaid, sequential-thinking)
- add §5.4 CI Drift Granularity (only enforced runtimes + touched capabilities
  fail the PR; full-repo drift is a non-blocking nightly report)
- add Phase 6 alias sunset detail: 60-day hard fail; hard deletion only at
  <1% usage for 30 days

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@coderabbitai

coderabbitai Bot commented May 11, 2026

Copy link
Copy Markdown

Important

Review skipped

Too many files!

This PR contains 167 files, which is 17 over the limit of 150.

To get a review, narrow the scope:
• coderabbit review --type committed # exclude uncommitted changes
• coderabbit review --dir # limit to a subdirectory
• coderabbit review --base # compare against a closer base

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 75ccc9c4-0059-41ac-8b0f-faaef5469a58

📥 Commits

Reviewing files that changed from the base of the PR and between 18ecc91 and dafe051.

📒 Files selected for processing (167)
  • .claude-plugin/marketplace.json
  • .github/workflows/hydrate-pointers.yml
  • .github/workflows/validate-chittymarket.yml
  • README.md
  • canonical/.dispatch-state/agents/chittyagent-autobot.json
  • canonical/.dispatch-state/agents/chittyagent-canon.json
  • canonical/.dispatch-state/agents/chittyagent-chatgpt.json
  • canonical/.dispatch-state/agents/chittyagent-claude.json
  • canonical/.dispatch-state/agents/chittyagent-cloudflare.json
  • canonical/.dispatch-state/agents/chittyagent-connect.json
  • canonical/.dispatch-state/agents/chittyagent-dispatch.json
  • canonical/.dispatch-state/agents/chittyagent-neon.json
  • canonical/.dispatch-state/agents/chittyagent-notion.json
  • canonical/.dispatch-state/agents/chittyagent-register.json
  • canonical/.dispatch-state/chittyagent-dispatch.json
  • canonical/.dispatch-state/chittyagent-neon.json
  • canonical/.dispatch-state/commands/autonomy.json
  • canonical/.dispatch-state/mcp/chittyos.json
  • canonical/.dispatch-state/mcp/neon.json
  • canonical/.dispatch-state/skills/capability-governor.json
  • canonical/.dispatch-state/skills/capability-registry-audit.json
  • canonical/.dispatch-state/skills/checkpoint.json
  • canonical/.dispatch-state/skills/chitty-autonomy-affirm.json
  • canonical/.dispatch-state/skills/chitty-autonomy-cicd.json
  • canonical/.dispatch-state/skills/chitty-autonomy-discover.json
  • canonical/.dispatch-state/skills/chitty-autonomy-generate.json
  • canonical/.dispatch-state/skills/chitty-autonomy-implement.json
  • canonical/.dispatch-state/skills/chitty-autonomy-plan.json
  • canonical/.dispatch-state/skills/chitty-autonomy-ship.json
  • canonical/.dispatch-state/skills/chitty-autonomy-tidy.json
  • canonical/.dispatch-state/skills/chitty-autonomy.json
  • canonical/.dispatch-state/skills/chitty-cleanup.json
  • canonical/.dispatch-state/skills/chitty-deploy.json
  • canonical/.dispatch-state/skills/chitty-health.json
  • canonical/.dispatch-state/skills/chitty-pipelines.json
  • canonical/.dispatch-state/skills/chitty-registry.json
  • canonical/.dispatch-state/skills/chittycontext.json
  • canonical/.dispatch-state/skills/chittyos-compliance.json
  • canonical/.dispatch-state/skills/chittyxl.json
  • canonical/.dispatch-state/skills/dispute.json
  • canonical/.dispatch-state/skills/docket.json
  • canonical/.dispatch-state/skills/evidence-collect.json
  • canonical/.dispatch-state/skills/evidence-egress.json
  • canonical/.dispatch-state/skills/fact-governance.json
  • canonical/.dispatch-state/skills/market.json
  • canonical/.dispatch-state/skills/wrangler-audit.json
  • canonical/agents/chittyagent-autobot.md
  • canonical/agents/chittyagent-canon.md
  • canonical/agents/chittyagent-chatgpt.md
  • canonical/agents/chittyagent-claude.md
  • canonical/agents/chittyagent-cloudflare.md
  • canonical/agents/chittyagent-connect.md
  • canonical/agents/chittyagent-dispatch.md
  • canonical/agents/chittyagent-neon.md
  • canonical/agents/chittyagent-notion.md
  • canonical/agents/chittyagent-register.md
  • canonical/commands/autonomy.md
  • canonical/mcp/chittyos.md
  • canonical/mcp/neon.md
  • canonical/skills/capability-governor.md
  • canonical/skills/capability-registry-audit.md
  • canonical/skills/checkpoint.md
  • canonical/skills/chitty-autonomy-affirm.md
  • canonical/skills/chitty-autonomy-cicd.md
  • canonical/skills/chitty-autonomy-discover.md
  • canonical/skills/chitty-autonomy-generate.md
  • canonical/skills/chitty-autonomy-implement.md
  • canonical/skills/chitty-autonomy-plan.md
  • canonical/skills/chitty-autonomy-ship.md
  • canonical/skills/chitty-autonomy-tidy.md
  • canonical/skills/chitty-autonomy.md
  • canonical/skills/chitty-cleanup.md
  • canonical/skills/chitty-deploy.md
  • canonical/skills/chitty-health.md
  • canonical/skills/chitty-pipelines.md
  • canonical/skills/chitty-registry.md
  • canonical/skills/chittycontext.md
  • canonical/skills/chittyos-compliance.md
  • canonical/skills/chittyxl.md
  • canonical/skills/dispute.md
  • canonical/skills/docket.md
  • canonical/skills/evidence-collect.md
  • canonical/skills/evidence-egress.md
  • canonical/skills/fact-governance.md
  • canonical/skills/market.md
  • canonical/skills/wrangler-audit.md
  • docs/architecture/SINGLE-SOURCE-CONVENTIONS.md
  • docs/architecture/UNIVERSAL-PROJECTION-PLAN.md
  • docs/plans/2026-03-03-chittymarket-design.md
  • docs/plans/2026-03-03-chittymarket-implementation.md
  • plugins/chittyagent-autobot/.claude-plugin/plugin.json
  • plugins/chittyagent-autobot/README.md
  • plugins/chittyagent-autobot/commands/autonomy.md
  • plugins/chittyagent-autobot/commands/commands/autonomy.md
  • plugins/chittyagent-autobot/plugin.json
  • plugins/chittyagent-autobot/skills/chitty-autonomy-cicd/SKILL.md
  • plugins/chittyagent-autobot/skills/chitty-autonomy/SKILL.md
  • plugins/chittyagent-dispatch/agents/chittyagent-dispatch.md
  • plugins/chittyagent-dispatch/codex-skills/chittyagent-dispatch/SKILL.md
  • plugins/chittyagent-dispatch/openclaw-agents/chittyagent-dispatch.yaml
  • plugins/chittyagent-dispatch/scripts/adapters/claude-code-hook.sh
  • plugins/chittyagent-dispatch/scripts/adapters/claude-code-mcp.sh
  • plugins/chittyagent-dispatch/scripts/dispatch.sh
  • plugins/chittyagent-dispatch/scripts/hydrate-pointers.sh
  • plugins/chittyagent-dispatch/scripts/pre-commit-drift.sh
  • plugins/chittymarket-canonical/.claude-plugin/plugin.json
  • plugins/chittymarket-manager/codex-skills/market/SKILL.md
  • plugins/chittymarket-manager/skills/market/SKILL.md
  • plugins/chittyos-core/agents/chittyagent-canon.md
  • plugins/chittyos-core/agents/chittyagent-claude.md
  • plugins/chittyos-core/agents/chittyagent-connect.md
  • plugins/chittyos-core/agents/chittyagent-register.md
  • plugins/chittyos-core/agents/chittyagent-schema.md
  • plugins/chittyos-core/codex-skills/checkpoint/SKILL.md
  • plugins/chittyos-core/codex-skills/chitty-cleanup/SKILL.md
  • plugins/chittyos-core/codex-skills/chittyagent-canon/SKILL.md
  • plugins/chittyos-core/codex-skills/chittyagent-register/SKILL.md
  • plugins/chittyos-core/skills/checkpoint/SKILL.md
  • plugins/chittyos-core/skills/chitty-cleanup/SKILL.md
  • plugins/chittyos-core/skills/chittycontext/SKILL.md
  • plugins/chittyos-core/skills/chittyxl/SKILL.md
  • plugins/chittyos-devops/skills/chitty-deploy/SKILL.md
  • plugins/chittyos-devops/skills/chitty-health/SKILL.md
  • plugins/chittyos-devops/skills/chitty-pipelines/SKILL.md
  • plugins/chittyos-devops/skills/chitty-registry/SKILL.md
  • plugins/chittyos-devops/skills/chittyos-compliance/SKILL.md
  • plugins/chittyos-devops/skills/chittyos-compliance/references/certification-criteria.md
  • plugins/chittyos-devops/skills/chittyos-compliance/references/compliance-checklist.md
  • plugins/chittyos-devops/skills/chittyos-compliance/references/templates.md
  • plugins/chittyos-devops/skills/wrangler-audit/SKILL.md
  • plugins/chittyos-devops/skills/wrangler-audit/templates/check-observability.yml
  • plugins/chittyos-governance/agents/chittyagent-neon.md
  • plugins/chittyos-governance/codex-skills/chittyagent-neon/SKILL.md
  • plugins/chittyos-governance/skills/capability-governor/SKILL.md
  • plugins/chittyos-governance/skills/capability-governor/agents/openai.yaml
  • plugins/chittyos-governance/skills/capability-governor/references/decision-matrix.md
  • plugins/chittyos-governance/skills/capability-governor/references/output-templates.md
  • plugins/chittyos-governance/skills/capability-governor/references/projection-matrix.md
  • plugins/chittyos-governance/skills/capability-governor/references/runbook.md
  • plugins/chittyos-governance/skills/capability-governor/scripts/audit_artifact.py
  • plugins/chittyos-governance/skills/capability-governor/scripts/batch_audit.py
  • plugins/chittyos-governance/skills/capability-governor/scripts/validate_decision_log.py
  • plugins/chittyos-governance/skills/capability-registry-audit/SKILL.md
  • plugins/chittyos-legal/skills/dispute/SKILL.md
  • plugins/chittyos-legal/skills/docket/SKILL.md
  • plugins/chittyos-legal/skills/evidence-collect/SKILL.md
  • plugins/chittyos-legal/skills/evidence-egress/SKILL.md
  • plugins/chittyos-legal/skills/evidence-egress/assets/config.json
  • plugins/chittyos-legal/skills/evidence-egress/scripts/audit.sh
  • plugins/chittyos-legal/skills/evidence-egress/scripts/check-drive.sh
  • plugins/chittyos-legal/skills/evidence-egress/scripts/check-neon.sh
  • plugins/chittyos-legal/skills/evidence-egress/scripts/discover.sh
  • plugins/chittyos-legal/skills/evidence-egress/scripts/index.sh
  • plugins/chittyos-legal/skills/evidence-egress/scripts/lib.sh
  • plugins/chittyos-legal/skills/evidence-egress/scripts/report.sh
  • plugins/chittyos-legal/skills/fact-governance/SKILL.md
  • plugins/chittyos-mcp/.mcp.json
  • plugins/chittyos-proxy-agents/agents/chittyagent-chatgpt.md
  • plugins/chittyos-proxy-agents/agents/chittyagent-cloudflare.md
  • plugins/chittyos-proxy-agents/agents/chittyagent-notion.md
  • plugins/neon-mcp/.mcp.json
  • scripts/heal-chittymarket.sh
  • scripts/lint-plugins.sh
  • views/by-authority.json
  • views/by-channel.json
  • views/by-context-cost.json
  • views/by-job.json

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

Phase 1 overlay consolidates 102 capabilities: refactor prompt and strategy, a v4 capability-router architecture spec, a v0.2 audit/runbook, Phase 0 audit results (102 artifacts blocked pending schema/source_links), round‑2 decisions, generated views/overrides, and a pre-commit evidence-gate hook.

Changes

ChittyMarket Capability Overlay (Phase 1)

Layer / File(s) Summary
Refactor Strategy
docs/refactor-prompt.md, docs/gemini-strategy-v1.md
Captures the initial refactor request describing the dual-manifest marketplace setup and enumerates seven refactor workstreams. Proposes a canonical capabilities/projections model with artifact taxonomy based on execution boundary and context weight, per-channel UX matrix, migration phases, and a kill list for local proxy consolidation.
Capability Router Architecture
docs/architecture/CHITTYMARKET_CAPABILITY_ROUTER.md
Comprehensive specification (v4.0.0) defining dual-layer taxonomy with user-facing JTBD groups and system-facing execution classes, canonical chittycanon:// URI schema, discovery/intent broadening logic with triple-AND criteria, zero-trust auth with device-code flow, security/governance constraints including non-repudiation receipts, and a multi-phase non-destructive migration plan with Phase 1 view generator script.
Audit and Governance Process
docs/capability-registry-audit-runbook.md
v0.2 repeatable process defining classification axes (JTBD, environmental footprint, evidentiary risk, runtime projection, P/L/T/E/A entity mapping), audit workflow with existing-first search gating, decision log templates, migration queue, retirement criteria, monthly governance cycle, and quality gates.
Phase 0 Audit Results
docs/audits/chittymarket-artifact-audit.md, docs/audits/chittymarket-plugin-package-audit.json
Phase 0 audit report documenting all 102 artifacts blocked due to missing source_links in marketplace.json schema, with rollup tables for disposition (hold/gateway/local-only/legal-only/skill), environmental footprint, and evidentiary risk. Plugin package audit JSON records legacy/proposed capability URIs, JTBD grouping, migration actions, and projection detection matrix.
Round 2 Strategy Decisions
docs/gemini-strategy-v1-followup.md
Binding decisions for slim-MCP discovery tolerance, strict canonical semver with projection inheritance and CI drift enforcement, and zero-trust auth for /market add connector bridging. Governance constraints include identity-first P/L/T/E/A mapping, non-repudiation gates for legal/governance capabilities, dual-manifest drift as error, and enumerated round-2 deliverables (schema finalization, legal projection design, compiler algorithm, API contracts, risk mitigations).
Documentation Updates
CHITTY.md, CLAUDE.md
Updates reflect Phase 1 capability overlay generation on 2026-05-11. Capability count adjusted to 102. CHITTY.md adds JTBD group distribution table. CLAUDE.md documents Capability Overlay purpose, updates directory structure with chittyagent-autobot and chittyagent-dispatch entries, and revises dual-manifest section.
Generated Views and Configuration
docs/overrides/capability-group-overrides.json, views/by-authority.json, views/by-context-cost.json, views/by-job.json
Capability group override configuration for explicit assignment control. Three generated JSON views: by-authority groups capabilities across six authority scopes (no_last_case_fallback, non_repudiation_required, requires_case, requires_chittyid_only, requires_deploy_authority, requires_governance_authority); by-context-cost groups across high/low/medium execution cost buckets; by-job groups across ten JTBD categories. All include metadata, aggregated counts, and per-entry visibility/source attribution.
Pre-commit Policy & Skill Docs
plugins/chittyagent-dispatch/scripts/pre-commit-drift.sh, docs/overrides/evidence-gate-overrides.json, plugins/chittyos-governance/skills/capability-registry-audit/SKILL.md
Adds a pre-commit hook that fails when non-repudiation-required capabilities lack an authority.evidence_gate (if capabilities.generated.json is staged and jq is present), supplies evidence-gate override mappings, and documents the capability-registry-audit skill and its standardized outputs/templates.
Claude Marketplace Manifest
.claude-plugin/marketplace.json
Adds chittyagent-dispatch plugin entry and broadens chittyos-governance description to “unified Neon integration governance.”

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Poem

🐰 A marketplace emerges from a list so long,
Capabilities now sing in cohesion's song,
Grouped by their jobs and their authority's weight,
A router supreme shall orchestrate fate.
From chaos, a canon—from chaos, a plan!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly identifies the main change: a refactor of the Capability Router with Phase 0/1 audits, overlay generation, and architecture specification version 4.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/market-refactor-v2

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

chitcommit and others added 3 commits May 11, 2026 09:58
F2 — Add YAML frontmatter to CHITTYMARKET_CAPABILITY_ROUTER.md
  Architecture doc previously started with bare # heading. Added
  canonical envelope (uri/namespace/type/version/status/registered_with/
  title/certifier/visibility) per ChittyOS compliance §"Required Files".
  Status set to PENDING (was DRAFT in body as "Approved & Finalized"
  which isn't a valid enum value).

F1 — Resolve artifact count drift across the compliance triad
  - CHITTY.md "86+ artifacts" → "102 capabilities"; updated artifact
    counts table (2026-03-08 → 2026-05-11) and added JTBD-group
    distribution table
  - CLAUDE.md "108 artifacts" → "102 capabilities" (3 occurrences)
  - Added Phase 1 capability-overlay reference to CLAUDE.md structure
    intro so the new `capabilities.generated.json` is discoverable

Audit findings F3 (new ChittyCanon URI namespace registration),
F4 (ChittyRegister onboarding), F5 (chartered-doc status promotion)
tracked as PR follow-up issues — non-blocking for this merge.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…view

C1 — Canonical ontology rule was violated for workspace capabilities
  All 6 records in capability_group=workspace had ontology.primary=["T"]
  inherited from the auditor's keyword-driven entity_anchor heuristic.
  ChittyCanon rule (chittycanon://gov/governance#core-types) requires
  Claude contexts to be Person (P), NEVER Thing (T). Spec §1.1 says
  workspace ontology = P + E.

  Fix: added GROUP_ONTOLOGY lookup table to the generator. Every group
  now derives ontology.primary/secondary from spec §1.1 rather than
  from the auditor's keyword heuristic. Regenerated capabilities.generated.json
  + all 4 views.

  Post-fix primary entity distribution: P:10, L:39, T:38, E:17, A:15
  (was P:15, L:4, T:85, E:8, A:3). All 5 P/L/T/E/A types meaningfully
  present.

I1 — CLAUDE.md "It serves two purposes:" → "three purposes" (the Phase 1
  overlay was appended as item 3 in the prior commit without updating
  the lead-in count).

I2 — CLAUDE.md structure tree: added chittyagent-autobot/ and
  chittyagent-dispatch/ which were present on disk but missing from
  the doc tree.

A1 — Spec §9.2: clarified that chittyos-proxy-agents / chittyos-mcp /
  neon-mcp are PLUGIN PACKAGE names (per plugin-package audit), NOT
  marketplace.json artifact IDs. Listed real affected artifact IDs.

A2 — Spec §2.1 canonical schema example: replaced fabricated fields
  (slim_mcp_hints, high_signal_verbs) with the real schema fields
  (indexable, session_index, ambient_by_intent, verbs, fallback_search)
  that capabilities.generated.json actually emits.

A3 — Spec §7.5 By-Authority: added missing no_last_case_fallback (5)
  row present in views/by-authority.json. Added note that authority
  flags are non-exclusive so the sum exceeds 102.

A4 — Spec §9.1: added skill- prefix to all skill IDs to match
  marketplace.json conventions (skill-evidence-collect, skill-chitty-deploy,
  etc.). Govern section expanded with specific hook artifact IDs.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
M1+M2+M3 — Spec §1.1 ontology declarations made canonical
  - Added explicit `Ontology primary:` / `Ontology secondary:` to every
    JTBD group (was informal one-liner with co-equal types)
  - Added ontology blocks for the 4 groups that previously had none:
    local-lab, agent-runtime, market, internal
  - workspace block now cites the ChittyCanon rule "Claude contexts are
    Person (P), NEVER Thing (T)" as the source of truth
  - §1.1 is now the explicit source of truth for the generator's
    GROUP_ONTOLOGY lookup table

B1 — §9.1 plugin-package vs artifact-ID disambiguation
  - Added preamble explaining the two layers (package directory vs
    marketplace.json artifact ID)
  - workspace, govern, agent-runtime sections split into explicit
    "Plugin packages" and "Artifact IDs in marketplace.json" subsections
  - Flagged unregistered targets (autobot sub-skills plan/ship/tidy/affirm,
    deploy-gate hooks, hook-block-bypass-pipeline) as Phase 1.5 work

B2 — §3.3 schema consistency
  - Triple-AND example "id" field now uses URI form
    (chittycanon://capability/legal/evidence.collect) to match §2.1

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 4

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
CLAUDE.md (1)

13-30: ⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Specify a language for the fenced code block (Line 13).

Add a language tag (e.g., text) to satisfy MD040.

🧩 Proposed fix
-```
+```text
 chittymarket/
   .claude-plugin/marketplace.json   # Native Claude Code marketplace (12 plugins)
   marketplace.json                  # Full artifact inventory (102 capabilities, for /market skill)
   ...
-```
+```
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@CLAUDE.md` around lines 13 - 30, The fenced code block in CLAUDE.md lacks a
language tag which triggers MD040; update the opening fence from ``` to ```text
for the file-level directory listing block (the triple-backtick block containing
"chittymarket/ ... generate-marketplace.sh") so the block is explicitly marked
as text and the markdown lint error is resolved.
🧹 Nitpick comments (2)
docs/architecture/CHITTYMARKET_CAPABILITY_ROUTER.md (2)

687-689: ⚡ Quick win

Reference the canonical manifest regeneration script in this phase section.

Lines 687–689 describe manifest projection, but adding the repo-standard regeneration command here will reduce drift between source plugin manifests and compiled native manifest.

Based on learnings: Use scripts/generate-marketplace.sh to regenerate the native manifest from plugin.json files and maintain consistency between source and compiled manifests.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/architecture/CHITTYMARKET_CAPABILITY_ROUTER.md` around lines 687 - 689,
Update the "manifest projection" phase description to reference the canonical
manifest regeneration script: instruct maintainers to run
scripts/generate-marketplace.sh to regenerate `.claude-plugin/marketplace.json`
from the canonical plugin.json overlay so compiled native manifests stay in
sync; mention that this step should be part of the phase that currently lists
"update generation script to read capability packs" / "generate
`.claude-plugin/marketplace.json`" so readers know the exact command to run and
why.

960-962: ⚡ Quick win

Generate generated_at dynamically instead of pinning a fixed date.

Line 961 will become stale on the next run and weakens traceability of generated views.

🕒 Suggested update
+from datetime import datetime, timezone
@@
-            "generated_at": "2026-05-11",
+            "generated_at": datetime.now(timezone.utc).date().isoformat(),
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/architecture/CHITTYMARKET_CAPABILITY_ROUTER.md` around lines 960 - 962,
The hard-coded "generated_at": "2026-05-11" should be replaced with a
dynamically produced timestamp when the view is generated; update the code that
emits this JSON (the section that writes the "generated_at" field alongside
"version" and "view" / variable name `name`) to insert the current date/time
(e.g., ISO 8601) at generation time instead of the fixed string so the generated
artifact always reflects the actual generation time.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@CHITTY.md`:
- Around line 71-93: Add a blank line before and after each Markdown table so
they are separated from surrounding text to satisfy MD058; specifically insert
an empty line above and below the table that starts with "Type | Count" (and its
closing line showing "**Total** | **102** capabilities") and do the same for the
table that starts with "Group | Count" (and its closing line for "market | 1"),
ensuring each table block is surrounded by one blank line on both sides.

In `@docs/capability-registry-audit-runbook.md`:
- Around line 135-137: The template uses both source_link and source_links
(alongside capability_name and current_location); pick a single canonical key
(e.g., source_links) and update all templates and any parsing/templating code to
use that key consistently: replace occurrences of source_link with the chosen
canonical key and adjust any code that reads/writes the field (template files
referencing capability_name, current_location, and the source_* key and any
parser/loader that expects either name) so examples at lines showing source_link
and source_links are unified.

In `@docs/gemini-strategy-v1.md`:
- Line 91: Fix the typo in the core concept phrase: replace "MemoryCloude" with
"MemoryCloud" in the line that reads "2. **Core ecosystem function needed
constantly (Identity, MemoryCloude, Trust)?** → ChittyMCP Tool (pre-loaded)." to
ensure the correct concept name is used and searchable; update the same phrase
wherever else it appears in this document to maintain consistency.

In `@docs/refactor-prompt.md`:
- Around line 54-55: Fix the typo in the gateway description: replace the
misspelled product name "MemoryCloude" with the correct name "MemoryCloud" in
the ChittyMCP description string ("2. **ChittyMCP** (`mcp.chitty.cc/mcp`) — HTTP
gateway, 21 tools, MemoryCloude persistence, credential retrieval, Notion/Neon
queries, ecosystem awareness.") so the documentation accurately reads
"MemoryCloud persistence".

---

Outside diff comments:
In `@CLAUDE.md`:
- Around line 13-30: The fenced code block in CLAUDE.md lacks a language tag
which triggers MD040; update the opening fence from ``` to ```text for the
file-level directory listing block (the triple-backtick block containing
"chittymarket/ ... generate-marketplace.sh") so the block is explicitly marked
as text and the markdown lint error is resolved.

---

Nitpick comments:
In `@docs/architecture/CHITTYMARKET_CAPABILITY_ROUTER.md`:
- Around line 687-689: Update the "manifest projection" phase description to
reference the canonical manifest regeneration script: instruct maintainers to
run scripts/generate-marketplace.sh to regenerate
`.claude-plugin/marketplace.json` from the canonical plugin.json overlay so
compiled native manifests stay in sync; mention that this step should be part of
the phase that currently lists "update generation script to read capability
packs" / "generate `.claude-plugin/marketplace.json`" so readers know the exact
command to run and why.
- Around line 960-962: The hard-coded "generated_at": "2026-05-11" should be
replaced with a dynamically produced timestamp when the view is generated;
update the code that emits this JSON (the section that writes the "generated_at"
field alongside "version" and "view" / variable name `name`) to insert the
current date/time (e.g., ISO 8601) at generation time instead of the fixed
string so the generated artifact always reflects the actual generation time.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 62e2ca01-2536-4e58-9122-b5ac3fc0226e

📥 Commits

Reviewing files that changed from the base of the PR and between c2226aa and d5100cc.

📒 Files selected for processing (16)
  • CHITTY.md
  • CLAUDE.md
  • capabilities.generated.json
  • docs/architecture/CHITTYMARKET_CAPABILITY_ROUTER.md
  • docs/audits/chittymarket-artifact-audit.json
  • docs/audits/chittymarket-artifact-audit.md
  • docs/audits/chittymarket-plugin-package-audit.json
  • docs/capability-registry-audit-runbook.md
  • docs/gemini-strategy-v1-followup.md
  • docs/gemini-strategy-v1.md
  • docs/overrides/capability-group-overrides.json
  • docs/refactor-prompt.md
  • views/by-authority.json
  • views/by-channel.json
  • views/by-context-cost.json
  • views/by-job.json

Comment thread CHITTY.md
Comment thread docs/capability-registry-audit-runbook.md
Comment thread docs/gemini-strategy-v1.md Outdated
Comment thread docs/refactor-prompt.md Outdated
chitcommit and others added 4 commits May 23, 2026 12:01
Operationalize the v0.2 audit runbook as an invokable skill. Produces the
four standard outputs (taxonomy entry, disposition, migration queue,
decision log) with entity-first checkpoint, non-repudiation gate, and
per-channel projection allow/deny enforced.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…udit

- SKILL.md now treats capabilities.generated.json (Phase 1 overlay, 102
  records) as the primary inventory source for existing-first search.
- First audit entry in docs/decisions/capability-audit-log.md flags a
  concrete finding: all 5 legal capabilities declare
  non_repudiation_required:true but evidence_gate:null. Disposition
  `hold` on portal exposure until the gate enforcement target is
  populated. Review 2026-06-06.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Closes the audit finding from the previous commit. The 5 legal capabilities
that assert non_repudiation_required:true now have an explicit evidence_gate
target each, with rationale. Disposition flips from `hold` → `legal-only`
once the overlay generator picks up these overrides.

Generator policy declared inline: refuse to emit any record with
non_repudiation_required:true and evidence_gate:null. Pre-commit drift hook
should treat the combination as blocking.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Hook now blocks any commit that stages capabilities.generated.json with
records where authority.non_repudiation_required:true but
authority.evidence_gate is null/missing. Verified against a synthetic
overlay (one violator, two clean) — policy fires correctly.

Re-running the policy against the live overlay surfaced 3 additional
violators beyond the initial legal-group sweep:
- chittycanon://capability/govern/fact-governance
- chittycanon://capability/ship/evidence-collection
- chittycanon://capability/govern/block-governance-edits

evidence-gate-overrides.json now covers all 8. Decision log updated.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 4

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.claude-plugin/marketplace.json:
- Around line 44-49: Revert the manual edits to the generated
.claude-plugin/marketplace.json and instead update the source plugin metadata
for chittyos-governance: add the new "description" and "keywords" entries to the
plugin.json for chittyos-governance (leave version/source/strict/category
as-is), then regenerate the marketplace manifest by running
scripts/generate-marketplace.sh so the new fields are propagated into
marketplace.json automatically.

In `@docs/decisions/capability-audit-log.md`:
- Around line 51-61: The document currently references "5" legal capabilities in
the Disposition/quality-gate text while earlier text reports "8" violators;
update the canonical statement so the count and scope match (either change the
earlier "8" to "5" or change the Disposition/quality-gate lines from "5" to "8")
and ensure the migration/next-action references (`authority.evidence_gate`,
"portal/projection emit", and the set of legal capabilities) reflect the same
canonical count; apply the same consistency fix to the repeated instance around
lines 89-93 so all mentions use the identical count and affected-scope language.
- Around line 66-78: Add a language tag to the fenced code block that lists the
distribution counts so markdownlint MD040 is satisfied: change the
triple-backtick fence that currently wraps the block of lines starting with
"agent-runtime:  4" and ending with "total:        102" to use a typed fence
(for example ```text) so the block becomes ```text ... ```.

In `@plugins/chittyagent-dispatch/scripts/pre-commit-drift.sh`:
- Line 94: The printf call prints $violations unquoted which allows
word-splitting/globbing; change the code that prints violations (the printf '  -
%s\n' $violations >&2 line) to safely iterate over the newline-separated output
and print each entry quoted, e.g. read the $violations string with a safe read
loop (using IFS= and read -r) and call printf '  - %s\n' "$line" >&2 for each
line so entries are not split or glob-expanded.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 773d8a90-2c21-4797-80a3-8db93a1c06bb

📥 Commits

Reviewing files that changed from the base of the PR and between d5100cc and 05ca0a1.

📒 Files selected for processing (5)
  • .claude-plugin/marketplace.json
  • docs/decisions/capability-audit-log.md
  • docs/overrides/evidence-gate-overrides.json
  • plugins/chittyagent-dispatch/scripts/pre-commit-drift.sh
  • plugins/chittyos-governance/skills/capability-registry-audit/SKILL.md

Comment thread .claude-plugin/marketplace.json Outdated
Comment thread docs/decisions/capability-audit-log.md
Comment thread docs/decisions/capability-audit-log.md
Comment thread plugins/chittyagent-dispatch/scripts/pre-commit-drift.sh
…ins/ (#23)

scripts/generate-marketplace.sh produces a manifest with no diff. Currently
the checked-in manifest has drifted from the plugins/ source of truth:

- Missing entry: chittyagent-dispatch (exists in plugins/ since #13, never added to manifest)
- Stale description on chittyos-governance: still references capability-registry-audit (renamed) and old Neon-schema-drift wording (per #12 chittyagent-neon-schema was unified into chittyagent-neon)
- Stale keywords on chittyos-governance: capability-audit (removed in #12)

This commit is a pure regeneration. No content authored by hand. Re-running
scripts/generate-marketplace.sh now yields no further diff.

Lint summary unchanged (1 pre-existing: chittyagent-autobot missing plugin.json).

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.claude-plugin/marketplace.json:
- Around line 12-21: The marketplace manifest now lists 13 plugins due to adding
"chittyagent-dispatch"; to fix, remove that plugin from the generated manifest
by reverting or removing its plugin.json entry (the plugin named
"chittyagent-dispatch") so the plugins array contains exactly 12 entries, then
regenerate the manifest using the repository script
scripts/generate-marketplace.sh rather than editing
.claude-plugin/marketplace.json by hand; ensure the plugin's source metadata in
plugins/chittyagent-dispatch/plugin.json is deleted or excluded before running
the generator.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 0197bb6c-ef66-4fbd-8486-c830947b25f0

📥 Commits

Reviewing files that changed from the base of the PR and between 05ca0a1 and 18ecc91.

📒 Files selected for processing (1)
  • .claude-plugin/marketplace.json

Comment thread .claude-plugin/marketplace.json
chitcommit and others added 12 commits May 26, 2026 14:13
…r in manifest (#24)

The plugin had plugin.json at plugins/chittyagent-autobot/plugin.json
instead of the canonical plugins/chittyagent-autobot/.claude-plugin/plugin.json.
lint-plugins.sh and test-plugins.sh both flagged this; manifest entry was
also missing because generate-marketplace.sh only scans the canonical location.

Changes:
- New plugins/chittyagent-autobot/.claude-plugin/plugin.json (canonical schema:
  name/version/description/author/requires, modeled on chittyos-core+dispatch)
- Removed plugins/chittyagent-autobot/plugin.json (non-canonical, rich-schema
  variant that duplicates info already in canonical/chittyagent-autobot.md
  frontmatter, dir listings, and marketplace.json)
- Regenerated .claude-plugin/marketplace.json (now includes chittyagent-autobot)

After this commit:
  scripts/lint-plugins.sh: All clear (no errors)
  scripts/test-plugins.sh: no manifest-vs-dir failures
  scripts/generate-marketplace.sh: idempotent

The manifest.json file at plugins/chittyagent-autobot/manifest.json is left
alone (it is a separate artifact-inventory file consumed by /market, not by
the .claude-plugin/marketplace.json generator).

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
… idempotency) (#25)

First CI for chittymarket. Three drift surfaces this session demonstrated
(missing plugin.json sat broken for weeks; manifest drifted from plugins/;
plugin orphan-referenced unshipped files) now get caught at PR time.

Workflow: bash scripts/lint-plugins.sh + bash scripts/test-plugins.sh +
generate-marketplace.sh-with-no-diff check.

Dry-run on current HEAD: lint PASS, test 60/60 PASS, manifest IDEMPOTENT.

Triggers: PRs touching plugins/, .claude-plugin/, marketplace.json,
profiles.json, scripts/, or this workflow. Plus push to main and feat/**.
Concurrency cancels superseded runs; timeout 5 min.

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
#26)

Captures source-of-truth precedence, settled CI-enforced conventions
(Layer 1, in place after #25), and the 4 in-flight architectural
decisions blocking full single-source/single-approach goals (Layer 2).

Decisions surfaced (none made):
  2.1 Agent filename-vs-slug alignment direction
  2.2 Pointer-file hydration: inline vs implement hydrator
  2.3 Skill name: frontmatter field: standardize on present or absent
  2.4 Three-realm sprawl: chittymarket-as-truth vs ai-parity-as-truth

Recommendation per section but no implementation; companion PRs to follow
once decisions are made.

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…al plugin.json (#27)

Two additions to make chittymarket more self-healing:

1. scripts/lint-plugins.sh section 4b: error if any plugin has
   plugin.json at top-level. Closes the autobot regression vector
   (autobot shipped with plugin.json at the wrong path for weeks
   before #24 fixed it; current lint would not catch a recurrence
   if .claude-plugin/plugin.json also existed alongside).

2. scripts/heal-chittymarket.sh: contributor convenience. One command
   to auto-resolve drift this script knows about (manifest regen) and
   surface drift that needs manual fixing (with the exact fix command).

Exit codes designed for CI integration: 0 clean, 1 auto-healed, 2 manual
fix needed. Verified on current tree: lint+test+manifest all PASS.

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* feat(backfill): add capability-governor + evidence-egress skills

Two skills written on chittymini-00 (2026-01 to 2026-05) were never
promoted to chittymarket. Adding them under existing plugin namespaces:

- chittyos-governance/skills/capability-governor: identity-first
  capability governance loop. Sibling to capability-registry-audit
  (this is the orchestration workflow; that is the single-pass audit).

- chittyos-legal/skills/evidence-egress: case-evidence migration from
  scattered local source dirs into the canonical pipeline. Read-only
  audit by default, case-agnostic.

Both pass scripts/test-plugins.sh. No manifest changes (generate-
marketplace.sh surfaces unrelated drift that should land in its own PR).

These are the only truly-new items from a chittymini-00 vs ai-parity
audit (2026-05-26); the other 20 candidates were stale duplicates of
existing plugin content or superseded by other artifacts (e.g.
chittyagent-neon-schema -> chittyagent-neon per #12).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* feat(backfill): add missing chittyos-compliance refs + wrangler-audit upgrades

The chittyos-compliance plugin SKILL.md explicitly references three
reference docs (compliance-checklist.md, certification-criteria.md,
templates.md) but the plugin install ships without them. Adding the
files that the existing SKILL.md already expects.

wrangler-audit: local SKILL.md has substantive content the published
version lacks — detailed observability bindings table (tail_consumers,
observability.{enabled,logs,traces}, placement.mode), explicit
ChittyTrack cross-reference step, and templates/check-observability.yml
asset. Promoting the local version.

Both pass scripts/test-plugins.sh. No marketplace.json changes (avoided
to keep PR scope minimal; pre-existing manifest drift handled separately).

Source: chittymini-00 vs chittymarket plugin install audit (2026-05-26).
Companion to PR #22.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…e via lint (#28)

Resolves SINGLE-SOURCE-CONVENTIONS §2.3 (decision A: standardize on present).
8 skills shipped with no YAML frontmatter; backfilled with name (= dirname)
and description (hand-written one-line summaries).

scripts/lint-plugins.sh section 3b: every SKILL.md must have YAML frontmatter
opening, closing within 30 lines, and containing name + description fields.

Prerequisite for §2.4 universal projection (chittyagent-dispatch needs
deterministic name: lookup).

Local: lint clear, 62/62 tests, manifest idempotent, heal clean.

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…29)

Resolves SINGLE-SOURCE-CONVENTIONS §2.1 decision B.

Renamed:
  chittycanon-code-cardinal           -> chittyagent-canon
  claude-integration-architect        -> chittyagent-claude
  chittyconnect-concierge             -> chittyagent-connect
  chittyregister-compliance-sergeant  -> chittyagent-register

Not renamed: chittyschema-overlord (slug owned by CHITTYFOUNDATION/chittyschema
under the per-service-ownership pattern).

To keep canonical/projection consistency this PR also CANONICALIZES the 4
chittyos-core agents — they were stranded as direct plugin files without
canonical/<name>.md entries. Now they live in canonical/, follow the same
block-scalar description schema as chittyagent-neon, and project via
chittyagent-dispatch (kind: agent, plugin: chittyos-core, runtimes:
[claude-code], classification: per-agent).

Updated upstream canonicals too (chittyagent-dispatch, chittyagent-neon)
since their bodies referenced the now-renamed slugs. Re-ran dispatch.sh
sync across all canonicals; pre-commit drift hook verifies no divergence.

NOT touched: capabilities.generated.json (would trigger evidence-gate
policy hook on 8 pre-existing legal capabilities lacking authority.
evidence_gate — separate data-quality issue tracked under audit log
2026-05-23). That file will be regenerated naturally once those capabilities
have their gate populated.

Local: lint clear, 62/62 tests, manifest idempotent, dispatch.sh sync no-op.

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…(§2.2) (#30)

Resolves SINGLE-SOURCE-CONVENTIONS §2.2 decision B (implement hydrator).

New: plugins/chittyagent-dispatch/scripts/hydrate-pointers.sh
  Detects every plugin agent file with owner_repo+prompt_url frontmatter.
  Fetches canonical body from prompt_url, replaces stub body in-place,
  preserves frontmatter and warning comment block. Safe to re-run.
  Exit codes: 0=current, 1=hydrated-something, 2=fetch-failed.
  Designed to wire into a periodic CI job that opens a PR on upstream drift.

Modified: plugins/chittyagent-dispatch/scripts/pre-commit-drift.sh
  Pointer agents (owner_repo + prompt_url in frontmatter) bypass the
  canonical-required check — pointers are per-service owned, source of
  truth is external.

Hydrated: plugins/chittyos-core/agents/chittyagent-schema.md
  First hydration run pulled 379 lines from
  CHITTYFOUNDATION/chittyschema/main/identity/agents/chittyschema-overlord.md.
  NOTE: fetched content references the OLD slug chittyconnect-concierge;
  the chittyschema repo needs a cross-repo update to align with the §2.1
  rename. Tracking as follow-up.

Local: lint clear, 62/62 tests, manifest idempotent.

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
)

The chittymarket-canonical plugin (per README: Canonical marketplace
definitions and sync source) was declared in README and existed as a
directory with a canonical/ subdir, but shipped without
.claude-plugin/plugin.json. Same bug class as chittyagent-autobot
pre-#24. Latest lint catches it as ERROR.

Added a minimal plugin.json declaring chittyagent-dispatch dependency
(the projector that consumes the canonical/ entries this plugin holds).

After this: lint clear, test 63/63, manifest auto-includes the entry.

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…32)

Resolves SINGLE-SOURCE-CONVENTIONS §2.4 (universal/agnostic marketplace).
Documents the path from the current state (7 canonicalized artifacts via
chittyagent-dispatch) to fully-canonical (all skills, agents, hooks,
commands, MCP configs derive from canonical/).

Phases:
  A. Adapter coverage (skill, hook, command, mcp, chatgpt-gpt, notion-agent)
  B. Canonicalize 27 existing skills (batched by plugin)
  C. Canonicalize hooks
  D. Canonicalize commands + MCP configs
  E. Lock migration with CI rule: no projection without canonical

Answers the user 2.4 question (doable, makes sense): yes, the adapter
infrastructure already exists; each new runtime is one adapter PR; lossy
fields handled per artifact kind.

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Per goal directive: cleanup of confusing/dated/inconsistent docs is deleted.

Removed (none referenced outside docs/; all served their planning purpose
and the resulting architecture lives in docs/architecture/):
  docs/refactor-prompt.md
  docs/gemini-strategy-v1.md
  docs/gemini-strategy-v1-followup.md
  docs/plans/2026-03-03-chittymarket-design.md
  docs/plans/2026-03-03-chittymarket-implementation.md

These captured the briefing-Gemini meta-prompt and the resulting strategy
that drove the v2 capability router design. v2 is now codified in:
  docs/architecture/CHITTYMARKET_CAPABILITY_ROUTER.md
  docs/architecture/SINGLE-SOURCE-CONVENTIONS.md
  docs/architecture/UNIVERSAL-PROJECTION-PLAN.md

All deleted content remains recoverable via git log.

Local: lint clear, tests pass, manifest idempotent.

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Resolves UNIVERSAL-PROJECTION-PLAN.md Phase A. Foundation for Phase B
canonicalization of the 27 existing skills.

dispatch.sh: now reads `kind` from canonical frontmatter (default: agent)
and routes output paths accordingly:
  agent       -> plugins/<plug>/agents/<name>.md
  skill       -> plugins/<plug>/skills/<name>/SKILL.md
  command     -> plugins/<plug>/commands/<name>.md
  hook        -> plugins/<plug>/hooks/hooks.json (merge entry)
  mcp-server  -> plugins/<plug>/.mcp.json (merge entry)

agent/skill/command all share the same markdown+frontmatter format, so
they reuse claude-code-agent.sh adapter; only the output path differs.

New adapters:
  claude-code-mcp.sh   — merges canonical/<name>.md mcp: block into .mcp.json
  claude-code-hook.sh  — merges canonical/<name>.md hook: block into hooks.json

Proof of concept: canonical/checkpoint.md (first skill canonicalized).
Projection regenerates plugins/chittyos-core/skills/checkpoint/SKILL.md
identically to the prior direct-authored file. Pre-commit drift hook is
satisfied.

Local: lint clear, 64/64 tests, manifest idempotent.

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
chitcommit and others added 5 commits May 26, 2026 15:26
Resolves UNIVERSAL-PROJECTION-PLAN.md Phase B. All skills now derive from
canonical/<name>.md sources; direct edits to plugins/<plug>/skills/.../SKILL.md
are now blocked by the pre-commit drift hook.

Canonicalized skills (26):
  chittyagent-autobot: chitty-autonomy + autonomy-{affirm,cicd,discover,
    generate,implement,plan,ship,tidy} (9)
  chittymarket-manager: market (1)
  chittyos-core: chitty-cleanup, chittycontext, chittyxl (3 — checkpoint
    already canonicalized in #34)
  chittyos-devops: chitty-deploy, chitty-health, chitty-pipelines,
    chitty-registry, chittyos-compliance, wrangler-audit (6)
  chittyos-governance: capability-governor, capability-registry-audit (2)
  chittyos-legal: dispute, docket, evidence-collect, evidence-egress,
    fact-governance (5)

For each: read plugins/<plug>/skills/<name>/SKILL.md, prepend canonical
frontmatter (kind: skill, plugin: <plug>, runtimes: [claude-code],
classification by plugin), convert any single-line description with
embedded colons to YAML block scalar, write canonical/<name>.md, run
dispatch.sh sync to regenerate the projection.

Local: lint clear, 64/64 tests, manifest idempotent, dispatch sync stable.

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…ojection lock (#36)

Resolves UNIVERSAL-PROJECTION-PLAN.md Phases D and E.

Phase D — Canonicalize commands + MCP + proxy agents:
  canonical/autonomy.md (kind: command)
  canonical/chittyos.md (kind: mcp-server)
  canonical/neon.md    (kind: mcp-server)
  canonical/chittyagent-chatgpt.md   (kind: agent, plugin: chittyos-proxy-agents)
  canonical/chittyagent-notion.md
  canonical/chittyagent-cloudflare.md

Phase E — Lock the migration with CI rule:
  New scripts/lint-plugins.sh section 9: every projection file in
  plugins/<plug>/{agents,skills,commands,codex-skills,openclaw-agents}/
  MUST have a corresponding canonical/<name>.md, EXCEPT pointer files
  that declare both owner_repo and prompt_url frontmatter (per-service
  ownership).

  After this commit, direct edits to projection paths cannot land:
    - pre-commit drift hook catches edits without canonical sync
    - lint section 9 catches missing canonical sources
    - CI (via validate-chittymarket.yml) blocks merge if either fails

dispatch.sh bug fix: runtimes regex now accepts 0+ whitespace indentation
(was requiring 1+ tab/space; yaml.dump emits flush-left).

Local: lint clear, 64/64 tests, manifest idempotent, dispatch idempotent.

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
… lint refinements (#37)

* chore(canonical): reorg into kind-subdirs + multi-runtime hardening + lint refinements

Addresses retrospective critique on the Phase A-E completion:

1. canonical/ subdir reorg
   Before: canonical/<name>.md (flat, 40 files mixing 4 kinds — collision risk
   at scale, poor discoverability)
   After:  canonical/agents/<name>.md   (10 files)
           canonical/skills/<name>.md   (27 files)
           canonical/commands/<name>.md (1 file)
           canonical/mcp/<name>.md      (2 files)
   Used `git mv` so renames are tracked. .dispatch-state/ also subdirified.

2. dispatch.sh: resolve canonicals from kind-subdirs first, flat layout as
   backward-compatibility fallback. State files now land in
   canonical/.dispatch-state/<kind>/<name>.json.

3. lint-plugins.sh:
   - Section 9 canonical-check searches kind-subdirs before flat fallback.
   - New check: every entry in plugins/<plug>/.mcp.json under mcpServers.*
     must have a corresponding canonical/mcp/<name>.md.
   - Documented Phase C exclusion (hooks.json is a manifest of EXTERNAL
     hookify rules, not a projection — canonical/hooks/ remains future work).

4. Multi-runtime hardening — codex projection coverage from 1 to 7 artifacts:
   Added `- codex` to runtimes block for:
     - canonical/skills/{checkpoint, market, chitty-cleanup}.md
     - canonical/agents/{chittyagent-canon, chittyagent-register}.md
   Now exercising codex projection across multiple plugins and both kinds.
   plus chittyagent-dispatch's existing openclaw projection.

Local: lint clear, 64/64 tests, manifest idempotent, dispatch idempotent.

What this PR does NOT address (deliberately):
- Phase C (canonicalize hooks) — hooks.json is external-reference manifest;
  canonicalization low-value until inline hooks land.
- §2.1 BREAKING slug rename retrospective — already merged; cost paid.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* chore(canonical): remove nested-projection detritus from reorg

The reorg in the parent commit produced nested projection paths (e.g.
plugins/<plug>/codex-skills/agents/<name>/SKILL.md) due to a race between
the pre-commit hook executing dispatch.sh with stale name extraction
(name="agents/<n>" rather than basename) and the patched hook landing.

Bug now fixed at three layers:
  - pre-commit-drift.sh: name extraction strips kind-subdir from path
  - pre-commit-drift.sh: canonical-existence check searches subdirs first
  - dispatch.sh: also searches subdirs + writes state to subdir

This commit removes the 6 nested directories that were created in the
window between commits. Dispatch.sh sync is now idempotent and produces
no nested paths.

Local: lint clear, 64/64 tests, manifest idempotent, dispatch idempotent
       (zero diff on re-run).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Subagent audit (chittyos-core:chittycanon-code-cardinal) of the UNIVERSAL-
PROJECTION-PLAN session work identified actionable remediations. Applied:

1. canon_uri frontmatter added to 29 canonicals (11 already had it).
   Format: `canon_uri: chittycanon://core/services/chittymarket#<kind>/<name>`.
   Satisfies the documentation-pipeline schema's canonical URI requirement.

2. Flat-layout fallback REMOVED from:
   - plugins/chittyagent-dispatch/scripts/dispatch.sh
   - plugins/chittyagent-dispatch/scripts/pre-commit-drift.sh
   - scripts/lint-plugins.sh (section 9)

   All 40 canonicals now live in canonical/<kind>/<name>.md; the fallback
   path was a transitional bridge that's no longer needed and risked
   "two-truths drift" per the audit. Removing it forces the kind-subdir
   layout to be the single source.

3. Scheduled pointer hydrator workflow:
   .github/workflows/hydrate-pointers.yml — runs weekly (Mondays 07:17 UTC),
   manually triggerable. Auto-opens a PR if any pointer-agent's upstream
   source has drifted from the local cache. Addresses the audit's advisory
   that "pointer freshness today depends on PR cadence."

NOT addressed in this PR (requires authority outside this repo):
- Codifying the chittyagent-* family-prefix slug convention in
  chittycanon://gov/governance (different repo, governance authority).
- Promoting CHARTER.md / CHITTY.md from DRAFT to PENDING certification
  (requires ChittyCertify authority).

Local: lint clear, 64/64 tests, manifest idempotent, dispatch idempotent
       (no flat-layout files to find — clean subdir-only layout).

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Conflict: main PR #20 refreshed chittyos-core/agents/chittyagent-connect.md
with current runtime truth (service bindings, sensitive-intent contract,
1Password 7-SA hierarchy, etc.) AFTER v2 had canonicalized the file from
an older snapshot.

Resolution: take main full body content, apply v2 slug rename
(chittyconnect-concierge -> chittyagent-connect) + canonical frontmatter
(kind/plugin/runtimes/classification/canon_uri), convert description to
YAML block scalar (required by strict YAML parser in dispatch.sh).

Updated canonical/agents/chittyagent-connect.md; dispatch.sh sync
regenerated plugins/chittyos-core/agents/chittyagent-connect.md from the
merged canonical. Pre-commit drift hook satisfied.

Local: lint clear, 64/64 tests, manifest idempotent.
…nt re-runs (#41)

The previous hydrate-pointers.sh accumulated blank lines between the
HTML comment block and the body on each weekly run, producing PRs that
were pure-whitespace noise (see closed PRs #39, #40 against
feat/market-refactor-v2).

Two normalizations:
- Comment regex no longer captures trailing whitespace.
- Body is .strip()ed before assembly, then joined with a single \n\n
  separator (or none if no comment block).

After: 2nd run of the hydrator produces zero diff against the 1st run.
@chitcommit
chitcommit merged commit ab9a63c into main May 26, 2026
4 checks passed
@chitcommit
chitcommit deleted the feat/market-refactor-v2 branch May 26, 2026 23:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant