@tiagojct/subsub 0.5.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.
Files changed (54) hide show
  1. package/README.md +90 -0
  2. package/bin/subsub-bench.js +19 -0
  3. package/bin/subsub.js +14 -0
  4. package/dist/args.js +67 -0
  5. package/dist/bench.js +534 -0
  6. package/dist/bridge.js +107 -0
  7. package/dist/cli.js +209 -0
  8. package/dist/config.js +144 -0
  9. package/dist/doctor.js +131 -0
  10. package/dist/init.js +215 -0
  11. package/dist/look.js +107 -0
  12. package/dist/paths.js +86 -0
  13. package/dist/preview.js +94 -0
  14. package/dist/profiles.js +79 -0
  15. package/dist/prompt.js +72 -0
  16. package/dist/roles.js +73 -0
  17. package/dist/subsub.js +414 -0
  18. package/docs/Subsub.md +126 -0
  19. package/extensions/subsub.ts +6 -0
  20. package/package.json +73 -0
  21. package/prompts/alert.md +4 -0
  22. package/prompts/clean-tags.md +4 -0
  23. package/prompts/gaps.md +5 -0
  24. package/prompts/import-queue.md +5 -0
  25. package/prompts/lit-note.md +5 -0
  26. package/prompts/manuscript.md +5 -0
  27. package/prompts/synthesis.md +5 -0
  28. package/prompts/tag-batch.md +5 -0
  29. package/roles/librarian.md +46 -0
  30. package/roles/researcher.md +37 -0
  31. package/scripts/build.mjs +14 -0
  32. package/scripts/make-themes.py +116 -0
  33. package/src/args.ts +64 -0
  34. package/src/bench.ts +580 -0
  35. package/src/bridge.ts +134 -0
  36. package/src/cli.ts +201 -0
  37. package/src/config.ts +191 -0
  38. package/src/doctor.ts +171 -0
  39. package/src/init.ts +252 -0
  40. package/src/look.ts +141 -0
  41. package/src/paths.ts +100 -0
  42. package/src/preview.ts +107 -0
  43. package/src/profiles.ts +99 -0
  44. package/src/prompt.ts +81 -0
  45. package/src/roles.ts +83 -0
  46. package/src/subsub.ts +434 -0
  47. package/templates/Zotero agent.md +87 -0
  48. package/templates/vocabularies/any-field.md +52 -0
  49. package/templates/vocabularies/health-informatics.md +88 -0
  50. package/templates/vocabularies/health-sciences.md +95 -0
  51. package/themes/subsub-glauca-dark.json +91 -0
  52. package/themes/subsub-glauca-light.json +91 -0
  53. package/themes/subsub-try-works-dark.json +91 -0
  54. package/themes/subsub-try-works-light.json +91 -0
