Skip to content

feat: add lunyu contents - #130

Merged
rindrics merged 12 commits into
mainfrom
content
Feb 12, 2026
Merged

feat: add lunyu contents#130
rindrics merged 12 commits into
mainfrom
content

Conversation

@rindrics

Copy link
Copy Markdown
Owner

No description provided.

@coderabbitai

coderabbitai Bot commented Feb 10, 2026

Copy link
Copy Markdown

Important

Review skipped

Too many files!

This PR contains 300 files, which is 150 over the limit of 150.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch content

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@qodo-free-for-open-source-projects

Copy link
Copy Markdown

Review Summary by Qodo

Add primer content support and Analects primer materials

✨ Enhancement

Grey Divider

Walkthroughs

Description
• Added primer content support infrastructure with primer optional boolean field to Content
  interface and related types
• Enhanced content generation scripts (generate-contents.ts) to support filtering and generating
  only primer-marked content via new --primer flag
• Modified validation scripts (validate-content-diff.ts, validate-audio-manifest.ts) to skip
  validation for primer content entries
• Added new npm script generate:contents:primer for dedicated primer content generation
• Added 40+ new primer content files from Analects (Lunyu) covering Books 1-5, 9-11 with Chinese
  text, Japanese translations, and speaker attributions
• Includes both fully populated content entries (with segments) and placeholder files (empty
  segments) for future expansion
Diagram
flowchart LR
  A["Content Type System"] -->|adds primer field| B["Content Interface"]
  C["Generation Scripts"] -->|filter by primer flag| D["Primer Content Output"]
  E["Validation Scripts"] -->|skip primer entries| F["Validation Logic"]
  G["Analects YAML Files"] -->|marked with primer: true| H["Primer Content Collection"]
  B --> D
  F --> D
  H --> D
Loading

Grey Divider

File Changes

1. scripts/generate-contents.ts ✨ Enhancement +37/-10

Add primer content filtering and generation support

• Added primer optional boolean field to OutputContent interface
• Modified deriveContent() function to accept and pass through primer parameter
• Enhanced main() function to accept primerOnly parameter and filter content based on primer
 flag
• Added logic to read YAML files and check for primer: true property, skipping non-primer content
 when in primer mode
• Updated generateContentTypeScriptFile() to set maxArrayLength: null in inspect options
• Added --primer command-line flag support alongside existing --watch flag
• Updated all main() calls to pass isPrimerMode parameter

scripts/generate-contents.ts


2. scripts/validate-content-diff.ts ✨ Enhancement +32/-2

Skip validation for primer content entries

• Added imports for readFileSync and js-yaml to support YAML parsing
• Modified getChangedContentIds() to skip validation for primer content (primer: true)
• Added primer detection logic in main() function to skip validation for primer entries
• Added try-catch blocks to gracefully handle file read errors

scripts/validate-content-diff.ts


3. scripts/validate-audio-manifest.ts ✨ Enhancement +13/-0

Skip audio validation for primer content

• Added primer optional boolean field to ContentYaml interface
• Added primer detection logic in validateAudioManifest() to skip audio validation for primer
 content
• Displays skip message with emoji indicator for primer content

scripts/validate-audio-manifest.ts


View more (179)
4. src/types/content.ts ✨ Enhancement +1/-0

Add primer field to Content type definition

• Added primer optional boolean field to Content interface

src/types/content.ts


5. package.json ⚙️ Configuration changes +1/-0

Add npm script for primer content generation

• Added new npm script generate:contents:primer to generate only primer content

package.json


6. contents/input/lunyu/17/1.yaml Content +72/-0

Add Analects 17/1 primer content

• New primer content file with 16 segments from Analects Book 17, Chapter 1
• Contains dialogue between Yanghuo and Confucius with Japanese translations
• Marked with primer: true and pinyin_reviewed: false

contents/input/lunyu/17/1.yaml


7. contents/input/lunyu/5/26.yaml Content +68/-0

Add Analects 5/26 primer content

• New primer content file with 10 segments from Analects Book 5, Chapter 26
• Contains dialogue about aspirations with Japanese translations
• Marked with primer: true and pinyin_reviewed: false

contents/input/lunyu/5/26.yaml


8. contents/input/lunyu/1/15.yaml Content +48/-0

Add Analects 1/15 primer content

• New primer content file with 9 segments from Analects Book 1, Chapter 15
• Contains dialogue between Zigong and Confucius about virtue
• Marked with primer: true and pinyin_reviewed: false

contents/input/lunyu/1/15.yaml


9. contents/input/lunyu/3/22.yaml Content +52/-0

Add Analects 3/22 primer content

• New primer content file with 12 segments from Analects Book 3, Chapter 22
• Contains dialogue about Guanzi's character and knowledge
• Marked with primer: true and pinyin_reviewed: false

contents/input/lunyu/3/22.yaml


