hummbl-bibliography 1.0.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 (95) hide show
  1. package/.cascade/rules/hummbl-base120.md +107 -0
  2. package/.github/CODEOWNERS +17 -0
  3. package/.github/ISSUE_TEMPLATE/bug_report.md +24 -0
  4. package/.github/ISSUE_TEMPLATE/feature_request.md +10 -0
  5. package/.github/ISSUE_TEMPLATE/new-entry.md +79 -0
  6. package/.github/ISSUE_TEMPLATE/quality-improvement.md +71 -0
  7. package/.github/PULL_REQUEST_TEMPLATE.md +15 -0
  8. package/.github/dependabot.yml +17 -0
  9. package/.github/workflows/ci.yml +98 -0
  10. package/.github/workflows/doi-enrichment.yml +77 -0
  11. package/.github/workflows/security-audit.yml +92 -0
  12. package/.github/workflows/stats-report.yml +59 -0
  13. package/.github/workflows/validate-models.yml +194 -0
  14. package/.github/workflows/validate.yml +152 -0
  15. package/.husky/pre-commit +15 -0
  16. package/.husky/validation-rules.json +11 -0
  17. package/CHANGELOG.md +228 -0
  18. package/CONTRIBUTING.md +110 -0
  19. package/CONTRIBUTORS.md +257 -0
  20. package/DEVELOPMENT.md +110 -0
  21. package/Day_1_Audit_Worksheet.md +64 -0
  22. package/LICENSE +21 -0
  23. package/README.md +213 -0
  24. package/SECURITY.md +16 -0
  25. package/SITREP.md +141 -0
  26. package/bibliography/T10_collaboration.bib +281 -0
  27. package/bibliography/T11_security.bib +311 -0
  28. package/bibliography/T12_complexity.bib +272 -0
  29. package/bibliography/T13_reasoning.bib +231 -0
  30. package/bibliography/T1_canonical.bib +236 -0
  31. package/bibliography/T2_empirical.bib +258 -0
  32. package/bibliography/T3_applied.bib +219 -0
  33. package/bibliography/T4_agentic.bib +281 -0
  34. package/bibliography/T5_engineering.bib +243 -0
  35. package/bibliography/T6_governance.bib +277 -0
  36. package/bibliography/T7_emerging.bib +228 -0
  37. package/bibliography/T8_cognition.bib +260 -0
  38. package/bibliography/T9_economics.bib +275 -0
  39. package/bibliography/hummbl-transformations.json +84 -0
  40. package/dist/unified-bibliography.json +5699 -0
  41. package/docs/CONTRIBUTING.md +240 -0
  42. package/docs/GAP_ANALYSIS.md +142 -0
  43. package/docs/MULTI_AGENT_COORDINATION_PROTOCOL.md +700 -0
  44. package/docs/QUALITY_AUDIT_REPORT.md +576 -0
  45. package/docs/QUALITY_STANDARDS.md +350 -0
  46. package/docs/TRANSFORMATION_GUIDE.md +337 -0
  47. package/docs/metrics/model-accuracy.md +150 -0
  48. package/governance/CAES_CANONICAL.sha256 +1 -0
  49. package/governance/CAES_SPEC.md +107 -0
  50. package/governance/CAES_VERSION +1 -0
  51. package/governance/lexicon/ALLOWLIST_POLICY.md +63 -0
  52. package/governance/lexicon/CANONICALIZATION.md +63 -0
  53. package/governance/lexicon/acronym.schema.json +153 -0
  54. package/governance/lexicon/acronym_allowlist.txt +237 -0
  55. package/governance/lexicon/acronyms.v0.2.json +2555 -0
  56. package/llms.txt +1105 -0
  57. package/mappings/arcana_citations.json +219 -0
  58. package/mappings/bki_evidence.json +384 -0
  59. package/package.json +25 -0
  60. package/reports/.gitkeep +0 -0
  61. package/reports/citation_graph.json +119335 -0
  62. package/scripts/add_nist_tags.py +437 -0
  63. package/scripts/annotate_dois.py +204 -0
  64. package/scripts/check_palace_aliases.py +200 -0
  65. package/scripts/ingest_to_open_brain.py +307 -0
  66. package/scripts/monthly-review.sh +166 -0
  67. package/scripts/setup-hooks.sh +107 -0
  68. package/scripts/test_check_palace_aliases.py +194 -0
  69. package/sources/bki.bib +57 -0
  70. package/sources/theoretical-foundations.bib +589 -0
  71. package/toolkit/README.md +360 -0
  72. package/toolkit/docs/generated/quick-reference.md +179 -0
  73. package/toolkit/package-lock.json +1140 -0
  74. package/toolkit/package.json +66 -0
  75. package/toolkit/scripts/check-memory-palace-aliases.js +230 -0
  76. package/toolkit/scripts/check-memory-palace-aliases.test.js +297 -0
  77. package/toolkit/scripts/generate-docs.js +223 -0
  78. package/toolkit/src/check-duplicates.js +225 -0
  79. package/toolkit/src/check-required-fields.js +138 -0
  80. package/toolkit/src/citation-graph.js +425 -0
  81. package/toolkit/src/extensions/beyondBase120Audit.ts +250 -0
  82. package/toolkit/src/extensions/memoryPalace.ts +438 -0
  83. package/toolkit/src/extract-keywords.js +190 -0
  84. package/toolkit/src/find-missing-dois.js +178 -0
  85. package/toolkit/src/fix-duplicates.js +140 -0
  86. package/toolkit/src/merge-entries.js +29 -0
  87. package/toolkit/src/query.js +281 -0
  88. package/toolkit/src/stats.js +244 -0
  89. package/toolkit/src/test-validation.js +117 -0
  90. package/toolkit/src/utils/modelRegistry.ts +193 -0
  91. package/toolkit/src/utils/monitorModels.ts +150 -0
  92. package/toolkit/src/utils/validateModelCode.ts +196 -0
  93. package/toolkit/src/validate.js +251 -0
  94. package/toolkit/src/watch.js +100 -0
  95. package/toolkit/tsconfig.json +25 -0
