plan: a spectator role goes back to the model once; bare-word movers and unlabelled groups parse
Re-planning the contractor showed three wasted rounds: `moves_by: {
checking: submitter }` written as a bare word, a group without a
label, and the two featured owner roles left with nothing to play,
which the builder only warned about after the fact. The bare word and
the missing label now parse (a label defaults to the id), and a plan
that parses with spectator roles is sent back once with the finding;
on the contractor, round three fixed both.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Fable 5.1
parent
6e49694211
commit
4d22f4cb44
+12
-1
@@ -50,7 +50,7 @@ doors: # a first question before the forms, only when the
|
||||
who: who comes through it # ten offers on one page; six offers on one page beat doors)
|
||||
|
||||
groups: # groups with a label the public may see: the committees
|
||||
- { id: traffic, label: Traffic, invited_by: [board] } # a person can ask to join (optional)
|
||||
- { id: traffic, label: Traffic, invited_by: [board] } # a person can ask to join (optional; label defaults to the id)
|
||||
invites_by: [board] # groups whose desk may invite people into every desk
|
||||
|
||||
needs:
|
||||
@@ -163,6 +163,10 @@ pub fn run(argv: &[String]) -> anyhow::Result<()> {
|
||||
std::fs::create_dir_all(out.join("llm"))?;
|
||||
|
||||
let mut feedback = String::new();
|
||||
// A structural finding the builder would only warn about (a role
|
||||
// the opener speaks for with nothing to play) goes back to the
|
||||
// model once; a second time it is the reader's, not another round.
|
||||
let mut spectators_sent = false;
|
||||
for round in 1..=rounds {
|
||||
let prompt = format!(
|
||||
"{REFERENCE}\n\n# Task\n\nA business filled in this intake. Write its plan.yaml: every need the intake implies, for the public and for each role inside the business, with the stages read off how the business says things progress, the form each need collects, and how much each person will tolerate.\n\n## Intake\n\n{intake}\n{feedback}\nReply with the YAML only, no prose, no code fences."
|
||||
@@ -172,6 +176,13 @@ pub fn run(argv: &[String]) -> anyhow::Result<()> {
|
||||
std::fs::write(out.join(format!("llm/{round:02}-reply.md")), &reply)?;
|
||||
let yaml = extract_yaml(&reply);
|
||||
match check(&yaml) {
|
||||
Ok(plan) if !plan.spectators().is_empty() && !spectators_sent && round < rounds => {
|
||||
spectators_sent = true;
|
||||
let findings = plan.spectators().join("\n- ");
|
||||
eprintln!("plan round {round}: the plan parses, and a role the opener speaks for has no move after sending; asking once more");
|
||||
feedback = format!("\n## Your last attempt parsed, with one thing to fix\n\n- {findings}\n\nGive each such need a move the person makes themselves (`moves_by: {{<stage>: [submitter, <group>]}}`, with a required `email` in its form) or `watched_by: [public]`, and return the whole plan again.\n\n```yaml\n{yaml}\n```\n");
|
||||
continue;
|
||||
}
|
||||
Ok(plan) => {
|
||||
let mut text = yaml.trim_end().to_string();
|
||||
text.push('\n');
|
||||
|
||||
Reference in New Issue
Block a user