10. contents/input/lunyu/5/19.yaml Content +60/-0

Add Analects 5/19 primer content

• New primer content file with 12 segments from Analects Book 5, Chapter 19
• Contains dialogue about Ziwen's loyalty and virtue
• Marked with primer: true and pinyin_reviewed: false

contents/input/lunyu/5/19.yaml


11. contents/input/lunyu/5/10.yaml Content +48/-0

Add Analects 5/10 primer content

• New primer content file with 10 segments from Analects Book 5, Chapter 10
• Contains dialogue about Zaiyu's laziness and character judgment
• Marked with primer: true and pinyin_reviewed: false

contents/input/lunyu/5/10.yaml


12. contents/input/lunyu/4/5.yaml Content +40/-0

Add Analects 4/5 primer content

• New primer content file with 8 segments from Analects Book 4, Chapter 5
• Contains dialogue about wealth, poverty, and virtue
• Marked with primer: true and pinyin_reviewed: false

contents/input/lunyu/4/5.yaml


13. contents/input/lunyu/2/5.yaml Content +40/-0

Add Analects 2/5 primer content

• New primer content file with 8 segments from Analects Book 2, Chapter 5
• Contains dialogue about filial piety and proper conduct
• Marked with primer: true and pinyin_reviewed: false

contents/input/lunyu/2/5.yaml


14. contents/input/lunyu/3/8.yaml Content +40/-0

Add Analects 3/8 primer content

• New primer content file with 8 segments from Analects Book 3, Chapter 8
• Contains dialogue about beauty, substance, and propriety
• Marked with primer: true and pinyin_reviewed: false

contents/input/lunyu/3/8.yaml


15. contents/input/lunyu/5/9.yaml Content +40/-0

Add Analects 5/9 primer content

• New primer content file with 8 segments from Analects Book 5, Chapter 9
• Contains dialogue comparing Zigong and Yan Hui's learning abilities
• Marked with primer: true and pinyin_reviewed: false

contents/input/lunyu/5/9.yaml


16. contents/input/lunyu/4/15.yaml Content +44/-0

Add Analects 4/15 primer content

• New primer content file with 9 segments from Analects Book 4, Chapter 15
• Contains dialogue about the unified principle of Confucius' teachings
• Marked with primer: true and pinyin_reviewed: false

contents/input/lunyu/4/15.yaml


17. contents/input/lunyu/3/24.yaml Content +36/-0

Add Analects 3/24 primer content

• New primer content file with 8 segments from Analects Book 3, Chapter 24
• Contains dialogue about Confucius as a cultural transmitter
• Marked with primer: true and pinyin_reviewed: false

contents/input/lunyu/3/24.yaml


18. contents/input/lunyu/3/21.yaml Content +32/-0

Add Analects 3/21 primer content

• New primer content file with 7 segments from Analects Book 3, Chapter 21
• Contains dialogue about ritual propriety and past events
• Marked with primer: true and pinyin_reviewed: false

contents/input/lunyu/3/21.yaml


19. contents/input/lunyu/5/8.yaml Content +40/-0

Add Analects 5/8 primer content

• New primer content file with 8 segments from Analects Book 5, Chapter 8
• Contains dialogue about Zilu's character and administrative abilities
• Marked with primer: true and pinyin_reviewed: false

contents/input/lunyu/5/8.yaml


20. contents/input/lunyu/5/5.yaml Content +36/-0

Add Analects 5/5 primer content

• New primer content file with 8 segments from Analects Book 5, Chapter 5
• Contains dialogue about eloquence and virtue
• Marked with primer: true and pinyin_reviewed: false

contents/input/lunyu/5/5.yaml


21. contents/input/lunyu/3/9.yaml Content +32/-0

Add Analects 3/9 primer content

• New primer content file with 8 segments from Analects Book 3, Chapter 9
• Contains dialogue about ritual knowledge and historical records
• Marked with primer: true and pinyin_reviewed: false

contents/input/lunyu/3/9.yaml


22. contents/input/lunyu/5/7.yaml Content +36/-0

Add Analects 5/7 primer content

• New primer content file with 8 segments from Analects Book 5, Chapter 7
• Contains dialogue about the Way and Zilu's courage
• Marked with primer: true and pinyin_reviewed: false

contents/input/lunyu/5/7.yaml


23. contents/input/lunyu/2/18.yaml Content +24/-0

Add Analects 2/18 primer content

• New primer content file with 4 segments from Analects Book 2, Chapter 18
• Contains dialogue about learning and caution in speech and action
• Marked with primer: true and pinyin_reviewed: false

contents/input/lunyu/2/18.yaml


24. contents/input/lunyu/2/4.yaml Content +32/-0

Add Analects 2/4 primer content

• New primer content file with 7 segments from Analects Book 2, Chapter 4
• Contains Confucius' autobiography of his life stages
• Marked with primer: true and pinyin_reviewed: false

