feat: finalize AI logging framework and workflow

- align instructions, workflow rules, and task template with three-level logging
- extend ai-task generation to support execution-log requirements
- update worklog, prompt log, and execution log for the finalized framework
- validate the framework with generator and project quality checks
This commit is contained in:
2026-03-16 03:00:39 +01:00
parent 9704d3ef5b
commit d9d412973b
7 changed files with 449 additions and 56 deletions

View File

@@ -38,6 +38,33 @@ case "$TYPE_LOWER" in
esac
WORKLOG_FILE="docs/ai-worklog.md"
PROMPTS_FILE="docs/ai-prompts.md"
EXECUTION_LOG_FILE="docs/ai-execution-log.md"
check_task_id_order() {
local file="$1"
local prefix="$2"
local previous=""
local current=""
[[ -f "$file" ]] || return 0
while IFS= read -r current; do
if [[ -n "$previous" && "$current" < "$previous" ]]; then
echo "Error: task IDs in $file are out of chronological order for prefix $prefix" >&2
echo "Previous: $previous" >&2
echo "Current: $current" >&2
echo "Please fix the log order before generating a new task." >&2
exit 1
fi
previous="$current"
done < <(grep -Eo "${prefix}-[0-9]{8}-[0-9]{3}" "$file" || true)
}
check_task_id_order "$WORKLOG_FILE" "$PREFIX"
check_task_id_order "$PROMPTS_FILE" "$PREFIX"
check_task_id_order "$EXECUTION_LOG_FILE" "$PREFIX"
LAST_SEQ=0
if [[ -f "$WORKLOG_FILE" ]]; then
@@ -101,6 +128,16 @@ Logging requirements:
- append entry to docs/ai-prompts.md
- include Date, Task ID, Agent, Scope
- use Task ID: ${TASK_ID}
- maintain chronological Task ID order in ai-worklog.md, ai-prompts.md and ai-execution-log.md
- append entry to docs/ai-execution-log.md
Execution Logging requirements:
- append entry to docs/ai-execution-log.md
- include:
- full prompt
- agent todos
- final execution report
- use the standard execution log format defined in docs/ai-execution-log.md
Git requirements:
- do NOT commit or push unless explicitly requested