Add intrinsic first-pass decomposition boost path (sprint 245)

This commit is contained in:
Bill
2026-02-26 15:19:21 -07:00
parent b68f7edc84
commit d4b7e8ce48
8 changed files with 154 additions and 2 deletions

View File

@@ -150,7 +150,7 @@ Parallel planning tranche (active):
- `logs/taskitem_runs/TEST_ONLY_spec_planning_baseline_20260226/deterministic_spec_readiness.json` - `logs/taskitem_runs/TEST_ONLY_spec_planning_baseline_20260226/deterministic_spec_readiness.json`
Planning runtime controls (active): Planning runtime controls (active):
- `sprint232_plan.md` to `sprint244_plan.md` - `sprint232_plan.md` to `sprint245_plan.md`
- semantic bridge + intake augmentation + requirement injection + expansion gating are wired into: - semantic bridge + intake augmentation + requirement injection + expansion gating are wired into:
- `tools/mcp/run_sprint_taskitem_pipeline.sh` - `tools/mcp/run_sprint_taskitem_pipeline.sh`
- current policy default is native-first semantic fallback: - current policy default is native-first semantic fallback:
@@ -185,3 +185,6 @@ Planning runtime controls (active):
- `WSTONE_NATIVE_PROFILE_AUTOFILL` - `WSTONE_NATIVE_PROFILE_AUTOFILL`
- `WSTONE_NATIVE_PROFILE_AUTOFILL_MAX_TASKS` - `WSTONE_NATIVE_PROFILE_AUTOFILL_MAX_TASKS`
- `tools/mcp/synthesize_native_profile_autofill_tasks.py` - `tools/mcp/synthesize_native_profile_autofill_tasks.py`
- intrinsic first-pass boost can inject profile-derived decomposition constraints:
- `WSTONE_NATIVE_INTRINSIC_BOOST`
- `tools/mcp/synthesize_native_intrinsic_boost_requirements.py`

View File