contents/input/lunyu/2/4.yaml


25. contents/input/lunyu/2/23.yaml Content +28/-0

Add Analects 2/23 primer content

• New primer content file with 5 segments from Analects Book 2, Chapter 23
• Contains dialogue about predicting future dynasties
• Marked with primer: true and pinyin_reviewed: false

contents/input/lunyu/2/23.yaml


26. contents/input/lunyu/2/20.yaml Content +28/-0

Add Analects 2/20 primer content

• New primer content file with 5 segments from Analects Book 2, Chapter 20
• Contains dialogue about governing people with respect and loyalty
• Marked with primer: true and pinyin_reviewed: false

contents/input/lunyu/2/20.yaml


27. contents/input/lunyu/3/23.yaml Content +28/-0

Add Analects 3/23 primer content

• New primer content file with 5 segments from Analects Book 3, Chapter 23
• Contains dialogue about music and its characteristics
• Marked with primer: true and pinyin_reviewed: false

contents/input/lunyu/3/23.yaml


28. contents/input/lunyu/5/25.yaml Content +32/-0

Add Analects 5/25 primer content

• New primer content file with 6 segments from Analects Book 5, Chapter 25
• Contains dialogue about flattery and hypocrisy
• Marked with primer: true and pinyin_reviewed: false

contents/input/lunyu/5/25.yaml


29. contents/input/lunyu/3/6.yaml Content +28/-0

Add Analects 3/6 primer content

• New primer content file with 6 segments from Analects Book 3, Chapter 6
• Contains dialogue about ritual propriety and virtue
• Marked with primer: true and pinyin_reviewed: false

contents/input/lunyu/3/6.yaml


30. contents/input/lunyu/3/15.yaml Content +32/-0

Add Analects 3/15 primer content

• New primer content file with 7 segments from Analects Book 3, Chapter 15
• Contains dialogue about asking questions and propriety
• Marked with primer: true and pinyin_reviewed: false

contents/input/lunyu/3/15.yaml


31. contents/input/lunyu/3/13.yaml Content +28/-0

Add Analects 3/13 primer content

• New primer content file with 5 segments from Analects Book 3, Chapter 13
• Contains dialogue about offending Heaven and propriety
• Marked with primer: true and pinyin_reviewed: false

contents/input/lunyu/3/13.yaml


32. contents/input/lunyu/2/21.yaml Content +24/-0

Add Analects 2/21 primer content

• New primer content file with 4 segments from Analects Book 2, Chapter 21
• Contains dialogue about filial piety and governance
• Marked with primer: true and pinyin_reviewed: false

contents/input/lunyu/2/21.yaml


33. contents/input/lunyu/4/6.yaml Content +28/-0

Add Analects 4/6 primer content

• New primer content file with 5 segments from Analects Book 4, Chapter 6
• Contains dialogue about benevolence and virtue
• Marked with primer: true and pinyin_reviewed: false

contents/input/lunyu/4/6.yaml


34. contents/input/lunyu/2/19.yaml Content +24/-0

Add Analects 2/19 primer content

• New primer content file with 4 segments from Analects Book 2, Chapter 19
• Contains dialogue about governing through virtue
• Marked with primer: true and pinyin_reviewed: false

contents/input/lunyu/2/19.yaml


35. contents/input/lunyu/1/12.yaml Content +24/-0

Add Analects 1/12 primer content

• New primer content file with 5 segments from Analects Book 1, Chapter 12
• Contains dialogue about propriety and harmony
• Marked with primer: true and pinyin_reviewed: false

contents/input/lunyu/1/12.yaml


36. contents/input/lunyu/2/8.yaml Content +28/-0

Add Analects 2/8 primer content

• New primer content file with 6 segments from Analects Book 2, Chapter 8
• Contains dialogue about filial piety and respect
• Marked with primer: true and pinyin_reviewed: false

contents/input/lunyu/2/8.yaml


37. contents/input/lunyu/5/16.yaml Content +28/-0

Add Analects 5/16 primer content

• New primer content file with 5 segments from Analects Book 5, Chapter 16
• Contains dialogue about the virtues of a gentleman
• Marked with primer: true and pinyin_reviewed: false

contents/input/lunyu/5/16.yaml


38. contents/input/lunyu/5/11.yaml 📦 Other +32/-0
• New

contents/input/lunyu/5/11.yaml


39. contents/input/lunyu/9/1.yaml Content addition +12/-0

Add Lunyu 9/1 primer content with segments

• Added new YAML file with text segments containing Chinese original and Japanese translation
• Includes speaker attribution (kongzi) for the second segment
• Marked as primer content with primer: true flag
• Pinyin review status set to false

contents/input/lunyu/9/1.yaml


40. contents/input/lunyu/2/12.yaml Content addition +12/-0

Add Lunyu 2/12 primer content with segments

• Added new YAML file with text segments containing Chinese original and Japanese translation
• Includes speaker attribution (kongzi) for the second segment
• Marked as primer content with primer: true flag
• Pinyin review status set to false

contents/input/lunyu/2/12.yaml


41. contents/input/lunyu/10/11.yaml Content addition +4/-0

Add Lunyu 10/11 primer placeholder file

• Added new YAML file with empty segments array
• Marked as primer content with primer: true flag
• Pinyin review status set to false

contents/input/lunyu/10/11.yaml


42. contents/input/lunyu/10/12.yaml Content addition +4/-0

Add Lunyu 10/12 primer placeholder file

• Added new YAML file with empty segments array
• Marked as primer content with primer: true flag
• Pinyin review status set to false

contents/input/lunyu/10/12.yaml


43. contents/input/lunyu/10/13.yaml Content addition +4/-0

Add Lunyu 10/13 primer placeholder file

• Added new YAML file with empty segments array
• Marked as primer content with primer: true flag
• Pinyin review status set to false

contents/input/lunyu/10/13.yaml


44. contents/input/lunyu/10/14.yaml Content addition +4/-0

Add Lunyu 10/14 primer placeholder file

• Added new YAML file with empty segments array
• Marked as primer content with primer: true flag
• Pinyin review status set to false

contents/input/lunyu/10/14.yaml


45. contents/input/lunyu/10/15.yaml Content addition +4/-0

Add Lunyu 10/15 primer placeholder file

• Added new YAML file with empty segments array
• Marked as primer content with primer: true flag
• Pinyin review status set to false

contents/input/lunyu/10/15.yaml


46. contents/input/lunyu/10/16.yaml Content addition +4/-0

Add Lunyu 10/16 primer placeholder file

• Added new YAML file with empty segments array
• Marked as primer content with primer: true flag
• Pinyin review status set to false

contents/input/lunyu/10/16.yaml


47. contents/input/lunyu/10/17.yaml Content addition +4/-0

Add Lunyu 10/17 primer placeholder file

• Added new YAML file with empty segments array
• Marked as primer content with primer: true flag
• Pinyin review status set to false

contents/input/lunyu/10/17.yaml


48. contents/input/lunyu/10/18.yaml Content addition +4/-0

Add Lunyu 10/18 primer placeholder file

• Added new YAML file with empty segments array
• Marked as primer content with primer: true flag
• Pinyin review status set to false

contents/input/lunyu/10/18.yaml


49. contents/input/lunyu/10/19.yaml Content addition +4/-0

Add Lunyu 10/19 primer placeholder file

• Added new YAML file with empty segments array
• Marked as primer content with primer: true flag
• Pinyin review status set to false

contents/input/lunyu/10/19.yaml


50. contents/input/lunyu/10/2.yaml Content addition +4/-0

Add Lunyu 10/2 primer placeholder file

• Added new YAML file with empty segments array
• Marked as primer content with primer: true flag
• Pinyin review status set to false

contents/input/lunyu/10/2.yaml


51. contents/input/lunyu/10/20.yaml Content addition +4/-0

Add Lunyu 10/20 primer placeholder file

• Added new YAML file with empty segments array
• Marked as primer content with primer: true flag
• Pinyin review status set to false

contents/input/lunyu/10/20.yaml


52. contents/input/lunyu/10/21.yaml Content addition +4/-0

Add Lunyu 10/21 primer placeholder file

• Added new YAML file with empty segments array
• Marked as primer content with primer: true flag
• Pinyin review status set to false

contents/input/lunyu/10/21.yaml


53. contents/input/lunyu/10/22.yaml Content addition +4/-0

Add Lunyu 10/22 primer placeholder file

• Added new YAML file with empty segments array
• Marked as primer content with primer: true flag
• Pinyin review status set to false

contents/input/lunyu/10/22.yaml


54. contents/input/lunyu/10/23.yaml Content addition +4/-0

Add Lunyu 10/23 primer placeholder file

• Added new YAML file with empty segments array
• Marked as primer content with primer: true flag
• Pinyin review status set to false

contents/input/lunyu/10/23.yaml


55. contents/input/lunyu/10/24.yaml Content addition +4/-0

Add Lunyu 10/24 primer placeholder file

• Added new YAML file with empty segments array
• Marked as primer content with primer: true flag
• Pinyin review status set to false

contents/input/lunyu/10/24.yaml


56. contents/input/lunyu/10/25.yaml Content addition +4/-0

Add Lunyu 10/25 primer placeholder file

• Added new YAML file with empty segments array
• Marked as primer content with primer: true flag
• Pinyin review status set to false

contents/input/lunyu/10/25.yaml


57. contents/input/lunyu/10/26.yaml Content addition +4/-0

Add Lunyu 10/26 primer placeholder file

• Added new YAML file with empty segments array
• Marked as primer content with primer: true flag
• Pinyin review status set to false

