@paradigma-inc/flywheel 0.1.19 → 0.1.26

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.
Files changed (56) hide show
  1. package/README.md +8 -0
  2. package/package.json +1 -1
  3. package/skills/flywheel/references/experiment-design-protocol.md +1 -1
  4. package/skills/flywheel/references/flywheel-mcp-tool-map.md +32 -35
  5. package/skills/flywheel/setting-up-flywheel/updating-flywheel-mcp.md +8 -0
  6. package/skills/flywheel-auto/SKILL.md +1 -1
  7. package/skills/flywheel-auto/references/ARTIFACTS.md +0 -1
  8. package/skills/flywheel-auto/references/INTERFACES.md +16 -10
  9. package/skills/flywheel-auto/references/experiment-design-protocol.md +1 -1
  10. package/skills/flywheel-auto/references/flywheel-mcp-tool-map.md +32 -35
  11. package/skills/flywheel-lookahead/SKILL.md +22 -15
  12. package/skills/flywheel-lookahead/agents/openai.yaml +3 -3
  13. package/skills/flywheel-lookahead/evals/evals.json +13 -1
  14. package/skills/flywheel-lookahead/references/ARTIFACTS.md +0 -1
  15. package/skills/flywheel-lookahead/references/INTERFACES.md +16 -10
  16. package/skills/flywheel-lookahead/references/flywheel-mcp-tool-map.md +32 -35
  17. package/skills/flywheel-prove/SKILL.md +163 -0
  18. package/skills/flywheel-prove/agents/interface.yaml +4 -0
  19. package/skills/flywheel-prove/assets/pipeline_template/bin/tproof +3 -0
  20. package/skills/flywheel-prove/assets/pipeline_template/bin/tproof.cmd +2 -0
  21. package/skills/flywheel-prove/assets/pipeline_template/logs/.gitkeep +1 -0
  22. package/skills/flywheel-prove/assets/pipeline_template/pyproject.toml +23 -0
  23. package/skills/flywheel-prove/assets/pipeline_template/scripts/smoke_test.cmd +2 -0
  24. package/skills/flywheel-prove/assets/pipeline_template/scripts/smoke_test.sh +3 -0
  25. package/skills/flywheel-prove/assets/pipeline_template/src/tproof/__init__.py +1 -0
  26. package/skills/flywheel-prove/assets/pipeline_template/src/tproof/cli.py +298 -0
  27. package/skills/flywheel-prove/assets/pipeline_template/src/tproof/constants.py +10 -0
  28. package/skills/flywheel-prove/assets/pipeline_template/src/tproof/layout.py +51 -0
  29. package/skills/flywheel-prove/assets/pipeline_template/src/tproof/leanops.py +116 -0
  30. package/skills/flywheel-prove/assets/pipeline_template/src/tproof/runstore.py +58 -0
  31. package/skills/flywheel-prove/assets/pipeline_template/src/tproof/tasking.py +94 -0
  32. package/skills/flywheel-prove/assets/pipeline_template/workspace/prompts/fill_sorries.txt +3 -0
  33. package/skills/flywheel-prove/references/workflow.md +193 -0
  34. package/skills/flywheel-prove/scripts/scaffold_pipeline.py +111 -0
  35. package/skills/flywheel-reproduce/SKILL.md +28 -23
  36. package/skills/flywheel-reproduce/evals/evals.json +7 -1
  37. package/skills/flywheel-reproduce/references/ARTIFACTS.md +0 -1
  38. package/skills/flywheel-reproduce/references/INTERFACES.md +16 -10
  39. package/skills/flywheel-reproduce/references/experiment-design-protocol.md +1 -1
  40. package/skills/flywheel-reproduce/references/flywheel-mcp-tool-map.md +32 -35
  41. package/skills/flywheel-reproduce/references/source-blog.md +35 -0
  42. package/skills/flywheel-reproduce/references/source-generic.md +30 -0
  43. package/skills/flywheel-reproduce/references/source-notes.md +35 -0
  44. package/skills/flywheel-reproduce/references/source-paper.md +89 -0
  45. package/skills/flywheel-reproduce/references/source-wiki.md +36 -0
  46. package/skills/flywheel-to-graph/SKILL.md +26 -21
  47. package/skills/flywheel-to-graph/evals/evals.json +7 -1
  48. package/skills/flywheel-to-graph/references/ARTIFACTS.md +0 -1
  49. package/skills/flywheel-to-graph/references/INTERFACES.md +16 -10
  50. package/skills/flywheel-to-graph/references/flywheel-mcp-tool-map.md +32 -35
  51. package/skills/flywheel-to-graph/references/source-blog.md +34 -0
  52. package/skills/flywheel-to-graph/references/source-generic.md +29 -0
  53. package/skills/flywheel-to-graph/references/source-notes.md +34 -0
  54. package/skills/flywheel-to-graph/references/source-paper.md +85 -0
  55. package/skills/flywheel-to-graph/references/source-wiki.md +35 -0
  56. package/src/cli.mjs +69 -3