@@ -47,7 +47,7 @@ This is the canonical dated registry for "not production-ready" generator gaps.
| GR-018 | Performance/security/rollout constrained refactor enforcement gap | `docs/gap_hunt_fullstack_multifile_2026-02-26.md`, `logs/taskitem_runs/challenging_fullstack_multifile_20260226_r5/results.jsonl` | `partial` | Hard checks now enforce migration rollback + data-loss policy, security deny-by-default, SLO p95 presence, and rollout staged+abort policy. Enforcement is contract-level; generator capability under these constraints is still weak in C++ AB path. | Constraint-aware generation follow-up | | GR-018 | Performance/security/rollout constrained refactor enforcement gap | `docs/gap_hunt_fullstack_multifile_2026-02-26.md`, `logs/taskitem_runs/challenging_fullstack_multifile_20260226_r5/results.jsonl` | `partial` | Hard checks now enforce migration rollback + data-loss policy, security deny-by-default, SLO p95 presence, and rollout staged+abort policy. Enforcement is contract-level; generator capability under these constraints is still weak in C++ AB path. | Constraint-aware generation follow-up |
| GR-019 | Parity-blocked readiness load (gating without capability closure) | `logs/taskitem_runs/challenging_fullstack_multifile_20260226_r7/summary.json`, `logs/taskitem_runs/challenging_subset_prod_20260226_r7/summary.json`, `docs/sprint225_227_execution_tracker_2026-02-26.md` | `partial` | Sprint 225-227 reduced blocked parity load from `6` to `0` on both tracked hard catalogs while keeping unresolved divergence at `0`. This closes immediate safety debt for current corpora, but robustness is still contingent on pattern-driven repair classes. | Generalize repairs beyond queue-shaped transpile outputs | | GR-019 | Parity-blocked readiness load (gating without capability closure) | `logs/taskitem_runs/challenging_fullstack_multifile_20260226_r7/summary.json`, `logs/taskitem_runs/challenging_subset_prod_20260226_r7/summary.json`, `docs/sprint225_227_execution_tracker_2026-02-26.md` | `partial` | Sprint 225-227 reduced blocked parity load from `6` to `0` on both tracked hard catalogs while keeping unresolved divergence at `0`. This closes immediate safety debt for current corpora, but robustness is still contingent on pattern-driven repair classes. | Generalize repairs beyond queue-shaped transpile outputs |
| GR-020 | Semantic fallback overuse masks weak native decomposition | `logs/taskitem_runs/TEST_ONLY_sprint236_semantic_fallback_audit_20260226/semantic_fallback_summary.json`, `logs/taskitem_runs/TEST_ONLY_sprint237_semantic_fallback_gate_fail_20260226/semantic_fallback_budget_gate.json`, `logs/taskitem_runs/TEST_ONLY_sprint238_native_gate_fail_20260226.json`, `logs/taskitem_runs/TEST_ONLY_sprint239_semantic_fallback_audit_20260226/semantic_fallback_summary.json`, `logs/taskitem_runs/TEST_ONLY_sprint240_retry_20260226_145631/00_summary.json`, `docs/sprint236_execution_tracker_2026-02-26.md`, `docs/sprint237_execution_tracker_2026-02-26.md`, `docs/sprint238_execution_tracker_2026-02-26.md`, `docs/sprint239_execution_tracker_2026-02-26.md`, `docs/sprint240_execution_tracker_2026-02-26.md` | `partial` | Sprint 236 added deterministic fallback-gap auditing with tool + constraint metadata. Sprint 237 added fallback-budget hard gate (`max-fallback-rate`) and produced expected fail/pass artifacts. Sprint 238 added native decomposition hard gate in pipeline (`min task count`, `min semantic signal count`) so weak native generation can be blocked before fallback masking. Sprint 239 added native reason enrichment and improved semantic signal density (`0 -> 6`). Sprint 240 added native decomposition retry with explicit minimum-task policy; on current sample retry attempted but did not improve depth (`2 -> 2`). | Native decomposition task-depth upgrade (increase native task granularity beyond 2) | | GR-020 | Semantic fallback overuse masks weak native decomposition | `logs/taskitem_runs/TEST_ONLY_sprint236_semantic_fallback_audit_20260226/semantic_fallback_summary.json`, `logs/taskitem_runs/TEST_ONLY_sprint237_semantic_fallback_gate_fail_20260226/semantic_fallback_budget_gate.json`, `logs/taskitem_runs/TEST_ONLY_sprint238_native_gate_fail_20260226.json`, `logs/taskitem_runs/TEST_ONLY_sprint239_semantic_fallback_audit_20260226/semantic_fallback_summary.json`, `logs/taskitem_runs/TEST_ONLY_sprint240_retry_20260226_145631/00_summary.json`, `docs/sprint236_execution_tracker_2026-02-26.md`, `docs/sprint237_execution_tracker_2026-02-26.md`, `docs/sprint238_execution_tracker_2026-02-26.md`, `docs/sprint239_execution_tracker_2026-02-26.md`, `docs/sprint240_execution_tracker_2026-02-26.md` | `partial` | Sprint 236 added deterministic fallback-gap auditing with tool + constraint metadata. Sprint 237 added fallback-budget hard gate (`max-fallback-rate`) and produced expected fail/pass artifacts. Sprint 238 added native decomposition hard gate in pipeline (`min task count`, `min semantic signal count`) so weak native generation can be blocked before fallback masking. Sprint 239 added native reason enrichment and improved semantic signal density (`0 -> 6`). Sprint 240 added native decomposition retry with explicit minimum-task policy; on current sample retry attempted but did not improve depth (`2 -> 2`). | Native decomposition task-depth upgrade (increase native task granularity beyond 2) |
| GR-021 | Impact-specific native decomposition coverage not enforced uniformly | `docs/native_decomposition_impact_list_2026-02-26.md`, `tools/mcp/profiles/native_decomposition_impact_profiles.json`, `logs/taskitem_runs/TEST_ONLY_sprint241_fullstack_impact_20260226_150416/00_summary.json`, `logs/taskitem_runs/TEST_ONLY_sprint241_native_impact_aggregate_20260226/native_impact_coverage_aggregate.json`, `logs/taskitem_runs/TEST_ONLY_sprint242_impact_remediation_loop_20260226/remediation_loop_summary.json`, `logs/taskitem_runs/TEST_ONLY_sprint243_impact_remediation_tasks_loop_20260226_r2/remediation_loop_summary.json`, `logs/taskitem_runs/TEST_ONLY_sprint244_autofill_20260226_151651/00_summary.json`, `logs/taskitem_runs/TEST_ONLY_sprint244_autofill_enforce_20260226_151709/00_summary.json` | `partial` | Sprint 241 added one-by-one impact profiles and native impact coverage gate. Sprint 242-243 added remediation synthesis and task-bundle closure loop (`7 -> 0` in one rerun on hard sample). Sprint 244 added first-pass profile autofill in the main pipeline; hard fullstack sample now passes impact coverage in first pass with autofill enabled (`failing_profile_count=0`), and enforced gate fails when autofill is disabled (`failing_profile_count=7`). Remaining gap is intrinsic native generator depth without scaffolding assistance. | Improve intrinsic first-pass native decomposition quality so profile closure does not rely on synthetic autofill tasks | | GR-021 | Impact-specific native decomposition coverage not enforced uniformly | `docs/native_decomposition_impact_list_2026-02-26.md`, `tools/mcp/profiles/native_decomposition_impact_profiles.json`, `logs/taskitem_runs/TEST_ONLY_sprint241_fullstack_impact_20260226_150416/00_summary.json`, `logs/taskitem_runs/TEST_ONLY_sprint241_native_impact_aggregate_20260226/native_impact_coverage_aggregate.json`, `logs/taskitem_runs/TEST_ONLY_sprint242_impact_remediation_loop_20260226/remediation_loop_summary.json`, `logs/taskitem_runs/TEST_ONLY_sprint243_impact_remediation_tasks_loop_20260226_r2/remediation_loop_summary.json`, `logs/taskitem_runs/TEST_ONLY_sprint244_autofill_20260226_151651/00_summary.json`, `logs/taskitem_runs/TEST_ONLY_sprint244_autofill_enforce_20260226_151709/00_summary.json`, `logs/taskitem_runs/TEST_ONLY_sprint245_intrinsic_20260226_151835/00_summary.json` | `partial` | Sprint 241 added one-by-one impact profiles and native impact coverage gate. Sprint 242-243 added remediation synthesis and task-bundle closure loop (`7 -> 0` in one rerun on hard sample). Sprint 244 added first-pass profile autofill in the main pipeline; hard sample passes with autofill (`failing_profile_count=0`) and fails without it (`7`). Sprint 245 added intrinsic first-pass boost constraints, but no uplift was observed on hard sample (`7 -> 7`, task count `2 -> 2`). Remaining gap is intrinsic native decomposition quality without synthetic task scaffolding. | Improve intrinsic first-pass native decomposition quality so profile closure does not rely on synthetic autofill tasks |
## What Was Covered Today (Sprints 175-184) ## What Was Covered Today (Sprints 175-184)