contents/input/lunyu/10/26.yaml


58. contents/input/lunyu/10/27.yaml Content addition +4/-0

Add Lunyu 10/27 primer placeholder file

• Added new YAML file with empty segments array
• Marked as primer content with primer: true flag
• Pinyin review status set to false

contents/input/lunyu/10/27.yaml


59. contents/input/lunyu/10/3.yaml Content addition +4/-0

Add Lunyu 10/3 primer placeholder file

• Added new YAML file with empty segments array
• Marked as primer content with primer: true flag
• Pinyin review status set to false

contents/input/lunyu/10/3.yaml


60. contents/input/lunyu/10/4.yaml Content addition +4/-0

Add Lunyu 10/4 primer placeholder file

• Added new YAML file with empty segments array
• Marked as primer content with primer: true flag
• Pinyin review status set to false

contents/input/lunyu/10/4.yaml


61. contents/input/lunyu/10/5.yaml Content addition +4/-0

Add Lunyu 10/5 primer placeholder file

• Added new YAML file with empty segments array
• Marked as primer content with primer: true flag
• Pinyin review status set to false

contents/input/lunyu/10/5.yaml


62. contents/input/lunyu/10/6.yaml Content addition +4/-0

Add Lunyu 10/6 primer placeholder file

• Added new YAML file with empty segments array
• Marked as primer content with primer: true flag
• Pinyin review status set to false

contents/input/lunyu/10/6.yaml


63. contents/input/lunyu/10/7.yaml Content addition +4/-0

Add Lunyu 10/7 primer placeholder file

• Added new YAML file with empty segments array
• Marked as primer content with primer: true flag
• Pinyin review status set to false

contents/input/lunyu/10/7.yaml


64. contents/input/lunyu/10/8.yaml Content addition +4/-0

Add Lunyu 10/8 primer placeholder file

• Added new YAML file with empty segments array
• Marked as primer content with primer: true flag
• Pinyin review status set to false

contents/input/lunyu/10/8.yaml


65. contents/input/lunyu/10/9.yaml Content addition +4/-0

Add Lunyu 10/9 primer placeholder file

• Added new YAML file with empty segments array
• Marked as primer content with primer: true flag
• Pinyin review status set to false

contents/input/lunyu/10/9.yaml


66. contents/input/lunyu/11/10.yaml Content addition +4/-0

Add Lunyu 11/10 primer placeholder file

• Added new YAML file with empty segments array
• Marked as primer content with primer: true flag
• Pinyin review status set to false

contents/input/lunyu/11/10.yaml


67. contents/input/lunyu/11/11.yaml Content addition +4/-0

Add Lunyu 11/11 primer placeholder file

• Added new YAML file with empty segments array
• Marked as primer content with primer: true flag
• Pinyin review status set to false

contents/input/lunyu/11/11.yaml


68. contents/input/lunyu/11/12.yaml Content addition +4/-0

Add Lunyu 11/12 primer placeholder file

• Added new YAML file with empty segments array
• Marked as primer content with primer: true flag
• Pinyin review status set to false

contents/input/lunyu/11/12.yaml


69. contents/input/lunyu/11/13.yaml Content addition +4/-0

Add Lunyu 11/13 primer placeholder file

• Added new YAML file with empty segments array
• Marked as primer content with primer: true flag
• Pinyin review status set to false

contents/input/lunyu/11/13.yaml


70. contents/input/lunyu/11/14.yaml Content addition +4/-0

Add Lunyu 11/14 primer placeholder file

• Added new YAML file with empty segments array
• Marked as primer content with primer: true flag
• Pinyin review status set to false

contents/input/lunyu/11/14.yaml


71. contents/input/lunyu/11/15.yaml Content addition +4/-0

Add Lunyu 11/15 primer placeholder file

• Added new YAML file with empty segments array
• Marked as primer content with primer: true flag
• Pinyin review status set to false

contents/input/lunyu/11/15.yaml


72. contents/input/lunyu/11/16.yaml Content addition +4/-0

Add Lunyu 11/16 primer placeholder file

• Added new YAML file with empty segments array
• Marked as primer content with primer: true flag
• Pinyin review status set to false

contents/input/lunyu/11/16.yaml


73. contents/input/lunyu/11/17.yaml Content addition +4/-0

Add Lunyu 11/17 primer placeholder file

• Added new YAML file with empty segments array
• Marked as primer content with primer: true flag
• Pinyin review status set to false

contents/input/lunyu/11/17.yaml


74. contents/input/lunyu/11/18.yaml Content addition +4/-0

Add Lunyu 11/18 primer placeholder file

• Added new YAML file with empty segments array
• Marked as primer content with primer: true flag
• Pinyin review status set to false

contents/input/lunyu/11/18.yaml


75. contents/input/lunyu/11/19.yaml Content addition +4/-0