@@ -0,0 +1,85 @@
1
+ # Paper Source Reference
2
+
3
+ Use this reference when the source is a paper PDF, arXiv page, DOI URL, or direct PDF URL.
4
+
5
+ ## Source Detection
6
+
7
+ Match this reference when any of these are true:
8
+
9
+ - Local file ends with `.pdf`.
10
+ - URL matches `arxiv.org/abs/`.
11
+ - URL matches `arxiv.org/pdf/`.
12
+ - URL is a DOI resolver link (`doi.org/...`).
13
+ - URL is a direct PDF link.
14
+
15
+ ## Acquisition Rules
16
+
17
+ Acquire source content in this order:
18
+
19
+ 1. Local PDF path: read local file bytes and preserve original filename.
20
+ 2. arXiv HTML URL (`arxiv.org/abs/...` or `arxiv.org/html/...`): fetch page body and parse section structure from HTML.
21
+ 3. arXiv PDF URL (`arxiv.org/pdf/...`): download PDF bytes and treat as PDF input.
22
+ 4. DOI URL: resolve final landing page; if it exposes a PDF, download it, otherwise fetch the HTML body.
23
+ 5. Direct PDF URL: download PDF bytes.
24
+
25
+ ## Parsing Rules
26
+
27
+ For PDF text extraction, use parser fallback chain exactly:
28
+
29
+ `PyMuPDF -> pypdfium2 -> pypdf`
30
+
31
+ - Try one parser at a time in that order.
32
+ - Advance to the next parser only when the previous parser fails to extract usable text.
33
+ - If all parsers fail, emit explicit failure and stop. Do not continue with partial guessed structure.
34
+ - If all parsers fail, do not silently produce a single-summary node with a PDF artifact.
35
+
36
+ License note:
37
+
38
+ - PyMuPDF is AGPL-3.0. Artifex offers a commercial license when AGPL terms are not acceptable for downstream distribution.
39
+
40
+ For arXiv HTML parsing, use LaTeXML selector boundaries:
41
+
42
+ - Top-level sections: `section.ltx_section`
43
+ - Top-level headings: `h2.ltx_title`
44
+ - Subsections: `section.ltx_subsection`
45
+ - Subsection headings: `h3.ltx_title`
46
+
47
+ Do not use naive `section` selectors without class filtering.
48
+
49
+ ## Graph Decomposition Contract
50
+
51
+ Default shape:
52
+
53
+ - Create one parent paper node under the requested root.
54
+ - Create one child node per detected top-level paper section.
55
+ - Typical section set includes Abstract, Introduction, Methods, Results, Discussion, Conclusion, and Related Work when present.
56
+
57
+ ## Content Placement Contract
58
+
59
+ - Parent title: paper title.
60
+ - Parent summary: abstract or concise abstract-derived synopsis.
61
+ - Parent content: one-paragraph orientation plus links/references to section children.
62
+ - Child content: narrative for that section only.
63
+
64
+ ## Artifact Contract
65
+
66
+ - Attach the paper PDF artifact to the parent paper node.
67
+ - Attach extracted figures/tables to the section child where they appear, when extraction is feasible.
68
+
69
+ ## Edge Contract
70
+
71
+ - Use hierarchy edges for paper parent -> section children.
72
+ - Do not add lateral interpretive edges (`cites`, `builds-on`, `derived-from`) by default.
73
+
74
+ ## Insight Controller Contract
75
+
76
+ - Single-paper one-shot import: no separate insight control node is created.
77
+ - Multi-paper corpus import: create one insight control node above paper parent nodes.
78
+
79
+ ## Failure Contract
80
+
81
+ - If acquisition fails, return explicit failure with the failing source variant and stop.
82
+ - If all parsers fail, return explicit failure and stop.
83
+ - Do not silently degrade to one summary node plus artifact-only output.
84
+
85
+ These rules apply only when `$flywheel-to-graph` is the active skill.
@@ -0,0 +1,35 @@
1
+ # Wiki Source Reference
2
+
3
+ Use this reference for markdown wiki-style corpora, README trees, GitHub wiki exports, and Notion markdown exports.
4
+
5
+ ## Source Detection
6
+
7
+ Match this reference when source material is wiki-like markdown content with multiple linked pages.
8
+
9
+ ## Acquisition
10
+
11
+ - Collect all relevant markdown pages in scope.
12
+ - Preserve stable page identifiers from file paths or page titles.
13
+
14
+ ## Decomposition
15
+
16
+ - One stable page or concept maps to one node by default.
17
+ - Large pages may split by top-level headings when that improves readability.
18
+
19
+ ## Content and Artifacts
20
+
21
+ - Main narrative goes into node `content`.
22
+ - Short synopsis goes into `summary`.
23
+ - Supporting files (images, PDFs, data files, notebooks) are node artifacts.
24
+
25
+ ## Edges
26
+
27
+ - Promote only durable semantic relationships to graph edges.
28
+ - Keep incidental hyperlinks in markdown body.
29
+
30
+ ## Failure Behavior
31
+
32
+ - If pages are unreadable or missing, emit explicit failure and stop for that page.
33
+ - Do not silently skip unreadable pages.
34
+
35
+ These rules apply only when `$flywheel-to-graph` is the active skill.
package/src/cli.mjs CHANGED
@@ -40,6 +40,7 @@ import {
40
40
  listBundledSkills,
41
41
  partitionInstallSkillHosts,
42
42
  removeInstalledSkillsForHosts,
43
+ resolveSkillsAgentName,
43
44
  SUPPORTED_INSTALL_SKILL_HOSTS,
44
45
  resolveInstalledSkillDir,
45
46
  resolvePackageRoot,
@@ -403,7 +404,12 @@ async function setupHost(hostName, scope, serverUrl, apiKey, serverName) {
403
404
  };
404
405
  }
