pi-gnosis 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +13 -0
- package/LICENSE +21 -0
- package/NOTICE +7 -0
- package/README.md +56 -0
- package/bin/pi-gnosis.js +58 -0
- package/config/gnosis.config.json +51 -0
- package/framework/circuitry-first.md +18 -0
- package/framework/cleanup-policy.md +22 -0
- package/framework/obsidian-contract.md +31 -0
- package/framework/probing-policy.md +20 -0
- package/framework/research-foundations.md +46 -0
- package/framework/storage-contract.md +36 -0
- package/framework/why-kt-dag.md +18 -0
- package/graphs/README.md +15 -0
- package/graphs/cleanup.circuitry.yaml +94 -0
- package/graphs/manim-lecture.circuitry.yaml +137 -0
- package/graphs/minimal-smoke.circuitry.yaml +32 -0
- package/graphs/note-export.circuitry.yaml +116 -0
- package/graphs/research.circuitry.yaml +309 -0
- package/graphs/tutoring-session.circuitry.yaml +130 -0
- package/package.json +81 -0
- package/pi.json +42 -0
- package/scripts/check-circuitry-v02.py +148 -0
- package/skills/manim-video/SKILL.md +49 -0
- package/skills/pi-gnosis/SKILL.md +54 -0
- package/src/cleanup-policy.js +43 -0
- package/src/config.js +40 -0
- package/src/graph-template.js +10 -0
- package/src/graph-validator.js +40 -0
- package/src/index.js +8 -0
- package/src/manim-project.js +44 -0
- package/src/probe-policy.js +22 -0
- package/src/review-scheduler.js +54 -0
- package/src/storage-contract.js +42 -0
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## 0.2.0
|
|
4
|
+
|
|
5
|
+
- Rebuilt package around Circuitry as the executable agentic programming layer.
|
|
6
|
+
- Removed the incorrect generic simulation-node framing. Circuitry graphs themselves are the multi-agent workflow programs.
|
|
7
|
+
- Added frozen graph programs for research, tutoring, note export, Manim lecture generation, cleanup, and smoke testing.
|
|
8
|
+
- Added required dependency on `pi-web-access` and optional dependency on `pi-exa-search` for graph agents that need web tools.
|
|
9
|
+
- Centralized runtime/model configuration in `config/gnosis.config.json`; all graph runtimes and agent nodes use `model: inherit`.
|
|
10
|
+
- Added bundled `manim-video` skill with credit to Nous/Hermes documentation.
|
|
11
|
+
- Added explicit DAG-state vs Obsidian storage contract.
|
|
12
|
+
- Added safe cleanup graph and cleanup policy.
|
|
13
|
+
- Added tests that validate graph shape, safe cleanup planning, probe policy, review scheduling, and Manim project generation.
|
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 darkhorseprojects
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/NOTICE
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
Pi-GNOSIS NOTICE
|
|
2
|
+
|
|
3
|
+
This package depends on DarkHorseProjects pi-circuitry and the transitive Circuitry runtime/spec.
|
|
4
|
+
|
|
5
|
+
The bundled Manim skill is an original local skill inspired by Nous Research / Hermes Agent's public "Manim Video" skill documentation. It is not an official Hermes skill release, and this package does not depend on Hermes Agent. Credit: Nous Research / Hermes Agent documentation, "Manim Video - Manim CE animations: 3Blue1Brown math/algo videos".
|
|
6
|
+
|
|
7
|
+
The research framework references public academic work on automated literature review generation, agentic RAG, intelligent tutoring systems, knowledge tracing, retrieval practice, and automated short-answer grading. See framework/research-foundations.md.
|
package/README.md
ADDED
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
# pi-gnosis
|
|
2
|
+
|
|
3
|
+
[](https://github.com/darkhorseprojects/pi-gnosis/actions/workflows/ci.yml)
|
|
4
|
+
[](https://opensource.org/licenses/MIT)
|
|
5
|
+
|
|
6
|
+
Source-grounded research and non-linear tutoring for [Pi](https://github.com/earendil-works/pi-coding-agent). pi-gnosis turns learning requests into executable Circuitry graph programs instead of lengthy prose responses.
|
|
7
|
+
|
|
8
|
+
```text
|
|
9
|
+
normal Pi conversation
|
|
10
|
+
-> Pi decides pi-gnosis is useful
|
|
11
|
+
-> Pi runs one or more graphs through pi-circuitry
|
|
12
|
+
-> graph agents use pi-web-access for research
|
|
13
|
+
-> results become DAG state, Obsidian notes, or Manim lecture projects
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
## Features
|
|
17
|
+
|
|
18
|
+
- **Non-linear tutoring**: Adaptive learning that responds to demonstrated understanding
|
|
19
|
+
- **Source-grounded research**: Every claim traces back to fetched sources
|
|
20
|
+
- **Open-ended probes**: Recall, explain, transfer, contrast, debug - no multiple-choice
|
|
21
|
+
- **Obsidian integration**: Export notes to a compatible learning vault
|
|
22
|
+
- **Manim lectures**: Generate video lectures with local Manim CE
|
|
23
|
+
- **Knowledge tracing**: DAG state tracks understanding depth over time
|
|
24
|
+
|
|
25
|
+
## Graph Programs
|
|
26
|
+
|
|
27
|
+
| Graph | Purpose |
|
|
28
|
+
| --- | --- |
|
|
29
|
+
| `graphs/research.circuitry.yaml` | Delegated research pipeline: scope, query planning, source discovery, fetching, claim extraction, critique, KT DAG seed |
|
|
30
|
+
| `graphs/tutoring-session.circuitry.yaml` | Non-linear tutoring turn planner with open-ended probes and state updates |
|
|
31
|
+
| `graphs/note-export.circuitry.yaml` | Obsidian-compatible note export from canonical DAG state |
|
|
32
|
+
| `graphs/manim-lecture.circuitry.yaml` | Video/lecture project generation using bundled manim-video skill |
|
|
33
|
+
| `graphs/cleanup.circuitry.yaml` | Safe cleanup pass for temporary artifacts created by graph runs |
|
|
34
|
+
| `graphs/minimal-smoke.circuitry.yaml` | Tiny graph for Circuitry shape validation |
|
|
35
|
+
|
|
36
|
+
## Installation
|
|
37
|
+
|
|
38
|
+
```bash
|
|
39
|
+
npm install
|
|
40
|
+
npm test
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
The package pins `@darkhorseprojects/pi-circuitry` exactly and validates generated Circuitry YAML against the bundled v0.2 structural checker. Runtime execution requires a Pi environment with network access.
|
|
44
|
+
|
|
45
|
+
## Dependencies
|
|
46
|
+
|
|
47
|
+
Required:
|
|
48
|
+
- `@darkhorseprojects/pi-circuitry` v0.2.6
|
|
49
|
+
- `pi-web-access` ^0.10.7
|
|
50
|
+
|
|
51
|
+
Optional:
|
|
52
|
+
- `pi-exa-search` for Exa-first source discovery
|
|
53
|
+
|
|
54
|
+
## License
|
|
55
|
+
|
|
56
|
+
MIT - see [LICENSE](LICENSE) file for details.
|
package/bin/pi-gnosis.js
ADDED
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { writeFileSync } from 'node:fs';
|
|
3
|
+
import { resolve } from 'node:path';
|
|
4
|
+
import { buildManimProject, buildReviewSchedule, getGraphProgram, listGraphPrograms, loadConfig, planCleanup, storagePlan, validateCircuitryFile } from '../src/index.js';
|
|
5
|
+
|
|
6
|
+
function arg(name, fallback = undefined) {
|
|
7
|
+
const prefix = `--${name}=`;
|
|
8
|
+
const found = process.argv.find((a) => a.startsWith(prefix));
|
|
9
|
+
if (found) return found.slice(prefix.length);
|
|
10
|
+
const idx = process.argv.indexOf(`--${name}`);
|
|
11
|
+
if (idx >= 0) return process.argv[idx + 1];
|
|
12
|
+
return fallback;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
function usage() {
|
|
16
|
+
console.log(`pi-gnosis commands:\n graphs\n graph <name>\n validate <file...>\n storage-plan --topic <topic>\n schedule <concept-scores.json> [--today YYYY-MM-DD]\n manim-sample --topic <topic> --out <dir>\n cleanup-plan <path...> [--apply] [--allow-media]`);
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
const cmd = process.argv[2];
|
|
20
|
+
try {
|
|
21
|
+
if (!cmd || cmd === 'help' || cmd === '--help') {
|
|
22
|
+
usage();
|
|
23
|
+
} else if (cmd === 'graphs') {
|
|
24
|
+
console.log(JSON.stringify(listGraphPrograms(), null, 2));
|
|
25
|
+
} else if (cmd === 'graph') {
|
|
26
|
+
const name = process.argv[3] || 'research';
|
|
27
|
+
console.log(getGraphProgram(name));
|
|
28
|
+
} else if (cmd === 'validate') {
|
|
29
|
+
const files = process.argv.slice(3);
|
|
30
|
+
if (files.length === 0) throw new Error('validate requires at least one file');
|
|
31
|
+
const results = files.map((f) => validateCircuitryFile(f));
|
|
32
|
+
const issues = results.flatMap((r) => r.issues);
|
|
33
|
+
if (issues.length) throw new Error(issues.join('\n'));
|
|
34
|
+
console.log(JSON.stringify({ ok: true, files }, null, 2));
|
|
35
|
+
} else if (cmd === 'storage-plan') {
|
|
36
|
+
console.log(JSON.stringify(storagePlan({ topic: arg('topic', 'topic') }), null, 2));
|
|
37
|
+
} else if (cmd === 'schedule') {
|
|
38
|
+
const file = process.argv[3];
|
|
39
|
+
if (!file) throw new Error('schedule requires a JSON file');
|
|
40
|
+
const concepts = JSON.parse(await import('node:fs').then((fs) => fs.readFileSync(file, 'utf8')));
|
|
41
|
+
console.log(JSON.stringify(buildReviewSchedule(concepts, { today: arg('today') }), null, 2));
|
|
42
|
+
} else if (cmd === 'manim-sample') {
|
|
43
|
+
const topic = arg('topic', 'knowledge tracing DAGs');
|
|
44
|
+
const out = arg('out', '/tmp/pi-gnosis-manim-sample');
|
|
45
|
+
const project = buildManimProject({ topic, outputRoot: out, write: true });
|
|
46
|
+
console.log(JSON.stringify({ ok: true, projectRoot: project.projectRoot, files: Object.keys(project.files) }, null, 2));
|
|
47
|
+
} else if (cmd === 'cleanup-plan') {
|
|
48
|
+
const paths = process.argv.slice(3).filter((x) => !x.startsWith('--'));
|
|
49
|
+
console.log(JSON.stringify(planCleanup(paths, { applyCleanup: process.argv.includes('--apply'), allowGeneratedMediaCleanup: process.argv.includes('--allow-media') }), null, 2));
|
|
50
|
+
} else if (cmd === 'config') {
|
|
51
|
+
console.log(JSON.stringify(loadConfig(), null, 2));
|
|
52
|
+
} else {
|
|
53
|
+
throw new Error(`Unknown command: ${cmd}`);
|
|
54
|
+
}
|
|
55
|
+
} catch (err) {
|
|
56
|
+
console.error(err.message);
|
|
57
|
+
process.exitCode = 1;
|
|
58
|
+
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schema": "pi-gnosis.config.v1",
|
|
3
|
+
"runtime": {
|
|
4
|
+
"provider": "pi",
|
|
5
|
+
"model": "inherit"
|
|
6
|
+
},
|
|
7
|
+
"circuitry": {
|
|
8
|
+
"version": "0.2",
|
|
9
|
+
"modelPolicy": "Every graph and every agent node uses model: inherit unless a user explicitly overrides it in Pi."
|
|
10
|
+
},
|
|
11
|
+
"paths": {
|
|
12
|
+
"dagStateRoot": ".pi-gnosis/state",
|
|
13
|
+
"temporaryRoot": ".pi-gnosis/tmp",
|
|
14
|
+
"obsidianRoot": "notes",
|
|
15
|
+
"manimRoot": "manim"
|
|
16
|
+
},
|
|
17
|
+
"webTools": {
|
|
18
|
+
"required": [
|
|
19
|
+
"web_search",
|
|
20
|
+
"fetch_content"
|
|
21
|
+
],
|
|
22
|
+
"optional": [
|
|
23
|
+
"exa_search"
|
|
24
|
+
],
|
|
25
|
+
"source": "pi-web-access is required; pi-exa-search is optional and preferred for first-pass source discovery when installed."
|
|
26
|
+
},
|
|
27
|
+
"policies": {
|
|
28
|
+
"probing": {
|
|
29
|
+
"multipleChoice": "forbidden",
|
|
30
|
+
"preferred": [
|
|
31
|
+
"recall",
|
|
32
|
+
"explain",
|
|
33
|
+
"transfer",
|
|
34
|
+
"contrast",
|
|
35
|
+
"debug",
|
|
36
|
+
"teach_back",
|
|
37
|
+
"source_check"
|
|
38
|
+
]
|
|
39
|
+
},
|
|
40
|
+
"writes": {
|
|
41
|
+
"default": "manifest-first",
|
|
42
|
+
"safeRoots": [
|
|
43
|
+
".pi-gnosis/state",
|
|
44
|
+
".pi-gnosis/tmp",
|
|
45
|
+
"notes",
|
|
46
|
+
"manim"
|
|
47
|
+
],
|
|
48
|
+
"deletePolicy": "cleanup graph may delete only temporary files under .pi-gnosis/tmp unless the user explicitly authorizes deleting generated media."
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# Circuitry-first architecture
|
|
2
|
+
|
|
3
|
+
Pi-GNOSIS treats Circuitry as the executable programming language for intelligent work.
|
|
4
|
+
|
|
5
|
+
Do not compress the workflow into one giant Pi prompt. Use top-level Pi skill instructions only to decide when and how to launch the frozen graph programs. The graphs do the delegation.
|
|
6
|
+
|
|
7
|
+
## Design rules
|
|
8
|
+
|
|
9
|
+
1. A graph is the multi-agent workflow. Do not add a single generic "simulation" node.
|
|
10
|
+
2. Each agent must have isolated responsibility, explicit inputs, whitelisted tools, whitelisted skills, and an `expect` schema.
|
|
11
|
+
3. Research, note export, video generation, tutoring turns, and cleanup are separate graph programs because they have different side-effect and tool policies.
|
|
12
|
+
4. Use `runtime.provider: pi` and `model: inherit` so pi-circuitry inherits the active Pi conversation model.
|
|
13
|
+
5. Prefer source-ledger and claim-ledger artifacts over prose summaries.
|
|
14
|
+
6. Read/write agents must operate under manifest-first constraints and safe roots.
|
|
15
|
+
|
|
16
|
+
## Why this is better than text instructions
|
|
17
|
+
|
|
18
|
+
Text instructions make one top-level agent remember every concern at once. Circuitry lets Pi run delegated programs with explicit context boundaries: one agent plans queries, another curates sources, another extracts claims, another builds a KT DAG, another writes notes, another creates a Manim project, and a final agent audits results.
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# Cleanup policy
|
|
2
|
+
|
|
3
|
+
Cleanup is a graph program, not an ad hoc shell habit.
|
|
4
|
+
|
|
5
|
+
The cleanup graph may identify:
|
|
6
|
+
|
|
7
|
+
- temporary graph-run files under `.pi-gnosis/tmp/`;
|
|
8
|
+
- failed draft Manim renders under `manim/**/media/`;
|
|
9
|
+
- scratch files declared in `output_manifest.json` as temporary;
|
|
10
|
+
- stale intermediate prompts or extracted snippets that were superseded by ledgers.
|
|
11
|
+
|
|
12
|
+
It must preserve:
|
|
13
|
+
|
|
14
|
+
- `.pi-gnosis/state/**` ledgers;
|
|
15
|
+
- final notes;
|
|
16
|
+
- final videos;
|
|
17
|
+
- source ledgers;
|
|
18
|
+
- claim ledgers;
|
|
19
|
+
- user-authored files;
|
|
20
|
+
- scripts and configs.
|
|
21
|
+
|
|
22
|
+
Default behavior is plan-only. Destructive cleanup requires either `apply_cleanup: true` in the cleanup request or explicit user confirmation, and even then deletion is restricted to safe temporary roots.
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# Obsidian note contract
|
|
2
|
+
|
|
3
|
+
Obsidian export is optional, but this package assumes many Pi users will actually use it.
|
|
4
|
+
|
|
5
|
+
Each topic export should contain:
|
|
6
|
+
|
|
7
|
+
```text
|
|
8
|
+
00-map.md
|
|
9
|
+
source-ledger.md
|
|
10
|
+
concepts/<concept>.md
|
|
11
|
+
misconceptions.md
|
|
12
|
+
probes.md
|
|
13
|
+
review-plan.md
|
|
14
|
+
reflection-log.md
|
|
15
|
+
manifest.md
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
Concept notes should include:
|
|
19
|
+
|
|
20
|
+
- plain-language definition;
|
|
21
|
+
- why it matters;
|
|
22
|
+
- prerequisites;
|
|
23
|
+
- contrasts;
|
|
24
|
+
- examples;
|
|
25
|
+
- common wrong variants;
|
|
26
|
+
- source support ids;
|
|
27
|
+
- open-ended retrieval prompts;
|
|
28
|
+
- transfer prompts;
|
|
29
|
+
- links to related notes.
|
|
30
|
+
|
|
31
|
+
Obsidian files are learner memory. Do not treat them as the canonical source ledger unless the DAG state has imported and validated them.
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# Probing policy
|
|
2
|
+
|
|
3
|
+
Pi-GNOSIS does not use multiple-choice questions for diagnostic probing.
|
|
4
|
+
|
|
5
|
+
Allowed probe types:
|
|
6
|
+
|
|
7
|
+
- recall from memory;
|
|
8
|
+
- explain in the learner's own words;
|
|
9
|
+
- generate a new example;
|
|
10
|
+
- solve or complete a worked example;
|
|
11
|
+
- transfer to a new case;
|
|
12
|
+
- contrast two concepts;
|
|
13
|
+
- debug a flawed explanation;
|
|
14
|
+
- predict-observe-explain;
|
|
15
|
+
- teach-back;
|
|
16
|
+
- source check.
|
|
17
|
+
|
|
18
|
+
Why: recognition-only formats can hide shallow familiarity. Open-ended probes make the learner externalize reasoning, reveal misconceptions, and produce evidence that can update the KT DAG.
|
|
19
|
+
|
|
20
|
+
Answer keys and rubrics may exist, but they should be hidden below the prompt or kept in the DAG state until after the learner attempts the probe.
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
# Research foundations used by Pi-GNOSIS
|
|
2
|
+
|
|
3
|
+
This file is a design grounding memo, not a frozen bibliography.
|
|
4
|
+
|
|
5
|
+
## Automated research pipelines
|
|
6
|
+
|
|
7
|
+
Automated research/survey systems work better when they decompose the job. Agentic AutoSurvey uses specialized agents for paper search, topic mining/clustering, survey writing, and quality evaluation, reporting higher synthesis quality than a single baseline survey generator. Design implication: Pi-GNOSIS uses separate Circuitry agents for scope, source discovery, extraction, synthesis, critique, and learner artifact routing.
|
|
8
|
+
|
|
9
|
+
Citation integrity remains a hard failure mode. Generated reviews can look polished while missing disagreement, hallucinating references, or failing to connect claims to sources. Design implication: every non-obvious claim should map to source ids, and quality gates should reject unsupported synthesis.
|
|
10
|
+
|
|
11
|
+
## Agentic RAG
|
|
12
|
+
|
|
13
|
+
Agentic RAG and multi-agent RAG research motivate decomposing retrieval-heavy tasks into planning, source discovery, extraction, and synthesis agents. Multi-agent RAG work such as MA-RAG uses planner/extractor/QA-style roles to handle ambiguous, multi-hop information seeking. Design implication: the research graph is a Circuitry program with role-specific agents and whitelisted web tools, not a single web-search prompt.
|
|
14
|
+
|
|
15
|
+
## Intelligent tutoring and KT
|
|
16
|
+
|
|
17
|
+
Intelligent tutoring systems traditionally maintain a learner model and use interactions to update the estimate of what the learner understands. Knowledge tracing estimates learner knowledge from interactions, but modern reviews warn that high predictive accuracy and interpretability do not always coexist. Design implication: Pi-GNOSIS stores transparent evidence records in the KT DAG instead of opaque mastery labels.
|
|
18
|
+
|
|
19
|
+
LLM tutoring papers warn that being good at solving problems is not the same as being good at tutoring. Design implication: Pi-GNOSIS separates subject research, learner-state modeling, probing, feedback, and next-turn planning.
|
|
20
|
+
|
|
21
|
+
## Open-ended probing
|
|
22
|
+
|
|
23
|
+
Open-ended questions reveal reasoning better than recognition-only formats. LLM-based short-answer grading work suggests open-ended formative assessment is increasingly practical, although not perfect. Design implication: Pi-GNOSIS forbids multiple-choice diagnostic probes and instead uses recall, explain, transfer, contrast, debug, teach-back, and source-check prompts.
|
|
24
|
+
|
|
25
|
+
## Retrieval practice and spacing
|
|
26
|
+
|
|
27
|
+
Retrieval practice and spaced review are more durable than passive rereading for many learning tasks. More effortful retrieval often produces better long-term memory than easy recognition. Design implication: Pi-GNOSIS produces review schedules and open-ended retrieval prompts for concepts with high decay or misconception risk.
|
|
28
|
+
|
|
29
|
+
## Memetics, cautiously
|
|
30
|
+
|
|
31
|
+
Memetics is used only as a constrained lens for concept variants, transmission pathways, attractive wrong explanations, and misconception risk. It is not treated as a literal idea-virus science and never replaces source evidence.
|
|
32
|
+
|
|
33
|
+
## Sources to refresh during research runs
|
|
34
|
+
|
|
35
|
+
- Circuitry spec: https://github.com/darkhorseprojects/circuitry/blob/main/docs/SPEC.md
|
|
36
|
+
- Circuitry README: https://github.com/darkhorseprojects/circuitry
|
|
37
|
+
- pi-web-access: https://github.com/nicobailon/pi-web-access
|
|
38
|
+
- pi-exa-search: https://github.com/najibninaba/pi-exa-search
|
|
39
|
+
- Hermes Manim Video docs: https://hermes-agent.nousresearch.com/docs/user-guide/skills/bundled/creative/creative-manim-video
|
|
40
|
+
- Agentic AutoSurvey: https://arxiv.org/abs/2509.18661
|
|
41
|
+
- MathTutorBench: https://arxiv.org/abs/2502.18940
|
|
42
|
+
- Beyond Final Answers: https://arxiv.org/abs/2503.16460
|
|
43
|
+
- Systematic Review of KT and LLMs in Education: https://arxiv.org/abs/2412.09248
|
|
44
|
+
- Can LLMs Grade Short-Answer Reading Comprehension Questions: https://arxiv.org/abs/2310.18373
|
|
45
|
+
- MA-RAG: https://arxiv.org/abs/2505.20096
|
|
46
|
+
- RAG-Reasoning Survey: https://arxiv.org/abs/2507.09477
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# Storage contract: DAG state vs Obsidian
|
|
2
|
+
|
|
3
|
+
## Canonical DAG state
|
|
4
|
+
|
|
5
|
+
DAG state is machine-readable and lives under `.pi-gnosis/state/<run-id>/`. It is what Pi-GNOSIS uses to resume and route learning.
|
|
6
|
+
|
|
7
|
+
Store here:
|
|
8
|
+
|
|
9
|
+
- `run_manifest.json`: run id, topic, graph, package version, timestamps, config snapshot.
|
|
10
|
+
- `source_ledger.json`: source ids, urls, dates, source type, reliability notes, claims supported.
|
|
11
|
+
- `claim_ledger.json`: atomic claims, support, conflicts, uncertainty, source ids.
|
|
12
|
+
- `kt_dag.json`: concepts, prerequisites, relation types, evidence records, review risks.
|
|
13
|
+
- `learner_state.json`: observed evidence, probe outcomes, confidence, misconception markers.
|
|
14
|
+
- `review_schedule.json`: next review dates and reasons.
|
|
15
|
+
- `output_manifest.json`: files intentionally written by graph agents.
|
|
16
|
+
|
|
17
|
+
## Obsidian notes
|
|
18
|
+
|
|
19
|
+
Obsidian is optional but first-class for the learner. It is the human-facing memory surface.
|
|
20
|
+
|
|
21
|
+
Store here:
|
|
22
|
+
|
|
23
|
+
- concept notes written for reading and review;
|
|
24
|
+
- source-ledger summaries with links;
|
|
25
|
+
- reflection logs;
|
|
26
|
+
- open-ended probes and answer rubrics;
|
|
27
|
+
- review plans;
|
|
28
|
+
- the learner's own explanations and corrections.
|
|
29
|
+
|
|
30
|
+
Pi can read Obsidian to infer what the learner has already explained, but it must treat notes as learner evidence rather than authoritative source truth.
|
|
31
|
+
|
|
32
|
+
## Rule
|
|
33
|
+
|
|
34
|
+
DAG state answers: what does the system know, why, with what evidence, and what should run next?
|
|
35
|
+
|
|
36
|
+
Obsidian answers: what can the person read, edit, connect, and study?
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# Why Pi-GNOSIS keeps a KT DAG
|
|
2
|
+
|
|
3
|
+
A normal conversation transcript is not enough to decide what the learner knows. Obsidian notes are also not enough: they show what was written, not whether prerequisite concepts are stable, decaying, or confused.
|
|
4
|
+
|
|
5
|
+
Pi-GNOSIS keeps a knowledge-tracing DAG because the user can stop, resume, jump topics, ask for video, revise notes, or reveal a misconception at any point. The graph stores:
|
|
6
|
+
|
|
7
|
+
- concepts;
|
|
8
|
+
- prerequisite and contrast links;
|
|
9
|
+
- source support;
|
|
10
|
+
- learner evidence;
|
|
11
|
+
- misconception risk;
|
|
12
|
+
- decay risk;
|
|
13
|
+
- next open-ended probe targets;
|
|
14
|
+
- review intervals.
|
|
15
|
+
|
|
16
|
+
It is not a rigid linear curriculum. It is a resumable state graph for non-linear tutoring.
|
|
17
|
+
|
|
18
|
+
The package borrows from knowledge tracing in intelligent tutoring systems: learner state is updated from observed interactions. It deliberately avoids classic binary mastered/not-mastered overconfidence. State updates must cite evidence: an open-ended explanation, worked example, transfer attempt, source check, or learner note.
|
package/graphs/README.md
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# Pi-GNOSIS Circuitry graphs
|
|
2
|
+
|
|
3
|
+
These graphs are frozen programs for pi-circuitry. Do not treat them as examples only. Pi should run them when the skill routes work here.
|
|
4
|
+
|
|
5
|
+
Every graph uses:
|
|
6
|
+
|
|
7
|
+
```yaml
|
|
8
|
+
runtime:
|
|
9
|
+
provider: pi
|
|
10
|
+
model: inherit
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
Every agent node also uses `model: inherit`.
|
|
14
|
+
|
|
15
|
+
The graph itself is the multi-actor workflow. Do not add a single generic simulation node.
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
circuitry: "0.2"
|
|
2
|
+
title: "Pi-GNOSIS Cleanup Program"
|
|
3
|
+
description: |
|
|
4
|
+
Frozen Circuitry program for planning and, when explicitly allowed, applying safe cleanup of non-permanent artifacts created by Pi-GNOSIS graph runs.
|
|
5
|
+
runtime:
|
|
6
|
+
provider: pi
|
|
7
|
+
model: inherit
|
|
8
|
+
validation:
|
|
9
|
+
rules:
|
|
10
|
+
- no-self-loops
|
|
11
|
+
- no-unknown-edge-endpoints
|
|
12
|
+
- no-cycles
|
|
13
|
+
- rule: require-executable-inputs
|
|
14
|
+
executableKinds: [agent, tool]
|
|
15
|
+
resources:
|
|
16
|
+
cleanup_request:
|
|
17
|
+
type: text
|
|
18
|
+
label: "Cleanup request"
|
|
19
|
+
value: |
|
|
20
|
+
run_id: ""
|
|
21
|
+
dag_state_path: ".pi-gnosis/state"
|
|
22
|
+
temp_path: ".pi-gnosis/tmp"
|
|
23
|
+
manim_root: "manim"
|
|
24
|
+
apply_cleanup: false
|
|
25
|
+
allow_generated_media_cleanup: false
|
|
26
|
+
cleanup_policy:
|
|
27
|
+
type: text
|
|
28
|
+
label: "Cleanup policy"
|
|
29
|
+
value: |
|
|
30
|
+
Default is plan-only. Safe deletion is restricted to temporary files under .pi-gnosis/tmp. Generated Manim media may be proposed for cleanup, but only deleted if allow_generated_media_cleanup is true. Never delete DAG state, source ledgers, claim ledgers, notes, final videos, scripts, configs, or user-authored files.
|
|
31
|
+
artifact_census:
|
|
32
|
+
type: agent
|
|
33
|
+
identity: "Artifact Census Agent"
|
|
34
|
+
model: inherit
|
|
35
|
+
inputs: [cleanup_request, cleanup_policy]
|
|
36
|
+
skills: [pi-gnosis]
|
|
37
|
+
tools: [read_file, grep, shell]
|
|
38
|
+
expect:
|
|
39
|
+
discovered_artifacts:
|
|
40
|
+
type: list
|
|
41
|
+
items:
|
|
42
|
+
path: str
|
|
43
|
+
category: str
|
|
44
|
+
source: str
|
|
45
|
+
protected_artifacts:
|
|
46
|
+
type: list
|
|
47
|
+
items: str
|
|
48
|
+
uncertainty:
|
|
49
|
+
type: list
|
|
50
|
+
items: str
|
|
51
|
+
instructions: |
|
|
52
|
+
Inspect manifests and safe roots if tools are available. Do not delete. Classify temporary, generated-media, final-output, state, note, source, config, or unknown. Unknown is protected. Output only valid JSON matching expect.
|
|
53
|
+
cleanup_decider:
|
|
54
|
+
type: agent
|
|
55
|
+
identity: "Cleanup Decision Agent"
|
|
56
|
+
model: inherit
|
|
57
|
+
inputs: [artifact_census, cleanup_policy, cleanup_request]
|
|
58
|
+
skills: [pi-gnosis]
|
|
59
|
+
tools: []
|
|
60
|
+
expect:
|
|
61
|
+
deletion_plan:
|
|
62
|
+
type: list
|
|
63
|
+
items:
|
|
64
|
+
path: str
|
|
65
|
+
reason: str
|
|
66
|
+
allowed_now: bool
|
|
67
|
+
keep_plan:
|
|
68
|
+
type: list
|
|
69
|
+
items:
|
|
70
|
+
path: str
|
|
71
|
+
reason: str
|
|
72
|
+
needs_user_confirmation:
|
|
73
|
+
type: list
|
|
74
|
+
items: str
|
|
75
|
+
instructions: |
|
|
76
|
+
Decide what can be deleted. Only temporary files under .pi-gnosis/tmp are allowed when apply_cleanup is true. Media cache cleanup needs allow_generated_media_cleanup. Everything else is keep/protected. Output only valid JSON matching expect.
|
|
77
|
+
cleanup_executor:
|
|
78
|
+
type: agent
|
|
79
|
+
identity: "Safe Cleanup Executor"
|
|
80
|
+
model: inherit
|
|
81
|
+
inputs: [cleanup_decider, cleanup_policy, cleanup_request]
|
|
82
|
+
skills: [pi-gnosis]
|
|
83
|
+
tools: [shell]
|
|
84
|
+
expect:
|
|
85
|
+
status: str
|
|
86
|
+
deleted:
|
|
87
|
+
type: list
|
|
88
|
+
items: str
|
|
89
|
+
not_deleted:
|
|
90
|
+
type: list
|
|
91
|
+
items: str
|
|
92
|
+
audit_log: str
|
|
93
|
+
instructions: |
|
|
94
|
+
If apply_cleanup is false, do not delete anything; return plan-only status. If true, delete only paths that cleanup_decider marked allowed_now and that are inside safe temporary roots. Use conservative commands. Never use recursive deletion outside safe roots. Output only valid JSON matching expect.
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
circuitry: "0.2"
|
|
2
|
+
title: "Pi-GNOSIS Manim Lecture Program"
|
|
3
|
+
description: |
|
|
4
|
+
Frozen Circuitry program for generating a Manim CE lecture project from researched/KT state. The Manim-producing agent directly loads the bundled manim-video skill.
|
|
5
|
+
runtime:
|
|
6
|
+
provider: pi
|
|
7
|
+
model: inherit
|
|
8
|
+
validation:
|
|
9
|
+
rules:
|
|
10
|
+
- no-self-loops
|
|
11
|
+
- no-unknown-edge-endpoints
|
|
12
|
+
- no-cycles
|
|
13
|
+
- rule: require-executable-inputs
|
|
14
|
+
executableKinds: [agent, tool]
|
|
15
|
+
resources:
|
|
16
|
+
lecture_request:
|
|
17
|
+
type: text
|
|
18
|
+
label: "Lecture request"
|
|
19
|
+
value: |
|
|
20
|
+
topic: ""
|
|
21
|
+
dag_state_path: ".pi-gnosis/state"
|
|
22
|
+
output_root: "manim"
|
|
23
|
+
render: "draft-if-environment-ready"
|
|
24
|
+
apply_writes: false
|
|
25
|
+
manim_policy:
|
|
26
|
+
type: text
|
|
27
|
+
label: "Manim side-effect policy"
|
|
28
|
+
value: |
|
|
29
|
+
Use the bundled manim-video skill. Write only inside output_root. Produce plan.md, scene_spec.json, script.py, render.sh, and README.md. Do not delete anything. Mark media/ as cleanup-eligible only after final outputs are preserved.
|
|
30
|
+
visual_learning_policy:
|
|
31
|
+
type: text
|
|
32
|
+
label: "Visual learning policy"
|
|
33
|
+
value: |
|
|
34
|
+
A lecture should have one narrative arc, one misconception or bottleneck to fix, and a small number of scenes. Prefer visual structure over text dumps. The aha moment should be visible.
|
|
35
|
+
lecture_state_importer:
|
|
36
|
+
type: agent
|
|
37
|
+
identity: "Lecture State Importer"
|
|
38
|
+
model: inherit
|
|
39
|
+
inputs: [lecture_request, visual_learning_policy]
|
|
40
|
+
skills: [pi-gnosis]
|
|
41
|
+
tools: [read_file, grep]
|
|
42
|
+
expect:
|
|
43
|
+
usable_concepts:
|
|
44
|
+
type: list
|
|
45
|
+
items: str
|
|
46
|
+
source_ids_to_carry:
|
|
47
|
+
type: list
|
|
48
|
+
items: str
|
|
49
|
+
learner_bottlenecks:
|
|
50
|
+
type: list
|
|
51
|
+
items: str
|
|
52
|
+
missing_state:
|
|
53
|
+
type: list
|
|
54
|
+
items: str
|
|
55
|
+
instructions: |
|
|
56
|
+
Read DAG state when available. Extract concepts, misconceptions, source ids, and learner bottlenecks relevant to the requested lecture. Do not write. Output only valid JSON matching expect.
|
|
57
|
+
lecture_storyboarder:
|
|
58
|
+
type: agent
|
|
59
|
+
identity: "Manim Lecture Storyboarder"
|
|
60
|
+
model: inherit
|
|
61
|
+
inputs: [lecture_state_importer, visual_learning_policy]
|
|
62
|
+
skills: [pi-gnosis, manim-video]
|
|
63
|
+
tools: []
|
|
64
|
+
expect:
|
|
65
|
+
narrative_arc: str
|
|
66
|
+
scenes:
|
|
67
|
+
type: list
|
|
68
|
+
items:
|
|
69
|
+
name: str
|
|
70
|
+
learning_goal: str
|
|
71
|
+
visual_metaphor: str
|
|
72
|
+
key_animation: str
|
|
73
|
+
narration_beat: str
|
|
74
|
+
aha_moment: str
|
|
75
|
+
what_to_avoid:
|
|
76
|
+
type: list
|
|
77
|
+
items: str
|
|
78
|
+
instructions: |
|
|
79
|
+
Design the lecture as a Manim visual explanation. Use source ids when claims depend on research. Keep scenes compact. Output only valid JSON matching expect.
|
|
80
|
+
manim_project_builder:
|
|
81
|
+
type: agent
|
|
82
|
+
identity: "Manim Project Builder"
|
|
83
|
+
model: inherit
|
|
84
|
+
inputs: [lecture_request, manim_policy, lecture_storyboarder]
|
|
85
|
+
skills: [pi-gnosis, manim-video]
|
|
86
|
+
tools: [read_file, write_file, edit_file]
|
|
87
|
+
expect:
|
|
88
|
+
project_root: str
|
|
89
|
+
files_written_or_planned:
|
|
90
|
+
type: list
|
|
91
|
+
items: str
|
|
92
|
+
render_command: str
|
|
93
|
+
cleanup_candidates:
|
|
94
|
+
type: list
|
|
95
|
+
items: str
|
|
96
|
+
instructions: |
|
|
97
|
+
If apply_writes is false, return file contents as planned artifacts. If writes are enabled by Pi, write only under output_root. Create plan.md, scene_spec.json, script.py, render.sh, and README.md. Do not render here. Output only valid JSON matching expect.
|
|
98
|
+
render_preflight:
|
|
99
|
+
type: agent
|
|
100
|
+
identity: "Manim Render Preflight"
|
|
101
|
+
model: inherit
|
|
102
|
+
inputs: [manim_project_builder, manim_policy]
|
|
103
|
+
skills: [manim-video]
|
|
104
|
+
tools: [read_file, shell]
|
|
105
|
+
expect:
|
|
106
|
+
can_render: bool
|
|
107
|
+
checks:
|
|
108
|
+
type: list
|
|
109
|
+
items:
|
|
110
|
+
name: str
|
|
111
|
+
status: str
|
|
112
|
+
detail: str
|
|
113
|
+
draft_render_command: str
|
|
114
|
+
if_not_rendered: str
|
|
115
|
+
instructions: |
|
|
116
|
+
Check Python syntax, Manim availability, ffmpeg availability, and LaTeX only if MathTex is used. If the environment is not ready, do not pretend a video was rendered. Output only valid JSON matching expect.
|
|
117
|
+
visual_quality_gate:
|
|
118
|
+
type: agent
|
|
119
|
+
identity: "Manim Visual Quality Gate"
|
|
120
|
+
model: inherit
|
|
121
|
+
inputs: [lecture_storyboarder, manim_project_builder, render_preflight, visual_learning_policy]
|
|
122
|
+
skills: [pi-gnosis, manim-video]
|
|
123
|
+
tools: [read_file]
|
|
124
|
+
expect:
|
|
125
|
+
status: str
|
|
126
|
+
learning_objective_match: str
|
|
127
|
+
clutter_risks:
|
|
128
|
+
type: list
|
|
129
|
+
items: str
|
|
130
|
+
source_claim_risks:
|
|
131
|
+
type: list
|
|
132
|
+
items: str
|
|
133
|
+
cleanup_manifest:
|
|
134
|
+
type: list
|
|
135
|
+
items: str
|
|
136
|
+
instructions: |
|
|
137
|
+
Review the planned or written Manim project. Flag visual clutter, missing aha moment, overuse of text, unsupported research claims, and cleanup candidates. Output only valid JSON matching expect.
|