Add Lunyu 11/19 primer placeholder file

• Added new YAML file with empty segments array
• Marked as primer content with primer: true flag
• Pinyin review status set to false

contents/input/lunyu/11/19.yaml


76. contents/input/lunyu/11/2.yaml Content addition +4/-0

Add Lunyu 11/2 primer placeholder file

• Added new YAML file with empty segments array
• Marked as primer content with primer: true flag
• Pinyin review status set to false

contents/input/lunyu/11/2.yaml


77. contents/input/lunyu/11/20.yaml Content addition +4/-0

Add Lunyu 11/20 primer placeholder file

• Added new YAML file with empty segments array
• Marked as primer content with primer: true flag
• Pinyin review status set to false

contents/input/lunyu/11/20.yaml


78. contents/input/lunyu/11/21.yaml Content addition +4/-0

Add Lunyu 11/21 primer placeholder file

• Added new YAML file with empty segments array
• Marked as primer content with primer: true flag
• Pinyin review status set to false

contents/input/lunyu/11/21.yaml


79. contents/input/lunyu/11/22.yaml Content addition +4/-0

Add Lunyu 11/22 primer placeholder file

• Added new YAML file with empty segments array
• Marked as primer content with primer: true flag
• Pinyin review status set to false

contents/input/lunyu/11/22.yaml


80. contents/input/lunyu/11/23.yaml Content addition +4/-0

Add Lunyu 11/23 primer placeholder file

• Added new YAML file with empty segments array
• Marked as primer content with primer: true flag
• Pinyin review status set to false

contents/input/lunyu/11/23.yaml


81. contents/input/lunyu/11 📦 Other +0/-0

contents/input/lunyu/11


82. contents/input/lunyu/1/13.yaml Additional files +20/-0

...

contents/input/lunyu/1/13.yaml


83. contents/input/lunyu/1/14.yaml Additional files +20/-0

...

contents/input/lunyu/1/14.yaml


84. contents/input/lunyu/1/16.yaml Additional files +12/-0

...

contents/input/lunyu/1/16.yaml


85. contents/input/lunyu/10/1.yaml Additional files +20/-0

...

contents/input/lunyu/10/1.yaml


86. contents/input/lunyu/10/10.yaml Additional files +4/-0

...

contents/input/lunyu/10/10.yaml


87. contents/input/lunyu/11/1.yaml Additional files +20/-0

...

contents/input/lunyu/11/1.yaml


88. contents/input/lunyu/11/24.yaml Additional files +4/-0

...

contents/input/lunyu/11/24.yaml


89. contents/input/lunyu/11/25.yaml Additional files +4/-0

...

contents/input/lunyu/11/25.yaml


90. contents/input/lunyu/11/26.yaml Additional files +4/-0

...

contents/input/lunyu/11/26.yaml


91. contents/input/lunyu/11/3.yaml Additional files +4/-0

...

contents/input/lunyu/11/3.yaml


92. contents/input/lunyu/11/4.yaml Additional files +4/-0

...

contents/input/lunyu/11/4.yaml


93. contents/input/lunyu/11/5.yaml Additional files +4/-0

...

contents/input/lunyu/11/5.yaml


94. contents/input/lunyu/11/6.yaml Additional files +4/-0

...

contents/input/lunyu/11/6.yaml


95. contents/input/lunyu/11/7.yaml Additional files +4/-0

...

contents/input/lunyu/11/7.yaml


96. contents/input/lunyu/11/8.yaml Additional files +4/-0

...

contents/input/lunyu/11/8.yaml


97. contents/input/lunyu/11/9.yaml Additional files +4/-0

...

contents/input/lunyu/11/9.yaml


98. contents/input/lunyu/12/10.yaml Additional files +4/-0

...

contents/input/lunyu/12/10.yaml


99. contents/input/lunyu/12/11.yaml Additional files +4/-0

...

contents/input/lunyu/12/11.yaml


100. contents/input/lunyu/12/12.yaml Additional files +4/-0

...

contents/input/lunyu/12/12.yaml


101. contents/input/lunyu/12/13.yaml Additional files +4/-0

...

contents/input/lunyu/12/13.yaml


102. contents/input/lunyu/12/14.yaml Additional files +4/-0

...

contents/input/lunyu/12/14.yaml


103. contents/input/lunyu/12/15.yaml Additional files +4/-0

...

contents/input/lunyu/12/15.yaml


104. contents/input/lunyu/12/16.yaml Additional files +4/-0

...

contents/input/lunyu/12/16.yaml


105. contents/input/lunyu/12/17.yaml Additional files +4/-0

...

contents/input/lunyu/12/17.yaml


106. contents/input/lunyu/12/18.yaml Additional files +4/-0

...

contents/input/lunyu/12/18.yaml


107. contents/input/lunyu/12/19.yaml Additional files +4/-0