@@ -0,0 +1,95 @@
1
+ ---
2
+ required_facets: topic, status
3
+ single_facets: status
4
+ max_per_facet: topic=4, type=2
5
+ ---
6
+ Tag list for the Zotero library (health sciences). Sub-Sub reads this file and refuses any tag that is not listed here. Add, rename or remove tags as your library needs: one tag per bullet, in backticks, then a short description. Put old or alternative names after "aliases:"; the librarian uses them to map old tags.
7
+
8
+ ## topic
9
+
10
+ What the item is about. 1 to 4 per item.
11
+
12
+ - `topic/cardiovascular` Heart and blood vessels. aliases: cardiology, hypertension
13
+ - `topic/respiratory` Lungs and airways. aliases: pulmonology, asthma, COPD
14
+ - `topic/neurology` Brain and nervous system. aliases: stroke, dementia
15
+ - `topic/mental-health` Psychiatry and mental health. aliases: psychiatry, depression, anxiety
16
+ - `topic/oncology` Cancer. aliases: cancer
17
+ - `topic/infectious-disease` Infections and vaccines. aliases: infection, vaccination, COVID-19
18
+ - `topic/endocrinology` Diabetes, obesity and hormones. aliases: diabetes, obesity
19
+ - `topic/gastroenterology` Digestive system and liver. aliases: hepatology
20
+ - `topic/nephrology` Kidneys and urinary tract. aliases: kidney
21
+ - `topic/musculoskeletal` Bones, joints and muscles. aliases: rheumatology, orthopaedics
22
+ - `topic/immunology` Immune system and allergy. aliases: allergy
23
+ - `topic/haematology` Blood. aliases: hematology
24
+ - `topic/reproductive-health` Obstetrics, gynaecology and sexual health. aliases: obstetrics, gynecology, pregnancy
25
+ - `topic/pediatrics` Children and adolescents. aliases: paediatrics, children
26
+ - `topic/ageing` Older adults and ageing. aliases: aging, geriatrics
27
+ - `topic/critical-care` Intensive care and emergency medicine. aliases: ICU, emergency
28
+ - `topic/surgery` Surgery and anaesthesia. aliases: anesthesia
29
+ - `topic/pharmacology` Drugs and their effects. aliases: pharmacotherapy, drugs
30
+ - `topic/genetics` Genetics and genomics. aliases: genomics
31
+ - `topic/nutrition` Nutrition and diet. aliases: diet
32
+ - `topic/physiology` Normal function of the body. aliases: human physiology
33
+ - `topic/public-health` Public health and prevention. aliases: prevention
34
+ - `topic/epidemiology` Epidemiology and population studies.
35
+ - `topic/health-services` Organisation, quality and costs of health care. aliases: health care quality, health economics
36
+ - `topic/health-policy` Health policy and regulation. aliases: regulation
37
+ - `topic/medical-education` Education of health professionals. aliases: medical education
38
+ - `topic/ethics` Ethics in medicine and research. aliases: bioethics
39
+ - `topic/digital-health` Digital health, eHealth and mHealth. aliases: eHealth, mHealth, telemedicine
40
+ - `topic/artificial-intelligence` AI in health. aliases: AI, LLM, machine learning
41
+ - `topic/statistics` Statistics and data analysis as a subject: methods, teaching, textbooks. aliases: biostatistics
42
+ - `topic/research-methods` Research methods, reporting, integrity and meta-research. aliases: methodology, reproducibility
43
+ - `topic/history-of-medicine` History of medicine. aliases: history
44
+
45
+ ## method
46
+
47
+ How the work was done. Only when it applies.
48
+
49
+ - `method/statistical-modelling` The work fits regression or other statistical models. A paper or book about statistics gets topic/statistics instead. aliases: regression
50
+ - `method/machine-learning` The work trains or evaluates machine-learning models (not a paper about AI in general). aliases: ML, machine learning
51
+ - `method/nlp` Natural language processing. aliases: NLP, text mining
52
+ - `method/survey` Questionnaire survey. aliases: questionnaire
53
+ - `method/interviews` Interviews and focus groups. aliases: focus groups
54
+ - `method/delphi` Delphi or consensus method. aliases: consensus
55
+ - `method/psychometrics` Instrument development and validation.
56
+ - `method/usability-testing` Usability and user testing. aliases: usability
57
+ - `method/simulation` Simulation or modelling study.
58
+ - `method/laboratory` Laboratory or bench experiments, including animal studies. aliases: in vitro, in vivo
59
+ - `method/imaging` Medical imaging is the main source of data. aliases: MRI, CT, ultrasound
60
+ - `method/programming` Programming and software tools. aliases: programming, R, Python
61
+
62
+ ## type
63
+
64
+ What kind of study or document it is.
65
+
66
+ - `type/rct` The item reports a randomised controlled trial (not a review or commentary about trials). aliases: RCT, Randomized Controlled Trial
67
+ - `type/cohort` Cohort study. aliases: Cohort Studies, longitudinal
68
+ - `type/case-control` Case-control study.
69
+ - `type/cross-sectional` Cross-sectional study. aliases: Cross-Sectional Studies
70
+ - `type/diagnostic-accuracy` Diagnostic accuracy study.
71
+ - `type/validation-study` Validation study (instrument, model or equation).
72
+ - `type/qualitative` Qualitative study.
73
+ - `type/mixed-methods` Mixed-methods study.
74
+ - `type/systematic-review` Systematic review. aliases: Systematic Review
75
+ - `type/meta-analysis` Meta-analysis. aliases: Meta-Analysis
76
+ - `type/scoping-review` Scoping review.
77
+ - `type/narrative-review` Narrative review. aliases: Review
78
+ - `type/guideline` The item is a guideline, statement or technical standard (not a paper about guidelines). aliases: Practice Guideline
79
+ - `type/protocol` Study protocol.
80
+ - `type/editorial` Editorial, commentary, letter or book review. aliases: Editorial, Comment, Letter
81
+ - `type/case-report` Case report.
82
+ - `type/web-document` Web page, blog post or online document. aliases: blog post
83
+ - `type/technical-report` Technical or institutional report.
84
+ - `type/thesis` Thesis or dissertation.
85
+ - `type/textbook` Textbook.
86
+ - `type/monograph` Monograph or non-fiction book.
87
+ - `type/edited-book` Edited book or book chapter.
88
+
89
+ ## status
90
+
91
+ Reading status. Exactly one per item.
92
+
93
+ - `status/to-read` Not read yet.
94
+ - `status/reading` Reading now.
95
+ - `status/read` Read.
@@ -0,0 +1,91 @@
1
+ {
2
+ "$schema": "https://raw.githubusercontent.com/earendil-works/pi/main/packages/coding-agent/src/modes/interactive/theme/theme-schema.json",
3
+ "name": "subsub-glauca-dark",
4
+ "vars": {
5
+ "bg": "#10161c",
6
+ "surface": "#171f26",
7
+ "raised": "#1f2932",
8
+ "text": "#e8eef2",
9
+ "muted": "#8c8c8c",
10
+ "line": "#2a3540",
11
+ "mark": "#3d97ff",
12
+ "markBright": "#6cb2ff",
13
+ "markDeep": "#007aff",
14
+ "toneDeep": "#142430",
15
+ "tone": "#2b4356",
16
+ "toneBright": "#4d7391",
17
+ "tonePale": "#93b7c9",
18
+ "green": "#62ba46",
19
+ "red": "#b85f5f",
20
+ "yellow": "#c79a3d",
21
+ "violet": "#b184db",
22
+ "link": "#4a9edb",
23
+ "dim": "#616365",
24
+ "select": "#2b4356",
25
+ "okBg": "#22352a",
26
+ "errBg": "#31292f"
27
+ },
28
+ "colors": {
29
+ "accent": "mark",
30
+ "border": "toneBright",
31
+ "borderAccent": "mark",
32
+ "borderMuted": "line",
33
+ "success": "green",
34
+ "error": "red",
35
+ "warning": "yellow",
36
+ "muted": "muted",
37
+ "dim": "dim",
38
+ "text": "text",
39
+ "thinkingText": "muted",
40
+ "selectedBg": "select",
41
+ "scrollbarTrack": "line",
42
+ "scrollbarThumb": "muted",
43
+ "searchMatchBg": "select",
44
+ "searchMatchText": "text",
45
+ "userMessageBg": "raised",
46
+ "userMessageText": "text",
47
+ "customMessageBg": "surface",
48
+ "customMessageText": "text",
49
+ "customMessageLabel": "tonePale",
50
+ "toolPendingBg": "surface",
51
+ "toolSuccessBg": "okBg",
52
+ "toolErrorBg": "errBg",
53
+ "toolTitle": "text",
54
+ "toolOutput": "muted",
55
+ "mdHeading": "tonePale",
56
+ "mdLink": "link",
57
+ "mdLinkUrl": "dim",
58
+ "mdCode": "green",
59
+ "mdCodeBlock": "text",
60
+ "mdCodeBlockBorder": "line",
61
+ "mdQuote": "muted",
62
+ "mdQuoteBorder": "toneBright",
63
+ "mdHr": "line",
64
+ "mdListBullet": "toneBright",
65
+ "toolDiffAdded": "green",
66
+ "toolDiffRemoved": "red",
67
+ "toolDiffContext": "muted",
68
+ "syntaxComment": "#8c8c8c",
69
+ "syntaxKeyword": "#007aff",
70
+ "syntaxFunction": "#4a9edb",
71
+ "syntaxVariable": "#e8eef2",
72
+ "syntaxString": "#62ba46",
73
+ "syntaxNumber": "#b184db",
74
+ "syntaxType": "#45a3ad",
75
+ "syntaxOperator": "#a7b1b8",
76
+ "syntaxPunctuation": "#86929a",
77
+ "thinkingOff": "line",
78
+ "thinkingMinimal": "dim",
79
+ "thinkingLow": "toneBright",
80
+ "thinkingMedium": "tonePale",
81
+ "thinkingHigh": "violet",
82
+ "thinkingXhigh": "markBright",
83
+ "thinkingMax": "mark",
84
+ "bashMode": "mark"
85
+ },
86
+ "export": {
87
+ "pageBg": "#10161c",
88
+ "cardBg": "#171f26",
89
+ "infoBg": "#1f2932"
90
+ }
91
+ }
@@ -0,0 +1,91 @@
1
+ {
2
+ "$schema": "https://raw.githubusercontent.com/earendil-works/pi/main/packages/coding-agent/src/modes/interactive/theme/theme-schema.json",
3
+ "name": "subsub-glauca-light",
4
+ "vars": {
5
+ "bg": "#f0f4f6",
6
+ "surface": "#f7fafb",
7
+ "raised": "#ffffff",
8
+ "text": "#16222a",
9
+ "muted": "#55646d",
10
+ "line": "#cdd7dc",
11
+ "mark": "#0b62cf",
12
+ "markBright": "#007aff",
13
+ "markDeep": "#084b96",
14
+ "toneDeep": "#16303f",
15
+ "tone": "#35576b",
16
+ "toneBright": "#3e6d84",
17
+ "tonePale": "#b7cdd6",
18
+ "green": "#3c6e38",
19
+ "red": "#a55859",
20
+ "yellow": "#846c36",
21
+ "violet": "#6b588b",
22
+ "link": "#33668b",
23
+ "dim": "#8b969d",
24
+ "select": "#b7cdd6",
25
+ "okBg": "#dde6e0",
26
+ "errBg": "#eae0e1"
27
+ },
28
+ "colors": {
29
+ "accent": "mark",
30
+ "border": "toneBright",
31
+ "borderAccent": "mark",
32
+ "borderMuted": "line",
33
+ "success": "green",
34
+ "error": "red",
35
+ "warning": "yellow",
36
+ "muted": "muted",
37
+ "dim": "dim",
38
+ "text": "text",
39
+ "thinkingText": "muted",
40
+ "selectedBg": "select",
41
+ "scrollbarTrack": "line",
42
+ "scrollbarThumb": "muted",
43
+ "searchMatchBg": "select",
44
+ "searchMatchText": "text",
45
+ "userMessageBg": "raised",
46
+ "userMessageText": "text",
47
+ "customMessageBg": "surface",
48
+ "customMessageText": "text",
49
+ "customMessageLabel": "tone",
50
+ "toolPendingBg": "surface",
51
+ "toolSuccessBg": "okBg",
52
+ "toolErrorBg": "errBg",
53
+ "toolTitle": "text",
54
+ "toolOutput": "muted",
55
+ "mdHeading": "tone",
56
+ "mdLink": "link",
57
+ "mdLinkUrl": "dim",
58
+ "mdCode": "green",
59
+ "mdCodeBlock": "text",
60
+ "mdCodeBlockBorder": "line",
61
+ "mdQuote": "muted",
62
+ "mdQuoteBorder": "toneBright",
63
+ "mdHr": "line",
64
+ "mdListBullet": "toneBright",
65
+ "toolDiffAdded": "green",
66
+ "toolDiffRemoved": "red",
67
+ "toolDiffContext": "muted",
68
+ "syntaxComment": "#55646d",
69
+ "syntaxKeyword": "#0b62cf",
70
+ "syntaxFunction": "#33668b",
71
+ "syntaxVariable": "#16222a",
72
+ "syntaxString": "#3c6e38",
73
+ "syntaxNumber": "#6b588b",
74
+ "syntaxType": "#306972",
75
+ "syntaxOperator": "#55646d",
76
+ "syntaxPunctuation": "#55646d",
77
+ "thinkingOff": "line",
78
+ "thinkingMinimal": "dim",
79
+ "thinkingLow": "toneBright",
80
+ "thinkingMedium": "tone",
81
+ "thinkingHigh": "violet",
82
+ "thinkingXhigh": "markBright",
83
+ "thinkingMax": "mark",
84
+ "bashMode": "mark"
85
+ },
86
+ "export": {
87
+ "pageBg": "#f0f4f6",
88
+ "cardBg": "#f7fafb",
89
+ "infoBg": "#ffffff"
90
+ }
91
+ }
@@ -0,0 +1,91 @@
1
+ {
2
+ "$schema": "https://raw.githubusercontent.com/earendil-works/pi/main/packages/coding-agent/src/modes/interactive/theme/theme-schema.json",
3
+ "name": "subsub-try-works-dark",
4
+ "vars": {
5
+ "bg": "#12161b",
6
+ "surface": "#1b2127",
7
+ "raised": "#232b32",
8
+ "text": "#f1efe9",
9
+ "muted": "#97a0a4",
10
+ "line": "#2c3640",
11
+ "mark": "#c9651d",
12
+ "markBright": "#e0832a",
13
+ "markDeep": "#9a4a16",
14
+ "toneDeep": "#14242c",
15
+ "tone": "#2c4953",
16
+ "toneBright": "#4d7680",
17
+ "tonePale": "#8fb6bd",
18
+ "green": "#86a87f",
19
+ "red": "#c05a3a",
20
+ "yellow": "#c9651d",
21
+ "violet": "#a487ba",
22
+ "link": "#5f93b0",
23
+ "dim": "#687074",
24
+ "select": "#2c4953",
25
+ "okBg": "#2a3433",
26
+ "errBg": "#352a2a"
27
+ },
28
+ "colors": {
29
+ "accent": "mark",
30
+ "border": "toneBright",
31
+ "borderAccent": "mark",
32
+ "borderMuted": "line",
33
+ "success": "green",
34
+ "error": "red",
35
+ "warning": "yellow",
36
+ "muted": "muted",
37
+ "dim": "dim",
38
+ "text": "text",
39
+ "thinkingText": "muted",
40
+ "selectedBg": "select",
41
+ "scrollbarTrack": "line",
42
+ "scrollbarThumb": "muted",
43
+ "searchMatchBg": "select",
44
+ "searchMatchText": "text",
45
+ "userMessageBg": "raised",
46
+ "userMessageText": "text",
47
+ "customMessageBg": "surface",
48
+ "customMessageText": "text",
49
+ "customMessageLabel": "tonePale",
50
+ "toolPendingBg": "surface",
51
+ "toolSuccessBg": "okBg",
52
+ "toolErrorBg": "errBg",
53
+ "toolTitle": "text",
54
+ "toolOutput": "muted",
55
+ "mdHeading": "tonePale",
56
+ "mdLink": "link",
57
+ "mdLinkUrl": "dim",
58
+ "mdCode": "green",
59
+ "mdCodeBlock": "text",
60
+ "mdCodeBlockBorder": "line",
61
+ "mdQuote": "muted",
62
+ "mdQuoteBorder": "toneBright",
63
+ "mdHr": "line",
64
+ "mdListBullet": "toneBright",
65
+ "toolDiffAdded": "green",
66
+ "toolDiffRemoved": "red",
67
+ "toolDiffContext": "muted",
68
+ "syntaxComment": "#97a0a4",
69
+ "syntaxKeyword": "#c9651d",
70
+ "syntaxFunction": "#5f93b0",
71
+ "syntaxVariable": "#f1efe9",
72
+ "syntaxString": "#86a87f",
73
+ "syntaxNumber": "#a487ba",
74
+ "syntaxType": "#5f97a0",
75
+ "syntaxOperator": "#aeb6b8",
76
+ "syntaxPunctuation": "#8a9296",
77
+ "thinkingOff": "line",
78
+ "thinkingMinimal": "dim",
79
+ "thinkingLow": "toneBright",
80
+ "thinkingMedium": "tonePale",
81
+ "thinkingHigh": "violet",
82
+ "thinkingXhigh": "markBright",
83
+ "thinkingMax": "mark",
84
+ "bashMode": "mark"
85
+ },
86
+ "export": {
87
+ "pageBg": "#12161b",
88
+ "cardBg": "#1b2127",
89
+ "infoBg": "#232b32"
90
+ }
91
+ }
@@ -0,0 +1,91 @@
1
+ {
2
+ "$schema": "https://raw.githubusercontent.com/earendil-works/pi/main/packages/coding-agent/src/modes/interactive/theme/theme-schema.json",
3
+ "name": "subsub-try-works-light",
4
+ "vars": {
5
+ "bg": "#dee7e4",
6
+ "surface": "#e7efeb",
7
+ "raised": "#f2f7f4",
8
+ "text": "#18272b",
9
+ "muted": "#52646a",
10
+ "line": "#c4d2cd",
11
+ "mark": "#9e5017",
12
+ "markBright": "#b85f1c",
13
+ "markDeep": "#7a3a10",
14
+ "toneDeep": "#16242b",
15
+ "tone": "#264852",
16
+ "toneBright": "#3d6b76",
17
+ "tonePale": "#b4ccc9",
18
+ "green": "#4f6855",
19
+ "red": "#c05a3a",
20
+ "yellow": "#c9651d",
21
+ "violet": "#655c7a",
22
+ "link": "#3f6274",
23
+ "dim": "#839295",
24
+ "select": "#b4ccc9",
25
+ "okBg": "#d2dcd6",
26
+ "errBg": "#e1d7cf"
27
+ },
28
+ "colors": {
29
+ "accent": "mark",
30
+ "border": "toneBright",
31
+ "borderAccent": "mark",
32
+ "borderMuted": "line",
33
+ "success": "green",
34
+ "error": "red",
35
+ "warning": "yellow",
36
+ "muted": "muted",
37
+ "dim": "dim",
38
+ "text": "text",
39
+ "thinkingText": "muted",
40
+ "selectedBg": "select",
41
+ "scrollbarTrack": "line",
42
+ "scrollbarThumb": "muted",
43
+ "searchMatchBg": "select",
44
+ "searchMatchText": "text",
45
+ "userMessageBg": "raised",
46
+ "userMessageText": "text",
47
+ "customMessageBg": "surface",
48
+ "customMessageText": "text",
49
+ "customMessageLabel": "tone",
50
+ "toolPendingBg": "surface",
51
+ "toolSuccessBg": "okBg",
52
+ "toolErrorBg": "errBg",
53
+ "toolTitle": "text",
54
+ "toolOutput": "muted",
55
+ "mdHeading": "tone",
56
+ "mdLink": "link",
57
+ "mdLinkUrl": "dim",
58
+ "mdCode": "green",
59
+ "mdCodeBlock": "text",
60
+ "mdCodeBlockBorder": "line",
61
+ "mdQuote": "muted",
62
+ "mdQuoteBorder": "toneBright",
63
+ "mdHr": "line",
64
+ "mdListBullet": "toneBright",
65
+ "toolDiffAdded": "green",
66
+ "toolDiffRemoved": "red",
67
+ "toolDiffContext": "muted",
68
+ "syntaxComment": "#52646a",
69
+ "syntaxKeyword": "#9e5017",
70
+ "syntaxFunction": "#3f6274",
71
+ "syntaxVariable": "#18272b",
72
+ "syntaxString": "#4f6855",
73
+ "syntaxNumber": "#655c7a",
74
+ "syntaxType": "#3f656b",
75
+ "syntaxOperator": "#52646a",
76
+ "syntaxPunctuation": "#52646a",
77
+ "thinkingOff": "line",
78
+ "thinkingMinimal": "dim",
79
+ "thinkingLow": "toneBright",
80
+ "thinkingMedium": "tone",
81
+ "thinkingHigh": "violet",
82
+ "thinkingXhigh": "markBright",
83
+ "thinkingMax": "mark",
84
+ "bashMode": "mark"
85
+ },
86
+ "export": {
87
+ "pageBg": "#dee7e4",
88
+ "cardBg": "#e7efeb",
89
+ "infoBg": "#f2f7f4"
90
+ }
91
+ }