Skip to content

fix(engine): make L-stage IDENTITY.md rewrites actually take effect#7

Merged
LeoLin990405 merged 1 commit intomainfrom
fix/identity-over-openclaw
Apr 14, 2026
Merged

fix(engine): make L-stage IDENTITY.md rewrites actually take effect#7
LeoLin990405 merged 1 commit intomainfrom
fix/identity-over-openclaw

Conversation

@LeoLin990405
Copy link
Copy Markdown
Owner

The bug

v4 engine (regime-to-cc.mjs L122) preferred openclaw.json.template over IDENTITY.md:

const sourceAgents = oclawAgents.length > 0 ? oclawAgents : tableAgents;

58 regimes have openclaw.json.template inherited from v4 upstream. Result: the 57-file L-stage canonical rewrite (#6) was cosmetic โ€” every regime still generated v4 default agents.

Most visibly: tang kept silijian (ๅธ็คผ็›‘, Ming-Qing anachronism) despite our #6 fix replacing it with zhongshu-sheren (ไธญไนฆ่ˆไบบ) in IDENTITY.md.

Fix

One-line flip: IDENTITY.md first, openclaw.json.template as legacy fallback.

Verification

All 57 regimes now generate historically-authentic agents from their canonical role mapping:

  • tang: zhongshu-sheren, bingbu, hubu, libu_ritual, gongbu, xingbu, libu_personnel
  • byzantine: basileus, patriarch, logothete-dromos, logothete-genikon, domestikos, eparch, protoasecretis
  • roman-republic: consul, senate, tribune, censor, assembly, etc. (per canonical IDENTITY.md)
  • soviet: politburo, council-of-ministers, etc.

Test plan

  • npm test โ€” 9/9 pass
  • npm run validate:regimes โ€” 0 errors
  • node engine/regime-to-cc.mjs generates โ‰ฅ5 agents for all 57 regimes
  • tang generates zhongshu-sheren (not silijian)
  • Deferred: live civagent run --v5 on sample regime to confirm agent prompts work end-to-end

โ€ฆagents

v4 engine preferred openclaw.json.template over IDENTITY.md, making the
L-stage canonical rewrite of 57 IDENTITY.md files have no effect on
actual agent generation. Flipped the precedence.

Before this fix:
  node engine/regime-to-cc.mjs regimes/global/byzantine
    โ†’ silijian, bingbu, hubu... (generic Tang-derived defaults)

After:
  node engine/regime-to-cc.mjs regimes/global/byzantine
    โ†’ basileus, patriarch, logothete-dromos/genikon, domestikos,
      eparch, protoasecretis (historically accurate Byzantine offices)

All 57 regimes verified to generate โ‰ฅ5 agents from their canonical
role mapping table. openclaw.json.template remains as fallback for
potential future regimes that haven't been canonicalized.

Tang anachronism fix also now takes effect: silijian (Ming-Qing) is
replaced by zhongshu-sheren (actual Tang drafter).
@LeoLin990405 LeoLin990405 merged commit e438760 into main Apr 14, 2026
1 check passed
LeoLin990405 added a commit that referenced this pull request Apr 14, 2026
- README adds '57 agent teams ้•ฟไป€ไนˆๆ ท' section with real agent output
  samples for tang/byzantine/roman-republic/qin/soviet (shows the PR #7
  fix actually took effect โ€” tang has zhongshu-sheren not silijian,
  byzantine has basileus+patriarch, etc.)
- README adds ็‰ˆๆœฌๅކ็จ‹ table linking to each release PR
- CHANGELOG: v5.0.1 entry documenting the one-line engine fix and its
  per-regime impact
- package.json: bump version 5.0.0 โ†’ 5.0.1
LeoLin990405 added a commit that referenced this pull request Apr 14, 2026
- README adds '57 agent teams ้•ฟไป€ไนˆๆ ท' section with real agent output
  samples for tang/byzantine/roman-republic/qin/soviet (shows the PR #7
  fix actually took effect โ€” tang has zhongshu-sheren not silijian,
  byzantine has basileus+patriarch, etc.)
- README adds ็‰ˆๆœฌๅކ็จ‹ table linking to each release PR
- CHANGELOG: v5.0.1 entry documenting the one-line engine fix and its
  per-regime impact
- package.json: bump version 5.0.0 โ†’ 5.0.1
LeoLin990405 added a commit that referenced this pull request Apr 14, 2026
- Replace marketing-style intro with research-testbed positioning
- Add Abstract + 14-section structure (Problem Statement โ†’ Theoretical
  Framework โ†’ Contributions โ†’ Architecture โ†’ Case Studies โ†’ Models โ†’
  Regime Index โ†’ Engineering โ†’ Limitations โ†’ Related Work โ†’ Release
  History โ†’ Extension โ†’ Acknowledgments โ†’ License)
- Formalize 'regime as topology' mapping (4-dimensional decomposition
  tied to agent orchestration primitives)
- Add 5 case studies (tang, byzantine, roman-republic, qin, soviet) with
  real engine output showing PR #7 fix took effect
- Related Work section cites Qian Mu, Montesquieu, Polybius, Acemoglu &
  Robinson, Fukuyama, plus AutoGen / CrewAI / LangGraph / Hermes
- Limitations section: institutional compression, temporal dimension,
  AI-authored content caveats, CN model filtering empirical finding,
  single-judge tournament bias
- Add BibTeX citation entry for research use

Line count: 427 โ†’ 640 (+50% volume, academic register throughout)
LeoLin990405 added a commit that referenced this pull request Apr 14, 2026
- Replace marketing-style intro with research-testbed positioning
- Add Abstract + 14-section structure (Problem Statement โ†’ Theoretical
  Framework โ†’ Contributions โ†’ Architecture โ†’ Case Studies โ†’ Models โ†’
  Regime Index โ†’ Engineering โ†’ Limitations โ†’ Related Work โ†’ Release
  History โ†’ Extension โ†’ Acknowledgments โ†’ License)
- Formalize 'regime as topology' mapping (4-dimensional decomposition
  tied to agent orchestration primitives)
- Add 5 case studies (tang, byzantine, roman-republic, qin, soviet) with
  real engine output showing PR #7 fix took effect
- Related Work section cites Qian Mu, Montesquieu, Polybius, Acemoglu &
  Robinson, Fukuyama, plus AutoGen / CrewAI / LangGraph / Hermes
- Limitations section: institutional compression, temporal dimension,
  AI-authored content caveats, CN model filtering empirical finding,
  single-judge tournament bias
- Add BibTeX citation entry for research use

Line count: 427 โ†’ 640 (+50% volume, academic register throughout)
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