405
406
 
406
- function printSetupResults(results, scope, serverUrl) {
407
+ function printSetupResults(
408
+ results,
409
+ scope,
410
+ serverUrl,
411
+ { showSkillRefreshGuidance = false, experimentalSyncAgents = [] } = {},
412
+ ) {
407
413
  log.blank();
408
414
  log.plain(pc.green("✔ Flywheel setup complete"));
409
415
  log.blank();
@@ -417,9 +423,48 @@ function printSetupResults(results, scope, serverUrl) {
417
423
  log.plain(` ${icon} ${result.status}`);
418
424
  log.plain(` ${pc.dim(result.filePath)}`);
419
425
  }
426
+ if (showSkillRefreshGuidance) {
427
+ log.blank();
428
+ log.plain(" Bundled skill refresh guidance");
429
+ log.plain(
430
+ ` Preferred: ${pc.bold("npx --yes @paradigma-inc/flywheel@latest setup --install-skill --project")}`,
431
+ );
432
+ log.plain(
433
+ ` ${pc.bold("npm install --save-dev @paradigma-inc/flywheel@latest")}`,
434
+ );
435
+ if (experimentalSyncAgents.length === 1) {
436
+ log.plain(" Optional path via skills experimental_sync:");
437
+ log.plain(
438
+ ` ${pc.bold(`npx skills experimental_sync --agent ${experimentalSyncAgents[0]} -y`)}`,
439
+ );
440
+ } else if (experimentalSyncAgents.length > 1) {
441
+ log.plain(" Optional path via skills experimental_sync for selected hosts:");
442
+ for (const agentName of experimentalSyncAgents) {
443
+ log.plain(
444
+ ` ${pc.bold(`npx skills experimental_sync --agent ${agentName} -y`)}`,
445
+ );
446
+ }
447
+ }
448
+ }
420
449
  log.blank();
421
450
  }
422
451
 
452
+ function resolveExperimentalSyncAgentsForHosts(supportedHosts) {
453
+ const agentNames = [];
454
+ const seenAgentNames = new Set();
455
+
456
+ for (const hostName of supportedHosts) {
457
+ const agentName = resolveSkillsAgentName(hostName);
458
+ if (seenAgentNames.has(agentName)) {
459
+ continue;
460
+ }
461
+ seenAgentNames.add(agentName);
462
+ agentNames.push(agentName);
463
+ }
464
+
465
+ return agentNames;
466
+ }
467
+
423
468
  async function promptGuidedSkillInstall(
424
469
  bundledSkillNames,
425
470
  unsupportedHosts,
@@ -658,7 +703,21 @@ async function runSetupCommand(options) {
658
703
  const completedCleanupState = cleanupState;
659
704
  cleanupState = null;
660
705
  await discardInstallSkillCleanupState(completedCleanupState);
661
- printSetupResults(setupResults, scope, serverUrl);
706
+ const showSkillRefreshGuidance =
707
+ scope === "project" &&
708
+ skillDecisionMode === "install" &&
709
+ supportedHosts.length > 0;
710
+ printSetupResults(
711
+ setupResults,
712
+ scope,
713
+ serverUrl,
714
+ {
715
+ showSkillRefreshGuidance,
716
+ experimentalSyncAgents: showSkillRefreshGuidance
717
+ ? resolveExperimentalSyncAgentsForHosts(supportedHosts)
718
+ : [],
719
+ },
720
+ );
662
721
  return;
663
722
  }
664
723
 
@@ -720,7 +779,14 @@ async function runSetupCommand(options) {
720
779
  const completedCleanupState = cleanupState;
721
780
  cleanupState = null;
722
781
  await discardInstallSkillCleanupState(completedCleanupState);
723
- printSetupResults(setupResults, scope, serverUrl);
782
+ const showSkillRefreshGuidance =
783
+ scope === "project" && supportedHosts.length > 0;
784
+ printSetupResults(setupResults, scope, serverUrl, {
785
+ showSkillRefreshGuidance,
786
+ experimentalSyncAgents: showSkillRefreshGuidance
787
+ ? resolveExperimentalSyncAgentsForHosts(supportedHosts)
788
+ : [],
789
+ });
724
790
  } catch (error) {
725
791
  if (cleanupState) {
726
792
  await cleanupInstalledSkillArtifactsForHosts({