...

contents/input/lunyu/12/19.yaml


108. contents/input/lunyu/12/2.yaml Additional files +4/-0

...

contents/input/lunyu/12/2.yaml


109. contents/input/lunyu/12/20.yaml Additional files +4/-0

...

contents/input/lunyu/12/20.yaml


110. contents/input/lunyu/12/21.yaml Additional files +4/-0

...

contents/input/lunyu/12/21.yaml


111. contents/input/lunyu/12/22.yaml Additional files +4/-0

...

contents/input/lunyu/12/22.yaml


112. contents/input/lunyu/12/23.yaml Additional files +4/-0

...

contents/input/lunyu/12/23.yaml


113. contents/input/lunyu/12/24.yaml Additional files +4/-0

...

contents/input/lunyu/12/24.yaml


114. contents/input/lunyu/12/3.yaml Additional files +4/-0

...

contents/input/lunyu/12/3.yaml


115. contents/input/lunyu/12/4.yaml Additional files +4/-0

...

contents/input/lunyu/12/4.yaml


116. contents/input/lunyu/12/5.yaml Additional files +4/-0

...

contents/input/lunyu/12/5.yaml


117. contents/input/lunyu/12/6.yaml Additional files +4/-0

...

contents/input/lunyu/12/6.yaml


118. contents/input/lunyu/12/7.yaml Additional files +4/-0

...

contents/input/lunyu/12/7.yaml


119. contents/input/lunyu/12/8.yaml Additional files +4/-0

...

contents/input/lunyu/12/8.yaml


120. contents/input/lunyu/12/9.yaml Additional files +4/-0

...

contents/input/lunyu/12/9.yaml


121. contents/input/lunyu/13/1.yaml Additional files +28/-0

...

contents/input/lunyu/13/1.yaml


122. contents/input/lunyu/13/10.yaml Additional files +4/-0

...

contents/input/lunyu/13/10.yaml


123. contents/input/lunyu/13/11.yaml Additional files +4/-0

...

contents/input/lunyu/13/11.yaml


124. contents/input/lunyu/13/12.yaml Additional files +4/-0

...

contents/input/lunyu/13/12.yaml


125. contents/input/lunyu/13/13.yaml Additional files +4/-0

...

contents/input/lunyu/13/13.yaml


126. contents/input/lunyu/13/14.yaml Additional files +4/-0

...

contents/input/lunyu/13/14.yaml


127. contents/input/lunyu/13/15.yaml Additional files +4/-0

...

contents/input/lunyu/13/15.yaml


128. contents/input/lunyu/13/16.yaml Additional files +4/-0

...

contents/input/lunyu/13/16.yaml


129. contents/input/lunyu/13/17.yaml Additional files +4/-0

...

contents/input/lunyu/13/17.yaml


130. contents/input/lunyu/13/18.yaml Additional files +4/-0

@github-actions

github-actions Bot commented Feb 10, 2026

Copy link
Copy Markdown

Visit the preview URL for this PR (updated for commit ccaa807):

https://izuminokami-kanesada--pr130-content-iempf2l8.web.app

