{
  "version": "1.0.1",
  "description": "FlyDocs Core - Manifest of all managed files",
  "repository": "github.com/plastrlab/flydocs-core",

  "packagedTemplate": true,

  "ownership": {
    "description": "Defines what FlyDocs owns vs what users can customize",

    "owned_directories": {
      "description": "Entire directories owned by FlyDocs - contents replaced on update",
      "paths": [
        ".flydocs/templates",
        ".claude/hooks",
        ".claude/agents",
        ".claude/skills/flydocs-workflow",
        ".cursor/agents"
      ]
    },

    "owned_files": {
      "description": "Individual files owned by FlyDocs - overwritten on update",
      "paths": [
        ".claude/CLAUDE.md",
        ".claude/settings.json",
        ".claude/commands/activate.md",
        ".claude/commands/attach.md",
        ".claude/commands/block.md",
        ".claude/commands/capture.md",
        ".claude/commands/close.md",
        ".claude/commands/flydocs-update.md",
        ".claude/commands/flydocs-upgrade.md",
        ".claude/commands/generate-context.md",
        ".claude/commands/implement.md",
        ".claude/commands/new-project.md",
        ".claude/commands/project-update.md",
        ".claude/commands/refine.md",
        ".claude/commands/review.md",
        ".claude/commands/start-session.md",
        ".claude/commands/status.md",
        ".claude/commands/validate.md",
        ".claude/commands/knowledge.md",
        ".claude/commands/onboard.md",
        ".claude/commands/wrap-session.md",
        ".claude/skills/README.md",
        ".cursor/hooks.json",
        ".flydocs/version",
        ".flydocs/CHANGELOG.md",
        "AGENTS.md",
        ".env.example"
      ]
    },

    "preserved_files": {
      "description": "User's living documentation - evolves with project, protected from FlyDocs updates",
      "paths": [
        ".env",
        ".env.local",
        "flydocs/context/project.md",
        "flydocs/knowledge/**",
        "flydocs/design-system/**"
      ]
    },

    "merged_files": {
      "description": "Files where specific keys are preserved during update",
      "files": {
        ".flydocs/config.json": {
          "preserve_keys": [
            "tier",
            "activeProjectId",
            "issueLabels",
            "statusMapping",
            "topology",
            "repoDefaults",
            "artifactOverrides"
          ]
        }
      }
    },

    "template_files": {
      "description": "Initial scaffolding - created on setup, then maintained by user as project evolves",
      "paths": [
        "flydocs/context/project.md",
        "flydocs/knowledge/INDEX.md",
        "flydocs/knowledge/README.md",
        "flydocs/knowledge/product/personas.md",
        "flydocs/knowledge/product/user-flows.md",
        "flydocs/README.md",
        "flydocs/knowledge/templates/decision.md",
        "flydocs/knowledge/templates/feature.md",
        "flydocs/knowledge/templates/note.md",
        "flydocs/design-system/README.md",
        "flydocs/design-system/token-mapping.md",
        "flydocs/design-system/component-patterns.md"
      ]
    }
  },

  "files": {
    "description": "Complete file tree for integrity verification",
    "tree": {
      ".claude": {
        "root": ["CLAUDE.md", "settings.json"],
        "agents": [
          "README.md",
          "pm-agent.md",
          "implementation-agent.md",
          "review-agent.md",
          "research-agent.md"
        ],
        "commands": [
          "activate.md",
          "attach.md",
          "block.md",
          "capture.md",
          "close.md",
          "flydocs-update.md",
          "flydocs-upgrade.md",
          "implement.md",
          "knowledge.md",
          "new-project.md",
          "onboard.md",
          "project-update.md",
          "refine.md",
          "review.md",
          "start-session.md",
          "status.md",
          "validate.md",
          "wrap-session.md"
        ],
        "hooks": [
          "auto-approve.py",
          "post-edit.py",
          "post-pr-check.py",
          "post-transition-check.py",
          "prompt-submit.py",
          "session-start.py",
          "stop-gate.py"
        ],
        "skills": {
          "root": ["README.md"],
          "flydocs-workflow": [
            "SKILL.md",
            "session.md",
            "stages/",
            "templates/",
            "reference/",
            "scripts/"
          ]
        }
      },
      ".cursor": {
        "root": ["hooks.json"],
        "agents": [
          "pm-agent.md",
          "implementation-agent.md",
          "review-agent.md",
          "research-agent.md"
        ],
        "rules": ["flydocs-workflow.mdc"]
      },
      ".flydocs": {
        "root": ["config.json", "version", "CHANGELOG.md"],
        "templates": ["bug.md", "chore.md", "feature.md", "idea.md"]
      },
      "flydocs": {
        "root": ["README.md"],
        "context": ["project.md"],
        "design-system": [
          "README.md",
          "token-mapping.md",
          "component-patterns.md"
        ],
        "knowledge": {
          "root": ["INDEX.md", "README.md"],
          "product": ["personas.md", "user-flows.md"],
          "templates": ["decision.md", "feature.md", "note.md"]
        }
      },
      "root": ["AGENTS.md", ".env.example"]
    }
  }
}
