Skip to content

refactor(faculty): extract hardcoded paths to constants in faculty_board.zig #168

@gHashTag

Description

@gHashTag

Task

In src/tri/faculty_board.zig, file paths like "specs/REGENERATION_REPORT.md" and ".trinity/mu/learning_db.json" are used as string literals deep in functions. Extract them to named constants at the top of the file.

Current State

Around line 499:

// somewhere in parseRegenReport()
const file = try std.fs.cwd().openFile("specs/REGENERATION_REPORT.md", .{});

Around line 554:

// somewhere in countMuPatterns()
const file = try std.fs.cwd().openFile(".trinity/mu/learning_db.json", .{});

Fix

Add constants near the existing ones at the top:

const REGEN_REPORT = "specs/REGENERATION_REPORT.md";
const MU_LEARNING_DB = ".trinity/mu/learning_db.json";

Then replace the string literals with these constants.

File

  • src/tri/faculty_board.zig

Acceptance

  • zig build compiles without errors
  • zig fmt passes
  • No hardcoded path strings in function bodies for these two paths
  • Constants defined at module level

Metadata

Metadata

Assignees

No one assigned

    Labels

    agent:spawnAuto-spawn agent container

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions