🚀 Phase 12.7-B: ChatGPT5糖衣構文(基本実装完了) - パイプライン演算子(|>)実装 - セーフアクセス(?.)とデフォルト値(??)実装 - sugar gateによる段階的有効化機能 - 糖衣構文テストスイート追加 🤖 自律型AI開発システム改善 - codex-async-notify.sh: タスク制御指示追加 - "下の箱を積み過ぎないように先に進んでください" - "フェーズが終わったと判断したら止まってください" - プロセス数表示機能の改善(count_running_codex_display) - 自動停止機能が正常動作(Phase 12.7-C前で停止確認) 📚 ドキュメント更新 - Paper 13: 自律型AI協調開発システムの革新性を文書化 - ANCP可逆マッピング仕様追加 - nyfmt PoC(フォーマッター)計画追加 🧱 箱理論の体現 - 74k行のコードベース(Phase 15で20k行を目指す) - ANCP適用で最終的に6k行相当を狙う - 世界最小の実用コンパイラへの道 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
1.4 KiB
1.4 KiB
nyfmt Reversible Formatter – PoC Roadmap
Status: Proposal (docs only)
Goal: A reversible code formatter for Nyash that enables round‑trip transforms (format → parse → print → original) for ANCP/Phase 12.7 sugar while preserving developer intent.
PoC Scope (Phase 1)
- Define reversible AST surface subset (no semantics changes).
- Implement pretty‑printer prototype in Rust or script (out of tree), constrained to subset.
- Add examples demonstrating round‑trip invariants and failure modes.
Round‑trip invariants (subset)
- Pipeline:
lhs |> f(a)⇄f(lhs,a) - Safe Access:
a?.b⇄peek a { null => null, else => a.b } - Default:
x ?? y⇄peek x { null => y, else => x } - Range:
a .. b⇄Range(a,b) - Compound Assign:
x += y⇄x = x + y(var/field target)
VSCode Extension Idea
- Commands:
- "Nyfmt: Format (reversible subset)"
- "Nyfmt: Verify Round‑Trip"
- On‑save optional gate with env flag
NYFMT_POC=1. - Diagnostics panel lists non‑reversible constructs.
Examples and Smokes
- Place minimal examples under
apps/nyfmt-poc/. - Add a smoke script
tools/nyfmt_smoke.shthat:- echoes
NYFMT_POCand current subset level - prints instructions and links to
ANCP-Reversible-Mapping-v1.md - shows Before/Canonical/Round‑Trip triads from examples
- echoes
Non‑Goals
- Changing Nyash runtime/semantics.
- Enforcing formatting in CI (PoC is opt‑in).