View File

@@ -248,3 +248,17 @@
- Enforced gate behavior verified: - Enforced gate behavior verified:
- pass with autofill ON: `logs/taskitem_runs/TEST_ONLY_sprint244_autofill_enforce_20260226_151709/00_summary.json` - pass with autofill ON: `logs/taskitem_runs/TEST_ONLY_sprint244_autofill_enforce_20260226_151709/00_summary.json`
- fail with autofill OFF: `logs/taskitem_runs/TEST_ONLY_sprint244_autofill_enforce_20260226_151710/06_native_impact_coverage.json` - fail with autofill OFF: `logs/taskitem_runs/TEST_ONLY_sprint244_autofill_enforce_20260226_151710/06_native_impact_coverage.json`
## Sprint 245 Added (Same Day)
- Added intrinsic first-pass decomposition boost path:
- `tools/mcp/synthesize_native_intrinsic_boost_requirements.py`
- `WSTONE_NATIVE_INTRINSIC_BOOST`
- summary packet: `native_intrinsic_boost`
- A/B with autofill disabled on hard fullstack sample:
- OFF: `logs/taskitem_runs/TEST_ONLY_sprint245_intrinsic_20260226_151834/00_summary.json`
- ON: `logs/taskitem_runs/TEST_ONLY_sprint245_intrinsic_20260226_151835/00_summary.json`
- Current measured result:
- `failing_profile_count 7 -> 7`
- `task_count 2 -> 2`
- no intrinsic uplift on this sample (signal retained for next tranche).

View File

