Przeglądaj źródła

Merge branch 'goal/operative-ethos' of clanker/clanker-saddle into web-stack

Billy Barrow 3 tygodni temu
rodzic
commit
7194b75dc4
2 zmienionych plików z 45 dodań i 26 usunięć
  1. 27 15
      src/Services/CanonService.vala
  2. 18 11
      test/bundles/canon.py

+ 27 - 15
src/Services/CanonService.vala

@@ -488,9 +488,12 @@ namespace ClankerSaddle.Services {
      * The ethos: where the agent sits in the cosmic order and the
      * order of goods its work serves — derived from the canonical
      * texts (see canon/). The order of goods is BINDING, not advisory
-     * (the once-and-ask conflict clause), with a heavy canon-grounding
-     * pass at goal start and only the binding duty for goal-initiated
-     * tasks. This is the ONE web-side copy: it rides every assignment
+     * (the once-and-ask conflict clause). The goal agent's canon duty
+     * has two edges: DIG past a bare "not prohibited" (one text
+     * answering it is not clearance) and RE-GROUND on every course
+     * shift after a human interaction changes what will be built;
+     * goal-initiated tasks carry only the binding duty. This is the
+     * ONE web-side copy: it rides every assignment
      * payload's `ethos` member (the daemon appends it verbatim in
      * preference to its compiled-in compatibility fallback), it is
      * served at `GET /api/saddle/ethos`, and the advisor's system
@@ -543,19 +546,28 @@ namespace ClankerSaddle.Services {
             + "their judgement is senior — proceed with what they decide; you\n"
             + "are a servant, not a oracle.\n"
             + "\n"
-            + "CANON GROUNDING AT GOAL START: when a goal's work begins — the goal\n"
-            + "agent's planning phase, before any task is created or queued — ground\n"
-            + "that judgement in the canon: list_canonical_texts, then query (or\n"
-            + "read) the one or two texts most relevant to the goal's moral\n"
-            + "character, and record a short canon-grounded verdict (texts consulted\n"
-            + "+ one paragraph: clear / concern to raise / no relevant canon) in the\n"
-            + "goal plan or an early log comment BEFORE any task queues. If a concern\n"
-            + "is found, that is the once-and-ask moment — stop and ask the human\n"
+            + "CANON GROUNDING FOR A GOAL AGENT: when a goal's work begins — the\n"
+            + "planning phase, before any task is created or queued — ground that\n"
+            + "judgement in the canon: list_canonical_texts, then query (or read) the\n"
+            + "one or two texts most relevant to the goal's moral character. DIG: one\n"
+            + "text answering \"not prohibited\" is not clearance — test the work from\n"
+            + "more than one angle (its effect on persons, the four freedoms, what it\n"
+            + "cultivates in its users and makers) and keep digging until the picture\n"
+            + "is real, not convenient. Record a short canon-grounded verdict (texts\n"
+            + "consulted + one paragraph: clear / concern to raise / no relevant\n"
+            + "canon) in the goal plan or an early log comment BEFORE any task queues.\n"
+            + "RE-GROUND ON EVERY COURSE SHIFT: the pass is not once-only — after each\n"
+            + "human interaction, answer, plan-review feedback or clarification that\n"
+            + "changes what will be built, query the canon again on the NEW material\n"
+            + "before submitting the revised plan or queueing work; an earlier\n"
+            + "verdict covers only what was examined then. If a concern is found,\n"
+            + "that is the once-and-ask moment — stop and ask the human\n"
             + "(ask_question). Goal-initiated TASKS carry only the binding duty\n"
-            + "above, not the canon pass: the heavy grounding happens ONCE per goal,\n"
-            + "not per task. When a decision needs grounding, the canon carries the\n"
-            + "texts this ethos is derived from: list_canonical_texts,\n"
-            + "read_canonical_text and query_canonical_text.\n"
+            + "above, not the canon pass: canon grounding belongs to the GOAL agent\n"
+            + "while the goal's course is being set, not to every task. When a\n"
+            + "decision needs grounding, the canon carries the texts this ethos is\n"
+            + "derived from: list_canonical_texts, read_canonical_text and\n"
+            + "query_canonical_text.\n"
             + "\n";
     }
 }

+ 18 - 11
test/bundles/canon.py

@@ -10,9 +10,10 @@ same three tools the daemon's ToolLoop exposes. The scenarios:
   slug answers 404
 - every canon/ethos route requires the bearer token (401 without)
 - GET /api/saddle/ethos serves the one web-side ethos text, which
-  carries the BINDING operative clause and the goal-start
-  canon-grounding tier (goal 32): named markers on the served text,
-  on the assignment payload member, and on the advisor system
+  carries the BINDING operative clause and the goal-agent
+  canon-grounding tier (goal 32): dig past a bare "not prohibited"
+  and re-ground on every course shift — named markers on the served
+  text, on the assignment payload member, and on the advisor system
   prompt's tail, so a softened edit fails loudly
 - a fresh assignment payload (the fake saddle's next-task ask) carries
   the same text as its `ethos` member
@@ -125,7 +126,8 @@ def run(ctx):
           and "order of goods" in ethos and "servant, not a oracle" in ethos,
           "the ethos text carries the daemon's section verbatim")
     # The operative duty (goal 32): the order of goods is BINDING, with a
-    # once-and-ask conflict clause and the goal-start canon-grounding tier.
+    # once-and-ask conflict clause and the goal-agent canon-grounding tier
+    # — dig past a bare "not prohibited", re-ground on every course shift.
     # Every marker is asserted by name so a softened edit fails loudly.
     for marker in ("BINDING, not advisory",
                    "state the conflict plainly ONCE",
@@ -133,9 +135,13 @@ def run(ctx):
                    "ask_question where available",
                    "do not nag",
                    "their judgement is senior",
-                   "CANON GROUNDING AT GOAL START",
+                   "CANON GROUNDING FOR A GOAL AGENT",
+                   "is not clearance",
+                   "not convenient",
+                   "RE-GROUND ON EVERY COURSE SHIFT",
+                   "after each",
+                   "covers only what was examined then",
                    "BEFORE any task queues",
-                   "ONCE per goal",
                    "Goal-initiated TASKS carry only the binding duty"):
         check(marker in ethos,
               "the ethos carries the operative marker %r" % marker)
@@ -203,12 +209,13 @@ def run(ctx):
           and "order of goods" in system.get("content", ""),
           "the advisor system prompt carries the ethos section")
     # The strengthened ethos rides LAST on the advisor system prompt: the
-    # binding clause and the goal-start canon tier must both be present,
-    # and the prompt must END with the served text (content is the prompt
-    # itself with the ethos appended, so the whole ethos is the tail —
-    # equal to the served text modulo its leading/trailing whitespace).
+    # binding clause and the goal-agent canon tier (dig + re-ground) must
+    # both be present, and the prompt must END with the served text
+    # (content is the prompt itself with the ethos appended, so the whole
+    # ethos is the tail — equal to the served text modulo its leading/
+    # trailing whitespace).
     system_content = system.get("content", "")
-    check("CANON GROUNDING AT GOAL START" in system_content
+    check("CANON GROUNDING FOR A GOAL AGENT" in system_content
           and "BINDING, not advisory" in system_content,
           "the advisor system prompt carries the strengthened ethos")
     check(system_content.strip().endswith(ethos.strip()),