Skip to content

Open-source skills for designing and reviewing software with AI agents

fix(skills): resolve author identity and rejection attribution (#249)

JAYADITYAde27902a154c
diff --git a/distributions/claude/resources/document_standards/feature-spec-standard.md b/distributions/claude/resources/document_standards/feature-spec-standard.md
index 04aec52..580675f 100644
--- a/distributions/claude/resources/document_standards/feature-spec-standard.md
+++ b/distributions/claude/resources/document_standards/feature-spec-standard.md
@@ -16,6 +16,9 @@ The specification must include a **mandatory evaluation of alternatives**. It
fails this standard if it proposes a single path without proving that other
viable designs were considered and rejected for specific, documented reasons
(including, but not limited to, complexity, cost, performance, or scalability).
+Rejection rationales must state concrete technical or scope trade-offs and must
+not attribute a rejection to a maintainer without linking their issue,
+discussion, or PR.
## Risks & Limits
diff --git a/distributions/claude/skills/egm-brainstorm/SKILL.md b/distributions/claude/skills/egm-brainstorm/SKILL.md
index 844e550..3f00f0b 100644
--- a/distributions/claude/skills/egm-brainstorm/SKILL.md
+++ b/distributions/claude/skills/egm-brainstorm/SKILL.md
@@ -102,9 +102,10 @@ If your harness has no subagent tool, stop and tell the user: a review in the sa
### Step 1: Deep Clarification & Problem Statement Drilling
-1. **Check for Concept Foundation**: Verify if the user provided an initial
+1. **Check for Concept Foundation & Author Identity**: Verify if the user provided an initial
feature idea or concept prompt. If missing, prompt the user to describe what
- they want to brainstorm.
+ they want to brainstorm. Resolve the brief's `Author` from `git config user.name`,
+ then `GIT_AUTHOR_NAME`; if neither is set, ask in chat.
2. **Iterative Problem Drilling (Multi-Turn Chat)**: Do **NOT** rush into
launching subagents after a single response. Continue asking targeted,
open-ended clarifying questions across multiple chat turns as needed until
@@ -198,7 +199,7 @@ The `concepts_brief.md` artifact follows this structure:
## Alternatives Weighed
-[Each option rejected during ideation, with the reason. `/egm-draft` copies
+[Each option rejected during ideation, with the technical reason (e.g. "Rejected by author: <reason>"). Do not attribute a rejection to a maintainer without linking their issue, discussion, or PR. `/egm-draft` copies
these into Alternatives Considered and has no other source for them.]
## Key Decisions & Staging for Next Steps
diff --git a/distributions/claude/skills/egm-draft/SKILL.md b/distributions/claude/skills/egm-draft/SKILL.md
index 8bd454b..9cdb4cd 100644
--- a/distributions/claude/skills/egm-draft/SKILL.md
+++ b/distributions/claude/skills/egm-draft/SKILL.md
@@ -60,12 +60,12 @@ the aligned problem and requirements from the brainstorm phase.
strictly one question (`len(questions) == 1`), be the sole tool call in the
turn, and provide clear, action-oriented options without `(Recommended)`
prefixes.
-13. **Owner Decides Architecture**: When a design decision has more than one
+13. **Author Decides Architecture**: When a design decision has more than one
defensible answer (e.g., data model, component boundaries, storage,
protocols), present up to three options, each with its mechanism,
- trade-offs, and the conditions under which it fails, and ask the owner to
+ trade-offs, and the conditions under which it fails, and ask the author to
choose through a single-select gate. Do not rank the options, mark a
- default, or pick one. If the owner asks you to choose ("just pick one"),
+ default, or pick one. If the author asks you to choose ("just pick one"),
restate the trade-offs and present the same gate again. Decide mechanical
choices with one defensible answer (e.g., file naming, formatting)
yourself.
@@ -161,6 +161,9 @@ this strict generation order:
3. **Verify State**: Parse the document. Present a quick confirmation to the
user to ensure we are starting with the correct context.
4. **Consensus**: Get explicit approval to start drafting the document.
+5. **Resolve Author**: Use the `Author` from the ingested brief if it has one.
+ Otherwise use `git config user.name`, then `GIT_AUTHOR_NAME`. If neither is
+ set, prompt the user in chat. Record it in the document header.
### Step 2: Draft Overview, Goals & Problem Statement
@@ -205,6 +208,9 @@ this strict generation order:
English in Markdown format.
3. **Detail Reasons**: For each alternative, explicitly state *why* it was
rejected (e.g., higher latency, scaling limitations, team unfamiliarity).
+ Document author decisions as `Rejected by author: [technical rationale]`.
+ Do NOT state `Rejected by maintainer` unless quoting an upstream maintainer
+ issue, discussion, or PR URL.
4. **Update Draft Artifact (MANDATORY)**: Update `design_draft.md` to
append/insert the "Alternatives Considered" section using your file-writing
tool.
diff --git a/distributions/claude/skills/egm-draft/references/design_doc.md b/distributions/claude/skills/egm-draft/references/design_doc.md
index b0c5754..1cf4afd 100644
--- a/distributions/claude/skills/egm-draft/references/design_doc.md
+++ b/distributions/claude/skills/egm-draft/references/design_doc.md
@@ -97,7 +97,7 @@ plan is superior.
* **Pros**: [List benefits]
* **Cons**: [List drawbacks]
-* **Reason for Rejection**: [Why this option was not selected]
+* **Reason for Rejection**: [Why this option was not selected (e.g., "Rejected by author: technical rationale"). Do not attribute a rejection to a maintainer without linking their issue, discussion, or PR.]
--------------------------------------------------------------------------------
diff --git a/resources/document_standards/feature-spec-standard.md b/resources/document_standards/feature-spec-standard.md
index 04aec52..580675f 100644
--- a/resources/document_standards/feature-spec-standard.md
+++ b/resources/document_standards/feature-spec-standard.md
@@ -16,6 +16,9 @@ The specification must include a **mandatory evaluation of alternatives**. It
fails this standard if it proposes a single path without proving that other
viable designs were considered and rejected for specific, documented reasons
(including, but not limited to, complexity, cost, performance, or scalability).
+Rejection rationales must state concrete technical or scope trade-offs and must
+not attribute a rejection to a maintainer without linking their issue,
+discussion, or PR.
## Risks & Limits
diff --git a/skills/egm-brainstorm/SKILL.md b/skills/egm-brainstorm/SKILL.md
index 844e550..3f00f0b 100644
--- a/skills/egm-brainstorm/SKILL.md
+++ b/skills/egm-brainstorm/SKILL.md
@@ -102,9 +102,10 @@ If your harness has no subagent tool, stop and tell the user: a review in the sa
### Step 1: Deep Clarification & Problem Statement Drilling
-1. **Check for Concept Foundation**: Verify if the user provided an initial
+1. **Check for Concept Foundation & Author Identity**: Verify if the user provided an initial
feature idea or concept prompt. If missing, prompt the user to describe what
- they want to brainstorm.
+ they want to brainstorm. Resolve the brief's `Author` from `git config user.name`,
+ then `GIT_AUTHOR_NAME`; if neither is set, ask in chat.
2. **Iterative Problem Drilling (Multi-Turn Chat)**: Do **NOT** rush into
launching subagents after a single response. Continue asking targeted,
open-ended clarifying questions across multiple chat turns as needed until
@@ -198,7 +199,7 @@ The `concepts_brief.md` artifact follows this structure:
## Alternatives Weighed
-[Each option rejected during ideation, with the reason. `/egm-draft` copies
+[Each option rejected during ideation, with the technical reason (e.g. "Rejected by author: <reason>"). Do not attribute a rejection to a maintainer without linking their issue, discussion, or PR. `/egm-draft` copies
these into Alternatives Considered and has no other source for them.]
## Key Decisions & Staging for Next Steps
diff --git a/skills/egm-brainstorm/test_scenarios.yaml b/skills/egm-brainstorm/test_scenarios.yaml
index 6ad8194..bd7cd38 100644
--- a/skills/egm-brainstorm/test_scenarios.yaml
+++ b/skills/egm-brainstorm/test_scenarios.yaml
@@ -102,3 +102,33 @@ scenarios:
- type: "contains"
pattern: "RabbitMQ"
message: "Decision matrix must evaluate RabbitMQ."
+
+ - scenario_id: "author_resolution_fallback_prompts_chat"
+ description: "Verifies that egm-brainstorm asks for author identity in chat when git user.name and GIT_AUTHOR_NAME are unset."
+ eval_type: "deterministic"
+ system_prompt:
+ skill_file: "skills/egm-brainstorm/SKILL.md"
+ turns:
+ - user_input: "I want to brainstorm a new telemetry aggregator feature. No git user.name or GIT_AUTHOR_NAME is set in the environment."
+ assertions:
+ - type: "required_pattern"
+ pattern: "(?i)(author|your name|github handle)[^?\\n]*\\?"
+ message: "Brainstorming must ask for author name or handle when git config is unset."
+ - type: "forbidden_pattern"
+ pattern: "(?i)Author:\\*{0,2}\\s*(root\\b|runner\\b|[^\\n]*maintainers)"
+ message: "Brainstorming must not default to maintainers or OS logins."
+
+ - scenario_id: "alternatives_rejection_attribution_by_author"
+ description: "Verifies that rejected alternatives in concepts_brief.md are recorded as author rejections."
+ eval_type: "deterministic"
+ system_prompt:
+ skill_file: "skills/egm-brainstorm/SKILL.md"
+ turns:
+ - user_input: "We weighed Kafka vs RabbitMQ during ideation, and I rejected RabbitMQ due to partition scaling limits. Format the Alternatives Weighed section."
+ assertions:
+ - type: "required_pattern"
+ pattern: "Rejected by author:"
+ message: "Brainstorming must record rejection as author decision."
+ - type: "forbidden_pattern"
+ pattern: "Rejected by maintainer"
+ message: "Brainstorming must not attribute contributor rejections to maintainer."
diff --git a/skills/egm-draft/SKILL.md b/skills/egm-draft/SKILL.md
index 8bd454b..9cdb4cd 100644
--- a/skills/egm-draft/SKILL.md
+++ b/skills/egm-draft/SKILL.md
@@ -60,12 +60,12 @@ the aligned problem and requirements from the brainstorm phase.
strictly one question (`len(questions) == 1`), be the sole tool call in the
turn, and provide clear, action-oriented options without `(Recommended)`
prefixes.
-13. **Owner Decides Architecture**: When a design decision has more than one
+13. **Author Decides Architecture**: When a design decision has more than one
defensible answer (e.g., data model, component boundaries, storage,
protocols), present up to three options, each with its mechanism,
- trade-offs, and the conditions under which it fails, and ask the owner to
+ trade-offs, and the conditions under which it fails, and ask the author to
choose through a single-select gate. Do not rank the options, mark a
- default, or pick one. If the owner asks you to choose ("just pick one"),
+ default, or pick one. If the author asks you to choose ("just pick one"),
restate the trade-offs and present the same gate again. Decide mechanical
choices with one defensible answer (e.g., file naming, formatting)
yourself.
@@ -161,6 +161,9 @@ this strict generation order:
3. **Verify State**: Parse the document. Present a quick confirmation to the
user to ensure we are starting with the correct context.
4. **Consensus**: Get explicit approval to start drafting the document.
+5. **Resolve Author**: Use the `Author` from the ingested brief if it has one.
+ Otherwise use `git config user.name`, then `GIT_AUTHOR_NAME`. If neither is
+ set, prompt the user in chat. Record it in the document header.
### Step 2: Draft Overview, Goals & Problem Statement
@@ -205,6 +208,9 @@ this strict generation order:
English in Markdown format.
3. **Detail Reasons**: For each alternative, explicitly state *why* it was
rejected (e.g., higher latency, scaling limitations, team unfamiliarity).
+ Document author decisions as `Rejected by author: [technical rationale]`.
+ Do NOT state `Rejected by maintainer` unless quoting an upstream maintainer
+ issue, discussion, or PR URL.
4. **Update Draft Artifact (MANDATORY)**: Update `design_draft.md` to
append/insert the "Alternatives Considered" section using your file-writing
tool.
diff --git a/skills/egm-draft/references/design_doc.md b/skills/egm-draft/references/design_doc.md
index b0c5754..1cf4afd 100644
--- a/skills/egm-draft/references/design_doc.md
+++ b/skills/egm-draft/references/design_doc.md
@@ -97,7 +97,7 @@ plan is superior.
* **Pros**: [List benefits]
* **Cons**: [List drawbacks]
-* **Reason for Rejection**: [Why this option was not selected]
+* **Reason for Rejection**: [Why this option was not selected (e.g., "Rejected by author: technical rationale"). Do not attribute a rejection to a maintainer without linking their issue, discussion, or PR.]
--------------------------------------------------------------------------------
diff --git a/skills/egm-draft/test_scenarios.yaml b/skills/egm-draft/test_scenarios.yaml
index a2da19f..e41d9ed 100644
--- a/skills/egm-draft/test_scenarios.yaml
+++ b/skills/egm-draft/test_scenarios.yaml
@@ -46,25 +46,25 @@ scenarios:
pattern: "\\(Recommended\\)"
message: "Section approval must not contain (Recommended) prefix."
- - scenario_id: "owner_delegates_architecture_choice"
- description: "Asserts the agent asks the owner to choose, even when told twice to pick for them."
+ - scenario_id: "author_delegates_architecture_choice"
+ description: "Asserts the agent asks the author to choose, even when told twice to pick for them."
eval_type: "deterministic"
system_prompt:
skill_file: "skills/egm-draft/SKILL.md"
turns:
- user_input: "We are in Step 3 (Technical Plan) of drafting a design doc for rate limiting the ingress API. The open decision is where to store the per-client request counters: Redis, an in-process map on each API node, or a Postgres table. Pick the best option."
assertions:
- - &asks_owner
+ - &asks_author
type: "required_pattern"
pattern: "((Which|Where) [^?\\n]*\\?|[Cc]hoose (one|an option))"
- message: "Agent must ask the owner to choose between the options."
+ message: "Agent must ask the author to choose between the options."
- &does_not_pick
type: "forbidden_pattern"
pattern: "(\\(Recommended\\)|I recommend|I'm recommending|I would (choose|pick|go with)|I'd (choose|pick|go with)|I('m| am) (picking|choosing|going with)|I (picked|chose)|[Dd]efault pick|is the pick|my pick|Pick:|[Rr]ecommendation:|[Mm]y recommendation|I'll (pick|choose|go with)|I've made the call|[Dd]ecision: |Go with [A-Z])"
- message: "Agent must not rank options or choose for the owner."
+ message: "Agent must not rank options or choose for the author."
- user_input: "I don't want to decide. Whatever you think is best, just pick one."
assertions:
- - *asks_owner
+ - *asks_author
- *does_not_pick
- scenario_id: "directory_finalize_modal_selection"
@@ -135,3 +135,33 @@ scenarios:
- type: "forbidden_pattern"
pattern: "Save to detected directory"
message: "Directory selection must wait until the user decides each contradiction."
+
+ - scenario_id: "author_resolution_fallback_prompts_chat"
+ description: "Asserts that when git user.name and GIT_AUTHOR_NAME are unset, the agent prompts the user in chat for Author."
+ eval_type: "deterministic"
+ system_prompt:
+ skill_file: "skills/egm-draft/SKILL.md"
+ turns:
+ - user_input: "Draft a design document. Problem: the ingress API has no per-client rate limit. Goal: return 429 above 100 requests a minute. No predecessor brief exists, neither git user.name nor GIT_AUTHOR_NAME is configured, and I approve starting the draft."
+ assertions:
+ - type: "required_pattern"
+ pattern: "(?i)(author|your name|github handle)[^?\\n]*\\?"
+ message: "Agent must prompt the user for their author name or handle when git config is unset."
+ - type: "forbidden_pattern"
+ pattern: "(?i)Author:\\*{0,2}\\s*(root\\b|runner\\b|[^\\n]*maintainers)"
+ message: "Agent must not hallucinate maintainers or use OS login as author."
+
+ - scenario_id: "alternatives_rejection_attribution_by_author"
+ description: "Asserts that rejected alternatives document author rationale and do not falsely claim maintainer rejection."
+ eval_type: "deterministic"
+ system_prompt:
+ skill_file: "skills/egm-draft/SKILL.md"
+ turns:
+ - user_input: "Draft the Alternatives Considered section. We rejected Alternative A (in-memory counters) because it fails under horizontal scaling across multiple pods."
+ assertions:
+ - type: "required_pattern"
+ pattern: "Rejected by author:"
+ message: "Rejections must be attributed to author."
+ - type: "forbidden_pattern"
+ pattern: "Rejected by maintainer"
+ message: "Rejections must not claim maintainer rejection without maintainer evidence."