docs(arch): Add ARCHITECTURE.md and CLAUDE.md, init repo

Bring the Blanton Tera Term TTL test suite under version control and
document how the pieces fit together.

- ARCHITECTURE.md: A/B/C script roles, host-to-DUT-to-FPGA data path,
  config/settings/profile data models, PCIe AER + EDAC topology table,
  10 key constraints, and 6 development phases derived from the
  Status_20260814 spreadsheet's On-Going items
- CLAUDE.md: stack, smoke-test commands, conventions, and the hardware
  footguns (per-unit BDF, VSPI vs VI2C timing, repeated START,
  STORE_USER_ALL, ARB_LOST false positives)
- secret/: gitignored credential store with README + .example template,
  so the DUT login stops living in 1_Blanton_Script_A.ttl
- .gitignore: secret/*, For_AI/, *.log, publish/, *.DSN

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014RetWKFZFG1ZHcitQAyhwM
This commit is contained in:
2026-08-17 08:52:11 +08:00
co-authored by Claude Opus 5
commit 24c704c667
60 changed files with 8637 additions and 0 deletions
+35
View File
@@ -0,0 +1,35 @@
# secret/ — 本機 / 現場敏感資料
這個資料夾集中放**不能進 git** 的東西:DUT console 帳密、per-unit 的 PCIe BDF 覆寫、
COM port 設定、客戶提供但未公開的附件。
## Committed vs Ignored
`.gitignore` 規則是 `secret/*` 搭配 `!secret/README.md` / `!secret/*.example` / `!secret/.gitkeep`
| 檔案 | 狀態 | 說明 |
|------|------|------|
| `README.md` | ✅ committed | 本說明 |
| `config_secret.ttl.example` | ✅ committed | 帳密範本,敏感欄位一律 `__CHANGE_ME__` |
| `config_secret.ttl` | 🚫 ignored | **實際** DUT 帳密,由 `config.ttl` include |
| `dut_bdf.ttl` / `*.local.*` | 🚫 ignored | per-unit 的 PCIe BDF / COM port 覆寫 |
| `*.pem` / `*.key` / `*.env` | 🚫 ignored | 憑證、金鑰 |
| 客戶未公開附件 | 🚫 ignored | schematic、內部 spec 草稿等 |
## 第一次使用
```bash
cp secret/config_secret.ttl.example secret/config_secret.ttl
# 編輯 secret/config_secret.ttl,把 __CHANGE_ME__ 換成實際帳密
```
Tera Term 端把整包 `src/Script_ABC_Blanton/` 複製到工作目錄時,**一併把
`secret/config_secret.ttl` 放到 `src/Script_ABC_Blanton/` 同層**`config.ttl` 以相對路徑 include)。
現場機器上的那份不要再複製回 repo。
## 鐵則
- 🔒 **commit 前先 grep 一次**`git grep -nE 'password|passwd|PaSsWoRd' -- . ':!secret'`
應該只找得到變數名與 placeholder,不該出現真值。
- 🔒 `.example` 檔內敏感欄位一律寫 `__CHANGE_ME__`,不留 `your_password` 這種半吊子 placeholder。
- 🔒 本 repo 含客戶 NDA 資料,**只推 `nas` + `gitea`,絕不推 GitHub**。
+24
View File
@@ -0,0 +1,24 @@
; =============================================================================
; config_secret.ttl.example -- DUT credentials (NOT in git)
; =============================================================================
; Usage:
; 1. cp secret/config_secret.ttl.example secret/config_secret.ttl
; 2. Replace every __CHANGE_ME__ below with the real value.
; 3. Put config_secret.ttl next to config.ttl in the Tera Term working dir.
;
; config.ttl includes this file; 1_Blanton_Script_A.ttl must use the variables
; below instead of a literal password:
;
; sendln dut_user
; wait "Password:"
; sendln dut_password
;
; NEVER commit the filled-in config_secret.ttl.
; =============================================================================
; --- SONiC console login ---
dut_user = "__CHANGE_ME__"
dut_password = "__CHANGE_ME__"
; --- Optional: root password, if 'sudo -i' prompts on this unit ---
dut_root_password = "__CHANGE_ME__"