@codio-ai/opencode-authoring-agent 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/LICENSE +21 -0
- package/README.md +119 -0
- package/bin/codio-authoring-register.js +77 -0
- package/bin/codio-authoring-unregister.js +45 -0
- package/dist/agents/assessment-author.d.ts +3 -0
- package/dist/agents/assessment-author.d.ts.map +1 -0
- package/dist/agents/assessment-author.test.d.ts +2 -0
- package/dist/agents/assessment-author.test.d.ts.map +1 -0
- package/dist/agents/index.d.ts +6 -0
- package/dist/agents/index.d.ts.map +1 -0
- package/dist/agents/index.test.d.ts +2 -0
- package/dist/agents/index.test.d.ts.map +1 -0
- package/dist/agents/orchestrator.d.ts +4 -0
- package/dist/agents/orchestrator.d.ts.map +1 -0
- package/dist/agents/orchestrator.test.d.ts +2 -0
- package/dist/agents/orchestrator.test.d.ts.map +1 -0
- package/dist/agents/outline-architect.d.ts +3 -0
- package/dist/agents/outline-architect.d.ts.map +1 -0
- package/dist/agents/outline-architect.test.d.ts +2 -0
- package/dist/agents/outline-architect.test.d.ts.map +1 -0
- package/dist/agents/page-author.d.ts +3 -0
- package/dist/agents/page-author.d.ts.map +1 -0
- package/dist/agents/page-author.test.d.ts +2 -0
- package/dist/agents/page-author.test.d.ts.map +1 -0
- package/dist/agents/source-ingester.d.ts +3 -0
- package/dist/agents/source-ingester.d.ts.map +1 -0
- package/dist/agents/source-ingester.test.d.ts +2 -0
- package/dist/agents/source-ingester.test.d.ts.map +1 -0
- package/dist/agents/types.d.ts +39 -0
- package/dist/agents/types.d.ts.map +1 -0
- package/dist/agents/types.test.d.ts +2 -0
- package/dist/agents/types.test.d.ts.map +1 -0
- package/dist/agents/validator.d.ts +3 -0
- package/dist/agents/validator.d.ts.map +1 -0
- package/dist/agents/validator.test.d.ts +2 -0
- package/dist/agents/validator.test.d.ts.map +1 -0
- package/dist/config/bedrock-models.d.ts +11 -0
- package/dist/config/bedrock-models.d.ts.map +1 -0
- package/dist/config/index.d.ts +26 -0
- package/dist/config/index.d.ts.map +1 -0
- package/dist/config/index.test.d.ts +2 -0
- package/dist/config/index.test.d.ts.map +1 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +1398 -0
- package/dist/index.test.d.ts +2 -0
- package/dist/index.test.d.ts.map +1 -0
- package/dist/tools/create-assessment.d.ts +310 -0
- package/dist/tools/create-assessment.d.ts.map +1 -0
- package/dist/tools/create-assessment.test.d.ts +2 -0
- package/dist/tools/create-assessment.test.d.ts.map +1 -0
- package/dist/tools/create-page.d.ts +49 -0
- package/dist/tools/create-page.d.ts.map +1 -0
- package/dist/tools/create-page.test.d.ts +2 -0
- package/dist/tools/create-page.test.d.ts.map +1 -0
- package/dist/tools/index.d.ts +62 -0
- package/dist/tools/index.d.ts.map +1 -0
- package/dist/tools/index.test.d.ts +2 -0
- package/dist/tools/index.test.d.ts.map +1 -0
- package/dist/tools/validate-guide.d.ts +17 -0
- package/dist/tools/validate-guide.d.ts.map +1 -0
- package/dist/tools/validate-guide.test.d.ts +2 -0
- package/dist/tools/validate-guide.test.d.ts.map +1 -0
- package/dist/utils/codio-paths.d.ts +13 -0
- package/dist/utils/codio-paths.d.ts.map +1 -0
- package/dist/utils/codio-paths.test.d.ts +2 -0
- package/dist/utils/codio-paths.test.d.ts.map +1 -0
- package/dist/utils/taskid.d.ts +7 -0
- package/dist/utils/taskid.d.ts.map +1 -0
- package/dist/utils/taskid.test.d.ts +2 -0
- package/dist/utils/taskid.test.d.ts.map +1 -0
- package/dist/utils/uuid.d.ts +3 -0
- package/dist/utils/uuid.d.ts.map +1 -0
- package/dist/utils/uuid.test.d.ts +2 -0
- package/dist/utils/uuid.test.d.ts.map +1 -0
- package/package.json +70 -0
- package/src/skills/reference-assessment-types/SKILL.md +309 -0
- package/src/skills/reference-authoring-notes/SKILL.md +297 -0
- package/src/skills/reference-mcq-quality/SKILL.md +56 -0
- package/src/skills/reference-page-flow/SKILL.md +62 -0
- package/src/skills/reference-project-defaults/SKILL.md +80 -0
- package/src/skills/reference-style/SKILL.md +14 -0
- package/src/skills/workflow-add-assessment/SKILL.md +29 -0
- package/src/skills/workflow-add-page/SKILL.md +32 -0
- package/src/skills/workflow-import-source/SKILL.md +31 -0
- package/src/skills/workflow-new-assignment/SKILL.md +69 -0
- package/src/skills/workflow-reorder/SKILL.md +24 -0
- package/src/skills/workflow-revise-page/SKILL.md +30 -0
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: reference-page-flow
|
|
3
|
+
description: Page sequence patterns — intro / objectives / instructional / assessment / conclusion ordering. Use when designing assignment structure or planning page types.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Page flow patterns
|
|
7
|
+
|
|
8
|
+
This reference is loaded by `outline-architect` and `page-author`. It defines standard sequences of page types for common assignment shapes.
|
|
9
|
+
|
|
10
|
+
## Default sequence (apply when user gives no other instruction)
|
|
11
|
+
|
|
12
|
+
1. **Introduction** — sets context, motivation, and what the assignment will cover. Short. No assessment.
|
|
13
|
+
2. **Objectives** — lists what learners will know or be able to do after completing the assignment. One bulleted list, derived from the learning objectives provided at intake.
|
|
14
|
+
3. **Instructional pages** — one or more pages, each focused on one concept or sub-skill. Roughly one LO per page when the assignment is well-decomposed.
|
|
15
|
+
4. **Formative assessment(s)** — embedded MCQs on a dedicated assessment page, OR embedded inline at the end of the relevant instructional page. Single approach per assignment unless the user requests otherwise.
|
|
16
|
+
5. **Conclusion / summary** — reinforces the most important concepts and points to next steps. No assessment.
|
|
17
|
+
|
|
18
|
+
## Variants
|
|
19
|
+
|
|
20
|
+
### Lab-style assignment (heavy hands-on)
|
|
21
|
+
|
|
22
|
+
```
|
|
23
|
+
Introduction → Objectives → Setup page (workspace files) → Walkthrough page(s) → Try-it-yourself page (with custom button) → Assessment → Conclusion
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
Use `2-panels-tree` layout for any page with workspace files; `1-panel` for purely conceptual pages.
|
|
27
|
+
|
|
28
|
+
### Assessment-only assignment (review/quiz)
|
|
29
|
+
|
|
30
|
+
```
|
|
31
|
+
Introduction → Objectives → Assessment page(s) → Conclusion
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
Skip instructional pages entirely.
|
|
35
|
+
|
|
36
|
+
### Multi-chapter assignment
|
|
37
|
+
|
|
38
|
+
Each chapter follows the default sequence internally. The root `index.json` `order` array references chapter folders; each chapter's `index.json` references its pages.
|
|
39
|
+
|
|
40
|
+
## Chaptering rules
|
|
41
|
+
|
|
42
|
+
- Use chapters when the assignment has ≥ 2 distinct topic groupings AND ≥ ~6 pages total.
|
|
43
|
+
- Don't chapter a 3-page assignment. The overhead exceeds the navigational value.
|
|
44
|
+
- Within a chapter, follow the default sequence; the introduction and conclusion can be at the assignment level (outside chapters) or per-chapter, depending on size.
|
|
45
|
+
|
|
46
|
+
## Page type → layout default
|
|
47
|
+
|
|
48
|
+
| Page type | Default layout | Files array |
|
|
49
|
+
|---|---|---|
|
|
50
|
+
| Introduction | `1-panel` | `[]` |
|
|
51
|
+
| Objectives | `1-panel` | `[]` |
|
|
52
|
+
| Instructional (concept only) | `1-panel` | `[]` |
|
|
53
|
+
| Instructional (with code/workspace files) | `2-panels-tree` | `[ { "path": "<file>", "panel": 0, "action": "open" } ]` |
|
|
54
|
+
| Assessment | `1-panel` | `[]` |
|
|
55
|
+
| Conclusion | `1-panel` | `[]` |
|
|
56
|
+
|
|
57
|
+
## When to deviate from defaults
|
|
58
|
+
|
|
59
|
+
The defaults exist to prevent decision fatigue, not to enforce rigidity. Override when:
|
|
60
|
+
- The user provided their own structure — follow theirs.
|
|
61
|
+
- The topic is intrinsically asymmetric (e.g. "one big tutorial then ten exercises" — flatten the instructional bundle, expand the assessment side).
|
|
62
|
+
- The audience profile suggests it (e.g. expert audience needs less introduction; novice audience needs more scaffolding pages).
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: reference-project-defaults
|
|
3
|
+
description: Default field values and sequences for Codio assignments (points, max_attempts, layout defaults).
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Project defaults
|
|
7
|
+
|
|
8
|
+
Apply these defaults unless the user overrides them.
|
|
9
|
+
|
|
10
|
+
## Root index.json defaults
|
|
11
|
+
|
|
12
|
+
```json
|
|
13
|
+
{
|
|
14
|
+
"theme": "light",
|
|
15
|
+
"useSubmitButtons": true,
|
|
16
|
+
"useMarkAsComplete": false,
|
|
17
|
+
"hideMenu": false,
|
|
18
|
+
"allowGuideClose": false,
|
|
19
|
+
"protectLayout": false,
|
|
20
|
+
"suppressPageNumbering": true,
|
|
21
|
+
"collapsedOnStart": false,
|
|
22
|
+
"hideSectionsToggle": false,
|
|
23
|
+
"hideBackToDashboard": false
|
|
24
|
+
}
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
## Page layout defaults
|
|
28
|
+
|
|
29
|
+
- Pages with workspace files: `"layout": "2-panels-tree"`
|
|
30
|
+
- Conceptual pages without files: `"layout": "1-panel"`
|
|
31
|
+
- `"teacherOnly": false` unless the page is instructor-only content
|
|
32
|
+
|
|
33
|
+
## Assessment defaults
|
|
34
|
+
|
|
35
|
+
- `"isRandomized": true` — shuffle answer order
|
|
36
|
+
- `"multipleResponse": false` — single correct answer unless the user requests otherwise
|
|
37
|
+
- `"maxAttemptsCount": 1`
|
|
38
|
+
- `"showGuidanceAfterResponseOption": { "type": "Attempts", "passedFrom": 1 }` — show guidance after first attempt
|
|
39
|
+
- `"showExpectedAnswerOption": { "type": "Always" }`
|
|
40
|
+
- `"points": 20`
|
|
41
|
+
- `"incorrectPoints": 0`
|
|
42
|
+
- `"arePartialPointsAllowed": false`
|
|
43
|
+
- `"guidance"` should contain a brief explanation of why the correct answer is right and why each distractor is wrong, when the topic supports it
|
|
44
|
+
|
|
45
|
+
## Custom buttons
|
|
46
|
+
|
|
47
|
+
- Add process-launch buttons only when the assignment includes runnable code or commands.
|
|
48
|
+
- Do not add section buttons.
|
|
49
|
+
- Use `| terminal` when the program reads standard input.
|
|
50
|
+
- Keep labels short and action-oriented: `Run Code`, `Compile & Run`, `Run Tests`.
|
|
51
|
+
|
|
52
|
+
## Page flow
|
|
53
|
+
|
|
54
|
+
Standard page sequence when not otherwise specified:
|
|
55
|
+
|
|
56
|
+
1. Introduction
|
|
57
|
+
2. Objectives
|
|
58
|
+
3. Instructional content pages (one or more)
|
|
59
|
+
4. Formative assessment page(s)
|
|
60
|
+
5. Conclusion / summary
|
|
61
|
+
|
|
62
|
+
## Formatting
|
|
63
|
+
|
|
64
|
+
- Suppress page numbering in titles (`suppressPageNumbering: true`)
|
|
65
|
+
- Use callout blocks (`|||info`, `|||important`, etc.) for tips, warnings, and key definitions
|
|
66
|
+
- Use fenced code blocks with language labels for all code samples
|
|
67
|
+
- Keep prose clear, direct, and student-friendly
|
|
68
|
+
|
|
69
|
+
## Deliverable
|
|
70
|
+
|
|
71
|
+
- Files are written directly into the live Codio workspace as they are generated.
|
|
72
|
+
- Tooling itself lives in `.guides/secure/codio-authoring-opencode/` (hidden from students).
|
|
73
|
+
|
|
74
|
+
## Interpretation notes
|
|
75
|
+
|
|
76
|
+
- Follow explicit user constraints over these defaults.
|
|
77
|
+
- Do not impose fixed chapter counts, page counts, or word counts unless the user asked for them.
|
|
78
|
+
- Do not impose fixed attempts or feedback timing unless the user asked for them.
|
|
79
|
+
- When the topic is conceptual, do not add custom buttons.
|
|
80
|
+
- When the topic includes programming, add buttons only if they clearly support the learning activity.
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: reference-style
|
|
3
|
+
description: Style guide for codio guide prose — concise sentences, active voice, callout usage, code block conventions, LaTeX math.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Codio guide style
|
|
7
|
+
|
|
8
|
+
- Concise instructional prose. Short sentences. Active voice. Address the learner directly ("you", not "the student").
|
|
9
|
+
- Use callout blocks (`|||info`, `|||important`, `|||warning`, `|||definition`) for tips, warnings, and key definitions — not as decoration.
|
|
10
|
+
- Fenced code blocks always include a language label.
|
|
11
|
+
- Use LaTeX (`$...$` inline, `$$...$$` block) for math.
|
|
12
|
+
- Suppress page numbering in titles.
|
|
13
|
+
- Cross-page references use the page title verbatim (not "previous/next page" — page order can change).
|
|
14
|
+
- No filler ("In this section, we will explore…"). Get to the point.
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: workflow-add-assessment
|
|
3
|
+
description: Use when the user wants to add one or more assessments to an existing page (multiple-choice / code-output-compare / fill-in-the-blanks). Example intents — "add an MCQ about X", "add a coding exercise on Y", "add 3 questions on W", "add a fill-in-the-blanks question". Needs type + topic + target page.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Workflow: add-assessment
|
|
7
|
+
|
|
8
|
+
Add one or more assessments to an existing page.
|
|
9
|
+
|
|
10
|
+
## Intake
|
|
11
|
+
|
|
12
|
+
Confirm:
|
|
13
|
+
1. **Assessment type** — `multiple-choice`, `code-output-compare`, or `fill-in-the-blanks`. If the user says only "add a question," ask which type.
|
|
14
|
+
2. **Topic / focus** — what the assessment(s) should test.
|
|
15
|
+
3. **Target page stem**.
|
|
16
|
+
4. **Count** — default 3 for MCQ; 1 for code test / FITB.
|
|
17
|
+
|
|
18
|
+
## Steps
|
|
19
|
+
|
|
20
|
+
1. Read the target page's `.md` for context.
|
|
21
|
+
2. Dispatch `@assessment-author` (parallel when count ≥ 2) with type, topic, LO (read from the page's JSON), and count.
|
|
22
|
+
3. For each returned payload: call `create_assessment` → splice the returned `embedLine` into the page markdown.
|
|
23
|
+
4. If 2+ embeds and the page doesn't already have a "Check your understanding" heading, add one and group the embeds under it.
|
|
24
|
+
5. **Skip auto-validation** — low risk for a focused add.
|
|
25
|
+
|
|
26
|
+
## Rules
|
|
27
|
+
|
|
28
|
+
- Auto-run when type + topic + target are clear.
|
|
29
|
+
- When count ≥ 2, fan out `@assessment-author` calls in parallel.
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: workflow-add-page
|
|
3
|
+
description: Use when the user wants to add one new page to an existing Codio assignment. Example intents — "add a page on X", "write a page titled Y in chapter Z", "add an instructional page about W". Needs title + parent (root or chapter folder).
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Workflow: add-page
|
|
7
|
+
|
|
8
|
+
Add a single page to an existing assignment.
|
|
9
|
+
|
|
10
|
+
## Intake
|
|
11
|
+
|
|
12
|
+
Confirm:
|
|
13
|
+
1. **Title**
|
|
14
|
+
2. **Parent** — root or the chapter folder name (if assignment is single-chapter, default to the chapter unless told root).
|
|
15
|
+
3. **Type** — `intro`, `objectives`, `instructional`, `assessment`, or `conclusion`. Default `instructional`.
|
|
16
|
+
4. **Layout** — `1-panel` or `2-panels-tree`. Default `1-panel`; if `2-panels-tree`, ask for `files`.
|
|
17
|
+
5. **Learning objective(s)** — at least one. If the user defers, propose candidates and confirm.
|
|
18
|
+
6. **Body brief** — bullets of what the page should cover.
|
|
19
|
+
|
|
20
|
+
## Steps
|
|
21
|
+
|
|
22
|
+
1. Generate stem (kebab-slug of title + 4-hex).
|
|
23
|
+
2. Read parent's `index.json` to confirm the page doesn't collide; note current `order`.
|
|
24
|
+
3. Dispatch `@page-author` (draft mode) with the brief.
|
|
25
|
+
4. Call `create_page` with the returned body + metadata.
|
|
26
|
+
5. Update parent `index.json` — append the new stem to `order` using the edit tool.
|
|
27
|
+
6. **Skip auto-validation** — single-page add is low-risk. User can run `/validate-guide` manually.
|
|
28
|
+
|
|
29
|
+
## Rules
|
|
30
|
+
|
|
31
|
+
- Auto-run when title + parent are clear.
|
|
32
|
+
- If type or LO is missing, ask inline. Do not bounce to a different workflow.
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: workflow-import-source
|
|
3
|
+
description: Use when the user provides source material (file path, URL, or paste) and wants pages built from it. Example intents — "import this material", "ingest <path or URL>", "use this source to build pages". Default materials location is `.guides/secure/materials/`.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Workflow: import-source
|
|
7
|
+
|
|
8
|
+
Ingest source material and build pages from it.
|
|
9
|
+
|
|
10
|
+
## Intake
|
|
11
|
+
|
|
12
|
+
Confirm:
|
|
13
|
+
1. **Source** — path (default lookup under `.guides/secure/materials/` if relative), URL, or paste.
|
|
14
|
+
2. **Scope** — building a fresh assignment, or appending pages to an existing one?
|
|
15
|
+
3. **Focus** (optional) — concepts, examples, exercises.
|
|
16
|
+
|
|
17
|
+
## Steps (fresh assignment)
|
|
18
|
+
|
|
19
|
+
Run `workflow-new-assignment`, but in Stage 2 dispatch `@source-ingester` with the source. The digest feeds Stage 3 (`@outline-architect`).
|
|
20
|
+
|
|
21
|
+
## Steps (appending)
|
|
22
|
+
|
|
23
|
+
1. Dispatch `@source-ingester` with the source.
|
|
24
|
+
2. Show the digest to the user. Ask which pages they want to add (or have `@outline-architect` propose additions, with approval).
|
|
25
|
+
3. For each new page: run `workflow-add-page` (intake skipped — you already have the brief).
|
|
26
|
+
4. Auto-run `validate_guide` at the end (multi-page change).
|
|
27
|
+
|
|
28
|
+
## Rules
|
|
29
|
+
|
|
30
|
+
- Outline gate applies to fresh-assignment branch (delegated to `workflow-new-assignment`).
|
|
31
|
+
- Appending branch confirms additions in one batch before writing.
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: workflow-new-assignment
|
|
3
|
+
description: Use when the user wants to start a new Codio assignment from scratch — building it from intake (topic, audience, LOs) through outline approval, scaffolding, page drafting, assessments, and validation. Example intents — "start a new assignment about X", "build a guide on Y", "create a course on Z". Assignments are flat or single-chapter only.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Workflow: new-assignment
|
|
7
|
+
|
|
8
|
+
End-to-end pipeline for authoring a new Codio assignment. Single approval gate at outline. Drives the full staged pipeline; after approval, runs end-to-end.
|
|
9
|
+
|
|
10
|
+
## Stage 1: Intake
|
|
11
|
+
|
|
12
|
+
Ask for (do not skip even if the user's first message had some of these):
|
|
13
|
+
|
|
14
|
+
1. **Topic**
|
|
15
|
+
2. **Audience** — level, prior knowledge.
|
|
16
|
+
3. **Learning objectives** — if the user has none, say so; `@outline-architect` will propose candidates.
|
|
17
|
+
4. **Structural constraints** — page count, assessment count, anything fixed. Note: assignment is flat or single-chapter.
|
|
18
|
+
5. **Source materials** — file path under `.guides/secure/materials/`, URL, or paste. If none, note "design from scratch."
|
|
19
|
+
|
|
20
|
+
Detect existing assignment: if `.guides/content/index.json` exists with non-empty `order`, this is **not** a new assignment. Tell the user; ask whether they want to import additional source material (append), revise an existing page, or add new pages — then route to the matching workflow skill. Stop the new-assignment workflow.
|
|
21
|
+
|
|
22
|
+
## Stage 2: Source ingestion (conditional)
|
|
23
|
+
|
|
24
|
+
If the user provided materials, dispatch `@source-ingester` with each. Collect the digest(s). Otherwise skip.
|
|
25
|
+
|
|
26
|
+
## Stage 3: Outline
|
|
27
|
+
|
|
28
|
+
Dispatch `@outline-architect` with topic, audience, LOs, structural constraints, and any source digests. The architect returns a markdown outline (flat or single-chapter).
|
|
29
|
+
|
|
30
|
+
**APPROVAL GATE.** Show the outline to the user. Iterate. Do not proceed until the user approves.
|
|
31
|
+
|
|
32
|
+
## Stage 4: Mechanical scaffolding
|
|
33
|
+
|
|
34
|
+
Once approved:
|
|
35
|
+
|
|
36
|
+
1. Generate stems (kebab-slug + 4-hex) for every page (and the chapter folder, if single-chapter).
|
|
37
|
+
2. Build a planning map: `{ stem → { title, type, layout, lo, parent (root or chapter folder), needs_assessment, mcq_topic } }`.
|
|
38
|
+
3. Write `.guides/content/index.json` with title, defaults (see `reference-project-defaults` skill), and the root-level `order` (chapter folder + any non-chaptered pages, in order).
|
|
39
|
+
4. If single-chapter: create `.guides/content/<chapter-folder>/index.json` with its own `order`.
|
|
40
|
+
|
|
41
|
+
## Stage 5: Fan-out drafting
|
|
42
|
+
|
|
43
|
+
Dispatch `@page-author` (draft mode) **in parallel** — one call per page. Each call gets stem, title, type, layout, LO(s), body brief, and `assignment_context`.
|
|
44
|
+
|
|
45
|
+
Each `@page-author` returns body+metadata. You call `create_page` for each. No assessment embeds yet.
|
|
46
|
+
|
|
47
|
+
## Stage 6: Assessments
|
|
48
|
+
|
|
49
|
+
For each page flagged `needs_assessment`, dispatch `@assessment-author` (parallel when ≥2). Default `assessment_type: multiple-choice` unless the outline says otherwise; pass the page's LO, inferred topic, body for context, and `count` (default 3 for MCQ; usually 1 for code test / FITB).
|
|
50
|
+
|
|
51
|
+
After each return, call `create_assessment` with the payload, then splice the returned `embedLine` into the corresponding page markdown using the edit tool. Group multiple embeds under `## Check your understanding`.
|
|
52
|
+
|
|
53
|
+
## Stage 7: Validation
|
|
54
|
+
|
|
55
|
+
Call the `validate_guide` tool. If structural findings exist, surface them.
|
|
56
|
+
|
|
57
|
+
Optionally dispatch `@validator` for content review. If the validator flags content-quality issues, present them and pause. The user can ask you to address each — route via the relevant workflow skill (`workflow-revise-page` or `workflow-add-assessment`).
|
|
58
|
+
|
|
59
|
+
## Stage 8: Done
|
|
60
|
+
|
|
61
|
+
Summarize: title, page count (and chapter, if any), assessment count, validation status, suggested next actions.
|
|
62
|
+
|
|
63
|
+
## Rules
|
|
64
|
+
|
|
65
|
+
- Only ONE approval gate — Stage 3.
|
|
66
|
+
- Never write to `.guides/content/` or `.guides/assessments/` before Stage 3 is passed.
|
|
67
|
+
- Parallelism only within Stages 5 and 6.
|
|
68
|
+
- If any subagent or tool call fails, surface and stop. Do not silently continue.
|
|
69
|
+
- Assignment is flat or single-chapter. Never propose multi-chapter.
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: workflow-reorder
|
|
3
|
+
description: Use when the user wants to change page or section ordering. Example intents — "reorder X", "move chapter Y before Z", "rearrange pages". Always confirm new position before writing. Modifies `order` arrays in index.json.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Workflow: reorder
|
|
7
|
+
|
|
8
|
+
Change page or section ordering.
|
|
9
|
+
|
|
10
|
+
## Intake
|
|
11
|
+
|
|
12
|
+
Confirm in one sentence: "Moving <X> to position <N> in <parent>. Proceed?" Wait for the user to confirm or correct.
|
|
13
|
+
|
|
14
|
+
## Steps
|
|
15
|
+
|
|
16
|
+
1. Read the relevant `index.json` (root or chapter folder).
|
|
17
|
+
2. Update the `order` array using the edit tool.
|
|
18
|
+
3. If reordering touches multiple parents (e.g. moving a page out of the chapter to root), update both index files.
|
|
19
|
+
4. Auto-run `validate_guide` (touches `order` arrays — exactly what the validator checks).
|
|
20
|
+
|
|
21
|
+
## Rules
|
|
22
|
+
|
|
23
|
+
- **Always confirm.** Restate the new position before writing.
|
|
24
|
+
- Auto-validate after every reorder.
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: workflow-revise-page
|
|
3
|
+
description: Use when the user wants to edit an existing page — surgical changes to prose, examples, or callouts. Example intents — "revise the page on X", "rewrite the section about Y", "edit the page about Z". Auto-runs for additive edits; confirms before prose-overwriting changes.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Workflow: revise-page
|
|
7
|
+
|
|
8
|
+
Edit an existing page.
|
|
9
|
+
|
|
10
|
+
## Intake
|
|
11
|
+
|
|
12
|
+
Confirm:
|
|
13
|
+
1. **Page stem**.
|
|
14
|
+
2. **Change** — description of what to modify (free-form). Categorize:
|
|
15
|
+
- **Additive** — append/insert (e.g. "add a worked example", "add a note about edge cases"). Auto-run.
|
|
16
|
+
- **Surgical replacement** — replace a paragraph or section. Restate ("I'll replace the second paragraph with ..."), then proceed unless corrected.
|
|
17
|
+
- **Wholesale rewrite** — if the change amounts to a rewrite, ask whether to switch to draft mode (start the page over) instead.
|
|
18
|
+
|
|
19
|
+
## Steps
|
|
20
|
+
|
|
21
|
+
1. Dispatch `@page-author` (revise mode) with `stem` and `change`.
|
|
22
|
+
2. `@page-author` reads the existing `.md`, applies the smallest contiguous edit, and returns a one-line summary.
|
|
23
|
+
3. If the change requires a new assessment embed, do NOT splice it here — `@page-author` returns the request, and you dispatch `workflow-add-assessment` for that page.
|
|
24
|
+
4. **Skip auto-validation** — surgical edit; validator likely has nothing to flag.
|
|
25
|
+
|
|
26
|
+
## Rules
|
|
27
|
+
|
|
28
|
+
- Auto-run additive edits.
|
|
29
|
+
- Restate replacements; proceed unless corrected.
|
|
30
|
+
- Bounce wholesale rewrites back to the user for explicit confirmation before switching to draft mode.
|