Skip to content

chore(hydrate): refresh pointer-agent content from upstream - #39

Closed
github-actions[bot] wants to merge 1 commit into
feat/market-refactor-v2from
chore/hydrate-pointers-1
Closed

github-actions[bot] wants to merge 1 commit into
feat/market-refactor-v2from
chore/hydrate-pointers-1

Conversation

@github-actions

Copy link
Copy Markdown

Automated hydration via plugins/chittyagent-dispatch/scripts/hydrate-pointers.sh.

Upstream content for one or more pointer agents has drifted from the
local cache. This PR refreshes the projection body while preserving
the pointer frontmatter (owner_repo, prompt_source, prompt_url).

Review the diff to confirm the upstream change is intentional.

Automated by .github/workflows/hydrate-pointers.yml
@chitcommit

Copy link
Copy Markdown
Contributor

Closing — superseded by upcoming PR #21 merge. The hydrator added only whitespace; a follow-up PR will fix the trailing-newline bug in hydrate-pointers.sh.

@chitcommit chitcommit closed this May 26, 2026
@chitcommit
chitcommit deleted the chore/hydrate-pointers-1 branch May 26, 2026 23:28
chitcommit added a commit that referenced this pull request May 26, 2026
…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 added a commit that referenced this pull request May 26, 2026
* docs(refactor): Gemini strategy prompt for market v2 refactor

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>

* docs(refactor): add Capability Registry Audit Runbook v0.2

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>

* docs(refactor): Gemini strategy v1 + locked-answer followup for round 2

- 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>

* feat(architecture): Phase 0/1 Capability Router migration

- 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>

* docs(architecture): expand Capability Router spec to v4

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>

* docs(compliance): F1+F2 fixes from ChittyOS compliance audit

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>

* fix(review): C1 ontology violation + 6 important doc fixes from PR review

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>

* docs(architecture): final polish from re-review (B1, M1-M3, B2)

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>

* feat(governance): capability-registry-audit skill (runbook §15)

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>

* feat(governance): wire capability-registry-audit to overlay + first audit

- 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>

* feat(governance): evidence-gate overrides resolve 2026-05-23 audit hold

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>

* feat(governance): wire evidence-gate policy into pre-commit drift hook

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>

* chore(manifest): regenerate .claude-plugin/marketplace.json from plugins/ (#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>

* fix(chittyagent-autobot): canonicalize plugin.json location + register 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>

* chore(ci): add validate-chittymarket workflow (lint + test + manifest 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>

* docs(architecture): single-source conventions for chittymarket (DRAFT) (#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>

* chore(scripts): add heal-chittymarket.sh + lint check for non-canonical 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 (#22)

* 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>

* chore(skills): add name:+description: frontmatter to 8 skills; enforce 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>

* BREAKING: rename 4 chittyos-core agent slugs to family-prefix (§2.1) (#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>

* feat(dispatch): pointer-file hydrator + drift-hook pointer exception (§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>

* fix(chittymarket-canonical): add missing .claude-plugin/plugin.json (#31)

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>

* docs(architecture): universal projection migration plan (§2.4 DRAFT) (#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>

* chore(cleanup): delete orphaned v2 planning docs (#33)

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>

* feat(dispatch): Phase A — kind-aware routing + hook + mcp adapters (#34)

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>

* feat(canonical): Phase B — canonicalize all 26 remaining skills (#35)

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>

* feat(canonical): Phases D + E — commands/MCP/proxy canonicalized + projection 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>

* chore(canonical): reorg into kind-subdirs + multi-runtime hardening + 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>

* chore(canon): apply chittycanon-code-cardinal audit remediations (#38)

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>

* fix(hydrator): normalize whitespace to prevent diff drift on idempotent 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.

---------

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