-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconstants.py
More file actions
90 lines (78 loc) · 2.58 KB
/
constants.py
File metadata and controls
90 lines (78 loc) · 2.58 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
from __future__ import annotations
from pathlib import Path
CURRENT_TASK_CONTRACT_VERSION = 3
TASK_STATES = {"draft", "approved", "in_progress", "failed", "blocked", "review_ready", "completed"}
PHASE_STATES = {"pending", "in_progress", "completed", "failed", "blocked"}
TASK_TRANSITIONS = {
"draft": {"approved"},
"approved": {"in_progress", "blocked"},
"in_progress": {"approved", "failed", "blocked", "review_ready", "completed"},
"failed": {"approved", "in_progress", "blocked"},
"blocked": {"approved", "in_progress"},
"review_ready": {"completed", "blocked"},
"completed": set(),
}
PHASE_TRANSITIONS = {
"pending": {"in_progress", "blocked"},
"in_progress": {"completed", "failed", "blocked"},
"failed": {"pending", "in_progress", "blocked"},
"blocked": {"pending", "in_progress"},
"completed": {"pending", "failed", "blocked"},
}
SPEC_REQUIRED_SECTIONS = [
"Request",
"Problem",
"Goals",
"Non-goals",
"Constraints",
"Acceptance",
"Socratic Clarification Log",
]
AGENTS_REQUIRED_HEADINGS = [
"## Mission",
"## Start Here",
"## CRITICAL Rules",
"## Architecture Boundaries",
"## Workflow Contract",
"## TDD Contract",
"## Command Contract",
"## Source Of Truth Order",
"## Forbidden Actions",
"## Change Discipline",
]
AGENTS_REQUIRED_KEYWORDS = [
"CRITICAL:",
"ALWAYS:",
"NEVER:",
]
DOC_FILES = [
"docs/README.md",
"docs/artifact-model.md",
"docs/runtime.md",
"docs/hooks.md",
"docs/runbook.md",
]
DOC_REQUIRED_MARKERS = {
"docs/README.md": ["AGENTS.md", "docs/runtime.md", "docs/artifact-model.md"],
"docs/artifact-model.md": ["task.json", "intake", "clarifications", "status", "kickoff_required_for_phase", "required_reads"],
"docs/runtime.md": ["소크라테스 질문", "Status: open", "approve", "plan", "kickoff", "review --close"],
"docs/hooks.md": [".githooks/", "TDD Guard", "Dangerous Command Guard", "Circuit Breaker", "workflow.py hook"],
"docs/runbook.md": ["Status: open", "사용자가 현재 spec 초안에 명시적으로 동의하면 approve 한다.", "approve", "plan", "kickoff"],
}
STALE_REFERENCE_PATTERNS = [
"docs/workflow/",
"SPECS.md",
"docs/specs/",
"docs/operations/",
"docs/architecture/",
"workflows/config/",
"workflows/runtime/",
"workflows/schemas/",
"scripts/hooks/",
"workflow_lib.py",
]
STALE_REFERENCE_SCAN_EXCLUDES = {
Path("scripts/workflow_runtime/constants.py"),
Path("scripts/workflow_runtime/doctor.py"),
Path(".github/workflows/workflow-control-plane.yml"),
}