fix(templates): add analytics next step

This commit is contained in:
kuei51307-hub
2026-09-21 20:56:57 +02:00
committed by Ahmad Othman Ammar Adi
parent 5ad5452276
commit cd0bc3d202
13 changed files with 121 additions and 11 deletions
@@ -8,6 +8,12 @@ State the analytical question or intended deliverable in one clear sentence.
[One sentence describing the analytical objective]
## Next Step
Record the single analytical action that should happen next. Update it whenever the active phase or immediate action changes.
[The single next analytical action. Update whenever phase status changes.]
## Current Phase
Name the phase currently being worked on.
@@ -76,6 +82,6 @@ Record each distinct error, the attempt number, and the resolution. Change the a
## Notes
- Update phase status as work progresses: `pending` to `in_progress` to `complete`.
- Re-read the goal and current phase before major analytical decisions.
- Re-read the goal, next step, and current phase before major analytical decisions.
- Log errors promptly so failed approaches are not repeated.
- Record query results and visual evidence in findings.md.
@@ -8,6 +8,12 @@ State the analytical question or intended deliverable in one clear sentence.
[One sentence describing the analytical objective]
## Next Step
Record the single analytical action that should happen next. Update it whenever the active phase or immediate action changes.
[The single next analytical action. Update whenever phase status changes.]
## Current Phase
Name the phase currently being worked on.
@@ -76,6 +82,6 @@ Record each distinct error, the attempt number, and the resolution. Change the a
## Notes
- Update phase status as work progresses: `pending` to `in_progress` to `complete`.
- Re-read the goal and current phase before major analytical decisions.
- Re-read the goal, next step, and current phase before major analytical decisions.
- Log errors promptly so failed approaches are not repeated.
- Record query results and visual evidence in findings.md.
@@ -8,6 +8,12 @@ State the analytical question or intended deliverable in one clear sentence.
[One sentence describing the analytical objective]
## Next Step
Record the single analytical action that should happen next. Update it whenever the active phase or immediate action changes.
[The single next analytical action. Update whenever phase status changes.]
## Current Phase
Name the phase currently being worked on.
@@ -76,6 +82,6 @@ Record each distinct error, the attempt number, and the resolution. Change the a
## Notes
- Update phase status as work progresses: `pending` to `in_progress` to `complete`.
- Re-read the goal and current phase before major analytical decisions.
- Re-read the goal, next step, and current phase before major analytical decisions.
- Log errors promptly so failed approaches are not repeated.
- Record query results and visual evidence in findings.md.
@@ -8,6 +8,12 @@ State the analytical question or intended deliverable in one clear sentence.
[One sentence describing the analytical objective]
## Next Step
Record the single analytical action that should happen next. Update it whenever the active phase or immediate action changes.
[The single next analytical action. Update whenever phase status changes.]
## Current Phase
Name the phase currently being worked on.
@@ -76,6 +82,6 @@ Record each distinct error, the attempt number, and the resolution. Change the a
## Notes
- Update phase status as work progresses: `pending` to `in_progress` to `complete`.
- Re-read the goal and current phase before major analytical decisions.
- Re-read the goal, next step, and current phase before major analytical decisions.
- Log errors promptly so failed approaches are not repeated.
- Record query results and visual evidence in findings.md.
@@ -8,6 +8,12 @@ State the analytical question or intended deliverable in one clear sentence.
[One sentence describing the analytical objective]
## Next Step
Record the single analytical action that should happen next. Update it whenever the active phase or immediate action changes.
[The single next analytical action. Update whenever phase status changes.]
## Current Phase
Name the phase currently being worked on.
@@ -76,6 +82,6 @@ Record each distinct error, the attempt number, and the resolution. Change the a
## Notes
- Update phase status as work progresses: `pending` to `in_progress` to `complete`.
- Re-read the goal and current phase before major analytical decisions.
- Re-read the goal, next step, and current phase before major analytical decisions.
- Log errors promptly so failed approaches are not repeated.
- Record query results and visual evidence in findings.md.
@@ -8,6 +8,12 @@ State the analytical question or intended deliverable in one clear sentence.
[One sentence describing the analytical objective]
## Next Step
Record the single analytical action that should happen next. Update it whenever the active phase or immediate action changes.
[The single next analytical action. Update whenever phase status changes.]
## Current Phase
Name the phase currently being worked on.
@@ -76,6 +82,6 @@ Record each distinct error, the attempt number, and the resolution. Change the a
## Notes
- Update phase status as work progresses: `pending` to `in_progress` to `complete`.
- Re-read the goal and current phase before major analytical decisions.
- Re-read the goal, next step, and current phase before major analytical decisions.
- Log errors promptly so failed approaches are not repeated.
- Record query results and visual evidence in findings.md.
@@ -8,6 +8,12 @@ State what the analysis should determine or produce in one clear sentence.
[One sentence describing the analytical objective]
## Next Step
Record the single analytical action that should happen next. Update it whenever the active phase or immediate action changes.
[The single next analytical action. Update whenever phase status changes.]
## Current Phase
Name the phase currently being worked on.
@@ -84,6 +90,6 @@ Record each distinct error, the attempt number, and the resolution. Change the a
## Notes
- Update phase status as work progresses: `pending` to `in_progress` to `complete`.
- Re-read the goal and current phase before major analytical decisions.
- Re-read the goal, next step, and current phase before major analytical decisions.
- Log errors promptly so failed approaches are not repeated.
- Record query results and visual findings in findings.md while the evidence is available.
@@ -8,6 +8,12 @@ State the analytical question or intended deliverable in one clear sentence.
[One sentence describing the analytical objective]
## Next Step
Record the single analytical action that should happen next. Update it whenever the active phase or immediate action changes.
[The single next analytical action. Update whenever phase status changes.]
## Current Phase
Name the phase currently being worked on.
@@ -76,6 +82,6 @@ Record each distinct error, the attempt number, and the resolution. Change the a
## Notes
- Update phase status as work progresses: `pending` to `in_progress` to `complete`.
- Re-read the goal and current phase before major analytical decisions.
- Re-read the goal, next step, and current phase before major analytical decisions.
- Log errors promptly so failed approaches are not repeated.
- Record query results and visual evidence in findings.md.
@@ -8,6 +8,12 @@ State the analytical question or intended deliverable in one clear sentence.
[One sentence describing the analytical objective]
## Next Step
Record the single analytical action that should happen next. Update it whenever the active phase or immediate action changes.
[The single next analytical action. Update whenever phase status changes.]
## Current Phase
Name the phase currently being worked on.
@@ -76,6 +82,6 @@ Record each distinct error, the attempt number, and the resolution. Change the a
## Notes
- Update phase status as work progresses: `pending` to `in_progress` to `complete`.
- Re-read the goal and current phase before major analytical decisions.
- Re-read the goal, next step, and current phase before major analytical decisions.
- Log errors promptly so failed approaches are not repeated.
- Record query results and visual evidence in findings.md.
@@ -8,6 +8,12 @@ State the analytical question or intended deliverable in one clear sentence.
[One sentence describing the analytical objective]
## Next Step
Record the single analytical action that should happen next. Update it whenever the active phase or immediate action changes.
[The single next analytical action. Update whenever phase status changes.]
## Current Phase
Name the phase currently being worked on.
@@ -76,6 +82,6 @@ Record each distinct error, the attempt number, and the resolution. Change the a
## Notes
- Update phase status as work progresses: `pending` to `in_progress` to `complete`.
- Re-read the goal and current phase before major analytical decisions.
- Re-read the goal, next step, and current phase before major analytical decisions.
- Log errors promptly so failed approaches are not repeated.
- Record query results and visual evidence in findings.md.
+7 -1
View File
@@ -8,6 +8,12 @@ State the analytical question or intended deliverable in one clear sentence.
[One sentence describing the analytical objective]
## Next Step
Record the single analytical action that should happen next. Update it whenever the active phase or immediate action changes.
[The single next analytical action. Update whenever phase status changes.]
## Current Phase
Name the phase currently being worked on.
@@ -76,6 +82,6 @@ Record each distinct error, the attempt number, and the resolution. Change the a
## Notes
- Update phase status as work progresses: `pending` to `in_progress` to `complete`.
- Re-read the goal and current phase before major analytical decisions.
- Re-read the goal, next step, and current phase before major analytical decisions.
- Log errors promptly so failed approaches are not repeated.
- Record query results and visual evidence in findings.md.
+19
View File
@@ -115,6 +115,25 @@ class InitSessionSlugTests(unittest.TestCase):
self.assertTrue((root / "task_plan.md").exists())
self.assertFalse((root / ".planning").exists())
def test_named_analytics_plan_has_a_nonempty_next_step(self) -> None:
with tempfile.TemporaryDirectory() as tmp:
root = Path(tmp)
result = self.run_init(root, "--template", "analytics", "Analytics Run")
self.assertEqual(0, result.returncode, result.stderr)
plan = (
root
/ ".planning"
/ f"{date.today().isoformat()}-analytics-run"
/ "task_plan.md"
).read_text(encoding="utf-8")
section = re.search(
r"(?ms)^## Next Step\s*\n(?P<body>.*?)(?=^## |\Z)",
plan,
)
self.assertIsNotNone(section)
assert section is not None
self.assertTrue(section.group("body").strip())
def test_slug_init_replaces_hardlinked_pointer_without_mutating_peer(self) -> None:
with tempfile.TemporaryDirectory() as tmp:
root = Path(tmp)
+25
View File
@@ -3,6 +3,7 @@
from __future__ import annotations
import os
import re
import subprocess
import tempfile
import unittest
@@ -101,6 +102,8 @@ class TemplateTransparencyTests(unittest.TestCase):
),
"analytics_task_plan.md": (
"[One sentence describing the analytical objective]",
"## Next Step",
"[The single next analytical action. Update whenever phase status changes.]",
"## Current Phase",
"## Phases",
"## Hypotheses",
@@ -126,6 +129,28 @@ class TemplateTransparencyTests(unittest.TestCase):
self.assertEqual(1, analytics_plan.count("- **Status:** in_progress"))
self.assertEqual(3, analytics_plan.count("- **Status:** pending"))
def test_shipped_task_plan_templates_have_a_nonempty_next_step_section(self) -> None:
analytics_paths = [
path
for path in tracked_install_facing_templates()
if path.name == "analytics_task_plan.md"
]
self.assertTrue(analytics_paths, "no shipped analytics task plan templates found")
paths = [CANONICAL_TEMPLATES / "task_plan.md", *analytics_paths]
for path in paths:
with self.subTest(path=path):
body = self.read_template(path)
section = re.search(
r"(?ms)^## Next Step\s*\n(?P<body>.*?)(?=^## |\Z)",
body,
)
self.assertIsNotNone(section, f"{path} is missing ## Next Step")
assert section is not None
self.assertTrue(
section.group("body").strip(),
f"{path} has an empty ## Next Step section",
)
def test_autonomous_template_names_the_real_gate_authority(self) -> None:
body = self.read_template(CANONICAL_TEMPLATES / "task_plan_autonomous.md")
for required in (