-
Notifications
You must be signed in to change notification settings - Fork 0
feat(g1): Knowledge Plane contract — spec + schema field + path-scoped rule #31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
e5c6290
docs(g1): kickoff — Knowledge Plane contract (G1)
f5450e3
docs(g1): sync ROADMAP + HANDOFF + MASTER_PLAN §G1 — cierre docs-sync
abe7369
fix: address PR #31 review — 3 factual fixes (Copilot)
51b5455
fix(g1): ROADMAP fila G1 — formulacion explicita vault/raw, vault/wik…
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,58 @@ | ||
| # 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 | ||
| ``` | ||
|
|
||
| `templates/vault/**` aplica al meta-repo cuando se trabaja en G2+ (renderers, | ||
| templates `.hbs`). `vault/**` aplica cuando Claude Code opera dentro de un proyecto | ||
| generado por `pos` que tiene la capa activada. | ||
|
|
||
| ## Contrato de referencia | ||
|
|
||
| Ver [docs/KNOWLEDGE_PLANE.md](../../docs/KNOWLEDGE_PLANE.md) para el contrato | ||
| completo (tres capas, principios invariantes, scope de cada rama G1–G4). | ||
|
|
||
| ## Qué hacer al editar archivos bajo `vault/**` | ||
|
|
||
| 1. **Respetar la separación raw / wiki / config.md**. No mover contenido de `raw/` | ||
| a `wiki/` sin síntesis; no modificar `raw/` in-place (son fuentes inmutables). | ||
|
|
||
| 2. **`vault/config.md` es la fuente de verdad local**. Antes de añadir convenciones | ||
| de nomenclatura o tags, verificar que no contradicen `vault/config.md`. | ||
|
|
||
| 3. **Sin dependencias de runtime**. Ningún archivo del vault debe importar, requerir | ||
| ni referenciar código ejecutable. El vault es solo Markdown. | ||
|
|
||
| 4. **Sin nuevos campos del questionnaire** sin rama G propia. Si una tarea requiere | ||
| ampliar el opt-in (ej. `integrations.knowledge_plane.adapter`), seguir el flujo | ||
| de rama con Fase -1 explícita. No añadir campos al schema.yaml directamente | ||
| (regla #7 CLAUDE.md — ≥2 repeticiones antes de abstraer). | ||
|
|
||
| ## Qué hacer al editar archivos bajo `templates/vault/**` (meta-repo, G2+) | ||
|
|
||
| 1. **TDD obligatorio** para cualquier nuevo renderer en `generator/renderers/`. | ||
| El pre-write-guard enforza test-pair co-located para `generator/**/*.ts`. | ||
|
|
||
| 2. **Registrar el renderer** en `generator/renderers/index.ts` dentro del grupo | ||
| `knowledgePlaneRenderers` (nuevo grupo, patrón `renderer-group` — sexta aplicación | ||
| del patrón; los 5 grupos existentes son core/policy/tests/cicd/skills-hooks, ver | ||
| `.claude/rules/generator.md § Renderers`). | ||
|
|
||
| 3. **Snapshots deterministas**: el renderer no debe usar `Date.now()` ni rutas del | ||
| host. El timestamp se inyecta vía `profile.metadata.generatedAt`. | ||
|
|
||
| 4. **Opt-in gate**: el renderer sólo emite archivos cuando | ||
| `answers["integrations.knowledge_plane.enabled"] === true`. Con `false` (default), | ||
| la función devuelve `[]`. | ||
|
|
||
| ## Qué NO hacer | ||
|
|
||
| - No implementar ingest automático, daemons ni watchers dentro del vault (G3 es stub CLI manual). | ||
| - No añadir MCP específico de Obsidian como dependencia del meta-repo (es reference adapter, no contrato base). | ||
| - No crear `vault/schema.md` — el config file se llama `vault/config.md` (decisión G1, evita colisión léxica con `questionnaire/schema.yaml`). | ||
| - No mezclar renderer de vault con otros renderers en una misma rama. Scope separado (CLAUDE.md "No tocar hooks/ y generator/ en la misma rama"). | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
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/*.mdin 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-classpaths:frontmatter support for rules in a future release, all rule files will be updated together.