@@ -0,0 +1,107 @@
1
+ # HUMMBL Base120 Mental Models - STRICT USAGE
2
+
3
+ ## ABSOLUTE REQUIREMENTS
4
+
5
+ 1. **ONLY use models from the official Base120 list**
6
+ 2. **NEVER substitute generic mental models** (OODA, Hanlon's, Occam's, etc.)
7
+ 3. **ALWAYS validate model codes** match pattern: [P|IN|CO|DE|RE|SY][1-20]
8
+ 4. **When uncertain, ASK** the user rather than guessing
9
+
10
+ ## FORBIDDEN MODELS (These are NOT in Base120)
11
+
12
+ ❌ OODA Loop
13
+ ❌ Hanlon's Razor
14
+ ❌ Occam's Razor
15
+ ❌ Circle of Competence
16
+ ❌ Antifragility
17
+ ❌ Survivorship Bias
18
+ ❌ Black Swan Theory
19
+ ❌ Regression to the Mean
20
+ ❌ Map vs Territory
21
+
22
+ If you reference any of these, you are HALLUCINATING.
23
+
24
+ ## CORRECT USAGE EXAMPLES
25
+
26
+ ✅ "Let's apply P1 (First Principles Framing) to break this down..."
27
+ ✅ "Using DE3 (Modularization), we can separate concerns..."
28
+ ✅ "IN2 (Premortem Analysis) suggests we should..."
29
+
30
+ ## BEFORE REFERENCING ANY MODEL
31
+
32
+ 1. Check: Is the code in format [P|IN|CO|DE|RE|SY][1-20]?
33
+ 2. Check: Does the name match the official list exactly?
34
+ 3. Check: Am I in the right transformation category?
35
+ 4. If ANY doubt → ASK USER
36
+
37
+ ## SELF-CHECK PROTOCOL
38
+
39
+ Before outputting code/docs that reference mental models:
40
+ - [ ] All model codes validated against official list
41
+ - [ ] No generic/hallucinated models present
42
+ - [ ] Model names match exactly (no paraphrasing)
43
+ - [ ] Transformation categories correct
44
+
45
+ ## HUMMBL Base120 Quick Reference
46
+
47
+ ### P-Series (Perspective/Identity)
48
+ P1=First Principles Framing, P2=Stakeholder Mapping, P3=Identity Stack,
49
+ P4=Lens Shifting, P5=Empathy Mapping, P6=Point-of-View Anchoring,
50
+ P7=Perspective Switching, P8=Narrative Framing, P9=Cultural Lens Shifting,
51
+ P10=Context Windowing, P11=Role Perspective-Taking, P12=Temporal Framing,
52
+ P13=Spatial Framing, P14=Reference Class Framing, P15=Assumption Surfacing,
53
+ P16=Identity-Context Reciprocity, P17=Frame Control & Reframing,
54
+ P18=Boundary Object Selection, P19=Sensemaking Canvases, P20=Worldview Articulation
55
+
56
+ ### IN-Series (Inversion)
57
+ IN1=Subtractive Thinking, IN2=Premortem Analysis, IN3=Problem Reversal,
58
+ IN4=Contra-Logic, IN5=Negative Space Framing, IN6=Inverse/Proof by Contradiction,
59
+ IN7=Boundary Testing, IN8=Contrapositive Reasoning, IN9=Backward Induction,
60
+ IN10=Red Teaming, IN11=Devil's Advocate Protocol, IN12=Failure First Design,
61
+ IN13=Opportunity Cost Focus, IN14=Second-Order Effects (Inverted),
62
+ IN15=Constraint Reversal, IN16=Inverse Optimization, IN17=Counterfactual Negation,
63
+ IN18=Kill-Criteria & Stop Rules, IN19=Harm Minimization (Via Negativa),
64
+ IN20=Antigoals & Anti-Patterns Catalog
65
+
66
+ ### CO-Series (Composition)
67
+ CO1=Synergy Principle, CO2=Chunking, CO3=Functional Composition,
68
+ CO4=Interdisciplinary Synthesis, CO5=Emergence, CO6=Gestalt Integration,
69
+ CO7=Network Effects, CO8=Layered Abstraction, CO9=Interface Contracts,
70
+ CO10=Pipeline Orchestration, CO11=Pattern Composition (Tiling),
71
+ CO12=Modular Interoperability, CO13=Cross-Domain Analogy, CO14=Platformization,
72
+ CO15=Combinatorial Design, CO16=System Integration Testing,
73
+ CO17=Orchestration vs Choreography, CO18=Knowledge Graphing,
74
+ CO19=Multi-Modal Integration, CO20=Holistic Integration
75
+
76
+ ### DE-Series (Decomposition)
77
+ DE1=Root Cause Analysis (5 Whys), DE2=Factorization, DE3=Modularization,
78
+ DE4=Layered Breakdown, DE5=Dimensional Reduction, DE6=Taxonomy/Classification,
79
+ DE7=Pareto Decomposition (80/20), DE8=Work Breakdown Structure,
80
+ DE9=Signal Separation, DE10=Abstraction Laddering, DE11=Scope Delimitation,
81
+ DE12=Constraint Isolation, DE13=Failure Mode Analysis (FMEA),
82
+ DE14=Variable Control & Isolation, DE15=Decision Tree Expansion,
83
+ DE16=Hypothesis Disaggregation, DE17=Orthogonalization,
84
+ DE18=Scenario Decomposition, DE19=Critical Path Unwinding,
85
+ DE20=Partition-and-Conquer
86
+
87
+ ### RE-Series (Recursion)
88
+ RE1=Recursive Improvement (Kaizen), RE2=Feedback Loops,
89
+ RE3=Meta-Learning (Learn-to-Learn), RE4=Nested Narratives,
90
+ RE5=Fractal Reasoning, RE6=Recursive Framing, RE7=Self-Referential Logic,
91
+ RE8=Bootstrapping, RE9=Iterative Prototyping, RE10=Compounding Cycles,
92
+ RE11=Calibration Loops, RE12=Bayesian Updating in Practice,
93
+ RE13=Gradient Descent Heuristic, RE14=Spiral Learning,
94
+ RE15=Convergence-Divergence Cycling, RE16=Retrospective→Prospective Loop,
95
+ RE17=Versioning & Diff, RE18=Anti-Catastrophic Forgetting,
96
+ RE19=Auto-Refactor, RE20=Recursive Governance (Guardrails that Learn)
97
+
98
+ ### SY-Series (Meta-Systems)
99
+ SY1=Leverage Points, SY2=System Boundaries, SY3=Stocks & Flows,
100
+ SY4=Requisite Variety, SY5=Systems Archetypes, SY6=Feedback Structure Mapping,
101
+ SY7=Path Dependence, SY8=Homeostasis/Dynamic Equilibrium,
102
+ SY9=Phase Transitions & Tipping Points, SY10=Causal Loop Diagrams,
103
+ SY11=Governance Patterns, SY12=Protocol/Interface Standards,
104
+ SY13=Incentive Architecture, SY14=Risk & Resilience Engineering,
105
+ SY15=Multi-Scale Alignment, SY16=Ecosystem Strategy, SY17=Policy Feedbacks,
106
+ SY18=Measurement & Telemetry, SY19=Meta-Model Selection,
107
+ SY20=Systems-of-Systems Coordination
@@ -0,0 +1,17 @@
1
+ # CODEOWNERS file — assign reviewers automatically for paths
2
+ # Format: <path> <user-or-team>
3
+ # See: https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners
4
+
5
+ # Default owners for everything
6
+ * @hummbl-dev
7
+
8
+ # Owners for sources (adjust paths if your code lives elsewhere)
9
+ bibliography/ @hummbl-dev
10
+ toolkit/ @hummbl-dev
11
+ scripts/ @hummbl-dev
12
+ docs/ @hummbl-dev
13
+ .github/ @hummbl-dev
14
+
15
+ # Owners for security-sensitive files
16
+ /package.json @hummbl-dev
17
+ /package-lock.json @hummbl-dev
@@ -0,0 +1,24 @@
1
+ # Bug report
2
+
3
+ **Describe the bug**
4
+ A clear and concise description of what the bug is.
5
+
6
+ **To Reproduce**
7
+ Steps to reproduce the behavior:
8
+ 1. Go to '...'
9
+ 2. Run '...'
10
+ 3. Observe '...'
11
+
12
+ **Expected behavior**
13
+ What you expected to happen.
14
+
15
+ **Screenshots or logs**
16
+ If applicable, add screenshots or paste logs.
17
+
18
+ **Environment (please complete the following information):**
19
+ - OS: (e.g. macOS, Ubuntu, Windows)
20
+ - Node.js version:
21
+ - npm/yarn version:
22
+
23
+ **Additional context**
24
+ Add any other context about the problem here.
@@ -0,0 +1,10 @@
1
+ # Feature request
2
+
3
+ **Is your feature request related to a problem? Please describe.**
4
+
5
+ **Describe the solution you'd like**
6
+
7
+ **Describe alternatives you've considered**
8
+
9
+ **Additional context**
10
+ Any extra information that can help.
@@ -0,0 +1,79 @@
1
+ ---
2
+ name: New Bibliography Entry
3
+ about: Propose a new entry for the HUMMBL Bibliography
4
+ title: '[NEW] '
5
+ labels: ['new-entry', 'needs-review']
6
+ assignees: ''
7
+ ---
8
+
9
+ ## Entry Information
10
+
11
+ ### Entry Type
12
+ - [ ] Book
13
+ - [ ] Journal Article
14
+ - [ ] Conference Paper
15
+ - [ ] Technical Report
16
+ - [ ] Other (specify):
17
+
18
+ ### Basic Information
19
+
20
+ **Title:**
21
+ **Author(s):**
22
+ **Year:**
23
+ **DOI/ISBN:**
24
+ **Publisher/Journal:**
25
+
26
+ ### HUMMBL Transformation Mapping
27
+
28
+ **Primary Transformation:** [Select one: P, IN, CO, DE, RE, SY]
29
+
30
+ **Secondary Transformation(s):** [Optional, select 0-2: P, IN, CO, DE, RE, SY]
31
+
32
+ **Mapping Rationale:**
33
+ <!-- Explain why you chose these transformations. What cognitive operations does this work emphasize? -->
34
+
35
+
36
+ ### Quality Tier
37
+
38
+ - [ ] **T1 - Canonical** (Foundational theory, field-defining, 500+ citations)
39
+ - [ ] **T2 - Empirical** (Peer-reviewed research, rigorous methodology)
40
+ - [ ] **T3 - Applied** (Practitioner-focused, industry applications)
41
+
42
+ **Tier Justification:**
43
+ <!-- Why does this work belong in the selected tier? -->
44
+
45
+
46
+ ### Gap Analysis
47
+
48
+ **Does this entry help fill a current gap?** [Yes/No]
49
+
50
+ If yes, which transformation(s) need coverage?
51
+ <!-- See docs/GAP_ANALYSIS.md for current gaps -->
52
+
53
+
54
+ ## BibTeX Entry
55
+
56
+ ```bibtex
57
+ @book{AuthorYearTitle,
58
+ title = {},
59
+ author = {},
60
+ year = {},
61
+ publisher = {},
62
+ isbn = {},
63
+ abstract = {},
64
+ keywords = {}
65
+ }
66
+ ```
67
+
68
+ ## Additional Context
69
+
70
+ <!-- Any other relevant information about this entry -->
71
+
72
+ **Checklist before submitting:**
73
+ - [ ] I have read [CONTRIBUTING.md](../../docs/CONTRIBUTING.md)
74
+ - [ ] I have reviewed [TRANSFORMATION_GUIDE.md](../../docs/TRANSFORMATION_GUIDE.md)
75
+ - [ ] I have checked for duplicates in existing bibliography
76
+ - [ ] BibTeX entry includes all required fields
77
+ - [ ] Abstract is at least 50 characters
78
+ - [ ] Keywords include HUMMBL transformation tags (e.g., `HUMMBL:SY`)
79
+ - [ ] Citation key follows format: `AuthorYearShortTitle`
@@ -0,0 +1,71 @@
1
+ ---
2
+ name: Quality Improvement
3
+ about: Report an issue with an existing entry or suggest improvements
4
+ title: '[QUALITY] '
5
+ labels: ['quality', 'enhancement']
6
+ assignees: ''
7
+ ---
8
+
9
+ ## Entry Information
10
+
11
+ **Citation Key:** [e.g., Meadows2008ThinkingSystems]
12
+
13
+ **Current File:** [e.g., bibliography/T1_canonical.bib]
14
+
15
+ ## Issue Type
16
+
17
+ - [ ] Missing or incorrect metadata (DOI, ISBN, etc.)
18
+ - [ ] Abstract needs improvement
19
+ - [ ] HUMMBL transformation mapping incorrect
20
+ - [ ] Tier assignment questionable
21
+ - [ ] Duplicate entry
22
+ - [ ] Formatting issues
23
+ - [ ] Other (specify below)
24
+
25
+ ## Problem Description
26
+
27
+ <!-- Describe the issue with the current entry -->
28
+
29
+
30
+ ## Proposed Solution
31
+
32
+ <!-- What changes do you suggest? -->
33
+
34
+
35
+ ## Supporting Evidence
36
+
37
+ <!-- Provide links, citations, or rationale for the proposed changes -->
38
+
39
+
40
+ ## Impact
41
+
42
+ **Severity:**
43
+ - [ ] Critical (blocks usage, must fix)
44
+ - [ ] High (significantly affects quality)
45
+ - [ ] Medium (moderate improvement)
46
+ - [ ] Low (minor enhancement)
47
+
48
+ **Affected Areas:**
49
+ - [ ] Bibliographic accuracy
50
+ - [ ] HUMMBL transformation mapping
51
+ - [ ] Tier classification
52
+ - [ ] Quality metrics
53
+ - [ ] Other:
54
+
55
+ ## Suggested BibTeX Changes
56
+
57
+ ```bibtex
58
+ <!-- If applicable, provide corrected BibTeX entry -->
59
+ ```
60
+
61
+ ## Additional Context
62
+
63
+ <!-- Any other relevant information -->
64
+
65
+ ---
66
+
67
+ **Checklist:**
68
+ - [ ] I have verified the issue exists in the current version
69
+ - [ ] I have checked that this issue hasn't been reported before
70
+ - [ ] I have consulted [QUALITY_STANDARDS.md](../../docs/QUALITY_STANDARDS.md)
71
+ - [ ] I have provided evidence for my claims
@@ -0,0 +1,15 @@
1
+ ## Summary
2
+ Brief description of the change.
3
+
4
+ ## Related issues
5
+ Closes: #
6
+
7
+ ## Checklist
8
+ - [ ] My code follows the project's style guidelines
9
+ - [ ] I have added/updated tests where applicable
10
+ - [ ] I have added/updated documentation (README, docs/)
11
+ - [ ] CI passes (lint, tests, audit)
12
+ - [ ] I have requested review from CODEOWNERS where applicable
13
+
14
+ ## Testing
15
+ Describe how this change was tested locally.
@@ -0,0 +1,17 @@
1
+ version: 2
2
+ updates:
3
+ # Enable version updates for npm
4
+ - package-ecosystem: "npm"
5
+ directory: "/toolkit"
6
+ schedule:
7
+ interval: "weekly"
8
+ # Create pull requests for version updates
9
+ open-pull-requests-limit: 10
10
+ # Add labels to pull requests
11
+ labels:
12
+ - "dependencies"
13
+ - "security"
14
+ # Group updates by dependency name
15
+ groups:
16
+ npm-dependencies:
17
+ patterns: ["*"]
@@ -0,0 +1,98 @@
1
+ name: CI
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - main
7
+ - 'q4-2025-enhancement'
8
+ - 'doi-enrichment-phase2'
9
+ - 'feat/security-enhancements'
10
+ - 'fix/node-version-update'
11
+ - 'copilot/*'
12
+ pull_request:
13
+ branches:
14
+ - main
15
+
16
+ permissions:
17
+ contents: read
18
+ pull-requests: write
19
+ actions: write
20
+ security-events: write
21
+
22
+ jobs:
23
+ build-and-test:
24
+ name: Lint / Test / Audit (Node ${{ matrix.node-version }})
25
+ runs-on: ubuntu-latest
26
+ strategy:
27
+ matrix:
28
+ node-version: [20, 24]
29
+ steps:
30
+ - name: Checkout
31
+ uses: actions/checkout@v4
32
+
33
+ - name: Use Node.js ${{ matrix.node-version }}
34
+ uses: actions/setup-node@v4
35
+ with:
36
+ node-version: ${{ matrix.node-version }}
37
+ cache: 'npm'
38
+ cache-dependency-path: toolkit/package-lock.json
39
+
40
+ - name: Install dependencies
41
+ run: |
42
+ cd toolkit
43
+ if [ -f package-lock.json ]; then npm ci; else npm install; fi
44
+
45
+ - name: Lint
46
+ run: |
47
+ cd toolkit
48
+ if npm run 2>/dev/null | grep -q 'lint'; then npm run lint; else echo "No lint script found"; fi
49
+
50
+ - name: Run tests
51
+ run: |
52
+ cd toolkit
53
+ if npm run 2>/dev/null | grep -q 'test'; then npm test --if-present --silent; else echo "No test script found"; fi
54
+ env:
55
+ CI: true
56
+
57
+ - name: Build (if applicable)
58
+ run: |
59
+ cd toolkit
60
+ if npm run 2>/dev/null | grep -q 'build'; then npm run build --if-present; else echo "No build script found"; fi
61
+
62
+ - name: Dependency audit (fail on high)
63
+ run: |
64
+ cd toolkit
65
+ if [ -f package-lock.json ] || [ -f yarn.lock ]; then
66
+ npm audit --omit=dev --audit-level=high || (echo "Vulnerabilities found (>=high)" && exit 1)
67
+ else
68
+ echo "No lockfile found — consider adding package-lock.json or yarn.lock"
69
+ fi
70
+
71
+ - name: Upload test artifacts (results, coverage)
72
+ if: always()
73
+ uses: actions/upload-artifact@v4
74
+ with:
75
+ name: test-results-node${{ matrix.node-version }}
76
+ path: |
77
+ toolkit/coverage
78
+ toolkit/test-results
79
+
80
+ codeql:
81
+ name: CodeQL Static Analysis
82
+ runs-on: ubuntu-latest
83
+ permissions:
84
+ security-events: write
85
+ steps:
86
+ - name: Checkout repository
87
+ uses: actions/checkout@v4
88
+
89
+ - name: Initialize CodeQL
90
+ uses: github/codeql-action/init@v3
91
+ with:
92
+ languages: javascript
93
+
94
+ - name: Autobuild
95
+ uses: github/codeql-action/autobuild@v3
96
+
97
+ - name: Run CodeQL analysis
98
+ uses: github/codeql-action/analyze@v3
@@ -0,0 +1,77 @@
1
+ name: DOI Enrichment
2
+
3
+ on:
4
+ workflow_dispatch: # Manual trigger only
5
+ inputs:
6
+ file:
7
+ description: 'Bibliography file to enrich (e.g., T1_canonical.bib, or "all")'
8
+ required: false
9
+ default: 'all'
10
+
11
+ permissions:
12
+ contents: write
13
+ pull-requests: write
14
+
15
+ jobs:
16
+ find-dois:
17
+ runs-on: ubuntu-latest
18
+
19
+ steps:
20
+ - name: Checkout code
21
+ uses: actions/checkout@v4
22
+ with:
23
+ ref: ${{ github.head_ref }}
24
+
25
+ - name: Setup Node.js
26
+ uses: actions/setup-node@v4
27
+ with:
28
+ node-version: '24'
29
+ cache: 'npm'
30
+ cache-dependency-path: toolkit/package-lock.json
31
+
32
+ - name: Install dependencies
33
+ run: |
34
+ cd toolkit
35
+ npm ci
36
+
37
+ - name: Find missing DOIs
38
+ run: |
39
+ cd toolkit
40
+ npm run find-dois > ../doi-enrichment-report.txt
41
+
42
+ - name: Create enrichment branch
43
+ run: |
44
+ git config --local user.email "github-actions[bot]@users.noreply.github.com"
45
+ git config --local user.name "github-actions[bot]"
46
+ git checkout -b doi-enrichment-$(date +%Y%m%d)
47
+
48
+ - name: Display results
49
+ run: |
50
+ cat doi-enrichment-report.txt
51
+
52
+ - name: Create summary
53
+ run: |
54
+ echo "## DOI Enrichment Report" > doi-summary.md
55
+ echo "" >> doi-summary.md
56
+ echo "Generated on: $(date)" >> doi-summary.md
57
+ echo "" >> doi-summary.md
58
+ echo "### Results" >> doi-summary.md
59
+ echo "" >> doi-summary.md
60
+ echo "\`\`\`" >> doi-summary.md
61
+ cat doi-enrichment-report.txt >> doi-summary.md
62
+ echo "\`\`\`" >> doi-summary.md
63
+ echo "" >> doi-summary.md
64
+ echo "### Action Required" >> doi-summary.md
65
+ echo "" >> doi-summary.md
66
+ echo "Review the found DOIs above and manually add high-confidence matches to the bibliography files." >> doi-summary.md
67
+ echo "" >> doi-summary.md
68
+ echo "**Note**: This workflow does NOT automatically modify bibliography files. Manual review is required." >> doi-summary.md
69
+
70
+ - name: Upload report
71
+ uses: actions/upload-artifact@v4
72
+ with:
73
+ name: doi-enrichment-report
74
+ path: |
75
+ doi-enrichment-report.txt
76
+ doi-summary.md
77
+ retention-days: 30
@@ -0,0 +1,92 @@
1
+ name: Security Audit
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+ pull_request:
7
+ branches: [main]
8
+ schedule:
9
+ - cron: '0 9 * * 1' # Weekly on Monday at 9:00 UTC
10
+ workflow_dispatch:
11
+
12
+ # Set the required permissions at the job level
13
+ permissions:
14
+ contents: read
15
+ security-events: write
16
+ pull-requests: write
17
+
18
+ jobs:
19
+ security-audit:
20
+ runs-on: ubuntu-latest
21
+
22
+ # Ensure the job has the necessary permissions
23
+ permissions:
24
+ contents: read
25
+ security-events: write
26
+ pull-requests: write
27
+
28
+ steps:
29
+ - uses: actions/checkout@v4
30
+
31
+ - name: Verify repository structure
32
+ run: |
33
+ echo "Current directory: $(pwd)"
34
+ echo "Contents:"
35
+ ls -la
36
+ echo "Toolkit contents:"
37
+ ls -la toolkit/
38
+
39
+ - name: Set up Node.js
40
+ uses: actions/setup-node@v4
41
+ with:
42
+ node-version: '24'
43
+ cache: 'npm'
44
+ cache-dependency-path: '**/package-lock.json'
45
+
46
+ - name: Install dependencies
47
+ working-directory: ./toolkit
48
+ run: |
49
+ echo "Installing in: $(pwd)"
50
+ npm ci
51
+
52
+ - name: Run npm audit
53
+ id: audit
54
+ working-directory: ./toolkit
55
+ continue-on-error: true
56
+ run: |
57
+ echo "Running npm audit in: $(pwd)"
58
+ npm audit --json > ../audit-report.json || true
59
+ echo "AUDIT_REPORT<<EOF" >> $GITHUB_ENV
60
+ cat ../audit-report.json >> $GITHUB_ENV
61
+ echo "EOF" >> $GITHUB_ENV
62
+ ls -la ..
63
+
64
+ - name: Upload audit report
65
+ if: always()
66
+ uses: actions/upload-artifact@v4
67
+ with:
68
+ name: audit-report
69
+ path: audit-report.json
70
+ retention-days: 7
71
+ compression-level: 6
72
+
73
+ - name: Comment on PR if vulnerabilities found
74
+ if: github.event_name == 'pull_request' && failure()
75
+ uses: actions/github-script@v7
76
+ env:
77
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
78
+ with:
79
+ script: |
80
+ try {
81
+ const { data: comment } = await github.rest.issues.createComment({
82
+ owner: context.repo.owner,
83
+ repo: context.repo.repo,
84
+ issue_number: context.issue.number,
85
+ body: '⚠️ **Security Audit Failed**\n\nVulnerabilities were found during the security audit. Please check the workflow run for details.'
86
+ });
87
+ console.log('Comment added successfully');
88
+ } catch (error) {
89
+ console.error('Error adding comment:', error);
90
+ // Don't fail the workflow if comment fails
91
+ core.setFailed('Failed to add comment, but continuing...');
92
+ }
@@ -0,0 +1,59 @@
1
+ name: Weekly Statistics Report
2
+
3
+ on:
4
+ schedule:
5
+ # Run every Monday at 9:00 AM UTC
6
+ - cron: '0 9 * * 1'
7
+ workflow_dispatch: # Allow manual trigger
8
+
9
+ permissions:
10
+ contents: write
11
+
12
+ jobs:
13
+ generate-report:
14
+ runs-on: ubuntu-latest
15
+
16
+ steps:
17
+ - name: Checkout code
18
+ uses: actions/checkout@v4
19
+
20
+ - name: Setup Node.js
21
+ uses: actions/setup-node@v4
22
+ with:
23
+ node-version: '24'
24
+ cache: 'npm'
25
+ cache-dependency-path: toolkit/package-lock.json
26
+
27
+ - name: Install dependencies
28
+ run: |
29
+ cd toolkit
30
+ npm ci
31
+
32
+ - name: Generate statistics report
33
+ env:
34
+ NO_COLOR: '1'
35
+ FORCE_COLOR: '0'
36
+ run: |
37
+ cd toolkit
38
+ REPORT="../reports/$(date +%Y-%m-%d)-stats.md"
39
+ echo "# Weekly Statistics Report — $(date +%Y-%m-%d)" > "$REPORT"
40
+ echo "" >> "$REPORT"
41
+ echo '```' >> "$REPORT"
42
+ node src/stats.js ../bibliography 2>&1 >> "$REPORT"
43
+ echo '```' >> "$REPORT"
44
+ echo "" >> "$REPORT"
45
+ echo "---" >> "$REPORT"
46
+ echo "" >> "$REPORT"
47
+ echo "## JSON Summary" >> "$REPORT"
48
+ echo "" >> "$REPORT"
49
+ echo '```json' >> "$REPORT"
50
+ node src/stats.js ../bibliography --json 2>/dev/null >> "$REPORT"
51
+ echo '```' >> "$REPORT"
52
+
53
+ - name: Commit report
54
+ run: |
55
+ git config --local user.email "github-actions[bot]@users.noreply.github.com"
56
+ git config --local user.name "github-actions[bot]"
57
+ git add reports/
58
+ git diff --staged --quiet || git commit -m "chore: weekly statistics report $(date +%Y-%m-%d)"
59
+ git push