(expires Thu, 19 Feb 2026 20:13:52 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

Sign: 4c4412227845b968bcb4c8b6996048cdd07fd6de

@qodo-free-for-open-source-projects

Copy link
Copy Markdown

Code Review by Qodo

🐞 Bugs (1) 📘 Rule violations (2) 📎 Requirement gaps (0)

Grey Divider


Action required

1. Silent catch skips YAML 📘 Rule violation ⛯ Reliability
Description
• The new primer-exclusion logic silently swallows file read/parse failures and continues without
  any logging.
• This can hide real validation issues (e.g., malformed YAML, unexpected IO errors) and make
  failures non-actionable/debugging difficult.
• It violates the requirement to avoid silent failures and to provide meaningful context when
  handling errors.
Code

scripts/validate-content-diff.ts[R129-140]

+    // Check if this is a primer content (skip validation)
+    try {
+      const yamlContent = readFileSync(file, 'utf-8');
+      const parsedYaml = yaml.load(yamlContent) as Record<string, unknown>;
+      if (parsedYaml.primer === true) {
+        console.log(`SKIP: ${contentId} (primer entry)`);
+        continue;
+      }
+    } catch {
+      // If file cannot be read, skip it (might be deleted)
+      continue;
+    }
Evidence
PR Compliance ID 3 forbids silent failures/swallowed exceptions without logging. The added `try {
... } catch { ... continue; }` block skips entries on any read/parse error without recording what
failed, where, or why.

Rule 3: Generic: Robust Error Handling and Edge Case Management
scripts/validate-content-diff.ts[129-140]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
The primer-exclusion YAML read/parse block uses a bare `catch` and silently `continue`s, which can hide real validation problems and violates the requirement to avoid silent failures.

## Issue Context
This code runs as part of content diff validation, so missing/hidden errors can cause invalid content to slip through or make CI failures hard to debug.

## Fix Focus Areas
- scripts/validate-content-diff.ts[129-140]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools



Remediation recommended

2. Unstructured console.log output 📘 Rule violation ✧ Quality
Description
• The new primer-skip logging uses free-form console.log messages rather than structured logging.
• This makes automated parsing/monitoring harder and reduces audit/debug value when these scripts
  run in CI.
• While no sensitive data is shown here, the logging format does not meet the checklist’s
  structured-logs requirement.
Code

scripts/validate-audio-manifest.ts[R127-135]

+    // Check if this is a primer content (skip validation)
+    const fullPath = path.join(process.cwd(), yamlPath);
+    if (fs.existsSync(fullPath)) {
+      const yamlContent = fs.readFileSync(fullPath, 'utf-8');
+      const parsedYaml = yaml.load(yamlContent) as ContentYaml;
+      if (parsedYaml.primer === true) {
+        console.log(`  ⏭️  ${contentId}: Skipping primer content`);
+        continue;
+      }
Evidence
PR Compliance ID 5 requires structured logs for easy auditing. The added message is plain-text (and
includes a non-standard symbol), making it harder to parse consistently in CI/log aggregation.

Rule 5: Generic: Secure Logging Practices
scripts/validate-audio-manifest.ts[127-135]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
Primer-skip messages are logged as unstructured plain text, which conflicts with the structured-logging requirement.

## Issue Context
These scripts likely run in CI; structured events (e.g., `{event:&quot;skip&quot;, reason:&quot;primer&quot;, content_id:...}`) are easier to audit and monitor.

## Fix Focus Areas
- scripts/validate-audio-manifest.ts[127-135]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


3. Primer skip log spam 🐞 Bug ➹ Performance
Description
generate-contents logs once per skipped primer YAML in non-primer mode; with many primer: true
  files this will flood build logs and slow generation.
• This happens on every pnpm build because prebuild always runs pnpm generate:contents, so
  CI/pre-push output will be consistently noisy.
Code

scripts/generate-contents.ts[R1239-1242]

+        }
+        if (!primerOnly && isPrimer) {
+          console.log(`Skipping primer: ${bookId}/${sectionId}/${chapterId}`);
+          continue;
Evidence
The generator parses each YAML to detect primer: true and, when not in primer-only mode, prints
Skipping primer: ... per file. The repo contains many primer YAML placeholders (example shown),
and builds always invoke the generator via prebuild, so this log line will be repeated for each
primer file on every build/pre-push.

scripts/generate-contents.ts[1227-1243]
contents/input/lunyu/10/2.yaml[1-4]
package.json[6-16]
.husky/pre-push[1-5]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
`scripts/generate-contents.ts` logs `Skipping primer: ...` for every primer YAML when running normal generation. With a large number of `primer: true` YAMLs, this floods CI/pre-push logs and adds avoidable overhead.

## Issue Context
Normal builds run `pnpm generate:contents` via `prebuild`, so the per-file skip log occurs on every build.

## Fix Focus Areas
- scripts/generate-contents.ts[1233-1243]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


Grey Divider

ⓘ The new review experience is currently in Beta. Learn more

Grey Divider

Qodo Logo

Comment on lines +129 to +140
// Check if this is a primer content (skip validation)
try {
const yamlContent = readFileSync(file, 'utf-8');
const parsedYaml = yaml.load(yamlContent) as Record<string, unknown>;
if (parsedYaml.primer === true) {
console.log(`SKIP: ${contentId} (primer entry)`);
continue;
}
} catch {
// If file cannot be read, skip it (might be deleted)
continue;
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Action required

1. Silent catch skips yaml 📘 Rule violation ⛯ Reliability

• The new primer-exclusion logic silently swallows file read/parse failures and continues without
  any logging.
• This can hide real validation issues (e.g., malformed YAML, unexpected IO errors) and make
  failures non-actionable/debugging difficult.
• It violates the requirement to avoid silent failures and to provide meaningful context when
  handling errors.
Agent Prompt
## Issue description
The primer-exclusion YAML read/parse block uses a bare `catch` and silently `continue`s, which can hide real validation problems and violates the requirement to avoid silent failures.

## Issue Context
This code runs as part of content diff validation, so missing/hidden errors can cause invalid content to slip through or make CI failures hard to debug.

## Fix Focus Areas
- scripts/validate-content-diff.ts[129-140]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools

@rindrics rindrics changed the title chore: add primers chore: add lunyu contents Feb 10, 2026
@rindrics rindrics changed the title chore: add lunyu contents feat: add lunyu contents Feb 10, 2026
@rindrics
rindrics merged commit f8b929a into main Feb 12, 2026
6 checks passed
@rindrics
rindrics deleted the content branch February 12, 2026 22:01
This was referenced Feb 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant