feat(g1): Knowledge Plane contract — spec + schema field + path-scoped rule#31
Conversation
## Kickoff — feat/g1-knowledge-plane-contract Fase -1 aprobada con 4 decisiones cerradas: - A1: opt-in bool unico (integrations.knowledge_plane.enabled, default false). Adapter/vault_path diferidos a G2+ (regla #7, sin consumer real hoy). - A2: config file = vault/config.md (no schema.md; evita colision lexica con questionnaire/schema.yaml). - A3: .claude/rules/knowledge-plane.md cubre templates/vault/** (meta-repo G2+) y vault/** (proyecto generado). Ambos documentados con contexto explicito. - A4: docs/KNOWLEDGE_PLANE.md standalone; ARCHITECTURE §1.1 queda como resumen + puntero (consistente con docs/RELEASE.md en F4). ### Scope - questionnaire/schema.yaml: campo integrations.knowledge_plane.enabled (boolean, default false, seccion E). Primer campo bool de la seccion Integraciones. - docs/KNOWLEDGE_PLANE.md: especificacion standalone — tres capas, principios invariantes, opt-in, scope G1-G4, relacion con modelo de dos capas. - .claude/rules/knowledge-plane.md: rule path-scoped (templates/vault/** + vault/**). - docs/ARCHITECTURE.md §1.1: resumen + puntero a KNOWLEDGE_PLANE.md; diagrama ASCII actualizado (config.md en lugar de schema.md). ### Tests (TDD advisory — schema.yaml fuera de rutas enforced) RED (antes de este commit): - knowledge-plane-on.yaml con enabled:true → answer-unknown-path (2 tests fallaban). GREEN (este commit): - Schema field declarado → ambos tests pasan (517 vitest, 0 failures). - validate:profiles CI verde (3 canónicos sin el campo → exit 0, default false). - answer-type-mismatch para enabled:"yes" → confirmado. ### Archivos tocados - questionnaire/schema.yaml (+9 lineas) - docs/KNOWLEDGE_PLANE.md (nuevo, ~130 lineas) - .claude/rules/knowledge-plane.md (nuevo, ~45 lineas) - docs/ARCHITECTURE.md §1.1 (-15/+11 lineas, net -4) - tools/validate-profile.test.ts (+13 lineas, 2 nuevos casos) - tools/__fixtures__/profiles/valid/knowledge-plane-on.yaml (nuevo) - tools/__fixtures__/profiles/invalid/knowledge-plane-type-mismatch.yaml (nuevo) ### Docs plan (pendiente en este PR) - ROADMAP.md fila G1 pend->hecho - HANDOFF.md §1 + §9 - MASTER_PLAN.md §G1 decisions cerradas Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
ROADMAP fila G1 pendiente->hecho (PR pendiente). HANDOFF §1 Snapshot actualizado (G1 en curso, siguiente G2). HANDOFF §9 carry-over actualizado (G1 entregado, siguiente G2). MASTER_PLAN §G1 expandido con entregables reales + 4 decisiones cerradas (A1 bool unico, A2 vault/config.md, A3 path-scope dual, A4 standalone). Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
Introduces the Phase G1 “Knowledge Plane” contract into the meta-repo by adding standalone documentation, a new opt-in schema field for profiles, and a path-scoped rule to guide future template/renderer work and downstream generated repos.
Changes:
- Add
docs/KNOWLEDGE_PLANE.mdand updatedocs/ARCHITECTURE.mdto point to the new spec. - Extend
questionnaire/schema.yamlwithintegrations.knowledge_plane.enabled(boolean, defaultfalse) and add validate-profile fixtures/tests. - Add a new path-scoped rule file
.claude/rules/knowledge-plane.mdand update planning/docs-sync files (ROADMAP/MASTER_PLAN/HANDOFF).
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
tools/validate-profile.test.ts |
Adds unit tests covering the new opt-in field (valid + type mismatch). |
tools/__fixtures__/profiles/valid/knowledge-plane-on.yaml |
New valid fixture enabling knowledge plane. |
tools/__fixtures__/profiles/invalid/knowledge-plane-type-mismatch.yaml |
New invalid fixture with string instead of boolean. |
questionnaire/schema.yaml |
Adds integrations.knowledge_plane.enabled field definition and description. |
docs/KNOWLEDGE_PLANE.md |
New standalone contract/specification for the knowledge plane. |
docs/ARCHITECTURE.md |
Condenses §1.1 and links to the standalone spec; updates diagram to config.md. |
ROADMAP.md |
Marks G1 as done and expands scope description. |
MASTER_PLAN.md |
Marks G1 delivered and documents shipped artifacts/decisions. |
HANDOFF.md |
Updates current/next branch snapshot and carry-over list for G1. |
.claude/rules/knowledge-plane.md |
New path-scoped rule intended to govern templates/vault/** and vault/**. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| | `feat/f4-marketplace-public-repo` | `marketplace.json` + `release.yml` (5 jobs: version-match, selftest, build-bundle, publish-release, mirror-marketplace condicional) + `docs/RELEASE.md` runbook + bump 0.0.1→0.1.0; repo público diferido | ✅ | — (PR pendiente) | | ||
| | `feat/fx-knowledge-plane-plan` | Docs-only: abre FASE G en MASTER_PLAN (capa opcional knowledge plane) | ✅ | cc7d2c3 (#14) | | ||
| | `feat/g1-knowledge-plane-contract` | Contrato tool-agnostic (raw/wiki/schema) + opt-in questionnaire | ⏳ | — | | ||
| | `feat/g1-knowledge-plane-contract` | Contrato tool-agnostic (raw/wiki/schema) + opt-in questionnaire + `docs/KNOWLEDGE_PLANE.md` + `.claude/rules/knowledge-plane.md` + schema field boolean | ✅ | — (PR pendiente) | |
| Activa la capa knowledge plane opt-in en el repo generado (vault/raw + vault/wiki + | ||
| vault/config.md). Contrato tool-agnostic: cualquier editor Markdown es compatible. | ||
| El generador emite el esqueleto vault/ sólo cuando este campo es true. | ||
| Ver docs/KNOWLEDGE_PLANE.md para el contrato completo. |
| # Reglas — Knowledge Plane | ||
|
|
||
| ## Paths cubiertos | ||
|
|
||
| ```yaml | ||
| paths: | ||
| - "templates/vault/**" # meta-repo: archivos fuente de la capa (G2+) | ||
| - "vault/**" # proyecto generado: vault real cuando pos se usa | ||
| ``` | ||
|
|
There was a problem hiding this comment.
Not applying — no other .claude/rules/*.md in this repo has YAML frontmatter either (docs.md, generator.md, tests.md, hooks.md — all start directly with # headings). Rules are loaded automatically from .claude/rules/ by location, not by frontmatter. Adding frontmatter would be inconsistent with the existing pattern. If Claude Code adds first-class paths: frontmatter support for rules in a future release, all rule files will be updated together.
| `knowledgePlaneRenderers` (nuevo grupo, patrón `renderer-group` — quinta aplicación | ||
| del patrón, ver `.claude/rules/generator.md § Renderers`). |
1. ROADMAP.md: raw/wiki/schema -> raw/wiki/config.md (decision A2 G1). 2. questionnaire/schema.yaml description: "emite vault/ solo cuando true" -> "emitira el esqueleto vault/ a partir de G2" (renderer no existe hasta G2). 3. .claude/rules/knowledge-plane.md: "quinta aplicacion" -> "sexta aplicacion" del patron renderer-group (5 grupos existentes: core/policy/tests/cicd/skills-hooks). Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
…i, vault/config.md Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Summary
docs/KNOWLEDGE_PLANE.md— especificación standalone del contrato tool-agnostic (3 capas raw/wiki/config.md, principios invariantes, scope G1-G4)questionnaire/schema.yaml— campointegrations.knowledge_plane.enabled(boolean, default false, sección E).claude/rules/knowledge-plane.md— rule path-scoped paratemplates/vault/**(meta-repo G2+) yvault/**(proyecto generado)docs/ARCHITECTURE.md §1.1— condensado a resumen + puntero a KNOWLEDGE_PLANE.mdDecisions closed (Fase -1)
enabled: boolean, default false).adapter/vault_pathdiferidos a G2+ (regla feat(c3): tests harness renderer — 13-file output per profile, deferred frameworks testeable #7).vault/config.md(novault/schema.md— evita colisión léxica conquestionnaire/schema.yaml).templates/vault/**(meta-repo) +vault/**(proyecto generado).docs/KNOWLEDGE_PLANE.mdindependiente; ARCHITECTURE §1.1 = resumen + puntero.Test plan
knowledge-plane-on.yaml→answer-unknown-pathantes del schema fieldenabled: true→ 0 issues (517 vitest, 0 failures)validate:profilesCI verde (3 canónicos sin el campo → OK, default false)enabled: "yes"→answer-type-mismatchconfirmado/pos:simplifypasada: 3 agentes, 0 issues encontrados🤖 Generated with Claude Code