cadence-skill-installer 0.2.42 → 0.2.43
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -19,7 +19,7 @@ description: Guide users from a rough concept to a fully defined project idea th
|
|
|
19
19
|
6. If the user provides a project brief or document:
|
|
20
20
|
- Extract the explicit requirements into a working ideation object.
|
|
21
21
|
- Judge whether the brief is execution-ready across the relevant dimensions below.
|
|
22
|
-
- If information is sufficient, present the final ideation summary and ask for
|
|
22
|
+
- If information is sufficient, present the final ideation summary and research-topic review, then ask for topic edits.
|
|
23
23
|
- If information is missing or ambiguous, ask exactly one highest-leverage follow-up question.
|
|
24
24
|
7. Ask exactly one question at a time. Never ask a batch of questions in a single turn.
|
|
25
25
|
8. After each user answer:
|
|
@@ -46,7 +46,7 @@ description: Guide users from a rough concept to a fully defined project idea th
|
|
|
46
46
|
- Track concrete entities (for example technologies, methods, standards, regulations, tools, audiences, channels) in `research_agenda.entity_registry`.
|
|
47
47
|
- Ensure entity relationships are block-consistent: if a topic references an entity, that topic must be in the entity's owner block.
|
|
48
48
|
12. Do not hard-code assumptions. If you infer something, label it explicitly and ask for confirmation.
|
|
49
|
-
13. When coverage is deep enough, present a final ideation summary and ask for
|
|
49
|
+
13. When coverage is deep enough, present a final ideation summary plus the full research topic list and ask for topic edits.
|
|
50
50
|
14. Use this canonical ideation payload contract and do not inspect Cadence scripts to infer shape during normal operation:
|
|
51
51
|
- Payload root must be a JSON object representing the full `ideation` object.
|
|
52
52
|
- Include execution-ready core fields from discovery. Preferred keys:
|
|
@@ -70,22 +70,27 @@ description: Guide users from a rough concept to a fully defined project idea th
|
|
|
70
70
|
- Each `topics[]` item should include `topic_id`, `title`, `category`, `priority` (`low|medium|high`), `why_it_matters`, `research_questions`, `keywords`, `tags`, and `related_entities`.
|
|
71
71
|
- Each `entity_registry[]` item should include `entity_id`, `label`, `kind`, `aliases`, and `owner_block_id`.
|
|
72
72
|
- Relationship rule: every id listed in topic `related_entities` must exist in `entity_registry`, and that entity's `owner_block_id` must match the topic's block.
|
|
73
|
-
15.
|
|
73
|
+
15. Before persistence, run a mandatory research-topic review gate:
|
|
74
|
+
- Return every identified `research_agenda.blocks[].topics[]` item to the user in the final pre-persistence review.
|
|
75
|
+
- Ask whether they want to add topics, remove topics, or keep the list as-is.
|
|
76
|
+
- If the user requests edits, update the ideation payload draft and rerun the full topic review until they explicitly approve with no changes.
|
|
77
|
+
16. After topic approval, ask a separate persistence confirmation (`yes/no`) before writing anything to `.cadence/cadence.json`.
|
|
78
|
+
17. After confirmation, rerun route assertion once before persistence:
|
|
74
79
|
- Run `cd "$PROJECT_ROOT" && python3 "$CADENCE_SCRIPTS_DIR/assert-workflow-route.py" --skill-name ideator --project-root "$PROJECT_ROOT"`.
|
|
75
80
|
- If assertion fails, stop and surface the exact error.
|
|
76
|
-
|
|
81
|
+
18. After confirmation, persist ideation programmatically:
|
|
77
82
|
- Create a JSON payload file at `"$PROJECT_ROOT/.cadence/ideation_payload.json"`.
|
|
78
83
|
- Write the full finalized ideation object to that file using the contract above.
|
|
79
84
|
- Run `python3 "$CADENCE_SCRIPTS_DIR/prepare-ideation-research.py" --file "$PROJECT_ROOT/.cadence/ideation_payload.json"`.
|
|
80
85
|
- Run `cd "$PROJECT_ROOT" && python3 "$CADENCE_SCRIPTS_DIR/inject-ideation.py" --file "$PROJECT_ROOT/.cadence/ideation_payload.json" --completion-state complete` (this injects ideation and deletes the payload file on success).
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
86
|
+
19. Verify persistence by running `cd "$PROJECT_ROOT" && python3 "$CADENCE_SCRIPTS_DIR/get-ideation.py"`.
|
|
87
|
+
20. Mention that granular research queries are available via `cd "$PROJECT_ROOT" && python3 "$CADENCE_SCRIPTS_DIR/query-ideation-research.py"`.
|
|
88
|
+
21. Mention that research execution runs in a separate `researcher` phase.
|
|
89
|
+
22. End successful ideation completion replies with this exact line: `Start a new chat with a new agent and say "research my project".`
|
|
90
|
+
23. At end of this successful skill conversation, run `cd "$PROJECT_ROOT" && python3 "$CADENCE_SCRIPTS_DIR/finalize-skill-checkpoint.py" --scope ideator --checkpoint ideation-completed --paths .`.
|
|
91
|
+
24. If `finalize-skill-checkpoint.py` returns `status=no_changes`, continue without failure.
|
|
92
|
+
25. If `finalize-skill-checkpoint.py` reports an error, stop and surface it verbatim.
|
|
93
|
+
26. If the user requests revisions later, regenerate the payload, rerun `prepare-ideation-research.py`, and rerun `inject-ideation.py` from `PROJECT_ROOT`.
|
|
89
94
|
|
|
90
95
|
## Strict Response Format
|
|
91
96
|
|
|
@@ -99,7 +104,7 @@ description: Guide users from a rough concept to a fully defined project idea th
|
|
|
99
104
|
Next question: <exactly one question>
|
|
100
105
|
```
|
|
101
106
|
|
|
102
|
-
- When presenting final pre-persistence
|
|
107
|
+
- When presenting final pre-persistence topic review, respond exactly in this shape:
|
|
103
108
|
|
|
104
109
|
```text
|
|
105
110
|
Proposed ideation package:
|
|
@@ -109,8 +114,21 @@ description: Guide users from a rough concept to a fully defined project idea th
|
|
|
109
114
|
- Audience: <summary>
|
|
110
115
|
- Scope: in=<count>, out=<count>
|
|
111
116
|
- Research agenda: blocks=<block_count>, topics=<topic_count>, entities=<entity_count>
|
|
112
|
-
|
|
113
|
-
|
|
117
|
+
- Research topics:
|
|
118
|
+
- [<block_id>] <block_title>: <topic_1_title> (<topic_1_id>); <topic_2_title> (<topic_2_id>); ...
|
|
119
|
+
- [<block_id>] <block_title>: <topic_1_title> (<topic_1_id>); ...
|
|
120
|
+
|
|
121
|
+
Topic edits needed: Add or remove any topics before persistence? (add/remove/no changes)
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
- After topic edits are settled, ask persistence confirmation in this exact shape:
|
|
125
|
+
|
|
126
|
+
```text
|
|
127
|
+
Persistence confirmation:
|
|
128
|
+
|
|
129
|
+
- Research topics finalized: <topic_count>
|
|
130
|
+
|
|
131
|
+
Confirmation needed: Persist this ideation package to .cadence/cadence.json? (yes/no)
|
|
114
132
|
```
|
|
115
133
|
|
|
116
134
|
- On successful persistence, respond exactly in this shape:
|
|
@@ -123,5 +141,5 @@ description: Guide users from a rough concept to a fully defined project idea th
|
|
|
123
141
|
- Research agenda: blocks=<block_count>, topics=<topic_count>, entities=<entity_count>
|
|
124
142
|
- Checkpoint: ideator/ideation-completed (<ok|no_changes>)
|
|
125
143
|
|
|
126
|
-
Start a new chat with a new agent and say "
|
|
144
|
+
Start a new chat with a new agent and say "research my project".
|
|
127
145
|
```
|
|
@@ -8,8 +8,10 @@ interface:
|
|
|
8
8
|
(repo_enabled).
|
|
9
9
|
Never read or edit .cadence/cadence.json directly (including cat/rg/jq/Read); use Cadence scripts for all state reads and writes.
|
|
10
10
|
Enforce the strict user-facing response templates from skills/ideator/SKILL.md.
|
|
11
|
-
Ask one question at a time, build an execution-ready ideation object and complete research_agenda
|
|
12
|
-
|
|
11
|
+
Ask one question at a time, build an execution-ready ideation object and complete research_agenda.
|
|
12
|
+
Before persistence, always return the full research topic list and let the user add/remove topics.
|
|
13
|
+
Only after explicit topic approval and explicit yes/no persistence confirmation,
|
|
14
|
+
rerun route assertion from PROJECT_ROOT, run scripts/prepare-ideation-research.py,
|
|
13
15
|
and persist with scripts/inject-ideation.py.
|
|
14
16
|
End successful completion with: Start a new chat with a new agent and say "research my project".
|
|
15
17
|
Finalize from PROJECT_ROOT with scripts/finalize-skill-checkpoint.py --scope ideator
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import unittest
|
|
2
|
+
from pathlib import Path
|
|
3
|
+
|
|
4
|
+
SKILL_ROOT = Path(__file__).resolve().parents[1]
|
|
5
|
+
IDEATOR_SKILL = SKILL_ROOT / "skills" / "ideator" / "SKILL.md"
|
|
6
|
+
IDEATOR_AGENT = SKILL_ROOT / "skills" / "ideator" / "agents" / "openai.yaml"
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
class IdeatorTopicReviewPromptTests(unittest.TestCase):
|
|
10
|
+
def test_skill_requires_full_topic_review_before_persistence(self) -> None:
|
|
11
|
+
content = IDEATOR_SKILL.read_text(encoding="utf-8")
|
|
12
|
+
|
|
13
|
+
self.assertIn(
|
|
14
|
+
"Return every identified `research_agenda.blocks[].topics[]` item to the user in the final pre-persistence review.",
|
|
15
|
+
content,
|
|
16
|
+
)
|
|
17
|
+
self.assertIn(
|
|
18
|
+
"Topic edits needed: Add or remove any topics before persistence? (add/remove/no changes)",
|
|
19
|
+
content,
|
|
20
|
+
)
|
|
21
|
+
self.assertIn(
|
|
22
|
+
"Confirmation needed: Persist this ideation package to .cadence/cadence.json? (yes/no)",
|
|
23
|
+
content,
|
|
24
|
+
)
|
|
25
|
+
|
|
26
|
+
def test_agent_prompt_reinforces_topic_review_gate(self) -> None:
|
|
27
|
+
content = IDEATOR_AGENT.read_text(encoding="utf-8")
|
|
28
|
+
|
|
29
|
+
self.assertIn(
|
|
30
|
+
"Before persistence, always return the full research topic list and let the user add/remove topics.",
|
|
31
|
+
content,
|
|
32
|
+
)
|
|
33
|
+
self.assertIn(
|
|
34
|
+
"Only after explicit topic approval and explicit yes/no persistence confirmation,",
|
|
35
|
+
content,
|
|
36
|
+
)
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
if __name__ == "__main__":
|
|
40
|
+
unittest.main()
|