@paradigma-inc/flywheel 0.1.93 → 0.1.99

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 (34) hide show
  1. package/README.md +22 -4
  2. package/package.json +2 -1
  3. package/skills/flywheel-llm-proof-paper/SKILL.md +156 -0
  4. package/skills/flywheel-llm-proof-paper/agents/openai.yaml +4 -0
  5. package/skills/flywheel-llm-proof-paper/references/checks.md +60 -0
  6. package/skills/flywheel-llm-proof-paper/scripts/__pycache__/check_paper.cpython-311.pyc +0 -0
  7. package/skills/flywheel-llm-proof-paper/scripts/check_paper.py +1065 -0
  8. package/src/agents.mjs +5 -2
  9. package/src/cli.mjs +27 -3
  10. package/src/public-command-metadata.mjs +44 -0
  11. package/src/runtime/vendor/flywheel-cli-dist/commands/_wait-polling.d.ts +21 -0
  12. package/src/runtime/vendor/flywheel-cli-dist/commands/_wait-polling.js +68 -2
  13. package/src/runtime/vendor/flywheel-cli-dist/commands/_wait-polling.js.map +1 -1
  14. package/src/runtime/vendor/flywheel-cli-dist/commands/compute-acquire.js +2 -8
  15. package/src/runtime/vendor/flywheel-cli-dist/commands/compute-acquire.js.map +1 -1
  16. package/src/runtime/vendor/flywheel-cli-dist/commands/feedback-create.js +4 -0
  17. package/src/runtime/vendor/flywheel-cli-dist/commands/feedback-create.js.map +1 -1
  18. package/src/runtime/vendor/flywheel-cli-dist/commands/registry/compute.js +1 -1
  19. package/src/runtime/vendor/flywheel-cli-dist/commands/registry/compute.js.map +1 -1
  20. package/src/runtime/vendor/flywheel-cli-dist/commands/registry/resources.js +16 -0
  21. package/src/runtime/vendor/flywheel-cli-dist/commands/registry/resources.js.map +1 -1
  22. package/src/runtime/vendor/flywheel-cli-dist/generatedProductTelemetryContract.d.ts +1 -1
  23. package/src/runtime/vendor/flywheel-cli-dist/generatedProductTelemetryContract.js +3 -3
  24. package/src/runtime/vendor/flywheel-cli-dist/generatedProductTelemetryContract.js.map +1 -1
  25. package/src/runtime/vendor/manifest.json +1 -1
  26. package/src/setup/shared/prior-mode-detect.mjs +76 -9
  27. package/src/unified-cli.mjs +54 -16
  28. package/src/update/cache.mjs +124 -0
  29. package/src/update/command.mjs +438 -0
  30. package/src/update/install-state.mjs +135 -0
  31. package/src/update/refresh.mjs +393 -0
  32. package/src/update/registry.mjs +35 -0
  33. package/src/update/version.mjs +59 -0
  34. package/src/update/warning.mjs +109 -0
package/README.md CHANGED
@@ -362,14 +362,32 @@ npx --yes @paradigma-inc/flywheel setup --mode cli --antigravity --project
362
362
 
363
363
  ## Public Update Flow
364
364
 
365
- After a new release:
365
+ Flywheel checks for newer public CLI releases during normal command use and
366
+ prints stale-version advisories to stderr only. To update the managed local
367
+ package and refresh detected local MCP host and bundled-skill setup artifacts,
368
+ run:
366
369
 
367
370
  ```bash
368
- npx --yes @paradigma-inc/flywheel@latest setup --mode mcp --install-skill
371
+ flywheel update --yes
369
372
  ```
370
373
 
371
- Reruns are idempotent and should be used as the primary recovery path for setup
372
- and update issues.
374
+ Check status without changing files:
375
+
376
+ ```bash
377
+ flywheel update --check
378
+ ```
379
+
380
+ Preview package and local setup refresh steps without changing files:
381
+
382
+ ```bash
383
+ flywheel update --dry-run
384
+ ```
385
+
386
+ If no local Flywheel setup artifacts are detected, rerun the public installer:
387
+
388
+ ```bash
389
+ curl -fsSL https://flywheel.paradigma.inc/install | sh
390
+ ```
373
391
 
374
392
  ## Troubleshooting
375
393
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@paradigma-inc/flywheel",
3
- "version": "0.1.93",
3
+ "version": "0.1.99",
4
4
  "description": "One-command setup for Flywheel MCP hosts",
5
5
  "type": "module",
6
6
  "files": [
@@ -25,6 +25,7 @@
25
25
  "open": "^10.2.0",
26
26
  "ora": "^9.0.0",
27
27
  "picocolors": "^1.1.1",
28
+ "semver": "^7.8.0",
28
29
  "skills": "1.4.7",
29
30
  "string-width": "^8.2.0",
30
31
  "wrap-ansi": "^10.0.0"
@@ -0,0 +1,156 @@
1
+ ---
2
+ name: flywheel-llm-proof-paper
3
+ description: Sanity-check LaTeX and BibTeX papers for fake or mismatched references and optional Slop Guard prose lint signals before submission.
4
+ ---
5
+
6
+ # LLM-Proof Paper
7
+
8
+ ## When To Use
9
+
10
+ Use this skill when the user wants to sanity-check, LLM-proof, submission-check, or preflight an academic paper before sharing, submitting to arXiv, or sending to reviewers. The normal input is a LaTeX project containing `.tex` and `.bib` files, but the checker can also run against a directory with only a manuscript and bibliography files.
11
+
12
+ This is a universal local skill. It does not depend on a specific agent runtime: run the bundled Python checker from this skill directory, inspect the report, then summarize hard failures and warnings.
13
+
14
+ ## What It Checks
15
+
16
+ Hard checks block submission:
17
+
18
+ - malformed or unresolved DOI and arXiv identifiers
19
+ - Crossref DOI or arXiv metadata that clearly contradicts a comparable BibTeX title
20
+
21
+ Soft checks need author review:
22
+
23
+ - BibTeX entries with no DOI or arXiv ID, which need an agent/manual title
24
+ search before they are trusted
25
+ - references whose DOI or arXiv ID resolves, but whose BibTeX title contains
26
+ LaTeX syntax the checker intentionally does not interpret
27
+ - references whose DOI resolves but no catalog title metadata is available for
28
+ automatic comparison
29
+ - Slop Guard prose lint output when enabled, including AI self-disclosure,
30
+ assistant tone markers, placeholder text, and formulaic writing signals
31
+
32
+ The checker intentionally does not report missing cite keys, duplicate BibTeX
33
+ keys, or unused BibTeX entries; LaTeX/BibTeX already covers compile-time
34
+ citation consistency.
35
+
36
+ The boundary is intentional: the script handles objective catalog lookups and
37
+ high-confidence plain-title comparisons for `.bib` entries. It does not parse
38
+ LaTeX citations; LaTeX/BibTeX owns citation consistency, and checking every
39
+ BibTeX entry avoids fragile citation-command allowlists. It is not a LaTeX
40
+ interpreter; when title normalization would require judgment, the report leaves
41
+ that as an agent/manual warning instead of adding another fragile parsing rule.
42
+
43
+ Load [references/checks.md](references/checks.md) only when you need the detailed taxonomy or want to tune the checker.
44
+
45
+ ## Invocation Questionnaire
46
+
47
+ Before running the checker, ask a short startup questionnaire unless the user has
48
+ already specified every choice. Use the active host's user-question mechanism:
49
+
50
+ - Codex: `request_user_input`
51
+ - Claude Code: `AskUserQuestion`
52
+
53
+ If neither tool is available, present the same choices in Markdown and ask the
54
+ user to reply with option labels or "Other". Ask for the paper root separately
55
+ when it is missing; if several likely roots exist, offer them as choices.
56
+
57
+ Ask these choices together when the host supports grouped questions:
58
+
59
+ 1. `run_profile`:
60
+ - Standard preflight (recommended): every bibliography entry, network
61
+ metadata verification, and Slop Guard if selected. Full papers can take a
62
+ minute or two because scholarly metadata lookups are network-bound.
63
+ - Offline structural pass: add `--offline`; bibliography parsing and
64
+ optional Slop Guard still run, but catalog lookups are skipped.
65
+ 2. `writing_lint_mode`:
66
+ - Run Slop Guard (recommended): include `--slop-guard`. This uses the local
67
+ `sg` CLI when available, otherwise `uvx --from slop-guard sg`; the first
68
+ `uvx` run may install Slop Guard into uv's cache.
69
+ - Skip Slop Guard: do not run prose lint.
70
+ - Local-only Slop Guard: include `--slop-guard` only if `sg` is already
71
+ installed as a shell command; otherwise explain that the user can install
72
+ Slop Guard or choose the normal `uvx` path.
73
+ 3. `output_mode`:
74
+ - Markdown report file (recommended): write
75
+ `paper-llm-proof-report.md` under the paper root.
76
+ - Markdown stdout: print the report instead of writing a file.
77
+ - JSON stdout: use `--format json` for downstream tooling.
78
+
79
+ Map answers directly to flags: offline adds `--offline`; Slop Guard adds
80
+ `--slop-guard`; JSON output adds `--format json`; report-file output adds
81
+ `--format markdown --out <paper-root>/paper-llm-proof-report.md`.
82
+
83
+ ## Workflow
84
+
85
+ 1. Locate the paper root.
86
+ - Prefer the directory containing the main `.tex` file, `.bib` files, or build config.
87
+ - If multiple candidate roots exist, choose the one that contains the manuscript source and bibliography together.
88
+ 2. Run the invocation questionnaire and map the answers to checker flags.
89
+ 3. Run the bundled checker from this skill directory.
90
+
91
+ ```bash
92
+ uv run --script scripts/check_paper.py /absolute/path/to/latex-project --format markdown --out /absolute/path/to/latex-project/paper-llm-proof-report.md
93
+ ```
94
+
95
+ When `--out` is used, the checker prints a one-line stderr summary with hard
96
+ failure count, warning count, and the exit code while leaving the full report in
97
+ the requested file.
98
+
99
+ The checker declares its Python dependencies in script metadata, so use
100
+ `uv run --script` or execute `scripts/check_paper.py` directly to provision them
101
+ automatically.
102
+
103
+ 1. Treat exit code `2` as a blocker.
104
+ - Do not wave away hard failures.
105
+ - Fix or explicitly escalate every hard failure before treating the paper as submission-ready.
106
+ - For hard reference failures, do a second-pass agent check before final
107
+ reporting: search the DOI, arXiv ID, or exact title in public scholarly
108
+ sources; if the paper is real and the checker missed an edge case, report
109
+ it as a checker false positive with the evidence.
110
+ 2. Review warnings manually.
111
+ - Manual-reference warnings mean the checker needs the calling agent to search the exact title.
112
+ - Slop Guard warnings mean the text contains residue or prose-lint signals that should be reviewed; do not accuse the author.
113
+ 3. Report results in submission-risk order.
114
+ - Start with hard failures if any exist.
115
+ - Include exact file paths and line numbers.
116
+ - For fake or unverifiable references, name the key and the verification method that failed.
117
+ - For references with no DOI or arXiv ID, search the exact title yourself and say whether the checker flagged a real risk or just needs manual confirmation.
118
+ - For warnings, explain what needs attention and what evidence would resolve it.
119
+
120
+ ## Useful Commands
121
+
122
+ Check bibliography entries:
123
+
124
+ ```bash
125
+ uv run --script scripts/check_paper.py /paper --format markdown --out /paper/paper-llm-proof-report.md
126
+ ```
127
+
128
+ Emit machine-readable JSON:
129
+
130
+ ```bash
131
+ uv run --script scripts/check_paper.py /paper --format json
132
+ ```
133
+
134
+ Skip network verification for an offline structural pass:
135
+
136
+ ```bash
137
+ uv run --script scripts/check_paper.py /paper --offline
138
+ ```
139
+
140
+ Enable Slop Guard as warning-only prose-lint evidence:
141
+
142
+ ```bash
143
+ uv run --script scripts/check_paper.py /paper --slop-guard
144
+ ```
145
+
146
+ ## Result Contract
147
+
148
+ When this skill completes a pass, it should produce:
149
+
150
+ - a local report file when `--out` is used
151
+ - a clear hard-failure count
152
+ - a clear warning count
153
+ - enough file, line, key, and verification-method evidence for the author to act
154
+ - no hard claim that a warning is true unless the evidence is direct
155
+
156
+ If there are hard failures, say the paper is not ready for submission. If there are only warnings, say the paper needs author review in the listed areas before submission.
@@ -0,0 +1,4 @@
1
+ interface:
2
+ display_name: "LLM-Proof Paper"
3
+ short_description: "Check papers for fake references and prose slop signals"
4
+ default_prompt: "Use $flywheel-llm-proof-paper to sanity-check a LaTeX and BibTeX paper before submission."
@@ -0,0 +1,60 @@
1
+ # Check Taxonomy
2
+
3
+ ## Hard Reference Checks
4
+
5
+ The checker verifies every parsed entry in the discovered or explicitly supplied
6
+ BibTeX files. It does not parse LaTeX citation commands; LaTeX/BibTeX owns
7
+ compile-time citation consistency, and checking the `.bib` entries directly
8
+ avoids fragile citation-command allowlists.
9
+
10
+ Verification order:
11
+
12
+ 1. DOI from `doi`, `url`, `note`, or `eprint` fields.
13
+ 2. arXiv ID from `eprint` plus `archivePrefix`/`eprinttype`, `url`, or arXiv DOI.
14
+
15
+ A reference is hard-failed when the strongest available identifier cannot be resolved, or when resolved metadata clearly conflicts with a comparable BibTeX title. Entries with no DOI or arXiv ID are warnings, not hard failures: the calling agent should search the exact title and report whether the reference is real, suspicious, or just missing machine-checkable metadata.
16
+
17
+ Title comparison is intentionally limited. The checker normalizes plain text,
18
+ accent commands, links, and simple one-argument formatting macros. It does not
19
+ try to interpret arbitrary LaTeX. If an identifier resolves but the BibTeX title
20
+ still contains unsupported LaTeX commands, the checker emits
21
+ `title-needs-agent-check` so the consuming agent can compare the reference
22
+ manually.
23
+
24
+ The checker does not flag missing cite keys, duplicate BibTeX keys, or unused
25
+ BibTeX entries. LaTeX/BibTeX already owns compile/renderability checks; this
26
+ skill is focused on whether reference identifiers exist and point at the named
27
+ paper.
28
+
29
+ ## Reference Warnings
30
+
31
+ Reference warnings should trigger an agent/manual title search, not automatic rewrites.
32
+
33
+ Common warning patterns:
34
+
35
+ - bibliography entries with no DOI or arXiv ID
36
+ - DOI resolver hits where Crossref/doi.org content negotiation does not provide
37
+ title metadata for automatic comparison
38
+ - identifiers that resolve, but need agent/manual title comparison because the
39
+ BibTeX title is not confidently normalizable
40
+
41
+ Generic URLs without a DOI or arXiv ID are intentionally left to the
42
+ agent/manual exact-title search rather than brittle HTML title scraping.
43
+
44
+ ## Slop Guard
45
+
46
+ `--slop-guard` strips manuscript text and passes it to Slop Guard through the
47
+ local CLI, not MCP. The checker prefers `sg -j -` when `sg` is already
48
+ installed as a shell command; otherwise it uses
49
+ `uvx --from slop-guard sg -j -`.
50
+
51
+ Treat Slop Guard results as triage evidence only. It covers AI
52
+ self-disclosure, assistant tone markers, bracketed placeholders, stock phrases,
53
+ and structural prose tics. A low score or prose-lint finding is never a hard
54
+ failure by itself.
55
+
56
+ ## Catalog Pacing
57
+
58
+ The checker uses open, no-key catalog endpoints only. Crossref and arXiv
59
+ requests are serialized, retried with bounded exponential jitter, and paced to
60
+ the public service limits.