Commit 8935745
feat: complete Fluently platform — tests, CI gates, knowledge base, and interactive site
## Core fixes
- Fix TypeScript monorepo build: correct paths in cli/mcp-server tsconfigs to point at
scorer's compiled dist (not source), add rootDir to prevent nested dist/ output
- Downgrade chalk@4 and ora@5 (ESM-only v5/v6 incompatible with CJS compiled output)
- Add "type": "module" to root package.json to enable ESM scripts
- Add exports field to scorer/package.json for subpath resolution at runtime
- Fix KNOWLEDGE_DIR paths in all 3 test files (../../knowledge → ../../../knowledge)
- Fix YAML indentation in coding-code-review-triage.yaml
- Fix schema float comparison: === 1 → Math.abs(sum - 1) < 1e-9 for decimal weights
- Fix validate-knowledge.js to import from dist/schema.js (not stale src/schema.js)
- Fix score-pr-knowledge.js: entry.dimensions.description.description and
result[0].dimensionScores.delegation (scoreTask returns an array)
- Rename test-integration.js → .cjs (uses require(), incompatible with "type":"module")
## Test suite (30 tests, all passing)
- packages/scorer/__tests__/engine.test.ts — 11 tests: scoreTask, loadKnowledgeEntries,
schema validation (valid/invalid domain, score_hints sum, missing fields)
- packages/cli/__tests__/commands.test.ts — 9 tests: score, compare, list, contribute commands
- packages/mcp-server/__tests__/tools.test.ts — 10 tests: compare_problem_space,
score_delegation, evaluate_discernment, check_diligence, get_4d_score tools
## CI — proper PR gate
- Fix silent test failure: remove "| head -100" pipe that swallowed vitest's exit code
- Add set -o pipefail + tee to capture output while preserving exit code
- Add permissions: pull-requests: write for PR comment bot
- On test failure: automatically post a detailed fix report comment to the PR with
collapsible test output, numbered remediation steps, and a hard exit 1 gate
- Build runs before validate-knowledge so dist/ artifacts exist at validation time
- Add knowledge-validate.yml: validates + regenerates index.json on every knowledge PR
- Add release.yml: publishes CLI + MCP server to npm on version tags
## Knowledge base — 16 entries across 7 domains
- 4 original coding entries (bug-fix-prioritization, code-review-triage,
refactoring-suggestions, test-case-generation)
- 12 new entries from aifluencyframework.org with contributor + reference fields:
education (course-design, lesson-planning, student-career-planning),
general (email-writing, iterative-refinement-loop),
healthcare (clinical-documentation),
legal (ai-research-drafting),
research (data-analysis, literature-review),
writing (content-development, creative-ai-collaboration, marketing-email-campaign)
- Add optional reference field to Zod schema
- Generate knowledge/index.json with summary field for GitHub Pages rendering
## GitHub Pages site (site/)
- index.html, knowledge.html, contribute.html: fix all "4D plays" → "Fluently 4D cycles",
fix CLI name "4d" → "fluent", fix domain list, fix YAML template format
- site/guide.html (new): user-centric visual guide with 4D workflow diagram,
CLI command reference with example output, Before/During/After AI collaboration
journey, 5-step contribution walkthrough with CI check explanation
- site/knowledge.html: add 4D Match Finder chat — user enters Delegation + Description,
client-side cosine similarity against index.json (raw.githubusercontent.com + API
fallback), top-3 results with similarity bars; if no strong match (< 40%) a
Register panel appears for Discernment + Diligence, pre-filling a GitHub issue
- Add Guide link to nav and footer across all 4 site pages
- Fix fetchKnowledgeBase() to extract .entries from index JSON (not the whole object)
- Fix entry.description → entry.summary in knowledge card renderer
## Terminology + docs
- CLAUDE.md, README.md, CONTRIBUTING.md: "4D plays/playbooks" → "Fluently 4D cycles",
"4d" CLI → "fluent", fix domain list, fix schema block, fix dimensions format
- _config.yml: Jekyll config for GitHub Pages serving from site/ directory
- scripts/: validate-knowledge.js, generate-knowledge-index.js,
generate-changelog.js, score-pr-knowledge.js — all working with ESM imports
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>1 parent 1f91957 commit 8935745
49 files changed
Lines changed: 8305 additions & 660 deletions
File tree
- .github/workflows
- knowledge
- packages
- cli
- __tests__
- src
- mcp-server
- __tests__
- src
- scorer
- __tests__
- src
- scripts
- site
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
6 | | - | |
| 5 | + | |
| 6 | + | |
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| |||
0 commit comments