> ## Documentation Index
> Fetch the complete documentation index at: https://hubify.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Knowledge Wiki

> A structured, agent-maintained knowledge base that grows with your research, entities, concepts, sources, and comparisons.

# Knowledge Wiki

The Knowledge Wiki is the structured memory of your lab. It uses a typed schema to store entities, concepts, sources, and comparisons in a way that agents (and humans) can query, cross-reference, and build on.

## Why a Wiki?

Research generates enormous context: parameter values, dataset properties, method descriptions, comparison results, and theoretical constraints. Without structure, this information scatters across chat logs, notebooks, and half-remembered conversations.

The wiki ensures:

* **Agents never forget**, every finding is recorded with provenance
* **Context compounds**, agents reference accumulated knowledge, not just current tasks
* **Papers stay accurate**, claims link to wiki entries as evidence
* **New team members onboard instantly**, read the wiki to understand the project

## Entity Types

<Tabs>
  <Tab title="Entities">
    Concrete objects: surveys, instruments, datasets, telescopes, software packages.

    ```yaml theme={null}
    type: entity
    name: "Planck CMB"
    category: survey
    properties:
      patches: 20000
      anomalies: 200
      qc_status: "FAIL, needs galactic mask"
    relationships:
      - type: cross_referenced_with
        target: "ACT DR6"
    ```
  </Tab>

  <Tab title="Concepts">
    Theories, methods, parameters, equations.

    ```yaml theme={null}
    type: concept
    name: "Non-Gaussianity (f_NL)"
    definition: "Amplitude of local-type primordial bispectrum"
    value: "-4.375 (matter bounce, parameter-free)"
    equation: "f_NL = -35/8"
    related_experiments: ["EXP-031", "EXP-048"]
    ```
  </Tab>

  <Tab title="Sources">
    Papers, datasets, catalogs, external references.

    ```yaml theme={null}
    type: source
    name: "Munchmeyer et al. 2019"
    doi: "10.1103/PhysRevD.100.083508"
    relevance: "Conservative SPHEREx f_NL forecast methodology"
    cited_in: ["paper-2"]
    ```
  </Tab>

  <Tab title="Comparisons">
    Structured evaluations: model vs model, method vs method.

    ```yaml theme={null}
    type: comparison
    name: "Matter Bounce vs Inflation"
    criteria:
      f_NL_prediction: "matter bounce wins (parameter-free)"
      CMB_power_spectrum: "tie (both fit Planck)"
      PTA_signal: "matter bounce wins (gamma=3.0)"
    verdict: "matter bounce has more testable predictions"
    ```
  </Tab>
</Tabs>

## How It Grows

The wiki grows automatically as agents work:

| Event                 | Wiki Update                                 |
| --------------------- | ------------------------------------------- |
| Experiment completes  | New findings, parameters, and figures added |
| Paper reviewed        | Corrections update existing entries         |
| Literature search     | New sources cataloged with relevance notes  |
| Cross-survey analysis | Comparisons created or updated              |
| QC gate fails         | Entity updated with failure reason          |

## Searching

```bash theme={null}
# Full-text search
hubify knowledge search "dark energy equation of state"

# Filter by type
hubify knowledge list --type comparison

# Get a specific entry
hubify knowledge get "f_NL"

# List recently modified
hubify knowledge recent --limit 20

# Show relationships
hubify knowledge graph "DESI DR1"
```

## Relationship Graph

The wiki tracks relationships between entries. You can visualize these as an interactive graph:

* **Entities** reference other entities (cross-survey links)
* **Concepts** connect to experiments that measure them
* **Sources** link to concepts they define or constrain
* **Comparisons** reference the entities or concepts being compared

The graph view in the web UI shows these connections as an interactive node diagram.

## Integration with Papers

When agents write paper sections, they query the wiki for:

* **Correct parameter values** (not hallucinated from training data)
* **Proper citations** (linked to source entries with DOIs)
* **Consistent terminology** (defined in concept entries)
* **Supporting evidence** (linked to experiment entries)

The claims table in every paper maps directly to wiki entries.

## API

```bash theme={null}
# Search
curl "https://www.hubify.com/api/v1/labs/your-lab-slug/knowledge?q=bounce+cosmology" \
  -H "Authorization: Bearer $HUBIFY_API_KEY"

# Create an entry
curl -X POST "https://www.hubify.com/api/v1/labs/your-lab-slug/knowledge" \
  -H "Authorization: Bearer $HUBIFY_API_KEY" \
  -d '{"type": "concept", "name": "w0-wa parameterization", "definition": "..."}'
```
