fito-tui 0.5.0 → 0.6.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/agents/fito-case-source-planner.md +42 -13
- package/agents/fito-performance-reviewer.md +15 -5
- package/agents/fito-tutor.md +2 -1
- package/extensions/fito-fetch-tools.js +63 -7
- package/extensions/fito-fetch-tools.ts +70 -7
- package/extensions/fito-startup.js +5 -2
- package/extensions/fito-startup.ts +5 -1
- package/package.json +1 -1
- package/prompts/fito-case-design.md +71 -16
- package/prompts/fito-case-generate.md +29 -10
- package/prompts/fito-case-open.md +17 -10
- package/prompts/fito-case-plan-source.md +13 -6
- package/prompts/fito-generate-domain-concepts.md +1 -1
- package/prompts/fito-generate-execution-facts.md +1 -1
- package/prompts/fito-generate-usage-scenarios.md +1 -1
- package/shared/case-briefing/briefing.js +1 -0
- package/shared/case-briefing/briefing.ts +1 -0
- package/skills/fito-case-author/SKILL.md +8 -6
- package/skills/fito-case-author/github-publish.js +29 -2
- package/skills/fito-case-author/github-publish.ts +30 -2
- package/skills/fito-case-author/publish.js +36 -3
- package/skills/fito-case-author/publish.ts +46 -2
- package/skills/fito-url-content-fetcher/SKILL.md +53 -16
|
@@ -35,28 +35,59 @@ run's business — a source clone, sibling pipeline stages
|
|
|
35
35
|
under `output/`, the URL list itself: the run neither adds
|
|
36
36
|
to them nor removes them.
|
|
37
37
|
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
38
|
+
Find Python first. Try the three candidates in this order
|
|
39
|
+
and take the first whose `--version` prints `Python 3.`
|
|
40
|
+
and a version number; carry that command forward
|
|
41
|
+
literally, in place of `<python>` below — `py -3`
|
|
42
|
+
included. A candidate counts by what it prints: on
|
|
43
|
+
Windows, `python3` can be the Microsoft Store's
|
|
44
|
+
placeholder, which prints no version and runs no Python.
|
|
45
|
+
When none prints one, stop and report that the fetch
|
|
46
|
+
needs Python 3.
|
|
43
47
|
|
|
44
48
|
```bash
|
|
45
|
-
|
|
49
|
+
python3 --version
|
|
50
|
+
python --version
|
|
51
|
+
py -3 --version
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
Then create the workspace with `<python>` and carry the
|
|
55
|
+
path it prints forward literally, in place of
|
|
56
|
+
`<workspace>` below. Python prints it with `/`
|
|
57
|
+
(`C:/Users/…` on Windows), the one form that Bash, Python
|
|
58
|
+
and the `write` tool all read as the same folder; keep
|
|
59
|
+
it in double quotes in every command, since it can hold
|
|
60
|
+
a space. Each `bash` call is a fresh shell, so a
|
|
61
|
+
variable set in one call is empty in the next, and a
|
|
62
|
+
`trap … EXIT` would delete the workspace on the way out
|
|
63
|
+
of the call that created it.
|
|
64
|
+
|
|
65
|
+
The venv keeps its programs in `<workspace>/venv/Scripts/`
|
|
66
|
+
on Windows and in `<workspace>/venv/bin/` elsewhere:
|
|
67
|
+
`<bin>` below is whichever of the two
|
|
68
|
+
`ls "<workspace>/venv"` lists.
|
|
69
|
+
|
|
70
|
+
```bash
|
|
71
|
+
<python> -c "import pathlib, tempfile; print(pathlib.Path(tempfile.mkdtemp(prefix='fito-fetch-')).as_posix())"
|
|
46
72
|
# → this run's workspace; substitute what it printed for <workspace>
|
|
47
73
|
|
|
48
74
|
# a PEP 668-protected box refuses a bare `pip install`;
|
|
49
75
|
# add any fallback package the same way
|
|
50
|
-
|
|
51
|
-
|
|
76
|
+
<python> -m venv "<workspace>/venv"
|
|
77
|
+
# the venv's pip is the one <python> shipped, and an old one skips
|
|
78
|
+
# the lxml_html_clean extra that `import trafilatura` needs, so
|
|
79
|
+
# upgrade it first; call pip through the venv's python every time,
|
|
80
|
+
# since on Windows the pip program refuses to replace itself
|
|
81
|
+
"<workspace>/venv/<bin>/python" -m pip install --upgrade pip
|
|
82
|
+
"<workspace>/venv/<bin>/python" -m pip install trafilatura youtube-transcript-api
|
|
52
83
|
|
|
53
84
|
# write the fetch script to <workspace>/fetch_urls.py, then run it from
|
|
54
85
|
# the working directory — never `cd` into the workspace, or the script's
|
|
55
86
|
# ./output/… paths move with you
|
|
56
|
-
<workspace>/venv
|
|
87
|
+
"<workspace>/venv/<bin>/python" "<workspace>/fetch_urls.py" "<URL list file>"
|
|
57
88
|
|
|
58
89
|
# the run's last act, before the summary — failed runs included
|
|
59
|
-
rm -rf <workspace>
|
|
90
|
+
rm -rf "<workspace>"
|
|
60
91
|
```
|
|
61
92
|
|
|
62
93
|
## URL Detection
|
|
@@ -77,10 +108,12 @@ multiple languages are available, prefer manual
|
|
|
77
108
|
captions over auto-generated ones.
|
|
78
109
|
|
|
79
110
|
If no transcript is available at all, fall back to
|
|
80
|
-
auto-generated subtitles, landing them in the workspace
|
|
111
|
+
auto-generated subtitles, landing them in the workspace.
|
|
112
|
+
Install `yt-dlp` into the venv first:
|
|
81
113
|
|
|
82
114
|
```bash
|
|
83
|
-
<workspace>/venv
|
|
115
|
+
"<workspace>/venv/<bin>/python" -m pip install yt-dlp
|
|
116
|
+
"<workspace>/venv/<bin>/yt-dlp" --write-auto-sub --skip-download -P "<workspace>" "<url>"
|
|
84
117
|
```
|
|
85
118
|
|
|
86
119
|
Then read and clean the resulting .vtt file there
|
|
@@ -172,10 +205,14 @@ Create the directory if it doesn't exist.
|
|
|
172
205
|
|
|
173
206
|
### Summary generation
|
|
174
207
|
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
208
|
+
The summary is yours, written from the page you have
|
|
209
|
+
read: a script has no words of its own, and a summary
|
|
210
|
+
written before the fetch comes from recall. So the
|
|
211
|
+
script writes each file with every front-matter key
|
|
212
|
+
but `summary`. Once the script has run, read each file
|
|
213
|
+
it wrote, then add its `summary` to the front matter
|
|
214
|
+
with `edit`: a coherent sentence or two describing
|
|
215
|
+
what the page is about, max 50 words. Do NOT truncate
|
|
179
216
|
the content or copy its first lines — write an
|
|
180
217
|
original summary.
|
|
181
218
|
|