Skip to content

feat(g1): Knowledge Plane contract — spec + schema field + path-scoped rule#31

Merged
javiAI merged 4 commits into
mainfrom
feat/g1-knowledge-plane-contract
Apr 28, 2026
Merged

feat(g1): Knowledge Plane contract — spec + schema field + path-scoped rule#31
javiAI merged 4 commits into
mainfrom
feat/g1-knowledge-plane-contract

Conversation

@javiAI
Copy link
Copy Markdown
Owner

@javiAI javiAI commented Apr 28, 2026

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 — campo integrations.knowledge_plane.enabled (boolean, default false, sección E)
  • .claude/rules/knowledge-plane.md — rule path-scoped para templates/vault/** (meta-repo G2+) y vault/** (proyecto generado)
  • docs/ARCHITECTURE.md §1.1 — condensado a resumen + puntero a KNOWLEDGE_PLANE.md

Decisions closed (Fase -1)

  • A1 opt-in bool único (enabled: boolean, default false). adapter/vault_path diferidos a G2+ (regla feat(c3): tests harness renderer — 13-file output per profile, deferred frameworks testeable #7).
  • A2 config file = vault/config.md (no vault/schema.md — evita colisión léxica con questionnaire/schema.yaml).
  • A3 path-scope dual: templates/vault/** (meta-repo) + vault/** (proyecto generado).
  • A4 standalone doc: docs/KNOWLEDGE_PLANE.md independiente; ARCHITECTURE §1.1 = resumen + puntero.

Test plan

  • RED: knowledge-plane-on.yamlanswer-unknown-path antes del schema field
  • GREEN: enabled: true → 0 issues (517 vitest, 0 failures)
  • validate:profiles CI verde (3 canónicos sin el campo → OK, default false)
  • Type mismatch: enabled: "yes"answer-type-mismatch confirmado
  • /pos:simplify pasada: 3 agentes, 0 issues encontrados

🤖 Generated with Claude Code

Javier and others added 2 commits April 28, 2026 13:51
## 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>
Copilot AI review requested due to automatic review settings April 28, 2026 11:54
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

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.md and update docs/ARCHITECTURE.md to point to the new spec.
  • Extend questionnaire/schema.yaml with integrations.knowledge_plane.enabled (boolean, default false) and add validate-profile fixtures/tests.
  • Add a new path-scoped rule file .claude/rules/knowledge-plane.md and 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.

Comment thread ROADMAP.md Outdated
| `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) |
Comment thread questionnaire/schema.yaml
Comment on lines +111 to +114
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.
Comment on lines +1 to +10
# 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
```

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

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.

Comment thread .claude/rules/knowledge-plane.md Outdated
Comment on lines +42 to +43
`knowledgePlaneRenderers` (nuevo grupo, patrón `renderer-group` — quinta aplicación
del patrón, ver `.claude/rules/generator.md § Renderers`).
Javier and others added 2 commits April 28, 2026 14:01
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>
@javiAI javiAI merged commit 53d49c7 into main Apr 28, 2026
7 checks passed
@javiAI javiAI deleted the feat/g1-knowledge-plane-contract branch April 28, 2026 12:54
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.

2 participants