cs-scientist-plugin 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/PROTOCOL.md +431 -0
- package/README.md +256 -0
- package/agents/cs-scientist-arbiter.md +124 -0
- package/agents/cs-scientist-consultant.md +111 -0
- package/agents/cs-scientist-critic.md +234 -0
- package/agents/cs-scientist-dev.md +439 -0
- package/agents/cs-scientist-research.md +426 -0
- package/agents/cs-scientist-teach.md +430 -0
- package/agents/cs-scientist.md +201 -0
- package/agents/planner.md +41 -0
- package/agents/writer.md +35 -0
- package/bin/install.js +109 -0
- package/index.js +3 -0
- package/package.json +40 -0
- package/skills/concept-explainer.md +78 -0
- package/skills/deep-research.md +98 -0
- package/skills/kb-validate.md +101 -0
- package/skills/lesson-plan.md +107 -0
- package/skills/negative-results.md +100 -0
- package/skills/notebooklm.md +95 -0
- package/skills/paper-outline.md +143 -0
- package/skills/parallel-research.md +85 -0
- package/skills/project-onboarding.md +118 -0
- package/skills/session-status.md +79 -0
- package/skills/writing-plans/SKILL.md +152 -0
- package/skills/writing-plans/plan-document-reviewer-prompt.md +49 -0
package/bin/install.js
ADDED
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { existsSync, mkdirSync, readdirSync, copyFileSync, statSync } from "node:fs";
|
|
3
|
+
import { join, dirname } from "node:path";
|
|
4
|
+
import { homedir } from "node:os";
|
|
5
|
+
import { fileURLToPath } from "node:url";
|
|
6
|
+
import { createInterface } from "node:readline";
|
|
7
|
+
|
|
8
|
+
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
9
|
+
const AGENTS_SRC = join(__dirname, "..", "agents");
|
|
10
|
+
const SKILLS_SRC = join(__dirname, "..", "skills");
|
|
11
|
+
|
|
12
|
+
const TARGETS = {
|
|
13
|
+
opencode: {
|
|
14
|
+
agents: join(homedir(), ".config", "opencode", "agents"),
|
|
15
|
+
skills: join(homedir(), ".config", "opencode", "skills"),
|
|
16
|
+
},
|
|
17
|
+
claude: {
|
|
18
|
+
agents: join(homedir(), ".claude", "agents"),
|
|
19
|
+
skills: join(homedir(), ".claude", "commands"),
|
|
20
|
+
},
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
const PLATFORM_PRESENCE = {
|
|
24
|
+
opencode: join(homedir(), ".config", "opencode"),
|
|
25
|
+
claude: join(homedir(), ".claude"),
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
function copyDir(src, dest, force = false, indent = " ") {
|
|
29
|
+
mkdirSync(dest, { recursive: true });
|
|
30
|
+
for (const entry of readdirSync(src)) {
|
|
31
|
+
const srcPath = join(src, entry);
|
|
32
|
+
const destPath = join(dest, entry);
|
|
33
|
+
if (statSync(srcPath).isDirectory()) {
|
|
34
|
+
copyDir(srcPath, destPath, force, indent + " ");
|
|
35
|
+
} else if (entry.endsWith(".md")) {
|
|
36
|
+
if (!force && existsSync(destPath)) {
|
|
37
|
+
console.log(`${indent}~ ${entry} (already exists — skipped, use --force to overwrite)`);
|
|
38
|
+
continue;
|
|
39
|
+
}
|
|
40
|
+
copyFileSync(srcPath, destPath);
|
|
41
|
+
console.log(`${indent}✓ ${entry}${force && existsSync(destPath) ? " (overwritten)" : ""}`);
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
function detect() {
|
|
47
|
+
return {
|
|
48
|
+
opencode: existsSync(PLATFORM_PRESENCE.opencode),
|
|
49
|
+
claude: existsSync(PLATFORM_PRESENCE.claude),
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
async function ask(question) {
|
|
54
|
+
const rl = createInterface({ input: process.stdin, output: process.stdout });
|
|
55
|
+
return new Promise(resolve => {
|
|
56
|
+
rl.question(question, answer => { rl.close(); resolve(answer.trim().toLowerCase()); });
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
async function main() {
|
|
61
|
+
const args = process.argv.slice(2);
|
|
62
|
+
const forceOpencode = args.includes("--opencode");
|
|
63
|
+
const forceClaude = args.includes("--claude");
|
|
64
|
+
const force = args.includes("--force");
|
|
65
|
+
const silent = args.includes("--silent"); // used by postinstall
|
|
66
|
+
const detected = detect();
|
|
67
|
+
|
|
68
|
+
const copy = (src, dest) => copyDir(src, dest, force);
|
|
69
|
+
|
|
70
|
+
let installOpencode = forceOpencode || (detected.opencode && !forceClaude);
|
|
71
|
+
let installClaude = forceClaude || (detected.claude && !forceOpencode);
|
|
72
|
+
|
|
73
|
+
if (!silent && !forceOpencode && !forceClaude) {
|
|
74
|
+
if (detected.opencode) {
|
|
75
|
+
const ans = await ask("Install agents + skills for opencode? [Y/n] ");
|
|
76
|
+
installOpencode = ans === "" || ans === "y";
|
|
77
|
+
}
|
|
78
|
+
if (detected.claude) {
|
|
79
|
+
const ans = await ask("Install agents + skills for Claude Code? [Y/n] ");
|
|
80
|
+
installClaude = ans === "" || ans === "y";
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
if (!installOpencode && !installClaude) {
|
|
85
|
+
console.log("Nothing to install. Use --opencode or --claude to force.");
|
|
86
|
+
process.exit(0);
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
if (installOpencode) {
|
|
90
|
+
console.log(`\nInstalling agents for opencode → ${TARGETS.opencode.agents}`);
|
|
91
|
+
copy(AGENTS_SRC, TARGETS.opencode.agents);
|
|
92
|
+
console.log(`\nInstalling skills for opencode → ${TARGETS.opencode.skills}`);
|
|
93
|
+
copy(SKILLS_SRC, TARGETS.opencode.skills);
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
if (installClaude) {
|
|
97
|
+
console.log(`\nInstalling agents for Claude Code → ${TARGETS.claude.agents}`);
|
|
98
|
+
copy(AGENTS_SRC, TARGETS.claude.agents);
|
|
99
|
+
console.log(`\nInstalling skills for Claude Code → ${TARGETS.claude.skills}`);
|
|
100
|
+
copy(SKILLS_SRC, TARGETS.claude.skills);
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
console.log("\nDone. Restart your tool to pick up the new agents and skills.");
|
|
104
|
+
if (!force) {
|
|
105
|
+
console.log("Tip: use --force to overwrite existing files on future updates.");
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
main().catch(err => { console.error(err.message); process.exit(1); });
|
package/index.js
ADDED
package/package.json
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "cs-scientist-plugin",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Verified Loop multi-agent system for rigorous research and development in opencode and Claude Code",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "./index.js",
|
|
7
|
+
"bin": {
|
|
8
|
+
"cs-scientist-plugin": "./bin/install.js"
|
|
9
|
+
},
|
|
10
|
+
"scripts": {
|
|
11
|
+
"postinstall": "node bin/install.js --silent"
|
|
12
|
+
},
|
|
13
|
+
"files": [
|
|
14
|
+
"agents/",
|
|
15
|
+
"skills/",
|
|
16
|
+
"bin/",
|
|
17
|
+
"index.js",
|
|
18
|
+
"README.md",
|
|
19
|
+
"PROTOCOL.md"
|
|
20
|
+
],
|
|
21
|
+
"keywords": [
|
|
22
|
+
"opencode",
|
|
23
|
+
"claude-code",
|
|
24
|
+
"ai-agent",
|
|
25
|
+
"research",
|
|
26
|
+
"verified-loop",
|
|
27
|
+
"cs-scientist",
|
|
28
|
+
"multi-agent",
|
|
29
|
+
"knowledge-base"
|
|
30
|
+
],
|
|
31
|
+
"author": "enriqueagm <kikialeglez@gmail.com>",
|
|
32
|
+
"license": "MIT",
|
|
33
|
+
"engines": {
|
|
34
|
+
"node": ">=18"
|
|
35
|
+
},
|
|
36
|
+
"repository": {
|
|
37
|
+
"type": "git",
|
|
38
|
+
"url": "https://github.com/QuiquiMatCom2004/cs-scientist-plugin.git"
|
|
39
|
+
}
|
|
40
|
+
}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: >-
|
|
3
|
+
Lightweight single-concept explainer. No session required. Takes a concept
|
|
4
|
+
and a student level, explains it at three levels of depth: accessible /
|
|
5
|
+
practitioner / researcher. Each level is a standalone explanation — not a
|
|
6
|
+
progression. Quick use during research or dev sessions when a concept needs
|
|
7
|
+
clarification without starting a full TEACH session.
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# concept-explainer
|
|
11
|
+
|
|
12
|
+
## Input
|
|
13
|
+
|
|
14
|
+
```
|
|
15
|
+
$ARGUMENTS — "concept [@ level]"
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
Examples:
|
|
19
|
+
- `gradient descent`
|
|
20
|
+
- `gradient descent @ nivel 0`
|
|
21
|
+
- `transformers @ investigador`
|
|
22
|
+
|
|
23
|
+
Level options: `nivel 0` (no background) / `grado` (undergraduate) / `investigador` (researcher)
|
|
24
|
+
|
|
25
|
+
If no level specified: generate all three.
|
|
26
|
+
|
|
27
|
+
## Rules before explaining
|
|
28
|
+
|
|
29
|
+
1. If you have a cs-scientist session active with a source KB, derive explanations from KB facts where they apply. Mark with `[KB]`.
|
|
30
|
+
2. If no session KB: explain from general knowledge. Do not cite sources you cannot verify.
|
|
31
|
+
3. Every explanation must include one concrete example. No purely abstract explanations.
|
|
32
|
+
|
|
33
|
+
## Output format
|
|
34
|
+
|
|
35
|
+
```
|
|
36
|
+
─── {CONCEPT} ───────────────────────────────────────────────
|
|
37
|
+
|
|
38
|
+
NIVEL 0 — Para alguien sin conocimiento previo
|
|
39
|
+
{3-5 sentences. Use only analogies to everyday objects or experiences.
|
|
40
|
+
No formulas. No technical vocabulary.}
|
|
41
|
+
Ejemplo: {one everyday analogy or story}
|
|
42
|
+
|
|
43
|
+
─────────────────────────────────────────────────────────────
|
|
44
|
+
|
|
45
|
+
NIVEL GRADO — Para un estudiante universitario
|
|
46
|
+
{5-8 sentences. Technical vocabulary is fine. Show the formal definition but explain it.
|
|
47
|
+
Connect to concepts a CS undergraduate would know.}
|
|
48
|
+
Ejemplo: {code snippet, equation, or concrete technical scenario}
|
|
49
|
+
|
|
50
|
+
─────────────────────────────────────────────────────────────
|
|
51
|
+
|
|
52
|
+
NIVEL INVESTIGADOR — Para alguien activo en el área
|
|
53
|
+
{3-5 sentences. No hand-holding. Highlight the non-obvious aspects,
|
|
54
|
+
known limitations, open problems, or common misconceptions in the literature.}
|
|
55
|
+
Puntero: {one specific area, paper type, or term to search if they want to go deeper}
|
|
56
|
+
|
|
57
|
+
─────────────────────────────────────────────────────────────
|
|
58
|
+
|
|
59
|
+
CONCEPTO RELACIONADO QUE VALE LA PENA CONOCER:
|
|
60
|
+
{one concept that connects to this one — name + one sentence on the connection}
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
## If session KB is active and concept is in KB
|
|
64
|
+
|
|
65
|
+
Lead with:
|
|
66
|
+
```
|
|
67
|
+
[KB] Este concepto está en tu base de conocimiento:
|
|
68
|
+
{KB entry verbatim}
|
|
69
|
+
|
|
70
|
+
Expandiendo desde esa base:
|
|
71
|
+
{then the level(s) requested}
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
## NEVER
|
|
75
|
+
|
|
76
|
+
- NEVER make up citations or paper titles — if you can't verify a source, don't cite it
|
|
77
|
+
- NEVER give a researcher-level explanation that is just a longer undergraduate explanation — it must add something a practitioner would actually find useful
|
|
78
|
+
- NEVER skip the concrete example — "I'll skip the example since this concept is abstract" is not acceptable
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: >-
|
|
3
|
+
Systematic multi-source research skill. Takes a research question and
|
|
4
|
+
returns structured output in cs-scientist KB format (confirmed/insufficient/
|
|
5
|
+
contradictory/partial). Output is directly importable into the KB without
|
|
6
|
+
reformatting. Works standalone or as Phase 3 RETRIEVE accelerator.
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# deep-research
|
|
10
|
+
|
|
11
|
+
## Input
|
|
12
|
+
|
|
13
|
+
```
|
|
14
|
+
$ARGUMENTS — the research question or topic to investigate
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
If called from cs-scientist-research Phase 3, $ARGUMENTS is the scientific question from SCOPE.
|
|
18
|
+
|
|
19
|
+
## What you do
|
|
20
|
+
|
|
21
|
+
Execute systematic research across source types. Do not summarize — extract and classify.
|
|
22
|
+
|
|
23
|
+
### Step 1 — Search across source types
|
|
24
|
+
|
|
25
|
+
For every question, search across at least 4 of these source types:
|
|
26
|
+
- Academic / peer-reviewed (arxiv, semantic scholar, pubmed, ACM, IEEE)
|
|
27
|
+
- Industry / technical documentation (official docs, engineering blogs, whitepapers)
|
|
28
|
+
- News / analysis (recent coverage, expert commentary)
|
|
29
|
+
- Primary data / code (GitHub repos, datasets, benchmarks, official repos)
|
|
30
|
+
|
|
31
|
+
### Step 2 — Classify each claim
|
|
32
|
+
|
|
33
|
+
For every claim extracted, assign a status:
|
|
34
|
+
|
|
35
|
+
| Status | Meaning | Output tag |
|
|
36
|
+
|--------|---------|-----------|
|
|
37
|
+
| `confirmed` | ≥3 independent sources agree | `[FACT]` |
|
|
38
|
+
| `contradictory` | Sources disagree — both versions documented | Open Question |
|
|
39
|
+
| `insufficient` | <3 sources or only one source type | `[HYPOTHESIS]` |
|
|
40
|
+
| `partial` | Supported but with caveats or limited scope | `[HYPOTHESIS]` + note |
|
|
41
|
+
|
|
42
|
+
### Step 3 — Output in KB format
|
|
43
|
+
|
|
44
|
+
```
|
|
45
|
+
DEEP-RESEARCH: {question}
|
|
46
|
+
DEPTH: standard | deep
|
|
47
|
+
SOURCES_CONSULTED: {N}
|
|
48
|
+
SOURCE_TYPES: {list of types used}
|
|
49
|
+
|
|
50
|
+
---
|
|
51
|
+
|
|
52
|
+
CONFIRMED:
|
|
53
|
+
- [FACT] {exact claim} — Source: {title}, {year}, {URL}
|
|
54
|
+
- [FACT] {exact claim} — Source: {title}, {year}, {URL}
|
|
55
|
+
|
|
56
|
+
INSUFFICIENT:
|
|
57
|
+
- [HYPOTHESIS] {claim} | Supporting: {source}, {year}
|
|
58
|
+
|
|
59
|
+
CONTRADICTORY:
|
|
60
|
+
- CLAIM: {claim}
|
|
61
|
+
FOR: {source URL} — {quote or evidence}
|
|
62
|
+
AGAINST: {source URL} — {quote or evidence}
|
|
63
|
+
STATUS: open question — do not advance as [FACT]
|
|
64
|
+
|
|
65
|
+
PARTIAL:
|
|
66
|
+
- [HYPOTHESIS] {claim} | Evidence: {source} | Note: {scope limitation}
|
|
67
|
+
|
|
68
|
+
OPEN_QUESTIONS:
|
|
69
|
+
- {question that research could not resolve}
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
## Integration with cs-scientist-research
|
|
73
|
+
|
|
74
|
+
When called from Phase 3 RETRIEVE, the mode agent maps this output directly:
|
|
75
|
+
|
|
76
|
+
```
|
|
77
|
+
confirmed → [FACT] in KB (pending TRIANGULATE)
|
|
78
|
+
insufficient → [HYPOTHESIS] in KB
|
|
79
|
+
contradictory → register both versions as Open Question
|
|
80
|
+
partial → [HYPOTHESIS] with note "partial evidence — scope limited to {X}"
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
Phase 4 TRIANGULATE still applies to [FACT] items — deep-research confirming a claim does not
|
|
84
|
+
replace the triangulation requirement. It accelerates source collection.
|
|
85
|
+
|
|
86
|
+
## Depth modes
|
|
87
|
+
|
|
88
|
+
`standard` — 2-3 sources per claim, covers main source types, good for established topics
|
|
89
|
+
`deep` — 5+ sources per claim, includes grey literature and primary data, for contested or novel topics
|
|
90
|
+
|
|
91
|
+
If $ARGUMENTS does not specify depth, use `standard`.
|
|
92
|
+
|
|
93
|
+
## NEVER
|
|
94
|
+
|
|
95
|
+
- NEVER mark a claim [VERIFIED] — that tag is reserved for the cs-scientist mode agent after TRIANGULATE
|
|
96
|
+
- NEVER omit contradictory evidence — if sources disagree, both versions are required
|
|
97
|
+
- NEVER summarize sources — quote the specific claim from the source
|
|
98
|
+
- NEVER use secondary sources to confirm a primary claim — independence of sources matters
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: >-
|
|
3
|
+
Validates the integrity of a cs-scientist knowledge base before advancing
|
|
4
|
+
to a gate or critical phase. Checks tag consistency, source completeness,
|
|
5
|
+
circular references, and schema compliance. Returns a structured report
|
|
6
|
+
with PASS/FAIL and a list of violations. Safe to run at any point.
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# kb-validate
|
|
10
|
+
|
|
11
|
+
## Input
|
|
12
|
+
|
|
13
|
+
```
|
|
14
|
+
$ARGUMENTS — path to knowledge_base.md, OR session directory path
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
If $ARGUMENTS is a session directory, look for `knowledge_base.md` inside it.
|
|
18
|
+
|
|
19
|
+
## What you check
|
|
20
|
+
|
|
21
|
+
### 1 — Tag consistency
|
|
22
|
+
|
|
23
|
+
Every item must use exactly one of these tags: `[FACT]`, `[VERIFIED]`, `[HYPOTHESIS]`,
|
|
24
|
+
`[SYNTHESIS]`, `[REFUTED]`, `[DATO]`, `[OPINIÓN]`.
|
|
25
|
+
|
|
26
|
+
Violations:
|
|
27
|
+
- Item with no tag
|
|
28
|
+
- Item with multiple tags
|
|
29
|
+
- Item with a tag not in this list
|
|
30
|
+
- `[VERIFIED]` item with no source citation
|
|
31
|
+
|
|
32
|
+
### 2 — Source completeness
|
|
33
|
+
|
|
34
|
+
Every `[FACT]` and `[VERIFIED]` item must have: title, year, URL (or "experiment_{date}" for experiments).
|
|
35
|
+
|
|
36
|
+
Violations:
|
|
37
|
+
- Missing source on [FACT] or [VERIFIED]
|
|
38
|
+
- Source present but URL missing
|
|
39
|
+
- "et al." or "various sources" as a source (not specific enough)
|
|
40
|
+
|
|
41
|
+
### 3 — Circular references
|
|
42
|
+
|
|
43
|
+
A `[SYNTHESIS]` item cited as evidence for a `[VERIFIED]` item is a circular reference.
|
|
44
|
+
A `[HYPOTHESIS]` used as evidence for another `[HYPOTHESIS]` without noting the chain is a weak chain.
|
|
45
|
+
|
|
46
|
+
Violations:
|
|
47
|
+
- [SYNTHESIS] cited as [VERIFIED] evidence
|
|
48
|
+
- [HYPOTHESIS] chain without explicit "depends on unverified hypothesis" note
|
|
49
|
+
|
|
50
|
+
### 4 — Refuted items still referenced
|
|
51
|
+
|
|
52
|
+
If a `[REFUTED]` claim is cited as evidence anywhere in the KB, it is a contamination.
|
|
53
|
+
|
|
54
|
+
Violations:
|
|
55
|
+
- Any reference to a [REFUTED] item as supporting evidence
|
|
56
|
+
|
|
57
|
+
### 5 — Open Questions coverage
|
|
58
|
+
|
|
59
|
+
If there are claims marked as contradictory but no corresponding Open Question entry, the
|
|
60
|
+
contradiction is silently resolved.
|
|
61
|
+
|
|
62
|
+
Violations:
|
|
63
|
+
- Contradictory sources cited for the same claim, no Open Question registered
|
|
64
|
+
|
|
65
|
+
## Output format
|
|
66
|
+
|
|
67
|
+
```
|
|
68
|
+
KB-VALIDATE: {kb path}
|
|
69
|
+
TIMESTAMP: {ISO8601}
|
|
70
|
+
RESULT: PASS | FAIL
|
|
71
|
+
|
|
72
|
+
VIOLATIONS:
|
|
73
|
+
- [TAG_CONSISTENCY] Line {N}: {description}
|
|
74
|
+
- [SOURCE_COMPLETENESS] "{claim excerpt}": missing {what}
|
|
75
|
+
- [CIRCULAR_REF] "{synthesis item}": cited as evidence for "{verified item}"
|
|
76
|
+
- [REFUTED_CONTAMINATION] "{refuted claim}": still referenced at line {N}
|
|
77
|
+
- [CONTRADICTION_UNREGISTERED] "{claim}": contradictory sources, no Open Question entry
|
|
78
|
+
|
|
79
|
+
STATS:
|
|
80
|
+
- [FACT]: {count}
|
|
81
|
+
- [VERIFIED]: {count}
|
|
82
|
+
- [HYPOTHESIS]: {count}
|
|
83
|
+
- [SYNTHESIS]: {count}
|
|
84
|
+
- [REFUTED]: {count}
|
|
85
|
+
- Open Questions: {count}
|
|
86
|
+
|
|
87
|
+
RECOMMENDATION:
|
|
88
|
+
{one sentence — what to fix before proceeding, or "KB is clean, proceed."}
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
## Integration with cs-scientist
|
|
92
|
+
|
|
93
|
+
Run before any gate dispatch to catch KB issues before the critic sees them.
|
|
94
|
+
If FAIL: fix violations before dispatching to cs-scientist-critic.
|
|
95
|
+
If PASS: proceed — the critic evaluates logic, not format.
|
|
96
|
+
|
|
97
|
+
## NEVER
|
|
98
|
+
|
|
99
|
+
- NEVER modify the KB — read only
|
|
100
|
+
- NEVER pass a KB with [CIRCULAR_REF] or [REFUTED_CONTAMINATION] violations — these are hard failures
|
|
101
|
+
- NEVER report PASS if any violation exists, even minor ones — the user decides what to fix
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: >-
|
|
3
|
+
Lightweight lesson plan generator. Takes a topic, target audience, and
|
|
4
|
+
available time, and produces a structured lesson plan with learning objective,
|
|
5
|
+
concept sequence, and suggested activities. Lighter than the full TEACH mode —
|
|
6
|
+
generates the plan document without running an interactive teaching session.
|
|
7
|
+
Use to prepare materials before a class.
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# lesson-plan
|
|
11
|
+
|
|
12
|
+
## Input
|
|
13
|
+
|
|
14
|
+
```
|
|
15
|
+
$ARGUMENTS — "topic [@ audience] [@ duration]"
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
Examples:
|
|
19
|
+
- `árboles de decisión`
|
|
20
|
+
- `árboles de decisión @ estudiantes de 2do año @ 90 minutos`
|
|
21
|
+
- `gradient descent @ investigadores @ 30 minutos`
|
|
22
|
+
|
|
23
|
+
Audience options: `bachillerato` / `grado` (default) / `máster` / `investigadores` / `profesionales`
|
|
24
|
+
Duration: in minutes (default: 60)
|
|
25
|
+
|
|
26
|
+
## Output format
|
|
27
|
+
|
|
28
|
+
```markdown
|
|
29
|
+
# Plan de Clase: {topic}
|
|
30
|
+
**Audiencia:** {audience} | **Duración:** {N} min | **Fecha:** {today}
|
|
31
|
+
|
|
32
|
+
---
|
|
33
|
+
|
|
34
|
+
## Objetivo de Aprendizaje
|
|
35
|
+
|
|
36
|
+
Al finalizar esta clase, el estudiante podrá:
|
|
37
|
+
{1-2 measurable capabilities — not "understand X", but "solve Y" or "explain Z to someone else"}
|
|
38
|
+
|
|
39
|
+
---
|
|
40
|
+
|
|
41
|
+
## Mapa de Conceptos (de prerequisito a objetivo)
|
|
42
|
+
|
|
43
|
+
{concept} → {concept} → {objective}
|
|
44
|
+
Prerequisitos asumidos: {what students must already know}
|
|
45
|
+
|
|
46
|
+
---
|
|
47
|
+
|
|
48
|
+
## Estructura de la Clase
|
|
49
|
+
|
|
50
|
+
| Bloque | Duración | Actividad | Objetivo del bloque |
|
|
51
|
+
|--------|----------|-----------|---------------------|
|
|
52
|
+
| Apertura | {N} min | {hook — question, problem, or surprising fact} | Activar conocimiento previo |
|
|
53
|
+
| Bloque 1 | {N} min | {core concept 1 — brief description} | {what students can do after} |
|
|
54
|
+
| Bloque 2 | {N} min | {core concept 2} | {capability} |
|
|
55
|
+
| {…} | | | |
|
|
56
|
+
| Verificación | {N} min | {exercise or question type} | Confirmar comprensión |
|
|
57
|
+
| Cierre | {N} min | {summary + forward link} | Consolidar y conectar |
|
|
58
|
+
|
|
59
|
+
Nota: reserva {10% of duration} para preguntas — redistribuye si no hay.
|
|
60
|
+
|
|
61
|
+
---
|
|
62
|
+
|
|
63
|
+
## Actividad de Verificación
|
|
64
|
+
|
|
65
|
+
{1 exercise or question that tests the learning objective}
|
|
66
|
+
Nivel: Tier 2 (aplicación) — el alumno debe usar el concepto, no solo recordarlo
|
|
67
|
+
|
|
68
|
+
Si el tiempo lo permite — Tier 3:
|
|
69
|
+
{1 extension exercise that requires applying the idea to a new context}
|
|
70
|
+
|
|
71
|
+
---
|
|
72
|
+
|
|
73
|
+
## Material de Apoyo Sugerido
|
|
74
|
+
|
|
75
|
+
- Requisito mínimo: {one diagram or visual that makes the core idea clearer}
|
|
76
|
+
- Opcional: {code example / dataset / paper reference}
|
|
77
|
+
|
|
78
|
+
---
|
|
79
|
+
|
|
80
|
+
## Puntos de Confusión Anticipados
|
|
81
|
+
|
|
82
|
+
- {common misconception about this topic} → abordar en {block N}
|
|
83
|
+
|
|
84
|
+
---
|
|
85
|
+
|
|
86
|
+
## Conexión con Clases Adyacentes
|
|
87
|
+
|
|
88
|
+
- Viene de: {previous topic in a typical curriculum}
|
|
89
|
+
- Lleva a: {next topic}
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
## If a cs-scientist TEACH session is active for this topic
|
|
93
|
+
|
|
94
|
+
Prepend:
|
|
95
|
+
```
|
|
96
|
+
[SESIÓN TEACH ACTIVA]
|
|
97
|
+
Este plan se apoya en los conceptos ya mapeados en tu sesión de teach.
|
|
98
|
+
Fuentes cargadas: {source titles from teach session}
|
|
99
|
+
```
|
|
100
|
+
Then derive concept sequence from the session's source KB rather than generating from scratch.
|
|
101
|
+
|
|
102
|
+
## NEVER
|
|
103
|
+
|
|
104
|
+
- NEVER write the full lecture — only the plan
|
|
105
|
+
- NEVER make the learning objective unmeasurable ("entender", "conocer", "apreciar")
|
|
106
|
+
- NEVER omit the verification activity — a class with no verification is not a lesson, it is a presentation
|
|
107
|
+
- NEVER assume prerequisites beyond what the audience level suggests
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: >-
|
|
3
|
+
Documents what was attempted and failed during a cs-scientist session.
|
|
4
|
+
Extracts gate failures, refuted hypotheses, discarded design decisions, and
|
|
5
|
+
abandoned approaches from session files. Negative results are first-class
|
|
6
|
+
scientific findings — they narrow the search space for future attempts.
|
|
7
|
+
Inspired by DeepMind's practice of documenting what did NOT work.
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# negative-results
|
|
11
|
+
|
|
12
|
+
## Input
|
|
13
|
+
|
|
14
|
+
```
|
|
15
|
+
$ARGUMENTS — session directory path, OR empty to scan .cs-scientist/ in current project
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
If $ARGUMENTS is empty:
|
|
19
|
+
1. `git rev-parse --show-toplevel 2>/dev/null || pwd`
|
|
20
|
+
2. List sessions in `{project_root}/.cs-scientist/`
|
|
21
|
+
3. If multiple: ask which one. If one: use it. If none: report no active session.
|
|
22
|
+
|
|
23
|
+
## What you extract
|
|
24
|
+
|
|
25
|
+
### From activity_log.jsonl
|
|
26
|
+
- Every entry with `result: fail` or `result: human_required`
|
|
27
|
+
- Every `gate_return` with failure verdict
|
|
28
|
+
|
|
29
|
+
### From knowledge_base.md
|
|
30
|
+
- All `[REFUTED]` items — claims that were tested and disproven
|
|
31
|
+
- All open questions that were explicitly closed as "unresolvable" in this session
|
|
32
|
+
|
|
33
|
+
### From plan.md (dev sessions only)
|
|
34
|
+
- `[DECISION]` entries with `Alternatives discarded:` — alternatives that were rejected and why
|
|
35
|
+
|
|
36
|
+
### From session_state.json
|
|
37
|
+
- Gate failures recorded in the `gates` object
|
|
38
|
+
- `blocked_reason` if present
|
|
39
|
+
|
|
40
|
+
## Output format
|
|
41
|
+
|
|
42
|
+
```
|
|
43
|
+
NEGATIVE RESULTS — {session_id}
|
|
44
|
+
Fecha: {ISO8601}
|
|
45
|
+
Modo: {research | dev | teach}
|
|
46
|
+
─────────────────────────────────────────────────────────────────
|
|
47
|
+
|
|
48
|
+
## 1. Hipótesis Refutadas
|
|
49
|
+
|
|
50
|
+
{from [REFUTED] KB items}
|
|
51
|
+
- [{REFUTED}] {claim} — Refutado porque: {reason from KB}
|
|
52
|
+
→ Implicación: {what this rules out for future attempts}
|
|
53
|
+
|
|
54
|
+
## 2. Fallos de Gate
|
|
55
|
+
|
|
56
|
+
{from activity_log gate_return failures}
|
|
57
|
+
- {GATE_ID} falló en fase {phase}
|
|
58
|
+
Causa diagnóstica: {FAILURES from critic verbatim}
|
|
59
|
+
Corrección aplicada: {what was done} | Resultado: {outcome}
|
|
60
|
+
|
|
61
|
+
## 3. Enfoques Descartados
|
|
62
|
+
|
|
63
|
+
{from [DECISION] discarded alternatives in dev, or abandoned research angles}
|
|
64
|
+
- Descartado: {approach}
|
|
65
|
+
Razón: {why not}
|
|
66
|
+
Condición de reapertura: {under what circumstances this would become viable again}
|
|
67
|
+
|
|
68
|
+
## 4. Preguntas Abiertas Sin Resolver
|
|
69
|
+
|
|
70
|
+
{open questions from KB that were not answered in this session}
|
|
71
|
+
- {question} — Estado al cierre: {why unresolved}
|
|
72
|
+
Sugerencia para próxima sesión: {where to look}
|
|
73
|
+
|
|
74
|
+
## 5. Bloqueos No Resueltos
|
|
75
|
+
|
|
76
|
+
{if blocked_reason in session_state.json}
|
|
77
|
+
- Bloqueado en: {phase}
|
|
78
|
+
Razón: {blocked_reason verbatim}
|
|
79
|
+
|
|
80
|
+
─────────────────────────────────────────────────────────────────
|
|
81
|
+
RESUMEN
|
|
82
|
+
Hipótesis refutadas: {N} | Fallos de gate: {N} | Enfoques descartados: {N}
|
|
83
|
+
Preguntas sin resolver: {N}
|
|
84
|
+
|
|
85
|
+
VALOR PARA LA PRÓXIMA SESIÓN:
|
|
86
|
+
{1-2 sentences — what the next session should NOT try again, and where to start instead}
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
## Save behavior
|
|
90
|
+
|
|
91
|
+
Ask the user: "¿Guardo esto en `.cs-scientist/{session_id}/negative_results.md`? [S/n]"
|
|
92
|
+
|
|
93
|
+
Default yes. Do not save automatically — the user decides.
|
|
94
|
+
|
|
95
|
+
## NEVER
|
|
96
|
+
|
|
97
|
+
- NEVER infer failures not recorded in the files — only report what is there
|
|
98
|
+
- NEVER present refuted claims as "partially valid" — if [REFUTED], it is refuted
|
|
99
|
+
- NEVER modify KB or session files — read only
|
|
100
|
+
- NEVER omit the "Condición de reapertura" for discarded approaches — it is what makes this useful
|