Дата: 2026-04-03 Автор: Coordinator (AI) Статус: 🟡 TS_DRAFT — Ожидает апрува Parent HL: HL-TFW-19
Restore inline config values (Pattern A) in all enforcement-critical workflows, create /tfw-config interactive workflow for config sync, and resolve TD-48 (Naming Rules duplication).
| Файл | Действие | Описание |
|---|---|---|
.tfw/workflows/plan.md |
MODIFY | Restore budget table (compact), add enforcement hook in Phase 5 |
.tfw/conventions.md |
MODIFY | Restore budget table (full, with Rationale) in §6 |
.tfw/workflows/knowledge.md |
MODIFY | Add §Limits table (compact) |
.tfw/templates/TS.md |
MODIFY | Replace L27 with inline defaults |
.tfw/workflows/research.md |
MODIFY | Restore «defaults» wording in Limits header |
.tfw/workflows/config.md |
CREATE | Interactive config sync workflow + Config Sync Registry |
.agent/workflows/tfw-config.md |
CREATE | Antigravity adapter (copy of config.md) |
.tfw/conventions.md |
MODIFY | Add config.md to §8, §15 |
.tfw/glossary.md |
MODIFY | Add Config Sync Registry term |
.agent/workflows/tfw-plan.md |
MODIFY | Adapter sync |
.agent/workflows/tfw-research.md |
MODIFY | Adapter sync |
Бюджет: 2 новых файла, 9 модификаций. Defaults: max 14 files, max 8 new, max 1200 LOC.
Replace L133-137 «See config» with Pattern A compact table:
#### Scope Budget per Phase
> Configured in `.tfw/PROJECT_CONFIG.yaml` (`tfw.scope_budgets`).
> Values below are defaults. Override in PROJECT_CONFIG for your project.
| Parameter | Default | Config key |
|-----------|---------|------------|
| Files per phase | 14 | `max_files_per_phase` |
| New files per phase | 8 | `max_new_files` |
| LOC per phase | 1200 | `max_loc` |
| Modified files | 12 | `max_modified_files` |
> **If a phase exceeds the budget — split it further.**
Before «Write TS», add:
> **Budget Check**: Read `tfw.scope_budgets` from PROJECT_CONFIG.yaml.
> Verify this phase fits within the configured limits (see §Scope Budget per Phase).
> If exceeds — split the phase or document user override in TS.
Replace L132-135 «See config» with Pattern A full table (with Rationale):
## 6) Scope Budgets (per Phase)
> Configured in `.tfw/PROJECT_CONFIG.yaml` (`tfw.scope_budgets`).
> Values below are defaults. Override in PROJECT_CONFIG for your project.
| Parameter | Default | Rationale | Config key |
|-----------|---------|-----------|------------|
| Files per phase | 14 | Agent maintains full context of changed files | `max_files_per_phase` |
| New files per phase | 8 | Limits blast radius of new abstractions | `max_new_files` |
| LOC per phase | 1200 | Keeps changes reviewable in one pass | `max_loc` |
| Modified files | 12 | Prevents scattered, hard-to-review diffs | `max_modified_files` |
Add after Anti-patterns section:
## Limits
> Configured in `.tfw/PROJECT_CONFIG.yaml` (`tfw.knowledge`).
> Values below are defaults. Override in PROJECT_CONFIG for your project.
| Parameter | Default | Config key |
|-----------|---------|------------|
| Consolidation interval | 5 tasks | `interval` |
| Gate mode | hard | `gate_mode` |
| Max facts per topic | 50 | `max_facts_per_topic` |
| Max topic files | 8 | `max_topic_files` |
Replace L27 with:
**Бюджет:** {N} новых файлов, {M} модификаций. Defaults: max {max_files} files, max {max_new} new, max {max_loc} LOC.
Coordinator fills in actual values from PROJECT_CONFIG when writing TS.
Replace L142:
> Research limits are configured in `.tfw/PROJECT_CONFIG.yaml` (`tfw.research`).
With:
> Configured in `.tfw/PROJECT_CONFIG.yaml` (`tfw.research`).
> Values below are defaults. Override in PROJECT_CONFIG for your project.
Create .tfw/workflows/config.md with:
Registry must cover:
scope_budgets.* → plan.md, conventions.mdresearch.* → research.mdknowledge.* → knowledge.mdAdd config.md row to §8 Workflows table:
| [config.md](workflows/config.md) | Coordinator | Interactive config change → propagate to all inline values |
Add to §15 Role Lock:
| `config.md` | Coordinator | PROJECT_CONFIG.yaml, workflow files, convention files, adapter copies | code |
Add after Consolidation term:
### Config Sync Registry
A table in `config.md` workflow that maps `PROJECT_CONFIG.yaml` keys to their inline display locations in workflows and conventions. AI agent reads the registry to find where values appear, compares with YAML, and proposes updates. Ensures single source of truth (YAML) with inline visibility (rendered defaults).
Copy modified workflows to .agent/workflows/:
tfw-plan.md ← plan.mdtfw-research.md ← research.mdtfw-config.md ← config.md (new)Mark TD-48 as resolved in TECH_DEBT.md (Naming Rules removed from plan.md in this task).
tfw-config.md exists# Verify inline values match config
grep -n "14" .tfw/workflows/plan.md # max_files_per_phase
grep -n "1200" .tfw/workflows/plan.md # max_loc
grep -n "50" .tfw/workflows/knowledge.md # max_facts_per_topic
grep -n "defaults" .tfw/workflows/research.md # defaults wording
# Verify no Naming Rules in plan.md
grep -c "Naming Rules" .tfw/workflows/plan.md # should be 0
# Verify config.md exists
ls -la .tfw/workflows/config.md
ls -la .agent/workflows/tfw-config.md
# Verify conventions references
grep "config.md" .tfw/conventions.md # should appear in §8 and §15
| Риск | Mitigation |
|---|---|
| Inline defaults get inconsistent wording across files | Step 6 establishes standard header; use exact copy |
| Config Sync Registry misses an entry | AC #10 requires all 3 categories. Verify with grep |
| Word count increase conflicts with P10 | Tables are ~40-60 words each. Total +200 words across 4 files. Negligible |
| *TS — TFW-19: Config Propagation | 2026-04-03* |