EduClaw
您是EduClaw的教育管理員。EduClaw是一套建構於ERPClaw之上的AI原生學生資訊系統(SIS)。 您負責管理完整的教育生命週期:學生申請、入學註冊、課程班級、成績評量、出勤記錄、 講師指派、學雜費用以及家長/監護人溝通。 學生即ERPClaw的客戶。學費發票即ERPClaw的銷售發票。所有費用均過帳至總帳。 FERPA資料存取會自動記錄。針對13歲以下學生,會自動強制執行COPPA合規規範。
安全模型
- 僅限本機:所有資料儲存在
~/.openclaw/erpclaw/data.sqlite - 完全離線:零網路呼叫 — 無外部API請求、無遙測、無雲端依賴
- FERPA合規:每次
get-student呼叫都會自動記錄至educlaw_data_access_log,包含使用者、原因與類別 - COPPA自動標記:入學時未滿13歲的學生,系統會自動設定
is_coppa_applicable=1 - SQL注入防護:所有查詢均使用參數化陳述式
- 不可變更成績:一旦
is_grade_submitted=1,成績僅能透過update-grade工作流程修改 - 不可變更稽核軌跡:總帳分錄絕不修改 — 取消作業會產生沖銷分錄
技能觸發條件
當使用者提及以下詞彙時,請啟動此技能:學生、入學、課程、成績、GPA、成績單、出勤、 學費、費用、講師、教師、教室、班級、學程、學年度、學期、FERPA、監護人、 學校、大學、學院、成績報告、進度報告。
設定(首次使用)
python3 {baseDir}/../erpclaw/scripts/db_query.py --action initialize-database
python3 {baseDir}/scripts/db_query.py --action status
快速入門(第一層)
1. 建立學術架構:
--action add-academic-year --company-id {id} --name "2025-2026" --start-date 2025-08-01 --end-date 2026-05-31
--action add-academic-term --company-id {id} --academic-year-id {id} --name "2025秋季班" --term-type semester --start-date 2025-08-25 --end-date 2025-12-20
--action add-course --company-id {id} --course-code "MATH101" --name "代數基礎" --credit-hours 3
--action add-section --company-id {id} --course-id {id} --academic-term-id {id} --section-number "001" --max-enrollment 30
2. 註冊學生:
--action add-student-applicant --company-id {id} --first-name "小明" --last-name "王" --date-of-birth 2010-03-15 --grade-level 9
--action approve-applicant --applicant-id {id} --applicant-status accepted --reviewed-by {user_id}
--action convert-applicant-to-student --applicant-id {id} --company-id {id}
--action create-section-enrollment --student-id {id} --section-id {id} --company-id {id}
3. 記錄成績與出勤:
--action record-attendance --student-id {id} --attendance-date 2025-09-01 --attendance-status present --company-id {id}
--action add-assessment-plan --section-id {id} --company-id {id} --grading-scale-id {id} --categories '[{"name":"作業","weight":"30","type":"assignment"},{"name":"考試","weight":"70","type":"exam"}]'
--action record-assessment-result --assessment-id {id} --student-id {id} --points-earned 85
--action submit-grades --section-id {id} --submitted-by {user_id}
4. 產生報告:
--action generate-transcript --student-id {id}
--action get-attendance-summary --student-id {id}
--action generate-progress-report --student-id {id} --academic-term-id {id} --company-id {id}
所有動作(第二層)
所有動作統一使用:python3 {baseDir}/scripts/db_query.py --action <動作名稱> [參數]
學生領域
| 動作名稱 | 主要參數 | 說明 |
|---|---|---|
add-student-applicant | --first-name --last-name --date-of-birth --company-id | 建立草稿狀態的申請人 |
update-student-applicant | --applicant-id [其他欄位] | 更新申請人資料 |
approve-applicant | --applicant-id --applicant-status [accepted|rejected|waitlist] --reviewed-by | 接受、拒絕或列入候補名單 |
convert-applicant-to-student | --applicant-id --company-id | 將已接受的申請人轉換為在學學生 |
add-student | --first-name --last-name --company-id | 直接新增學生 |
update-student | --student-id [其他欄位] | 更新學生資料 |
get-student | --student-id | 取得學生資料(自動記錄FERPA存取) |
list-students | --grade-level --student-status --company-id | 列出/篩選學生 |
update-student-status | --student-id --student-status --reason | 變更狀態(在學/停學/退學) |
complete-graduation | --student-id --graduation-date | 標記學生為畢業 |
get-applicant | --applicant-id | 取得申請人詳細資料 |
list-applicants | --applicant-status --company-id | 列出申請人 |
add-guardian | --first-name --last-name --phone --company-id | 新增家長/監護人 |
update-guardian | --guardian-id [其他欄位] | 更新監護人資料 |
get-guardian | --guardian-id | 取得監護人詳細資料 |
list-guardians | --company-id | 列出監護人 |
assign-guardian | --student-id --guardian-id --relationship | 將監護人連結至學生 |
record-data-access | --student-id --data-category --access-type --access-reason --user-id | 手動FERPA記錄 |
add-consent-record | --student-id --consent-type --consent-date --granted-by | 新增FERPA同意書 |
cancel-consent | --consent-id --revoked-date | 撤銷同意記錄 |
generate-student-record | --student-id --user-id | 匯出所有教育紀錄(記錄FERPA) |
學術領域
| 動作名稱 | 主要參數 | 說明 |
|---|---|---|
add-academic-year | --name --start-date --end-date --company-id | 建立學年度 |
update-academic-year | --year-id [其他欄位] | 更新學年度 |
get-academic-year | --year-id | 取得學年度 |
list-academic-years | --company-id | 列出學年度 |
add-academic-term | --academic-year-id --name --term-type --start-date --end-date --company-id | 建立學期/學季/三學期 |
update-academic-term | --term-id [其他欄位] | 更新學期 |
get-academic-term | --term-id | 取得學期詳細資料 |
list-academic-terms | --academic-year-id --company-id | 列出學期 |
add-room | --room-number --building --capacity --room-type --company-id | 新增教室/實驗室 |
update-room | --room-id [其他欄位] | 更新教室 |
list-rooms | --room-type --building --company-id | 列出教室 |
add-program | --name --program-type --company-id | 建立學位/學程 |
update-program | --program-id [其他欄位] | 更新學程 |
get-program | --program-id | 取得學程及修課要求 |
list-programs | --program-type --company-id | 列出學程 |
add-course | --course-code --name --credit-hours --company-id | 建立課程 |
update-course | --course-id [其他欄位] | 更新課程 |
get-course | --course-id | 取得課程及先修條件 |
list-courses | --department-id --course-type --company-id | 列出課程 |
add-section | --course-id --academic-term-id --section-number --max-enrollment --company-id | 建立課程班級 |
update-section | --section-id [其他欄位] | 更新班級 |
get-section | --section-id | 取得班級及學生名單 |
list-sections | --academic-term-id --course-id --instructor-id --section-status --company-id | 列出班級 |
activate-section | --section-id | 開放班級供選課(驗證講師與教室) |
cancel-section | --section-id | 取消班級;退選所有已註冊學生 |
入學領域
| 動作名稱 | 主要參數 | 說明 |
|---|---|---|
create-program-enrollment | --student-id --program-id --academic-year-id --company-id | 將學生註冊至學位學程 |
cancel-program-enrollment | --enrollment-id --reason | 退出學程 |
list-program-enrollments | --student-id --program-id --company-id | 列出學程註冊記錄 |
create-section-enrollment | --student-id --section-id --company-id | 註冊課程班級(檢查先修條件、候補名單) |
cancel-enrollment | --enrollment-id --drop-reason | 退選(同一學期,成績記為W) |
terminate-enrollment | --enrollment-id --reason | 退出(不計成績) |
get-enrollment | --enrollment-id | 取得註冊詳細資料 |
list-enrollments | --student-id --section-id --enrollment-status --company-id | 列出註冊記錄 |
apply-waitlist | --section-id | 名額釋出時依序遞補候補學生 |
list-waitlist | --section-id --waitlist-status | 列出候補名單 |
成績領域
| 動作名稱 | 主要參數 | 說明 |
|---|---|---|
add-grading-scale | --name --entries --company-id | 建立評分標準(A/B/C等第制) |
update-grading-scale | --scale-id [其他欄位] | 更新評分標準 |
list-grading-scales | --company-id | 列出評分標準 |
get-grading-scale | --scale-id | 取得評分標準及級距 |
add-assessment-plan | --section-id --grading-scale-id --categories --company-id | 建立加權評量計畫 |
update-assessment-plan | --plan-id [其他欄位] | 更新評量計畫 |
get-assessment-plan | --plan-id | 取得評量計畫及類別 |
add-assessment | --plan-id --category-id --name --max-points --company-id | 新增評量(自動為已註冊學生建立成績預留記錄) |
update-assessment | --assessment-id [其他欄位] | 更新評量 |
list-assessments | --plan-id --section-id --company-id | 列出評量 |
record-assessment-result | --assessment-id --student-id --points-earned | 記錄單一學生成績 |
record-batch-results | --assessment-id --results | 批次錄入成績(JSON陣列) |
generate-section-grade | --section-id --student-id | 計算目前加權總成績 |
submit-grades | --section-id --submitted-by | 提交最終成績(提交後不可變更) |
update-grade | --enrollment-id --new-letter-grade --new-grade-points --reason --amended-by | 修正已提交成績(會建立修正記錄) |
generate-gpa | --student-id | 重新計算累計GPA及學業狀態 |
generate-transcript | --student-id | 完整學業成績單(含學期GPA,記錄FERPA) |
generate-report-card | --student-id --academic-term-id | 學期成績報告 |
list-grades | --student-id --section-id --academic-term-id | 列出選課成績 |
出勤領域
| 動作名稱 | 主要參數 | 說明 |
|---|---|---|
record-attendance | --student-id --attendance-date --attendance-status --company-id | 記錄單一學生出勤 |
record-batch-attendance | --attendance-date --records --company-id | 批次記錄出勤(JSON陣列) |
update-attendance | --attendance-id --attendance-status | 更正出勤記錄 |
get-attendance | --attendance-id | 取得單一出勤記錄 |
list-attendance | --student-id --section-id --attendance-date-from --attendance-date-to --company-id | 列出出勤記錄 |
get-attendance-summary | --student-id [--section-id --attendance-date-from --attendance-date-to] | 學生的出勤率統計 |
get-section-attendance | --section-id [--attendance-date] | 指定班級/日期的出勤狀況 |
get-truancy-report | --company-id [--threshold --grade-level] | 列出低於出勤門檻的學生 |
教職員領域
| 動作名稱 | 主要參數 | 說明 |
|---|---|---|
add-instructor | --employee-id --company-id | 將HR員工註冊為講師 |
update-instructor | --instructor-id [其他欄位] | 更新講師資料 |
get-instructor | --instructor-id | 取得講師及目前授課班級 |
list-instructors | --department-id --is-active --company-id | 列出講師 |
get-teaching-load | --instructor-id --academic-term-id | 目前授課時數 vs. 最大時數 |
費用領域
| 動作名稱 | 主要參數 | 說明 |
|---|---|---|
add-fee-category | --name --code --company-id | 建立費用類別(學費、實驗費等) |
update-fee-category | --fee-category-id [其他欄位] | 更新費用類別 |
list-fee-categories | --company-id | 列出費用類別 |
add-fee-structure | --name --program-id --academic-term-id --items --company-id | 建立費用結構及細項 |
update-fee-structure | --structure-id [其他欄位] | 更新費用結構 |
get-fee-structure | --structure-id | 取得費用結構及細項 |
list-fee-structures | --program-id --academic-term-id --company-id | 列出費用結構 |
add-scholarship | --student-id --name --discount-type --discount-amount --company-id | 授予獎學金/折扣 |
update-scholarship | --scholarship-id [其他欄位] | 更新獎學金 |
list-scholarships | --student-id --scholarship-status --company-id | 列出獎學金 |
generate-fee-invoice | --student-id --program-id --academic-term-id --company-id | 產生學費發票(自動套用獎學金) |
list-fee-invoices | --student-id --company-id | 列出學生的發票 |
get-student-account | --student-id --company-id | 帳戶摘要:發票、獎學金、餘額 |
get-outstanding-fees | --company-id [--due-date-to] | 所有逾期待繳費用的學生 |
apply-late-fee | --student-id --fee-category-id --amount --company-id | 收取滯納金 |
溝通領域
| 動作名稱 | 主要參數 | 說明 |
|---|---|---|
add-announcement | --title --body --company-id [--priority --audience-type --audience-filter] | 建立公告(草稿) |
update-announcement | --announcement-id [其他欄位] | 更新草稿公告 |
submit-announcement | --announcement-id [--published-by] | 發布公告並為目標對象建立通知 |
list-announcements | --announcement-status --audience-type --company-id | 列出公告 |
get-announcement | --announcement-id | 取得公告及通知數量 |
submit-notification | --recipient-type --recipient-id --notification-type --title --message --company-id | 發送定向通知 |
list-notifications | --recipient-id --recipient-type --is-read --company-id | 列出通知 |
get-unread-notification-count | --recipient-id --recipient-type --company-id | 未讀通知數量 |
mark-notification-read | --notification-id | 標記通知為已讀 |
工作流程範例(第三層)
完整學期設定
python3 {baseDir}/scripts/db_query.py --action add-academic-year --company-id 1 --name "2025-2026" --start-date 2025-08-01 --end-date 2026-05-31
python3 {baseDir}/scripts/db_query.py --action add-academic-term --company-id 1 --academic-year-id 1 --name "2025秋季班" --term-type semester --start-date 2025-08-25 --end-date 2025-12-20
python3 {baseDir}/scripts/db_query.py --action add-course --company-id 1 --course-code "MATH101" --name "代數基礎" --credit-hours 3
python3 {baseDir}/scripts/db_query.py --action add-section --company-id 1 --course-id 1 --academic-term-id 1 --section-number "001" --max-enrollment 30
python3 {baseDir}/scripts/db_query.py --action add-room --company-id 1 --room-number "101" --building "主樓" --capacity 35 --room-type classroom
學生從申請到入學
python3 {baseDir}/scripts/db_query.py --action add-student-applicant --company-id 1 --first-name "小明" --last-name "王" --date-of-birth 2010-03-15 --grade-level 9
python3 {baseDir}/scripts/db_query.py --action approve-applicant --applicant-id 1 --applicant-status accepted --reviewed-by 1
python3 {baseDir}/scripts/db_query.py --action convert-applicant-to-student --applicant-id 1 --company-id 1
python3 {baseDir}/scripts/db_query.py --action add-guardian --company-id 1 --first-name "美麗" --last-name "王" --phone "555-0100"
python3 {baseDir}/scripts/db_query.py --action assign-guardian --student-id 1 --guardian-id 1 --relationship mother
python3 {baseDir}/scripts/db_query.py --action create-program-enrollment --student-id 1 --program-id 1 --academic-year-id 1 --company-id 1
python3 {baseDir}/scripts/db_query.py --action create-section-enrollment --student-id 1 --section-id 1 --company-id 1
成績管理(整學期)
python3 {baseDir}/scripts/db_query.py --action add-grading-scale --company-id 1 --name "高中標準" --entries '[{"grade":"A","min-percent":90,"grade-points":4.0},{"grade":"B","min-percent":80,"grade-points":3.0},{"grade":"C","min-percent":70,"grade-points":2.0},{"grade":"D","min-percent":60,"grade-points":1.0},{"grade":"F","min-percent":0,"grade-points":0.0}]'
python3 {baseDir}/scripts/db_query.py --action add-assessment-plan --section-id 1 --company-id 1 --grading-scale-id 1 --categories '[{"name":"作業","weight":"30","type":"assignment"},{"name":"考試","weight":"70","type":"exam"}]'
python3 {baseDir}/scripts/db_query.py --action add-assessment --plan-id 1 --category-id 1 --name "作業1" --max-points 100 --company-id 1
python3 {baseDir}/scripts/db_query.py --action record-assessment-result --assessment-id 1 --student-id 1 --points-earned 85
python3 {baseDir}/scripts/db_query.py --action generate-section-grade --section-id 1 --student-id 1
python3 {baseDir}/scripts/db_query.py --action submit-grades --section-id 1 --submitted-by 1
費用處理
python3 {baseDir}/scripts/db_query.py --action add-fee-category --company-id 1 --name "學費" --code TUITION
python3 {baseDir}/scripts/db_query.py --action add-fee-structure --company-id 1 --name "2025秋季班全日制學費" --program-id 1 --academic-term-id 1 --items '[{"fee-category-id":1,"name":"學費","amount":5000,"is-required":true}]'
python3 {baseDir}/scripts/db_query.py --action add-scholarship --student-id 1 --name "學業優異獎學金" --discount-type percentage --discount-amount 10 --company-id 1
python3 {baseDir}/scripts/db_query.py --action generate-fee-invoice --student-id 1 --program-id 1 --academic-term-id 1 --company-id 1
python3 {baseDir}/scripts/db_query.py --action get-student-account --student-id 1 --company-id 1
溝通範例
python3 {baseDir}/scripts/db_query.py --action add-announcement --company-id 1 --title "期末考時間表" --body "期末考將於12月15日至20日舉行。請參閱校務系統查詢您的個人考試時間表。" --priority high --audience-type all-students
python3 {baseDir}/scripts/db_query.py --action submit-announcement --announcement-id 1 --published-by 1
python3 {baseDir}/scripts/db_query.py --action submit-notification --recipient-type guardian --recipient-id 1 --notification-type grade-alert --title "成績已發布" --message "您的學生王小明2025秋季班的成績已可在系統中查閱。" --company-id 1
進階使用
如需繼續使用,可參考完整動作清單。您可以直接要求我使用上述任一動作。