feat(docs): add TELOS, Cursor rules generation, and nondominium-domain skill#104
Merged
Conversation
9438be8 to
39f7519
Compare
…n skill - Add pai/TELOS.md: project purpose, philosophy, and AI operating principles - Add pai/conventions.md: distilled coding/design conventions for both tools - Add pai/cursor-rules/: 4 Cursor-specific source files (architecture, Rust, Svelte 5, Sweettest patterns) - Add nix/cursor-pai.nix: Nix builder that generates .cursor/rules/*.mdc from pai/ sources with proper frontmatter (alwaysApply + glob scoping) - Extend flake.nix: cursorPAI derivation + rsync shellHook to materialize rules on nix develop; adds rsync to devShell packages - Add .claude/skills/nondominium-domain/: project-specific skill pack with 5 files covering NDO three-layer model, PPR system, capability slots, ValueFlows alignment - Update LoadProjectDocs.hook.ts: add pai/TELOS.md as first loaded doc - Update AGENTS.md and CLAUDE.md: add @pai/TELOS.md as first foundational reference (files remain byte-identical) - Update README.md: add AI Tooling section explaining Cursor + Claude Code setup - Update CONTRIBUTING.md: add AI Tooling Conventions section for pai/ editing workflow
…velop - Extend shellHook to rsync both skills into .agents/skills/ after submodule init: - holochain-agent-skill → .agents/skills/holochain/ (name matches SKILL.md) - nondominium-domain → .agents/skills/nondominium-domain/ - Add /.agents to .gitignore (generated directory, never committed) - Update README.md: expanded AI Tooling section with skills table + Cursor rules table - Update CONTRIBUTING.md: table mapping source files to generated outputs Skills now load in Cursor, VS Code Copilot, and any Open Agent Skill compatible editor via .agents/skills/ (primary discovery path), with .claude/skills/ as Claude Code fallback — same folders, no duplication.
…mpatibility .agents/skills/ is the new editor-agnostic Open Agent Skill path, but .cursor/skills/ is Cursor's own native path with longer-standing support. Copy to both to guarantee Cursor picks them up regardless of which path its current version checks first.
- ppr-system.md: PerformanceMetrics field names wrong; replace with actual fields from ppr.rs (timeliness, quality, reliability, communication, overall_satisfaction, notes) - ndo-three-layer-model.md: ResourceNature missing Service and Information variants that already exist in zome_resource/src/lib.rs - valueflows-alignment.md: VfAction count was 19, corrected to 16 - SKILL.md: VfAction count and ResourceNature quick ref both wrong; align both with actual enum values
… hook
Replace manual rsync shell blocks with a declarative agent-skills.nix
package that maps {src, name} pairs to rsync targets (.claude/skills/,
.cursor/skills/, .agents/skills/). The holochain-agent-skill is now
pinned as a flake input instead of a git submodule under .claude/.
.claude/ is now fully gitignored and generated by nix develop from pai/claude/ sources. This removes the holochain-agent-skill git submodule (now a flake input) and relocates LoadProjectDocs hook, settings.json, and nondominium-domain skill into pai/claude/ so they are managed under version control as PAI source files.
TELOS.md belongs alongside other documentation/ source files rather than in the pai/ AI-config tree. Update CLAUDE.md, AGENTS.md, CONTRIBUTING.md, README.md, and DOCUMENTATION_INDEX.md to point to the new canonical location.
Add 10-domain-enums.md covering PropertyRegime, ResourceNature, LifecycleStage, OperationalState, VfAction, and RoleType enums. Expand architecture, Rust, Svelte, and test rules with clarifications surfaced during recent review. Conventions.md gets a source-map table pointing each convention area to its canonical documentation file.
cursor-pai.nix hardcoded all source files under paiDir (./pai). TELOS.md was moved to documentation/ in this PR. This broke the Nix build: cursor-pai-rules.drv could not find pai/TELOS.md. Changes: - Add docsDir parameter to cursor-pai.nix (separate from paiDir) - Each rule now carries a dir field pointing to the correct source root - TELOS rule uses docsDir; all other rules use paiDir (unchanged) - Pass docsDir = ./documentation from flake.nix - Add missing 25-domain-enums rule (sources cursor-rules/10-domain-enums.md)
…t path - 20-architecture.md: removed dangling 'Full detail' link to .claude/skills/nondominium-domain/ndo-three-layer-model.md (deleted in d6cab72; authoritative source is ndo_prima_materia.md §4-5, already cited two lines above) - 30-rust-zomes.md: removed .claude/skills/nondominium-domain/ppr-system.md from PPR Storage source annotation (file deleted in d6cab72; specifications.md §3.3.6 is sufficient) - conventions.md: corrected pai/ editing workflow entry: .claude/ is now gitignored and generated on nix develop; source is pai/claude/skills/nondominium-domain/
…rsor rule Both enums were referenced in the PR description and SKILL.md but absent from 10-domain-enums.md. LifecycleStage (10 variants) is already in zome_resource/src/lib.rs. OperationalState is planned (REQ-NDO-OS-06) and documented here with a note that it is not yet in code.
- Row 4: source is pai/claude/skills/nondominium-domain/, not .claude/skills/ (generated path, gitignored — edits there are overwritten on nix develop) - Row 5: update is via nix flake update, not direct edit of .claude/skills/ - Remove misleading 'no rebuild needed' note - fix(nix): omit globs field from cursor-pai.nix frontmatter when empty (lib.optionalString guard — cleaner .mdc output for alwaysApply rules)
4187f76 to
4dc4220
Compare
Collaborator
Author
|
Re: Devin's findings on |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Intent
Extend the AI tooling infrastructure with three architectural improvements: declarative agent-skill management via Nix flake inputs, migration of all Claude Code source files into
pai/claude/(making.claude/fully generated), and relocation ofTELOS.mdtodocumentation/. Also adds a new10-domain-enums.mdcursor rule and expands the conventions index.Changes
1.
nix/agent-skills.nix— declarative agent-skills hook (feat(nix))New Nix package that maps
{src, name}pairs to rsync targets across.claude/skills/,.cursor/skills/, and.agents/skills/. Replaces the previous manualif [ -d ... ]; then rsyncshell blocks.The
holochain-agent-skillis now a flake input (github:Soushi888/holochain-agent-skill) instead of a git submodule under.claude/. Pinned viaflake.lock; update withnix flake update holochain-agent-skill.2.
.claude/is now fully generated — sources live inpai/claude/(refactor(pai))All files previously tracked under
.claude/have been moved topai/claude/and.claude/added to.gitignore. Onnix develop, the shellHook rsyncspai/claude/→.claude/(alongside existing Cursor rules generation)..claude/hooks/LoadProjectDocs.hook.tspai/claude/hooks/LoadProjectDocs.hook.ts.claude/settings.jsonpai/claude/settings.json.claude/skills/nondominium-domain/pai/claude/skills/nondominium-domain/.claude/skills/holochain-agent-skill(submodule)holochain-agent-skill.gitmodulesentry forholochain-agent-skillremoved.3.
TELOS.mdmoved todocumentation/(docs)pai/TELOS.md→documentation/TELOS.md. References updated inCLAUDE.md,AGENTS.md,README.md,CONTRIBUTING.md, andDOCUMENTATION_INDEX.md. TELOS belongs with the other living documentation rather than in the AI-config tree.4. Expanded cursor rules and conventions (
docs(pai))pai/cursor-rules/10-domain-enums.md— canonical enum reference coveringPropertyRegime,ResourceNature,LifecycleStage,OperationalState,VfAction, andRoleTypepai/conventions.md— source-map table added, pointing each convention area to its canonical documentation filepai/cursor-rules/20-40-50-*.md— clarifications surfaced during recent review cycleCursor rules produced on
nix develop00-telos.mdc10-conventions.mdc20-architecture.mdc25-domain-enums.mdc30-rust-zomes.mdc**/*.rs40-svelte-ui.mdc**/*.svelte50-tests.mdcdnas/**/tests/**/*.rsDecisions
holochain-agent-skill: flake input gives deterministic pinning viaflake.lockand avoids the submodule init requirement atnix developtime..claude/gitignored and generated: removes the dual-tracking problem (source in.claude/, also inpai/claude/) and makes the generation boundary explicit. All AI tooling config is now authored inpai/and materialized onnix develop.TELOS.mdtodocumentation/: TELOS is living documentation about the project, not AI harness config. Collocating it withrequirements/andspecifications/ensures it stays current alongside the spec docs and is loaded byLoadProjectDocs.hook.ts.How to test
nix developmaterializes.cursor/rules/with correct.mdcfilesnix developmaterializes.claude/frompai/claude/(hooks, settings, skills)diff CLAUDE.md AGENTS.mdproduces no outputbun run build:zomessucceeds (no regression)Documentation
documentation/TELOS.md— new file (moved frompai/TELOS.md)documentation/DOCUMENTATION_INDEX.md— updated to reference TELOSCLAUDE.md,AGENTS.md,README.md,CONTRIBUTING.md— references updated todocumentation/TELOS.mdpai/conventions.md— new source-map tablepai/cursor-rules/10-domain-enums.md— new canonical enum referenceRelated
No open issues tracked for this PR.
Notes
.claude/and.agents/remain gitignored; both are generated-only