fito-tui 0.2.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/README.md +88 -0
- package/agents/fito-case-source-planner.md +265 -0
- package/agents/fito-performance-reviewer.md +231 -0
- package/agents/fito-practice-concept-content-generator.md +318 -0
- package/agents/fito-practice-concept-identifier.md +482 -0
- package/agents/fito-practice-execution-fact-content-generator.md +299 -0
- package/agents/fito-practice-execution-fact-identifier.md +367 -0
- package/agents/fito-practice-usage-scenario-content-generator.md +331 -0
- package/agents/fito-practice-usage-scenario-identifier.md +397 -0
- package/agents/fito-subagent-selftest.md +27 -0
- package/agents/fito-technology-generator.md +207 -0
- package/agents/fito-tool-concept-content-generator.md +282 -0
- package/agents/fito-tool-concept-identifier.md +384 -0
- package/agents/fito-tool-execution-fact-content-generator.md +382 -0
- package/agents/fito-tool-execution-fact-identifier.md +360 -0
- package/agents/fito-tool-usage-scenario-content-generator.md +381 -0
- package/agents/fito-tool-usage-scenario-identifier.md +432 -0
- package/agents/fito-tutor.md +185 -0
- package/extensions/fito-delegate.js +539 -0
- package/extensions/fito-delegate.ts +691 -0
- package/extensions/fito-fetch-tools.js +380 -0
- package/extensions/fito-fetch-tools.ts +419 -0
- package/extensions/fito-startup.js +166 -0
- package/extensions/fito-startup.ts +188 -0
- package/package.json +56 -0
- package/prompts/fito-auth-refresh.md +15 -0
- package/prompts/fito-case-design.md +506 -0
- package/prompts/fito-case-edit.md +91 -0
- package/prompts/fito-case-generate.md +222 -0
- package/prompts/fito-case-open.md +124 -0
- package/prompts/fito-case-plan-source.md +114 -0
- package/prompts/fito-create-or-update-competence.md +261 -0
- package/prompts/fito-create-or-update-technology.md +199 -0
- package/prompts/fito-delete-competence.md +147 -0
- package/prompts/fito-evaluate.md +148 -0
- package/prompts/fito-fetch-urls-content.md +35 -0
- package/prompts/fito-generate-domain-concepts.md +85 -0
- package/prompts/fito-generate-execution-facts.md +85 -0
- package/prompts/fito-generate-usage-scenarios.md +85 -0
- package/prompts/fito-identify-domain-concepts.md +49 -0
- package/prompts/fito-identify-execution-facts.md +49 -0
- package/prompts/fito-identify-usage-scenarios.md +49 -0
- package/prompts/fito-login.md +21 -0
- package/prompts/fito-logout.md +14 -0
- package/prompts/fito-publish-case.md +266 -0
- package/prompts/fito-push-knowledge.md +84 -0
- package/prompts/fito-submit.md +208 -0
- package/prompts/fito-tutor.md +120 -0
- package/shared/case-briefing/briefing.js +221 -0
- package/shared/case-briefing/briefing.ts +261 -0
- package/shared/case-quiz/scoring.js +16 -0
- package/shared/case-quiz/scoring.ts +61 -0
- package/shared/case-validation/case-loader.js +88 -0
- package/shared/case-validation/case-loader.ts +106 -0
- package/shared/case-validation/case-schema.js +716 -0
- package/shared/case-validation/case-schema.ts +895 -0
- package/shared/competences/competence-list.js +29 -0
- package/shared/competences/competence-list.ts +32 -0
- package/shared/fito-api/README.md +192 -0
- package/shared/fito-api/client.js +731 -0
- package/shared/fito-api/client.ts +1426 -0
- package/shared/fito-session/credentials.js +79 -0
- package/shared/fito-session/credentials.ts +88 -0
- package/shared/fito-session/session.js +16 -0
- package/shared/fito-session/session.ts +35 -0
- package/shared/github-url/parse.js +26 -0
- package/shared/github-url/parse.ts +35 -0
- package/shared/knowledge-components/component-names.js +35 -0
- package/shared/knowledge-components/component-names.ts +39 -0
- package/shared/knowledge-components/knowledge-fetch.js +46 -0
- package/shared/knowledge-components/knowledge-fetch.ts +57 -0
- package/shared/knowledge-components/knowledge-search.js +101 -0
- package/shared/knowledge-components/knowledge-search.ts +144 -0
- package/shared/knowledge-components/push-payload.js +104 -0
- package/shared/knowledge-components/push-payload.ts +129 -0
- package/shared/knowledge-components/reference.js +24 -0
- package/shared/knowledge-components/reference.ts +43 -0
- package/shared/knowledge-components/technology-fetch.js +30 -0
- package/shared/knowledge-components/technology-fetch.ts +38 -0
- package/shared/shell-exec/exec.js +22 -0
- package/shared/shell-exec/exec.ts +46 -0
- package/skills/fito-auth/SKILL.md +68 -0
- package/skills/fito-auth/auth-refresh.js +23 -0
- package/skills/fito-auth/auth-refresh.ts +25 -0
- package/skills/fito-auth/browser.js +35 -0
- package/skills/fito-auth/browser.ts +57 -0
- package/skills/fito-auth/callback-server.js +152 -0
- package/skills/fito-auth/callback-server.ts +189 -0
- package/skills/fito-auth/login.js +37 -0
- package/skills/fito-auth/login.ts +42 -0
- package/skills/fito-auth/logout.js +24 -0
- package/skills/fito-auth/logout.ts +25 -0
- package/skills/fito-case-author/SKILL.md +179 -0
- package/skills/fito-case-author/checkout.js +222 -0
- package/skills/fito-case-author/checkout.ts +281 -0
- package/skills/fito-case-author/github-publish.js +218 -0
- package/skills/fito-case-author/github-publish.ts +251 -0
- package/skills/fito-case-author/publish-payload.js +108 -0
- package/skills/fito-case-author/publish-payload.ts +186 -0
- package/skills/fito-case-author/publish-state.js +72 -0
- package/skills/fito-case-author/publish-state.ts +87 -0
- package/skills/fito-case-author/publish-version.js +364 -0
- package/skills/fito-case-author/publish-version.ts +495 -0
- package/skills/fito-case-author/publish.js +284 -0
- package/skills/fito-case-author/publish.ts +394 -0
- package/skills/fito-case-author/semver.js +55 -0
- package/skills/fito-case-author/semver.ts +63 -0
- package/skills/fito-case-author/status-gate.js +34 -0
- package/skills/fito-case-author/status-gate.ts +54 -0
- package/skills/fito-case-author/validate.js +62 -0
- package/skills/fito-case-author/validate.ts +64 -0
- package/skills/fito-case-runner/SKILL.md +119 -0
- package/skills/fito-case-runner/case-component-names.js +45 -0
- package/skills/fito-case-runner/case-component-names.ts +65 -0
- package/skills/fito-case-runner/case-detail.js +20 -0
- package/skills/fito-case-runner/case-detail.ts +20 -0
- package/skills/fito-case-runner/github.js +234 -0
- package/skills/fito-case-runner/github.ts +287 -0
- package/skills/fito-case-runner/manifest.js +56 -0
- package/skills/fito-case-runner/manifest.ts +73 -0
- package/skills/fito-case-runner/open.js +175 -0
- package/skills/fito-case-runner/open.ts +241 -0
- package/skills/fito-case-runner/report.js +22 -0
- package/skills/fito-case-runner/report.ts +24 -0
- package/skills/fito-case-runner/runner.js +158 -0
- package/skills/fito-case-runner/runner.ts +304 -0
- package/skills/fito-case-runner/score-quiz-mc.js +85 -0
- package/skills/fito-case-runner/score-quiz-mc.ts +99 -0
- package/skills/fito-case-runner/submit-evaluation.js +73 -0
- package/skills/fito-case-runner/submit-evaluation.ts +98 -0
- package/skills/fito-case-runner/submit-quiz-result.js +75 -0
- package/skills/fito-case-runner/submit-quiz-result.ts +100 -0
- package/skills/fito-case-runner/submit.js +85 -0
- package/skills/fito-case-runner/submit.ts +111 -0
- package/skills/fito-case-runner/workdir.js +10 -0
- package/skills/fito-case-runner/workdir.ts +11 -0
- package/skills/fito-competence-write/SKILL.md +155 -0
- package/skills/fito-competence-write/create.js +64 -0
- package/skills/fito-competence-write/create.ts +80 -0
- package/skills/fito-competence-write/delete.js +136 -0
- package/skills/fito-competence-write/delete.ts +166 -0
- package/skills/fito-competence-write/display.js +20 -0
- package/skills/fito-competence-write/display.ts +21 -0
- package/skills/fito-competence-write/payload.js +96 -0
- package/skills/fito-competence-write/payload.ts +115 -0
- package/skills/fito-competence-write/update.js +155 -0
- package/skills/fito-competence-write/update.ts +206 -0
- package/skills/fito-evaluator/SKILL.md +73 -0
- package/skills/fito-evaluator/criterion-exec.js +64 -0
- package/skills/fito-evaluator/criterion-exec.ts +73 -0
- package/skills/fito-evaluator/evaluate-automated.js +57 -0
- package/skills/fito-evaluator/evaluate-automated.ts +84 -0
- package/skills/fito-evaluator/evaluate.js +28 -0
- package/skills/fito-evaluator/evaluate.ts +86 -0
- package/skills/fito-evaluator/report.js +112 -0
- package/skills/fito-evaluator/report.ts +128 -0
- package/skills/fito-evaluator/rubric.js +90 -0
- package/skills/fito-evaluator/rubric.ts +170 -0
- package/skills/fito-knowledge-push/SKILL.md +114 -0
- package/skills/fito-knowledge-push/push.js +282 -0
- package/skills/fito-knowledge-push/push.ts +360 -0
- package/skills/fito-source-ingestion/SKILL.md +77 -0
- package/skills/fito-source-ingestion/authoring-check.js +128 -0
- package/skills/fito-source-ingestion/authoring-check.ts +155 -0
- package/skills/fito-source-ingestion/bundle.js +198 -0
- package/skills/fito-source-ingestion/bundle.ts +246 -0
- package/skills/fito-technology-write/SKILL.md +108 -0
- package/skills/fito-technology-write/create.js +134 -0
- package/skills/fito-technology-write/create.ts +161 -0
- package/skills/fito-technology-write/payload.js +64 -0
- package/skills/fito-technology-write/payload.ts +70 -0
- package/skills/fito-technology-write/update.js +122 -0
- package/skills/fito-technology-write/update.ts +171 -0
- package/skills/fito-url-content-fetcher/SKILL.md +213 -0
- package/templates/concept-practice-content-template.md +281 -0
- package/templates/concept-tool-content-template.md +207 -0
- package/templates/execution-fact-practice-content-template.md +372 -0
- package/templates/execution-fact-tool-content-template.md +307 -0
- package/templates/usage-scenario-content-template.md +248 -0
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Preview your Fito case evaluation — score the rubric (automated, ai, hybrid) locally, before submitting
|
|
3
|
+
argument-hint: "<case-id>"
|
|
4
|
+
---
|
|
5
|
+
The learner wants a **preview** of how their work on the Fito case `$1` scores —
|
|
6
|
+
a local dry run, **before** submitting. Drive the flow below.
|
|
7
|
+
|
|
8
|
+
If no case id was given, ask the learner for it first — the case's UUID, the same
|
|
9
|
+
id they opened with `/fito-case-open` — and don't run anything until you have it.
|
|
10
|
+
|
|
11
|
+
This is a preview only: it runs the case's rubric checks — `automated`, `ai`, and
|
|
12
|
+
`hybrid` — against the learner's local checkout and shows the scores. It does
|
|
13
|
+
**not** push, open a PR, record a submission, or write anything to the backend.
|
|
14
|
+
Submitting for real (which also records the evaluation) is `/fito-submit`.
|
|
15
|
+
|
|
16
|
+
## 1. Build the evaluation report
|
|
17
|
+
|
|
18
|
+
Use the `fito-evaluator` skill (read its `SKILL.md`), then run:
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
node <fito-evaluator skill dir>/evaluate-automated.js $1
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
Stream the output. In `~/.fito/cases/$1/` it runs the automated criteria's commands
|
|
25
|
+
and the hybrid criteria's gate commands, and prints one **evaluation report**: the
|
|
26
|
+
automated evidence, the `ai` criteria + their prompt hints, the `hybrid` gate
|
|
27
|
+
evidence, and any `human` criteria under **Needs human review**.
|
|
28
|
+
|
|
29
|
+
- If it reports **no open case** at `~/.fito/cases/$1/`, the case was never opened
|
|
30
|
+
(or the checkout was moved) — point the learner at `/fito-case-open $1` and stop.
|
|
31
|
+
- If the report has **no scorable criteria** (nothing automated, ai, or hybrid),
|
|
32
|
+
there is no rubric to preview — skip the rubric steps (2–3) and go straight to
|
|
33
|
+
the quiz (step 4). If there is also no `~/.fito/cases/$1/.case/quiz.yaml`, tell
|
|
34
|
+
the learner there is nothing to preview and stop.
|
|
35
|
+
|
|
36
|
+
**Done when** you have the printed evaluation report (or you stopped for one of the
|
|
37
|
+
cases above).
|
|
38
|
+
|
|
39
|
+
## 2. Score the report
|
|
40
|
+
|
|
41
|
+
Delegate to the `fito-performance-reviewer` **subagent** via the `fito_delegate`
|
|
42
|
+
tool. Hand it **both**:
|
|
43
|
+
|
|
44
|
+
- the **full evaluation report** from step 1 (automated evidence, the `ai` criteria
|
|
45
|
+
+ prompt hints, and the `hybrid` gate evidence), and
|
|
46
|
+
- the **case checkout path** `~/.fito/cases/$1/`, which it needs to score the `ai`
|
|
47
|
+
and `hybrid` criteria from the learner's actual changes.
|
|
48
|
+
|
|
49
|
+
It returns a 0–3 score (or a needs-human-review marker for `human` criteria), the
|
|
50
|
+
matching level, and a justification per criterion. Do not score anything yourself —
|
|
51
|
+
hand it to the subagent.
|
|
52
|
+
|
|
53
|
+
This delegation blocks — you read the child's summary from the tool result.
|
|
54
|
+
|
|
55
|
+
**Done when** the subagent has returned a result for every rubric criterion.
|
|
56
|
+
|
|
57
|
+
## 3. Show the learner where they stand
|
|
58
|
+
|
|
59
|
+
First, resolve each scored component's canonical **name**. Collect the distinct
|
|
60
|
+
`knowledgeComponent` ids from the subagent's results, then — using the
|
|
61
|
+
`fito-case-runner` skill (read its `SKILL.md`) — run:
|
|
62
|
+
|
|
63
|
+
```bash
|
|
64
|
+
node <fito-case-runner skill dir>/case-component-names.js $1 <component-id...>
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
passing those ids. It prints one `<id>\t<label>` line per id, where `<label>` is
|
|
68
|
+
`name (id)` for a component the case declares as a learning objective or prerequisite, or
|
|
69
|
+
the bare id otherwise (`GET /cases/{id}` is public — no login needed, consistent with this
|
|
70
|
+
preview). Build an id→label map from its output.
|
|
71
|
+
|
|
72
|
+
If that command fails (for example the backend is unreachable), do **not** block the
|
|
73
|
+
preview — name resolution is additive. Relay the summary with the bare component ids
|
|
74
|
+
instead, and add a brief note that the component names could not be resolved (the
|
|
75
|
+
backend may be unavailable).
|
|
76
|
+
|
|
77
|
+
Then relay the subagent's **learner-facing summary** — one block per criterion: the
|
|
78
|
+
criterion, its knowledge component **labeled by name** (replace the bare
|
|
79
|
+
`knowledgeComponent` id with its label from the map; fall back to the id if absent),
|
|
80
|
+
its Bloom level, the score (`<n>/3` + label), the proficiency the score maps to, the
|
|
81
|
+
`/knowledge/...` link, and the one-sentence justification. Make each link clickable by
|
|
82
|
+
prefixing it with the web origin — read `$FITO_WEB_ORIGIN` (`echo $FITO_WEB_ORIGIN`),
|
|
83
|
+
falling back to `http://localhost:5173` if it is unset. Because this is a preview,
|
|
84
|
+
frame the proficiency as **what a submission would record** — not as already on their
|
|
85
|
+
profile. Where an `automated` criterion scored below 3, surface the captured
|
|
86
|
+
stdout/stderr from the report so the learner sees **why**.
|
|
87
|
+
|
|
88
|
+
If any criterion came back as **needs human review** (a `human` evaluation
|
|
89
|
+
method), tell the learner it can't be scored locally and needs a human reviewer —
|
|
90
|
+
so they know that part of the picture is still open.
|
|
91
|
+
|
|
92
|
+
**Done when** every criterion's score is shown (the preview reminder comes after
|
|
93
|
+
the quiz, in step 4).
|
|
94
|
+
|
|
95
|
+
## 4. Practice the quiz (if the case has one)
|
|
96
|
+
|
|
97
|
+
If `~/.fito/cases/$1/.case/quiz.yaml` exists, the case has a knowledge-check quiz.
|
|
98
|
+
Administer it as a **practice run** — nothing here is recorded. If the file is
|
|
99
|
+
absent, skip this step.
|
|
100
|
+
|
|
101
|
+
1. **Present the quiz, hiding the answer key.** Read `.case/quiz.yaml` and walk the
|
|
102
|
+
learner through each question in order, showing only its `prompt` and (for a
|
|
103
|
+
`multiple_choice` question) its `choices` (id + text). **Never reveal a
|
|
104
|
+
question's `answer` or its `evaluation.prompt_hint`** — those are the answer key,
|
|
105
|
+
for scoring only. Collect the learner's `multiple_choice` answers as a
|
|
106
|
+
`{ "<questionId>": "<choiceId>" }` map, and hold their `short_answer` /
|
|
107
|
+
`code_snippet` answers for the reviewer.
|
|
108
|
+
2. **Score the `multiple_choice` questions in code.** Write the MC answers map to a
|
|
109
|
+
temp file (e.g. `$(mktemp)`) and, using the `fito-case-runner` skill (read its
|
|
110
|
+
`SKILL.md`), run:
|
|
111
|
+
|
|
112
|
+
```bash
|
|
113
|
+
node <fito-case-runner skill dir>/score-quiz-mc.js $1 <answers-file>
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
Capture its JSON array of scored `multiple_choice` questions. (If the quiz has no
|
|
117
|
+
`multiple_choice` questions it prints `[]`.)
|
|
118
|
+
3. **Score the `short_answer` / `code_snippet` questions via the reviewer.** If the
|
|
119
|
+
quiz has any, delegate to the `fito-performance-reviewer` **subagent** via
|
|
120
|
+
the `fito_delegate` tool, handing it the **case checkout path**
|
|
121
|
+
`~/.fito/cases/$1/` (it reads `.case/quiz.yaml` — including the `evaluation`
|
|
122
|
+
block — itself) and the **learner's answers** to those questions, keyed by
|
|
123
|
+
question id. It returns a 0–3 score (or a needs-human-review marker) and a
|
|
124
|
+
justification per question. Do not score anything yourself. This delegation
|
|
125
|
+
blocks — you read the child's summary from the tool result.
|
|
126
|
+
4. **Show the combined result.** Merge the code-scored (step 2) and reviewer-scored
|
|
127
|
+
(step 3) questions and relay one block per question: the prompt, the result, the
|
|
128
|
+
knowledge component(s) it tests with their Bloom level, the proficiency a
|
|
129
|
+
submission would record, and the justification. Frame each result as **what a
|
|
130
|
+
submission would record**, not as already on their profile. Because this is a
|
|
131
|
+
preview, **record nothing** — do not call any submit script.
|
|
132
|
+
|
|
133
|
+
**Show a `multiple_choice` result as met or not met, never as `<n>/3`.** It scores
|
|
134
|
+
2 when correct and 0 when wrong or blank, so `2/3` would show a right answer as a
|
|
135
|
+
lost point. Show an open-ended question's score as `<n>/3` — it can reach 3. A
|
|
136
|
+
submission records the question's *target Bloom level* at score 2 or 3, and
|
|
137
|
+
`NOT_ACHIEVED` at 0 or 1. For example: *"Correct — a submission would record
|
|
138
|
+
KNOWLEDGE."*, *"Incorrect — a submission would record NOT_ACHIEVED."*, *"2/3 — met;
|
|
139
|
+
a submission would record COMPREHENSION."*
|
|
140
|
+
|
|
141
|
+
Then remind them: this was a **local preview — nothing was submitted**. They can
|
|
142
|
+
keep improving their work in `~/.fito/cases/$1/`, re-run `/fito-evaluate $1` to
|
|
143
|
+
re-check, and submit for real with `/fito-submit $1` when satisfied.
|
|
144
|
+
|
|
145
|
+
**Done when** every quiz question shows its result **and the proficiency a
|
|
146
|
+
submission would record for it** (or the case has no `quiz.yaml`), and the
|
|
147
|
+
learner knows this was a preview and how to submit. A result with no proficiency
|
|
148
|
+
beside it is not done: it is the half that tells the learner where they stand.
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: "Read URLs from a file, fetch each page's content (or YouTube transcript), clean it, and save as raw markdown files"
|
|
3
|
+
argument-hint: "<URL list file path>"
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Fetch URLs to Raw Markdown
|
|
7
|
+
|
|
8
|
+
Use the **fito-url-content-fetcher** skill to process
|
|
9
|
+
the URL list file at: $ARGUMENTS
|
|
10
|
+
|
|
11
|
+
If no file path is provided, look for a file named
|
|
12
|
+
`urls.txt` in the current working directory.
|
|
13
|
+
|
|
14
|
+
This is the **fallback / supplemental** ingestion path of
|
|
15
|
+
the Fito knowledge pipeline — the preferred source is the
|
|
16
|
+
case's own source tree via the `fito-source-ingestion`
|
|
17
|
+
skill.
|
|
18
|
+
|
|
19
|
+
## Steps
|
|
20
|
+
|
|
21
|
+
1. Read the URL file (one URL per line, skip blank
|
|
22
|
+
lines and comments starting with #)
|
|
23
|
+
2. Create `./output/1-ingest/extracted_links_content/` if it
|
|
24
|
+
doesn't exist
|
|
25
|
+
3. Set up the run's scratch workspace outside the
|
|
26
|
+
working directory — a virtualenv plus the Python
|
|
27
|
+
packages it needs (trafilatura,
|
|
28
|
+
youtube-transcript-api, beautifulsoup4, requests) —
|
|
29
|
+
per the skill's *Leave no trace* section
|
|
30
|
+
4. Process each URL using the fito-url-content-fetcher
|
|
31
|
+
skill
|
|
32
|
+
5. Remove the run's scratch workspace, then report a
|
|
33
|
+
summary: how many succeeded, failed, and list any
|
|
34
|
+
errors. No temporary file from the fetch is left in
|
|
35
|
+
the working directory
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: "Generate Concept knowledge-component content for identified domain concepts"
|
|
3
|
+
argument-hint: "<tool-name> --technology-version <slug>[,<slug>...] [--technology <slug>] [--version <ver>] [--concepts <path>] [--output <path>] [--mode one|batch|all] [--select <ids-or-names-or-ranges>] [--audience beginner|intermediate|advanced] [--language <lang>] [--identify] [--source <path>] [--fetch] [--urls <file>] [--docs <path>]"
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Generate Domain Concepts
|
|
7
|
+
|
|
8
|
+
Generate full Concept knowledge-component content for domain concepts previously identified by `/fito-identify-domain-concepts`, using the Concept content generator matching the subject technology's kind — the GENERATE step of the Fito knowledge pipeline. Step 2 resolves that kind; it selects the generator sibling (step 9), the content template (step 6) and the registered schema variant (step 7). Each output conforms to the registered `ConceptTemplate` field-schema, with every field value a markdown fragment.
|
|
9
|
+
|
|
10
|
+
Parse `$ARGUMENTS` to extract:
|
|
11
|
+
|
|
12
|
+
- **tool-name** (required): first positional argument — the name of the software tool, technique, or methodology being documented
|
|
13
|
+
- **--technology** (optional): the subject's Fito Technology slug (e.g. `spring-boot`), used to resolve the technology's `kind` (step 2) and by the generator to ground related-concept references against the backend Knowledge Repository. Defaults to the tool name lowercased with spaces collapsed to dashes
|
|
14
|
+
- **--technology-version** (required): the slug(s) of the Fito `TechnologyVersion`(s) the generated components apply to — the technology's major line (e.g. `7`, or `7,8` comma-separated for a component that spans majors), written into each payload's `metadata.technology_versions`. This is the addressable version link the backend attaches to each component, distinct from `--version` below (which only tunes example accuracy). The push refuses a payload with no version link. A practice carries a single version `1` — Fito's own numbering, not an upstream release line — so a practice run passes `--technology-version 1`; the flag is required for every kind.
|
|
15
|
+
- **--version** (optional): the tool version to target. Ensures code examples, API names, and terminology are accurate for that version. If omitted, the agent proceeds without version constraints
|
|
16
|
+
- **--concepts** (optional): path to the `domain_concepts.json` file produced by `/fito-identify-domain-concepts`. Defaults to `./output/2-identify/domain_concepts/domain_concepts.json`
|
|
17
|
+
- **--output** (optional): directory where generated component files will be saved. Defaults to `./output/3-generate/concept_content/`
|
|
18
|
+
- **--mode** (optional): processing scope — `one`, `batch`, or `all`. Defaults to `all`
|
|
19
|
+
- **--select** (optional): comma-separated concept IDs, concept names, or numeric ranges to process. Required when `--mode` is `one` or `batch`. Ignored when `--mode` is `all`. Ranges are expressed as `start-end` where both ends are integers (e.g., `5-10` selects concepts 5 through 10 inclusive). Ranges, plain IDs, and names can be mixed freely (e.g., `--select "1-3, 10, Bean"`). Before invoking the agent, expand any range tokens into the full flat list of individual IDs or names.
|
|
20
|
+
- **--audience** (optional): target audience level — `beginner`, `intermediate`, or `advanced`. Defaults to `intermediate`
|
|
21
|
+
- **--language** (optional): natural language for all generated prose. Defaults to `English`
|
|
22
|
+
- **--identify** (optional flag): if present, run `/fito-identify-domain-concepts` first before generating. Use when `domain_concepts.json` does not yet exist. The four flags below are identify's own ingestion flags, and reach it only through this one
|
|
23
|
+
- **--source** (optional): path to a local case source tree, forwarded to `/fito-identify-domain-concepts` — identify's preferred ingestion source, which it bundles with the `fito-source-ingestion` skill
|
|
24
|
+
- **--fetch** (optional flag): forwarded to `/fito-identify-domain-concepts`, which then runs `/fito-fetch-urls-content` before identifying (the URL-fallback ingestion path)
|
|
25
|
+
- **--urls** (optional): URL list file, forwarded to `/fito-identify-domain-concepts`, which reads it only under `--fetch`. Identify defaults it to `urls.txt`
|
|
26
|
+
- **--docs** (optional): path to an already-ingested source directory, forwarded to `/fito-identify-domain-concepts`. Identify defaults it to `./output/1-ingest/extracted_links_content/`
|
|
27
|
+
|
|
28
|
+
## Steps
|
|
29
|
+
|
|
30
|
+
1. If no tool name is provided, stop and ask the user:
|
|
31
|
+
|
|
32
|
+
> "Please provide the tool name. Usage: `/fito-generate-domain-concepts <tool-name> --technology-version <slug>[,<slug>...] [--technology <slug>] [--version <ver>] [--concepts <path>] [--output <path>] [--mode one|batch|all] [--select <ids-or-names>] [--audience beginner|intermediate|advanced] [--language <lang>] [--identify] [--source <path>] [--fetch] [--urls <file>] [--docs <path>]`"
|
|
33
|
+
|
|
34
|
+
If `--technology-version` is not provided, stop and ask the user:
|
|
35
|
+
|
|
36
|
+
> "Please provide the Fito technology version(s) the components apply to with `--technology-version <slug>` (e.g. `7`, or `1` for a practice). Every knowledge component is version-scoped; the push refuses a payload with no version link."
|
|
37
|
+
|
|
38
|
+
2. Resolve the subject technology's **kind** — the value that picks which content generator runs, which content template it reads, and which registered schema variant its output is stored under. Call the `fito_technology_fetch` tool once with the technology slug (the `--technology` value, or the default derived from the tool name; the read is public — no login) and read its `kind`: `tool` or `practice`. Nothing else picks a variant — the author declares a technology, and the kind follows from it.
|
|
39
|
+
|
|
40
|
+
**Only a not-found means the technology is not provisioned** — the fetch reports `No technology found for`. Stop and tell the user:
|
|
41
|
+
|
|
42
|
+
> "The Fito vocabulary holds no `<slug>` technology, so there is nothing to attach these components to. Provision it first with `/fito-create-or-update-technology --technology <slug>@<version>` — a practice is provisioned at version `1` — then re-run `/fito-generate-domain-concepts`. If the slug is merely misspelled, correct `--technology` instead: provisioning a misspelling admits a second, independent technology alongside the real one."
|
|
43
|
+
|
|
44
|
+
Any other outcome — an unreachable backend, a 5xx, anything that is not a not-found — says nothing about whether the technology exists: report it **verbatim** and stop there, without the refusal above. A backend that is down must never read as a technology nobody provisioned.
|
|
45
|
+
|
|
46
|
+
3. If `--identify` is present, run the `/fito-identify-domain-concepts` prompt with:
|
|
47
|
+
- the tool name and the `--technology` slug
|
|
48
|
+
- the same `--technology-version` slug (required — the declared major line every grounded candidate must apply to)
|
|
49
|
+
- `--source`, `--fetch` and `--urls` exactly as given — forward each one only when the author provided it. Identify reads `--urls` only under `--fetch`, so the pair travels together or the URL list is read by nobody
|
|
50
|
+
- `--docs` only when it was provided. Left out, identify resolves its own default, and — inside a case checkout given no ingestion flag at all — can still offer to proceed with `--source .`
|
|
51
|
+
- the default output path `./output/2-identify/domain_concepts/`
|
|
52
|
+
Wait for it to complete before proceeding.
|
|
53
|
+
|
|
54
|
+
4. Resolve the concepts path (from `--concepts` or the default). Verify that `domain_concepts.json` exists at that path. If not, stop and tell the user:
|
|
55
|
+
|
|
56
|
+
> "No domain concepts found at `<concepts-path>`. Run `/fito-identify-domain-concepts` first, or pass `--identify` to run it automatically."
|
|
57
|
+
|
|
58
|
+
5. If `--mode` is `one` or `batch` and `--select` is not provided, stop and ask the user:
|
|
59
|
+
|
|
60
|
+
> "Please specify which concepts to process with `--select`. Provide concept IDs or names as a comma-separated list (e.g., `--select \"1,3\"` or `--select \"Bean,Context\"`)."
|
|
61
|
+
|
|
62
|
+
6. Resolve the content template path — the variant the `kind` from step 2 selects: `concept-tool-content-template.md` for a `tool`, `concept-practice-content-template.md` for a `practice`. The template ships in the Fito package's `templates/` directory, a sibling of the package's `skills/`: locate the `fito-url-content-fetcher` skill's directory (where its `SKILL.md` lives) and resolve `../../templates/<the selected file>` from it. Verify the file exists. If not, stop and report:
|
|
63
|
+
|
|
64
|
+
> "Content template not found. The Fito package installation may be incomplete."
|
|
65
|
+
|
|
66
|
+
7. Pull the registered `Template` **field-schema** for the `concept` type from the backend Knowledge Repository — the authoritative field structure (keys, labels, types, requirements) the generated `content` must conform to. A component type carries **several** registered templates — one variant per technology kind, plus a shared `any` variant — and the subject technology's own `kind` selects which applies: an exact `tool` or `practice` match, otherwise the `any` variant. That is the `kind` resolved in step 2 — no second fetch. The variant follows from the subject, so nothing names one directly; the push resolves it the same way, making this the schema the component is stored under. If the backend's Template read endpoint is not yet available, use the field keys documented in the content template resolved in step 6.
|
|
67
|
+
|
|
68
|
+
8. Create the output directory if it does not exist.
|
|
69
|
+
|
|
70
|
+
9. Delegate to the content generator the resolved `kind` selects — `fito-tool-concept-content-generator` for a `tool`, `fito-practice-concept-content-generator` for a `practice` — as a **subagent** via the `fito_delegate` tool, handing it:
|
|
71
|
+
- tool name and technology slug
|
|
72
|
+
- the technology version slug(s) the components apply to (from `--technology-version`), for each payload's `metadata.technology_versions`
|
|
73
|
+
- tool version (from `--version`, or null if not provided)
|
|
74
|
+
- path to `domain_concepts.json`
|
|
75
|
+
- the registered field-schema (step 7)
|
|
76
|
+
- path to the content template selected in step 6
|
|
77
|
+
- output directory path
|
|
78
|
+
- processing mode (`one`, `batch`, or `all`)
|
|
79
|
+
- selected concept IDs or names (from `--select`, only when mode is `one` or `batch`)
|
|
80
|
+
- audience level
|
|
81
|
+
- language
|
|
82
|
+
|
|
83
|
+
This delegation blocks — you read the child's summary from the tool result.
|
|
84
|
+
|
|
85
|
+
10. Relay the subagent's summary to the user — including any concepts skipped because they already exist in the backend Knowledge Repository.
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: "Generate ExecutionFact knowledge-component content for identified execution facts"
|
|
3
|
+
argument-hint: "<tool-name> --technology-version <slug>[,<slug>...] [--technology <slug>] [--version <ver>] [--facts <path>] [--output <path>] [--mode one|batch|all] [--select <ids-or-fragments-or-ranges>] [--audience beginner|intermediate|advanced] [--language <lang>] [--identify] [--source <path>] [--fetch] [--urls <file>] [--docs <path>]"
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Generate Execution Facts
|
|
7
|
+
|
|
8
|
+
Generate full ExecutionFact knowledge-component content for execution facts previously identified by `/fito-identify-execution-facts`, using the ExecutionFact content generator matching the subject technology's kind — the GENERATE step of the Fito knowledge pipeline. Step 2 resolves that kind; it selects the generator sibling (step 9), the content template (step 6) and the registered schema variant (step 7). Each output conforms to the registered `ExecutionFactTemplate` field-schema, with every field value a markdown fragment.
|
|
9
|
+
|
|
10
|
+
Parse `$ARGUMENTS` to extract:
|
|
11
|
+
|
|
12
|
+
- **tool-name** (required): first positional argument — the name of the software tool, technique, or methodology being documented
|
|
13
|
+
- **--technology** (optional): the subject's Fito Technology slug (e.g. `spring-boot`), used to resolve the technology's `kind` (step 2) and by the generator to ground related-fact references against the backend Knowledge Repository. Defaults to the tool name lowercased with spaces collapsed to dashes
|
|
14
|
+
- **--technology-version** (required): the slug(s) of the Fito `TechnologyVersion`(s) the generated components apply to — the technology's major line (e.g. `7`, or `7,8` comma-separated for a component that spans majors), written into each payload's `metadata.technology_versions`. This is the addressable version link the backend attaches to each component, distinct from `--version` below (which only tunes example accuracy). The push refuses a payload with no version link. A practice carries a single version `1` — Fito's own numbering, not an upstream release line — so a practice run passes `--technology-version 1`; the flag is required for every kind.
|
|
15
|
+
- **--version** (optional): the tool version to target. Ensures code examples, API names, signatures, and terminology are accurate for that version. If omitted, the agent infers the version from `execution_facts.json` metadata or from the collection of facts
|
|
16
|
+
- **--facts** (optional): path to the `execution_facts.json` file produced by `/fito-identify-execution-facts`. Defaults to `./output/2-identify/execution_facts/execution_facts.json`
|
|
17
|
+
- **--output** (optional): directory where generated component files will be saved. Defaults to `./output/3-generate/execution_fact_content/`
|
|
18
|
+
- **--mode** (optional): processing scope — `one`, `batch`, or `all`. Defaults to `all`
|
|
19
|
+
- **--select** (optional): comma-separated execution fact IDs, statement fragments, or numeric ranges to process. Required when `--mode` is `one` or `batch`. Ignored when `--mode` is `all`. Ranges are expressed as `start-end` where both ends are integers (e.g., `5-10` selects EF-005 through EF-010 inclusive). Ranges, plain IDs, and fragments can be mixed freely (e.g., `--select "1-3, EF-010, 15-20"`). Before invoking the agent, expand any range tokens into the full flat list of individual IDs.
|
|
20
|
+
- **--audience** (optional): target audience level — `beginner`, `intermediate`, or `advanced`. Defaults to `intermediate`
|
|
21
|
+
- **--language** (optional): natural language for all generated prose. Defaults to `English`
|
|
22
|
+
- **--identify** (optional flag): if present, run `/fito-identify-execution-facts` first before generating. Use when `execution_facts.json` does not yet exist. The four flags below are identify's own ingestion flags, and reach it only through this one
|
|
23
|
+
- **--source** (optional): path to a local case source tree, forwarded to `/fito-identify-execution-facts` — identify's preferred ingestion source, which it bundles with the `fito-source-ingestion` skill
|
|
24
|
+
- **--fetch** (optional flag): forwarded to `/fito-identify-execution-facts`, which then runs `/fito-fetch-urls-content` before identifying (the URL-fallback ingestion path)
|
|
25
|
+
- **--urls** (optional): URL list file, forwarded to `/fito-identify-execution-facts`, which reads it only under `--fetch`. Identify defaults it to `urls.txt`
|
|
26
|
+
- **--docs** (optional): path to an already-ingested source directory, forwarded to `/fito-identify-execution-facts`. Identify defaults it to `./output/1-ingest/extracted_links_content/`
|
|
27
|
+
|
|
28
|
+
## Steps
|
|
29
|
+
|
|
30
|
+
1. If no tool name is provided, stop and ask the user:
|
|
31
|
+
|
|
32
|
+
> "Please provide the tool name. Usage: `/fito-generate-execution-facts <tool-name> --technology-version <slug>[,<slug>...] [--technology <slug>] [--version <ver>] [--facts <path>] [--output <path>] [--mode one|batch|all] [--select <ids-or-fragments>] [--audience beginner|intermediate|advanced] [--language <lang>] [--identify] [--source <path>] [--fetch] [--urls <file>] [--docs <path>]`"
|
|
33
|
+
|
|
34
|
+
If `--technology-version` is not provided, stop and ask the user:
|
|
35
|
+
|
|
36
|
+
> "Please provide the Fito technology version(s) the components apply to with `--technology-version <slug>` (e.g. `7`, or `1` for a practice). Every knowledge component is version-scoped; the push refuses a payload with no version link."
|
|
37
|
+
|
|
38
|
+
2. Resolve the subject technology's **kind** — the value that picks which content generator runs, which content template it reads, and which registered schema variant its output is stored under. Call the `fito_technology_fetch` tool once with the technology slug (the `--technology` value, or the default derived from the tool name; the read is public — no login) and read its `kind`: `tool` or `practice`. Nothing else picks a variant — the author declares a technology, and the kind follows from it.
|
|
39
|
+
|
|
40
|
+
**Only a not-found means the technology is not provisioned** — the fetch reports `No technology found for`. Stop and tell the user:
|
|
41
|
+
|
|
42
|
+
> "The Fito vocabulary holds no `<slug>` technology, so there is nothing to attach these components to. Provision it first with `/fito-create-or-update-technology --technology <slug>@<version>` — a practice is provisioned at version `1` — then re-run `/fito-generate-execution-facts`. If the slug is merely misspelled, correct `--technology` instead: provisioning a misspelling admits a second, independent technology alongside the real one."
|
|
43
|
+
|
|
44
|
+
Any other outcome — an unreachable backend, a 5xx, anything that is not a not-found — says nothing about whether the technology exists: report it **verbatim** and stop there, without the refusal above. A backend that is down must never read as a technology nobody provisioned.
|
|
45
|
+
|
|
46
|
+
3. If `--identify` is present, run the `/fito-identify-execution-facts` prompt with:
|
|
47
|
+
- the tool name and the `--technology` slug
|
|
48
|
+
- the same `--technology-version` slug (required — the declared major line every grounded candidate must apply to)
|
|
49
|
+
- `--source`, `--fetch` and `--urls` exactly as given — forward each one only when the author provided it. Identify reads `--urls` only under `--fetch`, so the pair travels together or the URL list is read by nobody
|
|
50
|
+
- `--docs` only when it was provided. Left out, identify resolves its own default, and — inside a case checkout given no ingestion flag at all — can still offer to proceed with `--source .`
|
|
51
|
+
- the default output path `./output/2-identify/execution_facts/`
|
|
52
|
+
Wait for it to complete before proceeding.
|
|
53
|
+
|
|
54
|
+
4. Resolve the facts path (from `--facts` or the default). Verify that `execution_facts.json` exists at that path. If not, stop and tell the user:
|
|
55
|
+
|
|
56
|
+
> "No execution facts found at `<facts-path>`. Run `/fito-identify-execution-facts` first, or pass `--identify` to run it automatically."
|
|
57
|
+
|
|
58
|
+
5. If `--mode` is `one` or `batch` and `--select` is not provided, stop and ask the user:
|
|
59
|
+
|
|
60
|
+
> "Please specify which execution facts to process with `--select`. Provide fact IDs or statement fragments as a comma-separated list (e.g., `--select \"EF-001,EF-003\"` or `--select \"TorusGeometry,position.y\"`)."
|
|
61
|
+
|
|
62
|
+
6. Resolve the content template path — the variant the `kind` from step 2 selects: `execution-fact-tool-content-template.md` for a `tool`, `execution-fact-practice-content-template.md` for a `practice`. The template ships in the Fito package's `templates/` directory, a sibling of the package's `skills/`: locate the `fito-url-content-fetcher` skill's directory (where its `SKILL.md` lives) and resolve `../../templates/<the selected file>` from it. Verify the file exists. If not, stop and report:
|
|
63
|
+
|
|
64
|
+
> "Content template not found. The Fito package installation may be incomplete."
|
|
65
|
+
|
|
66
|
+
7. Pull the registered `Template` **field-schema** for the `execution-fact` type from the backend Knowledge Repository — the authoritative field structure (keys, labels, types, requirements, the `optional_sections_included` trigger mechanism) the generated `content` must conform to. A component type carries **several** registered templates — one variant per technology kind, plus a shared `any` variant — and the subject technology's own `kind` selects which applies: an exact `tool` or `practice` match, otherwise the `any` variant. That is the `kind` resolved in step 2 — no second fetch. The variant follows from the subject, so nothing names one directly; the push resolves it the same way, making this the schema the component is stored under. If the backend's Template read endpoint is not yet available, use the field keys documented in the content template resolved in step 6.
|
|
67
|
+
|
|
68
|
+
8. Create the output directory if it does not exist.
|
|
69
|
+
|
|
70
|
+
9. Delegate to the content generator the resolved `kind` selects — `fito-tool-execution-fact-content-generator` for a `tool`, `fito-practice-execution-fact-content-generator` for a `practice` — as a **subagent** via the `fito_delegate` tool, handing it:
|
|
71
|
+
- tool name and technology slug
|
|
72
|
+
- the technology version slug(s) the components apply to (from `--technology-version`), for each payload's `metadata.technology_versions`
|
|
73
|
+
- tool version (from `--version`, or null if not provided — the agent handles inference)
|
|
74
|
+
- path to `execution_facts.json`
|
|
75
|
+
- the registered field-schema (step 7)
|
|
76
|
+
- path to the content template selected in step 6
|
|
77
|
+
- output directory path
|
|
78
|
+
- processing mode (`one`, `batch`, or `all`)
|
|
79
|
+
- selected fact IDs or statement fragments (from `--select`, only when mode is `one` or `batch`)
|
|
80
|
+
- audience level
|
|
81
|
+
- language
|
|
82
|
+
|
|
83
|
+
This delegation blocks — you read the child's summary from the tool result.
|
|
84
|
+
|
|
85
|
+
10. Relay the subagent's summary to the user — including any facts skipped because they already exist in the backend Knowledge Repository.
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: "Generate UsageScenario knowledge-component content for identified usage scenarios"
|
|
3
|
+
argument-hint: "<tool-name> --technology-version <slug>[,<slug>...] [--technology <slug>] [--version <ver>] [--scenarios <path>] [--output <path>] [--mode one|batch|all] [--select <ids-or-titles-or-ranges>] [--audience beginner|intermediate|advanced] [--language <lang>] [--identify] [--source <path>] [--fetch] [--urls <file>] [--docs <path>]"
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Generate Usage Scenarios
|
|
7
|
+
|
|
8
|
+
Generate full UsageScenario knowledge-component content for usage scenarios previously identified by `/fito-identify-usage-scenarios`, using the UsageScenario content generator matching the subject technology's kind — the GENERATE step of the Fito knowledge pipeline. Step 2 resolves that kind; it selects the generator sibling (step 9). The content template does **not** branch on it — step 6 says why. Each output conforms to the registered `UsageScenarioTemplate` field-schema, with every field value a markdown fragment.
|
|
9
|
+
|
|
10
|
+
Parse `$ARGUMENTS` to extract:
|
|
11
|
+
|
|
12
|
+
- **tool-name** (required): first positional argument — the name of the software tool, technique, or methodology being documented
|
|
13
|
+
- **--technology** (optional): the subject's Fito Technology slug (e.g. `spring-boot`), used to resolve the technology's `kind` (step 2) and by the generator to ground related-scenario references against the backend Knowledge Repository. Defaults to the tool name lowercased with spaces collapsed to dashes
|
|
14
|
+
- **--technology-version** (required): the slug(s) of the Fito `TechnologyVersion`(s) the generated components apply to — the technology's major line (e.g. `7`, or `7,8` comma-separated for a component that spans majors), written into each payload's `metadata.technology_versions`. This is the addressable version link the backend attaches to each component, distinct from `--version` below (which only tunes example accuracy). The push refuses a payload with no version link. A practice carries a single version `1` — Fito's own numbering, not an upstream release line — so a practice run passes `--technology-version 1`; the flag is required for every kind.
|
|
15
|
+
- **--version** (optional): the tool version to target. Ensures code examples, API names, configuration, and step ordering are accurate for that version. If omitted, the agent infers the version from `usage_scenarios.json` metadata or from the collection of scenarios
|
|
16
|
+
- **--scenarios** (optional): path to the `usage_scenarios.json` file produced by `/fito-identify-usage-scenarios`. Defaults to `./output/2-identify/usage_scenarios/usage_scenarios.json`
|
|
17
|
+
- **--output** (optional): directory where generated component files will be saved. Defaults to `./output/3-generate/usage_scenario_content/`
|
|
18
|
+
- **--mode** (optional): processing scope — `one`, `batch`, or `all`. Defaults to `all`
|
|
19
|
+
- **--select** (optional): comma-separated usage scenario IDs, title fragments, or numeric ranges to process. Required when `--mode` is `one` or `batch`. Ignored when `--mode` is `all`. Ranges are expressed as `start-end` where both ends are integers (e.g., `5-10` selects scenarios 5 through 10 inclusive). Ranges, plain IDs, and title fragments can be mixed freely (e.g., `--select "1-3, 10, file upload"`). Before invoking the agent, expand any range tokens into the full flat list of individual IDs or fragments.
|
|
20
|
+
- **--audience** (optional): target audience level — `beginner`, `intermediate`, or `advanced`. Defaults to `intermediate`
|
|
21
|
+
- **--language** (optional): natural language for all generated prose. Defaults to `English`
|
|
22
|
+
- **--identify** (optional flag): if present, run `/fito-identify-usage-scenarios` first before generating. Use when `usage_scenarios.json` does not yet exist. The four flags below are identify's own ingestion flags, and reach it only through this one
|
|
23
|
+
- **--source** (optional): path to a local case source tree, forwarded to `/fito-identify-usage-scenarios` — identify's preferred ingestion source, which it bundles with the `fito-source-ingestion` skill
|
|
24
|
+
- **--fetch** (optional flag): forwarded to `/fito-identify-usage-scenarios`, which then runs `/fito-fetch-urls-content` before identifying (the URL-fallback ingestion path)
|
|
25
|
+
- **--urls** (optional): URL list file, forwarded to `/fito-identify-usage-scenarios`, which reads it only under `--fetch`. Identify defaults it to `urls.txt`
|
|
26
|
+
- **--docs** (optional): path to an already-ingested source directory, forwarded to `/fito-identify-usage-scenarios`. Identify defaults it to `./output/1-ingest/extracted_links_content/`
|
|
27
|
+
|
|
28
|
+
## Steps
|
|
29
|
+
|
|
30
|
+
1. If no tool name is provided, stop and ask the user:
|
|
31
|
+
|
|
32
|
+
> "Please provide the tool name. Usage: `/fito-generate-usage-scenarios <tool-name> --technology-version <slug>[,<slug>...] [--technology <slug>] [--version <ver>] [--scenarios <path>] [--output <path>] [--mode one|batch|all] [--select <ids-or-titles>] [--audience beginner|intermediate|advanced] [--language <lang>] [--identify] [--source <path>] [--fetch] [--urls <file>] [--docs <path>]`"
|
|
33
|
+
|
|
34
|
+
If `--technology-version` is not provided, stop and ask the user:
|
|
35
|
+
|
|
36
|
+
> "Please provide the Fito technology version(s) the components apply to with `--technology-version <slug>` (e.g. `7`, or `1` for a practice). Every knowledge component is version-scoped; the push refuses a payload with no version link."
|
|
37
|
+
|
|
38
|
+
2. Resolve the subject technology's **kind** — the value that picks which content generator runs and which registered schema variant its output is stored under. Call the `fito_technology_fetch` tool once with the technology slug (the `--technology` value, or the default derived from the tool name; the read is public — no login) and read its `kind`: `tool` or `practice`. Nothing else picks a variant — the author declares a technology, and the kind follows from it.
|
|
39
|
+
|
|
40
|
+
**Only a not-found means the technology is not provisioned** — the fetch reports `No technology found for`. Stop and tell the user:
|
|
41
|
+
|
|
42
|
+
> "The Fito vocabulary holds no `<slug>` technology, so there is nothing to attach these components to. Provision it first with `/fito-create-or-update-technology --technology <slug>@<version>` — a practice is provisioned at version `1` — then re-run `/fito-generate-usage-scenarios`. If the slug is merely misspelled, correct `--technology` instead: provisioning a misspelling admits a second, independent technology alongside the real one."
|
|
43
|
+
|
|
44
|
+
Any other outcome — an unreachable backend, a 5xx, anything that is not a not-found — says nothing about whether the technology exists: report it **verbatim** and stop there, without the refusal above. A backend that is down must never read as a technology nobody provisioned.
|
|
45
|
+
|
|
46
|
+
3. If `--identify` is present, run the `/fito-identify-usage-scenarios` prompt with:
|
|
47
|
+
- the tool name and the `--technology` slug
|
|
48
|
+
- the same `--technology-version` slug (required — the declared major line every grounded candidate must apply to)
|
|
49
|
+
- `--source`, `--fetch` and `--urls` exactly as given — forward each one only when the author provided it. Identify reads `--urls` only under `--fetch`, so the pair travels together or the URL list is read by nobody
|
|
50
|
+
- `--docs` only when it was provided. Left out, identify resolves its own default, and — inside a case checkout given no ingestion flag at all — can still offer to proceed with `--source .`
|
|
51
|
+
- the default output path `./output/2-identify/usage_scenarios/`
|
|
52
|
+
Wait for it to complete before proceeding.
|
|
53
|
+
|
|
54
|
+
4. Resolve the scenarios path (from `--scenarios` or the default). Verify that `usage_scenarios.json` exists at that path. If not, stop and tell the user:
|
|
55
|
+
|
|
56
|
+
> "No usage scenarios found at `<scenarios-path>`. Run `/fito-identify-usage-scenarios` first, or pass `--identify` to run it automatically."
|
|
57
|
+
|
|
58
|
+
5. If `--mode` is `one` or `batch` and `--select` is not provided, stop and ask the user:
|
|
59
|
+
|
|
60
|
+
> "Please specify which usage scenarios to process with `--select`. Provide scenario IDs or title fragments as a comma-separated list (e.g., `--select \"1,3\"` or `--select \"file upload,persist entity\"`)."
|
|
61
|
+
|
|
62
|
+
6. Resolve the content template path. Unlike its Concept and ExecutionFact siblings, this path does not branch on `kind`: `UsageScenario` registers a single shared `any` template, so both kinds read the same file. The template ships in the Fito package's `templates/` directory, a sibling of the package's `skills/`: locate the `fito-url-content-fetcher` skill's directory (where its `SKILL.md` lives) and resolve `../../templates/usage-scenario-content-template.md` from it. Verify the file exists. If not, stop and report:
|
|
63
|
+
|
|
64
|
+
> "Content template not found. The Fito package installation may be incomplete."
|
|
65
|
+
|
|
66
|
+
7. Pull the registered `Template` **field-schema** for the `usage-scenario` type from the backend Knowledge Repository — the authoritative field structure (keys, labels, types, requirements) the generated `content` must conform to. A component type carries **several** registered templates — one variant per technology kind, plus a shared `any` variant — and the subject technology's own `kind` selects which applies: an exact `tool` or `practice` match, otherwise the `any` variant. That is the `kind` resolved in step 2 — no second fetch. For this type the `any` row is the only one registered, so both kinds land on it; the variant follows from the subject, so nothing names one directly, and the push resolves it the same way, making this the schema the component is stored under. If the backend's Template read endpoint is not yet available, use the field keys documented in the content template resolved in step 6.
|
|
67
|
+
|
|
68
|
+
8. Create the output directory if it does not exist.
|
|
69
|
+
|
|
70
|
+
9. Delegate to the content generator the resolved `kind` selects — `fito-tool-usage-scenario-content-generator` for a `tool`, `fito-practice-usage-scenario-content-generator` for a `practice` — as a **subagent** via the `fito_delegate` tool, handing it:
|
|
71
|
+
- tool name and technology slug
|
|
72
|
+
- the technology version slug(s) the components apply to (from `--technology-version`), for each payload's `metadata.technology_versions`
|
|
73
|
+
- tool version (from `--version`, or null if not provided — the agent handles inference)
|
|
74
|
+
- path to `usage_scenarios.json`
|
|
75
|
+
- the registered field-schema (step 7)
|
|
76
|
+
- path to `usage-scenario-content-template.md` (resolved in step 6)
|
|
77
|
+
- output directory path
|
|
78
|
+
- processing mode (`one`, `batch`, or `all`)
|
|
79
|
+
- selected scenario IDs or title fragments (from `--select`, only when mode is `one` or `batch`)
|
|
80
|
+
- audience level
|
|
81
|
+
- language
|
|
82
|
+
|
|
83
|
+
This delegation blocks — you read the child's summary from the tool result.
|
|
84
|
+
|
|
85
|
+
10. Relay the subagent's summary to the user — including any scenarios skipped because they already exist in the backend Knowledge Repository.
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: "Extract domain concepts from an ingested source (case source tree or fetched docs)"
|
|
3
|
+
argument-hint: '<tool-name> --technology-version <slug> [--source <path>] [--technology <slug>] [--description "<text>"] [--fetch] [--urls <file>] [--docs <path>] [--output <path>]'
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Identify Domain Concepts
|
|
7
|
+
|
|
8
|
+
Extract domain concepts from an ingested source using the Concept identifier matching the subject
|
|
9
|
+
technology's kind — the IDENTIFY step of the Fito knowledge pipeline for Concept components. Step 2
|
|
10
|
+
resolves that kind; step 8 names the sibling it selects.
|
|
11
|
+
|
|
12
|
+
The **preferred** ingestion source is the case's own source tree — pass `--source`
|
|
13
|
+
and this prompt runs the `fito-source-ingestion` skill to bundle it. **Fetched
|
|
14
|
+
documentation URLs** (via `/fito-fetch-urls-content`) are the fallback / supplemental
|
|
15
|
+
source. Either way, the identifier reads a directory of files; `--docs` points at one
|
|
16
|
+
that was already ingested.
|
|
17
|
+
|
|
18
|
+
Parse `$ARGUMENTS` to extract:
|
|
19
|
+
|
|
20
|
+
- **tool-name** (required): first positional argument — the name of the software tool, technique, or methodology being analyzed
|
|
21
|
+
- **--source** (optional): path to a local case source tree — the preferred ingestion source, ingested by the `fito-source-ingestion` skill (step 4)
|
|
22
|
+
- **--technology** (optional): the subject's Fito Technology slug (e.g. `spring-boot`), used to resolve the technology's `kind` (step 2) and by the identifier to ground candidates against the backend Knowledge Repository. Defaults to the tool name lowercased with spaces collapsed to dashes
|
|
23
|
+
- **--technology-version** (required): the Fito `TechnologyVersion.slug` the identified components apply to — the technology's major line (e.g. `7`). The identifier grounds every candidate under this version, so a component that lives only for another major line reads as new. This is the declared version that flows downstream to generate and plan-source. A practice carries a single version `1` — Fito's own numbering, not an upstream release line — so a practice run passes `--technology-version 1`; the flag is required for every kind
|
|
24
|
+
- **--description** (optional): a brief description of what the subject does and what domains it operates in. Helps the agent infer relevant domains before reading the source
|
|
25
|
+
- **--fetch** (optional flag): if present, run `/fito-fetch-urls-content` before identifying concepts (the URL-fallback ingestion path)
|
|
26
|
+
- **--urls** (optional): URL list file to pass to `/fito-fetch-urls-content`. Defaults to `urls.txt`. Only relevant when `--fetch` is present
|
|
27
|
+
- **--docs** (optional): path to the directory containing the source to analyze — a `fito-source-ingestion` bundle or fetched markdown documents. Defaults to `./output/1-ingest/extracted_links_content/`
|
|
28
|
+
- **--output** (optional): path to the directory where results will be saved. Defaults to `./output/2-identify/domain_concepts/`
|
|
29
|
+
|
|
30
|
+
## Steps
|
|
31
|
+
|
|
32
|
+
1. If no tool name is provided, stop and ask the user:
|
|
33
|
+
> "Please provide the tool name. Usage: `/fito-identify-domain-concepts <tool-name> --technology-version <slug> [--source <path>] [--technology <slug>] [--description \"<text>\"] [--fetch] [--urls <file>] [--docs <path>] [--output <path>]`"
|
|
34
|
+
If `--technology-version` is not provided, stop and ask the user:
|
|
35
|
+
> "Please provide the Fito technology version the identified components apply to with `--technology-version <slug>` (e.g. `7`, or `1` for a practice). Every knowledge component is version-scoped; without a declared major line the identifier cannot decide whether an existing component still applies."
|
|
36
|
+
2. Resolve the subject technology's **kind** — the value that picks which identifier runs. Call the `fito_technology_fetch` tool once with the technology slug (the `--technology` value, or the default derived from the tool name; the read is public — no login) and read its `kind`: `tool` or `practice`. Nothing else picks a variant — the author declares a technology, and the kind follows from it.
|
|
37
|
+
**Only a not-found means the technology is not provisioned** — the fetch reports `No technology found for`. Stop and tell the user:
|
|
38
|
+
> "The Fito vocabulary holds no `<slug>` technology, so there is nothing to ground candidates against. Provision it first with `/fito-create-or-update-technology --technology <slug>@<version>` — a practice is provisioned at version `1` — then re-run `/fito-identify-domain-concepts`. If the slug is merely misspelled, correct `--technology` instead: provisioning a misspelling admits a second, independent technology alongside the real one."
|
|
39
|
+
|
|
40
|
+
Any other outcome — an unreachable backend, a 5xx, anything that is not a not-found — says nothing about whether the technology exists: report it **verbatim** and stop there, without the refusal above. A backend that is down must never read as a technology nobody provisioned
|
|
41
|
+
3. If none of `--source`, `--docs`, or `--fetch` was given, the current directory contains `.case/manifest.yaml`, and the `fito-source-ingestion` skill is available, run its **authoring-context check** (authoring = the checkout is the case repo itself or a fork of an unregistered repo — not a fork of a case registered in the backend). On an *authoring* verdict, offer to proceed with `--source .`; if the user accepts, treat `--source .` as given for the remaining steps. In every other outcome (skill unavailable, non-authoring verdict, or offer declined), continue without `--source`
|
|
42
|
+
4. If `--source` is provided, run the `fito-source-ingestion` skill on that path and use the bundle directory it produces as the docs directory for the remaining steps, skipping `--fetch` even if present. If the skill is not available, tell the user:
|
|
43
|
+
> "The `fito-source-ingestion` skill is not available yet — falling back to fetched documentation (`--docs` / `--fetch`)."
|
|
44
|
+
5. If `--fetch` is present and no `--source` bundle was produced, run the `/fito-fetch-urls-content` prompt with the `--urls` path (or `urls.txt` if not provided)
|
|
45
|
+
6. Verify the docs directory exists and contains at least one file. If not, stop and tell the user:
|
|
46
|
+
> "No source found at `<docs-path>`. Ingest the case's source tree with `--source <path>` (preferred) or fetch documentation with `/fito-fetch-urls-content`, then re-run."
|
|
47
|
+
7. Create the output directory if it does not exist
|
|
48
|
+
8. Delegate to the identifier the resolved `kind` selects — `fito-tool-concept-identifier` for a `tool`, `fito-practice-concept-identifier` for a `practice` — as a **subagent** via the `fito_delegate` tool, handing it: the subject name, the technology slug, the technology version slug (from `--technology-version`), the subject description (if provided), the docs path, and the output path. This delegation blocks — you read the child's summary from the tool result.
|
|
49
|
+
9. Relay the subagent's summary to the user — including how many candidates already exist in the backend Knowledge Repository
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: "Extract execution facts from an ingested source (case source tree or fetched docs)"
|
|
3
|
+
argument-hint: '<tool-name> --technology-version <slug> [--source <path>] [--technology <slug>] [--description "<text>"] [--fetch] [--urls <file>] [--docs <path>] [--output <path>]'
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Identify Execution Facts
|
|
7
|
+
|
|
8
|
+
Extract execution facts from an ingested source using the ExecutionFact identifier matching the
|
|
9
|
+
subject technology's kind — the IDENTIFY step of the Fito knowledge pipeline for ExecutionFact
|
|
10
|
+
components. Step 2 resolves that kind; step 8 names the sibling it selects.
|
|
11
|
+
|
|
12
|
+
The **preferred** ingestion source is the case's own source tree — pass `--source`
|
|
13
|
+
and this prompt runs the `fito-source-ingestion` skill to bundle it. **Fetched
|
|
14
|
+
documentation URLs** (via `/fito-fetch-urls-content`) are the fallback / supplemental
|
|
15
|
+
source. Either way, the identifier reads a directory of files; `--docs` points at one
|
|
16
|
+
that was already ingested.
|
|
17
|
+
|
|
18
|
+
Parse `$ARGUMENTS` to extract:
|
|
19
|
+
|
|
20
|
+
- **tool-name** (required): first positional argument — the name of the software tool, technique, or methodology being analyzed
|
|
21
|
+
- **--source** (optional): path to a local case source tree — the preferred ingestion source, ingested by the `fito-source-ingestion` skill (step 4)
|
|
22
|
+
- **--technology** (optional): the subject's Fito Technology slug (e.g. `spring-boot`), used to resolve the technology's `kind` (step 2) and by the identifier to ground candidates against the backend Knowledge Repository. Defaults to the tool name lowercased with spaces collapsed to dashes
|
|
23
|
+
- **--technology-version** (required): the Fito `TechnologyVersion.slug` the identified components apply to — the technology's major line (e.g. `7`). The identifier grounds every candidate under this version, so a component that lives only for another major line reads as new. This is the declared version that flows downstream to generate and plan-source. A practice carries a single version `1` — Fito's own numbering, not an upstream release line — so a practice run passes `--technology-version 1`; the flag is required for every kind
|
|
24
|
+
- **--description** (optional): a brief description of what the subject does and what domains it operates in. Helps the agent infer relevant domains before reading the source
|
|
25
|
+
- **--fetch** (optional flag): if present, run `/fito-fetch-urls-content` before identifying execution facts (the URL-fallback ingestion path)
|
|
26
|
+
- **--urls** (optional): URL list file to pass to `/fito-fetch-urls-content`. Defaults to `urls.txt`. Only relevant when `--fetch` is present
|
|
27
|
+
- **--docs** (optional): path to the directory containing the source to analyze — a `fito-source-ingestion` bundle or fetched markdown documents. Defaults to `./output/1-ingest/extracted_links_content/`
|
|
28
|
+
- **--output** (optional): path to the directory where results will be saved. Defaults to `./output/2-identify/execution_facts/`
|
|
29
|
+
|
|
30
|
+
## Steps
|
|
31
|
+
|
|
32
|
+
1. If no tool name is provided, stop and ask the user:
|
|
33
|
+
> "Please provide the tool name. Usage: `/fito-identify-execution-facts <tool-name> --technology-version <slug> [--source <path>] [--technology <slug>] [--description \"<text>\"] [--fetch] [--urls <file>] [--docs <path>] [--output <path>]`"
|
|
34
|
+
If `--technology-version` is not provided, stop and ask the user:
|
|
35
|
+
> "Please provide the Fito technology version the identified components apply to with `--technology-version <slug>` (e.g. `7`, or `1` for a practice). Every knowledge component is version-scoped; without a declared major line the identifier cannot decide whether an existing component still applies."
|
|
36
|
+
2. Resolve the subject technology's **kind** — the value that picks which identifier runs. Call the `fito_technology_fetch` tool once with the technology slug (the `--technology` value, or the default derived from the tool name; the read is public — no login) and read its `kind`: `tool` or `practice`. Nothing else picks a variant — the author declares a technology, and the kind follows from it.
|
|
37
|
+
**Only a not-found means the technology is not provisioned** — the fetch reports `No technology found for`. Stop and tell the user:
|
|
38
|
+
> "The Fito vocabulary holds no `<slug>` technology, so there is nothing to ground candidates against. Provision it first with `/fito-create-or-update-technology --technology <slug>@<version>` — a practice is provisioned at version `1` — then re-run `/fito-identify-execution-facts`. If the slug is merely misspelled, correct `--technology` instead: provisioning a misspelling admits a second, independent technology alongside the real one."
|
|
39
|
+
|
|
40
|
+
Any other outcome — an unreachable backend, a 5xx, anything that is not a not-found — says nothing about whether the technology exists: report it **verbatim** and stop there, without the refusal above. A backend that is down must never read as a technology nobody provisioned
|
|
41
|
+
3. If none of `--source`, `--docs`, or `--fetch` was given, the current directory contains `.case/manifest.yaml`, and the `fito-source-ingestion` skill is available, run its **authoring-context check** (authoring = the checkout is the case repo itself or a fork of an unregistered repo — not a fork of a case registered in the backend). On an *authoring* verdict, offer to proceed with `--source .`; if the user accepts, treat `--source .` as given for the remaining steps. In every other outcome (skill unavailable, non-authoring verdict, or offer declined), continue without `--source`
|
|
42
|
+
4. If `--source` is provided, run the `fito-source-ingestion` skill on that path and use the bundle directory it produces as the docs directory for the remaining steps, skipping `--fetch` even if present. If the skill is not available, tell the user:
|
|
43
|
+
> "The `fito-source-ingestion` skill is not available yet — falling back to fetched documentation (`--docs` / `--fetch`)."
|
|
44
|
+
5. If `--fetch` is present and no `--source` bundle was produced, run the `/fito-fetch-urls-content` prompt with the `--urls` path (or `urls.txt` if not provided)
|
|
45
|
+
6. Verify the docs directory exists and contains at least one file. If not, stop and tell the user:
|
|
46
|
+
> "No source found at `<docs-path>`. Ingest the case's source tree with `--source <path>` (preferred) or fetch documentation with `/fito-fetch-urls-content`, then re-run."
|
|
47
|
+
7. Create the output directory if it does not exist
|
|
48
|
+
8. Delegate to the identifier the resolved `kind` selects — `fito-tool-execution-fact-identifier` for a `tool`, `fito-practice-execution-fact-identifier` for a `practice` — as a **subagent** via the `fito_delegate` tool, handing it: the subject name, the technology slug, the technology version slug (from `--technology-version`), the subject description (if provided), the docs path, and the output path. This delegation blocks — you read the child's summary from the tool result.
|
|
49
|
+
9. Relay the subagent's summary to the user — including how many candidates already exist in the backend Knowledge Repository
|