@@ -0,0 +1,33 @@
# Sprint 245 Execution Tracker - 2026-02-26
## Scope
- `sprint245_plan.md`
## Implemented
New tool:
- `tools/mcp/synthesize_native_intrinsic_boost_requirements.py`
- Builds profile-derived intrinsic decomposition constraints from active profiles.
Pipeline integration in `tools/mcp/run_sprint_taskitem_pipeline.sh`:
- Added `WSTONE_NATIVE_INTRINSIC_BOOST` (default `0`).
- Writes intrinsic requirements artifact when enabled:
- `01d_native_intrinsic_boost_requirements.json`
- Appends intrinsic requirements into `NORMALIZED_REQS` pre-generation.
- Summary now includes:
- `native_intrinsic_boost`
## A/B Validation (autofill disabled)
- intrinsic OFF:
- `logs/taskitem_runs/TEST_ONLY_sprint245_intrinsic_20260226_151834/00_summary.json`
- intrinsic ON:
- `logs/taskitem_runs/TEST_ONLY_sprint245_intrinsic_20260226_151835/00_summary.json`
Observed result on hard fullstack sample:
- `native_impact_coverage.failing_profile_count: 7 -> 7`
- `taskitems.task_count: 2 -> 2`
## Explicit Completion Signal
- Sprint 245: `DONE` (implemented + measured; no closure uplift on this sample)

View File

@@ -0,0 +1,6 @@
#pragma once
// Sprint 245 integration summary:
// - Added intrinsic first-pass decomposition boost requirement synthesis.
// - Pipeline can inject profile-derived intrinsic constraints before generation.
// - A/B evidence currently shows no first-pass closure improvement on hard fullstack sample.

11
sprint245_plan.md Normal file
View File

@@ -0,0 +1,11 @@
# Sprint 245 Plan: Intrinsic First-Pass Decomposition Boost
## Goal
Improve native first-pass decomposition without synthetic task injection by adding profile-derived intrinsic decomposition constraints before generation.
## Steps
- Step 2269: Add intrinsic boost requirement synthesizer from active impact profiles.
- Step 2270: Integrate optional intrinsic boost requirement injection into pipeline pre-generation path.
- Step 2271: Emit intrinsic boost telemetry in summary.
- Step 2272: Run A/B with autofill disabled to measure intrinsic-only effect.
- Step 2273: Add `Sprint245IntegrationSummary.h` and execution tracker.

View File

