Capability Router refactor — Phase 0/1 audits, overlay, spec v4 - #21
Conversation
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>
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
Important Review skippedToo many files! This PR contains 167 files, which is 17 over the limit of 150. To get a review, narrow the scope: ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (167)
You can disable this status message by setting the Use the checkbox below for a quick retry:
📝 WalkthroughWalkthroughPhase 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. ChangesChittyMarket Capability Overlay (Phase 1)
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
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>
There was a problem hiding this comment.
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 winSpecify a language for the fenced code block (Line 13).
Add a language tag (e.g.,
text) to satisfyMD040.🧩 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 winReference 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.shto 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 winGenerate
generated_atdynamically 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
📒 Files selected for processing (16)
CHITTY.mdCLAUDE.mdcapabilities.generated.jsondocs/architecture/CHITTYMARKET_CAPABILITY_ROUTER.mddocs/audits/chittymarket-artifact-audit.jsondocs/audits/chittymarket-artifact-audit.mddocs/audits/chittymarket-plugin-package-audit.jsondocs/capability-registry-audit-runbook.mddocs/gemini-strategy-v1-followup.mddocs/gemini-strategy-v1.mddocs/overrides/capability-group-overrides.jsondocs/refactor-prompt.mdviews/by-authority.jsonviews/by-channel.jsonviews/by-context-cost.jsonviews/by-job.json
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>
There was a problem hiding this comment.
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
📒 Files selected for processing (5)
.claude-plugin/marketplace.jsondocs/decisions/capability-audit-log.mddocs/overrides/evidence-gate-overrides.jsonplugins/chittyagent-dispatch/scripts/pre-commit-drift.shplugins/chittyos-governance/skills/capability-registry-audit/SKILL.md
…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>
There was a problem hiding this comment.
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
📒 Files selected for processing (1)
.claude-plugin/marketplace.json
…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>
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.
Summary
docs/audits/.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 atdocs/overrides/capability-group-overrides.json. Zero fallback assignments.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.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
Follow-up issues to file (non-blocking for this PR)
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.registry.chitty.cc/api/services. CHARTER + the new CAPABILITY_ROUTER spec form the registration packet.status: DRAFT; v4 work + Phase 0/1 deliverables justify promotion.agent.chitty.cc/mcpreturns 404 (health endpoint up). Skills-orchestrator skill describes tools that aren't reachable from this session; need orchestrator MCP wired into~/.claude/.mcp.jsonto enable cross-channel skill routing perproject_skill_orchestrator.md.Out of scope for this PR
Generated with Claude Code
Summary by CodeRabbit