@@ -44,6 +44,7 @@ NATIVE_IMPACT_COVERAGE_ENFORCE="${WSTONE_NATIVE_IMPACT_COVERAGE_ENFORCE:-0}"
NATIVE_IMPACT_COVERAGE_PROFILES="${WSTONE_NATIVE_IMPACT_COVERAGE_PROFILES:-$ROOT_DIR/tools/mcp/profiles/native_decomposition_impact_profiles.json}" NATIVE_IMPACT_COVERAGE_PROFILES="${WSTONE_NATIVE_IMPACT_COVERAGE_PROFILES:-$ROOT_DIR/tools/mcp/profiles/native_decomposition_impact_profiles.json}"
NATIVE_PROFILE_AUTOFILL="${WSTONE_NATIVE_PROFILE_AUTOFILL:-0}" NATIVE_PROFILE_AUTOFILL="${WSTONE_NATIVE_PROFILE_AUTOFILL:-0}"
NATIVE_PROFILE_AUTOFILL_MAX_TASKS="${WSTONE_NATIVE_PROFILE_AUTOFILL_MAX_TASKS:-12}" NATIVE_PROFILE_AUTOFILL_MAX_TASKS="${WSTONE_NATIVE_PROFILE_AUTOFILL_MAX_TASKS:-12}"
NATIVE_INTRINSIC_BOOST="${WSTONE_NATIVE_INTRINSIC_BOOST:-0}"
EXTRA_NORMALIZED_REQUIREMENTS_FILE="${WSTONE_EXTRA_NORMALIZED_REQUIREMENTS_FILE:-}" EXTRA_NORMALIZED_REQUIREMENTS_FILE="${WSTONE_EXTRA_NORMALIZED_REQUIREMENTS_FILE:-}"
EXTRA_TASKS_FILE="${WSTONE_EXTRA_TASKS_FILE:-}" EXTRA_TASKS_FILE="${WSTONE_EXTRA_TASKS_FILE:-}"
CAPABILITY_SIGNALS_JSON="${WSTONE_CAPABILITY_SIGNALS_JSON:-}" CAPABILITY_SIGNALS_JSON="${WSTONE_CAPABILITY_SIGNALS_JSON:-}"
@@ -102,6 +103,7 @@ NATIVE_REASON_ENRICHMENT_JSON='{}'
NATIVE_DECOMP_RETRY_JSON='{}' NATIVE_DECOMP_RETRY_JSON='{}'
NATIVE_IMPACT_COVERAGE_JSON='{}' NATIVE_IMPACT_COVERAGE_JSON='{}'
NATIVE_PROFILE_AUTOFILL_JSON='{}' NATIVE_PROFILE_AUTOFILL_JSON='{}'
NATIVE_INTRINSIC_BOOST_JSON='{}'
EXTRA_NORMALIZED_REQUIREMENTS_JSON='[]' EXTRA_NORMALIZED_REQUIREMENTS_JSON='[]'
EXTRA_TASKS_JSON='[]' EXTRA_TASKS_JSON='[]'
if [[ "$SEMANTIC_PLANNING_BRIDGE" == "1" ]]; then if [[ "$SEMANTIC_PLANNING_BRIDGE" == "1" ]]; then
@@ -305,6 +307,17 @@ if [[ -n "$EXTRA_NORMALIZED_REQUIREMENTS_FILE" ]]; then
EXTRA_NORMALIZED_REQUIREMENTS_JSON="$(cat "$EXTRA_NORMALIZED_REQUIREMENTS_FILE")" EXTRA_NORMALIZED_REQUIREMENTS_JSON="$(cat "$EXTRA_NORMALIZED_REQUIREMENTS_FILE")"
NORMALIZED_REQS="$(jq -nc --argjson base "$NORMALIZED_REQS" --argjson extra "$EXTRA_NORMALIZED_REQUIREMENTS_JSON" '$base + $extra')" NORMALIZED_REQS="$(jq -nc --argjson base "$NORMALIZED_REQS" --argjson extra "$EXTRA_NORMALIZED_REQUIREMENTS_JSON" '$base + $extra')"
fi fi
if [[ "$NATIVE_INTRINSIC_BOOST" == "1" ]]; then
python3 "$ROOT_DIR/tools/mcp/synthesize_native_intrinsic_boost_requirements.py" \
--spec "$INPUT_FILE" \
--profiles "$NATIVE_IMPACT_COVERAGE_PROFILES" \
--out "$OUT_DIR/01d_native_intrinsic_boost_requirements.json" >/dev/null
INTRINSIC_REQS_JSON="$(cat "$OUT_DIR/01d_native_intrinsic_boost_requirements.json")"
NORMALIZED_REQS="$(jq -nc --argjson base "$NORMALIZED_REQS" --argjson intrinsic "$INTRINSIC_REQS_JSON" '$base + $intrinsic')"
NATIVE_INTRINSIC_BOOST_JSON="$(jq -nc --argjson reqs "$INTRINSIC_REQS_JSON" '{enabled:true, requirement_count:($reqs|length)}')"
else
NATIVE_INTRINSIC_BOOST_JSON='{"enabled":false,"requirement_count":0}'
fi
CONFLICTS="$(printf '%s' "$INTAKE_JSON" | jq '.conflicts // []')" CONFLICTS="$(printf '%s' "$INTAKE_JSON" | jq '.conflicts // []')"
GEN_ARGS="$(jq -nc --argjson nr "$NORMALIZED_REQS" --argjson cf "$CONFLICTS" --arg strict "$STRICT_EXECUTION_CONTRACT" \ GEN_ARGS="$(jq -nc --argjson nr "$NORMALIZED_REQS" --argjson cf "$CONFLICTS" --arg strict "$STRICT_EXECUTION_CONTRACT" \
'{normalizedRequirements:$nr,conflicts:$cf,strictExecutionContract:($strict == "1")}')" '{normalizedRequirements:$nr,conflicts:$cf,strictExecutionContract:($strict == "1")}')"
@@ -567,6 +580,7 @@ SUMMARY_JSON="$(jq -nc \
--argjson native_reason_enrichment "$NATIVE_REASON_ENRICHMENT_JSON" \ --argjson native_reason_enrichment "$NATIVE_REASON_ENRICHMENT_JSON" \
--argjson native_decomposition_retry "$NATIVE_DECOMP_RETRY_JSON" \ --argjson native_decomposition_retry "$NATIVE_DECOMP_RETRY_JSON" \
--argjson native_profile_autofill "$NATIVE_PROFILE_AUTOFILL_JSON" \ --argjson native_profile_autofill "$NATIVE_PROFILE_AUTOFILL_JSON" \
--argjson native_intrinsic_boost "$NATIVE_INTRINSIC_BOOST_JSON" \
--argjson extra_normalized_requirements "$EXTRA_NORMALIZED_REQUIREMENTS_JSON" \ --argjson extra_normalized_requirements "$EXTRA_NORMALIZED_REQUIREMENTS_JSON" \
--argjson extra_tasks "$EXTRA_TASKS_JSON" \ --argjson extra_tasks "$EXTRA_TASKS_JSON" \
--argjson intake "$INTAKE_JSON" \ --argjson intake "$INTAKE_JSON" \
@@ -590,6 +604,7 @@ SUMMARY_JSON="$(jq -nc \
native_reason_enrichment: $native_reason_enrichment, native_reason_enrichment: $native_reason_enrichment,
native_decomposition_retry: $native_decomposition_retry, native_decomposition_retry: $native_decomposition_retry,
native_profile_autofill: $native_profile_autofill, native_profile_autofill: $native_profile_autofill,
native_intrinsic_boost: $native_intrinsic_boost,
extra_normalized_requirements: $extra_normalized_requirements, extra_normalized_requirements: $extra_normalized_requirements,
extra_tasks: $extra_tasks, extra_tasks: $extra_tasks,
intake: { intake: {

View File

@@ -0,0 +1,70 @@
#!/usr/bin/env python3
import argparse
import json
from pathlib import Path
from typing import Dict, List
def load_json(path: Path):
with path.open("r", encoding="utf-8") as f:
return json.load(f)
def write_json(path: Path, obj) -> None:
with path.open("w", encoding="utf-8") as f:
json.dump(obj, f, indent=2, sort_keys=True)
f.write("\n")
def activate_profiles(profiles: List[Dict], spec_text: str) -> List[Dict]:
s = spec_text.lower()
out = []
for p in profiles:
keys = [str(k).lower() for k in (p.get("trigger_keywords") or [])]
if keys and any(k in s for k in keys):
out.append(p)
return out
def mk_req(profile: Dict, idx: int) -> Dict:
pid = str(profile.get("id", f"profile_{idx}"))
min_tasks = int(profile.get("min_native_task_count", 0) or 0)
reason_keys = [str(x) for x in (profile.get("required_reason_keywords") or [])]
ops = [str(x) for x in (profile.get("required_prerequisite_ops") or [])]
contract = [str(x) for x in (profile.get("required_execution_contract") or [])]
text = (
f"intrinsic decomposition policy for {pid}: produce at least {min_tasks} concrete taskitems; "
f"ensure reasons include {', '.join(reason_keys) if reason_keys else 'none'}; "
f"ensure prerequisiteOps include {', '.join(ops) if ops else 'none'}; "
f"ensure executionContract includes {', '.join(contract) if contract else 'none'}."
)
return {
"requirementId": f"intrinsic-boost-{pid}",
"kind": "constraint",
"normalizedText": text,
"anchor": "native_intrinsic_boost",
"sourceLine": 0,
"ambiguous": False,
}
def main() -> int:
p = argparse.ArgumentParser(description="Synthesize intrinsic decomposition boost requirements from active impact profiles.")
p.add_argument("--spec", required=True)
p.add_argument("--profiles", required=True)
p.add_argument("--out", required=True)
args = p.parse_args()
spec_text = Path(args.spec).read_text(encoding="utf-8", errors="ignore")
profiles_doc = load_json(Path(args.profiles))
profiles = list(profiles_doc.get("profiles") or [])
active = activate_profiles(profiles, spec_text)
reqs = [mk_req(pf, i) for i, pf in enumerate(active)]
write_json(Path(args.out), reqs)
print(json.dumps({"status": "ok", "active_profile_count": len(active), "requirement_count": len(reqs), "out": args.out}, sort_keys=True))
return 0
if __name__ == "__main__":
raise SystemExit(main())