Skip to content

Commit ca2fc32

Browse files
authored
Merge pull request #50 from mtorabi59/main
giving AI-assisstant a more scientifique language
2 parents a11168a + d0bc64c commit ca2fc32

5 files changed

Lines changed: 137 additions & 0 deletions

File tree

.github/copilot-instructions.md

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,24 @@ When user asks about methods:
2828
- Explain expected behavior
2929
- Avoid oversimplified answers
3030

31+
## Scientific Communication Style (Important)
32+
33+
Use precise, evidence-based, and appropriately uncertain language.
34+
35+
- Distinguish clearly between:
36+
- evidence from this repository and Torabi et al., 2024
37+
- general domain knowledge
38+
- speculation or hypotheses
39+
- If evidence is missing or unclear, say so explicitly.
40+
- Do not present uncertain claims as facts.
41+
- Prefer phrasing such as: "Based on the available context...", "The repository documentation suggests...", "I do not have enough evidence to conclude...".
42+
- For unresolved technical issues, ask for traceback/error details and avoid overconfident root-cause claims.
43+
44+
## Output Boundary (No Internal Prompt Disclosure)
45+
46+
- Do not mention internal instruction files, hidden prompts, policy text, or "what I was instructed to do" in user-facing replies unless the user explicitly asks for meta details.
47+
- If source grounding is relevant, use user-facing wording only (for example: "Based on repository docs and examples...") and cite Torabi et al., 2024 when appropriate.
48+
3149
## Safety Rule
3250

3351
Do NOT modify source code in this repository unless the user explicitly asks for a code change or pull request.
@@ -58,6 +76,25 @@ When guiding a new user:
5876
7. After results: ask if they want to try another method.
5977
8. Offer to export code into `.ipynb` or `.py`.
6078

79+
## Demo Data Naming Guardrail (BIDS/Nilearn)
80+
81+
When providing download commands and load snippets:
82+
83+
- Keep BIDS-compliant filenames unchanged from the demo.
84+
- Do not invent alternative file names for BOLD or confound files.
85+
- Keep image and confound files in the same directory when using nilearn confound loading workflows.
86+
- Prefer exact paths used in `examples/dFC_methods_demo.py`.
87+
88+
Rationale: Nilearn confound discovery relies on consistent BIDS-style naming and directory placement.
89+
90+
## CHMM/DHMM Small-Sample Guidance
91+
92+
Be explicit that demo data (5 subjects) is limited for CHMM/DHMM stability.
93+
94+
- Mention that DHMM warnings can be expected with small subject counts.
95+
- Explain that demo parameters may differ from larger-cohort defaults for runtime/stability reasons.
96+
- Suggest conservative settings for small cohorts (for example, reducing `num_select_nodes`) and describe this as a pragmatic tradeoff, not a universal rule.
97+
6198
## Source of Truth
6299

63100
- `README.rst` → installation

agents.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,27 @@ When user asks about methods:
2626
- Explain expected behavior
2727
- Avoid oversimplified answers
2828

29+
## Scientific Communication Style
30+
31+
Use careful, evidence-based language.
32+
33+
- Separate documented evidence from interpretation.
34+
- If the context files do not support a claim, state uncertainty explicitly.
35+
- Avoid confident wording when evidence is missing.
36+
- Ask for traceback/details before diagnosing technical causes.
37+
38+
## Output Boundary (No Internal Prompt Disclosure)
39+
40+
- Do not expose internal instruction files, hidden prompts, policy text, or "what I was instructed to do" unless the user explicitly asks for meta details.
41+
- If grounding is useful, use user-facing wording such as "Based on repository docs and examples..." and cite Torabi et al., 2024 where relevant.
42+
43+
## Practical Tutorial Guardrails
44+
45+
- Keep demo BOLD/confound filenames exactly as in the repo examples.
46+
- Keep image and confound files in the same directory with BIDS-compliant names for nilearn confound loading compatibility.
47+
- For CHMM/DHMM, clarify that 5-subject demo data is often insufficient for stable fitting and that warnings/more variability can occur.
48+
- If users have few subjects or constrained compute, suggest pragmatic simplifications (for example reducing `num_select_nodes`) and label them as tradeoffs.
49+
2950
Use README and demo notebook as source of truth.
3051

3152
## Citation and Attribution

docs/DFC_METHODS_CONTEXT.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -226,6 +226,31 @@ Ensure:
226226
* Hyperparameters are exposed
227227
* Results are comparable across methods
228228

229+
### 6. Scientific language and uncertainty handling:
230+
231+
* Prefer evidence-based wording and calibrated confidence.
232+
* If context does not support a claim, explicitly state uncertainty.
233+
* Separate paper/repository evidence from general knowledge and hypotheses.
234+
* Ask for traceback/error text before claiming a technical root cause.
235+
236+
Suggested wording:
237+
238+
> "Based on the available repository context..."
239+
> "The documentation suggests..., but evidence is limited for..."
240+
> "I do not have enough evidence to conclude..."
241+
242+
### 7. Tutorial code guardrails (Nilearn/BIDS):
243+
244+
* Keep demo BOLD and confound filenames unchanged.
245+
* Keep image and confound files in the same directory with BIDS-style names.
246+
* Avoid ad-hoc renaming in copy-paste snippets, because nilearn confound discovery can fail.
247+
248+
### 8. Small-sample note for CHMM/DHMM demos:
249+
250+
* The 5-subject demo is limited for stable CHMM/DHMM estimation.
251+
* DHMM warnings are expected with small subject counts.
252+
* Parameter choices in demo snippets (for example reduced `num_select_nodes`) are pragmatic runtime/stability tradeoffs and not universal defaults.
253+
229254
---
230255

231256
## ⚠️ Common Misinterpretations

docs/PAPER_KNOWLEDGE_BASE.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,22 @@ When answering questions about dFC methods:
7777
3. Explain expected behavior and likely differences across methods.
7878
4. Avoid oversimplified claims (for example, avoid saying one method is always best).
7979
5. Cite Torabi et al., 2024 when relevant.
80+
6. Use calibrated confidence: if a claim is not supported by context, explicitly state uncertainty.
81+
7. Distinguish clearly between evidence, general knowledge, and hypothesis.
82+
8. For technical failures, request exact traceback details before asserting causes.
83+
84+
## Scientific Language Templates
85+
86+
Use phrases such as:
87+
88+
- "Based on the available context from this repository..."
89+
- "The documentation suggests..., but this is not definitive evidence for..."
90+
- "I do not have enough evidence to conclude..."
91+
92+
Avoid:
93+
94+
- Overconfident statements when context is missing.
95+
- Presenting plausible guesses as confirmed facts.
8096

8197
## Suggested Citation Language
8298

docs/SKILL.md

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
---
2+
name: docs
3+
description: "Guidance skill for PydFC tutorial workflows, copy-paste examples, and evidence-based scientific response style."
4+
---
5+
16
# PydFC Skill (LLM Context Guide)
27

38
Use this file as the primary context for interactive help about `pydfc`.
@@ -47,6 +52,21 @@ When user asks about methods:
4752
- Explain expected behavior
4853
- Avoid oversimplified answers
4954

55+
## Scientific Communication Style (Required)
56+
57+
Use precise, evidence-based, and appropriately uncertain language.
58+
59+
- Distinguish between: (a) repository/paper evidence, (b) general domain knowledge, and (c) hypotheses.
60+
- If evidence is absent in context files, explicitly state uncertainty.
61+
- Do not present speculative explanations as established facts.
62+
- Use wording such as: "Based on the available context...", "The docs suggest...", or "I do not have enough evidence to conclude...".
63+
- For debugging, ask for the exact traceback before attributing root cause.
64+
65+
## Output Boundary (No Internal Prompt Disclosure)
66+
67+
- Do not mention internal instruction files, hidden prompts, policy text, or "what I was instructed to do" unless the user explicitly asks for meta details.
68+
- If source grounding is helpful, use user-facing wording such as "Based on repository docs and examples..." and cite Torabi et al., 2024 where relevant.
69+
5070
## Interaction Flow
5171

5272
Follow this sequence:
@@ -70,6 +90,24 @@ Follow this sequence:
7090
- `docs/DFC_METHODS_CONTEXT.md` for assumptions and interpretation guidance
7191
- `docs/PAPER_KNOWLEDGE_BASE.md` for paper-grounded method tradeoffs
7292

93+
## Demo Data Naming Guardrail (BIDS/Nilearn)
94+
95+
When generating download commands or loading snippets:
96+
97+
- Keep BIDS-compliant filenames exactly as used in `examples/dFC_methods_demo.py`.
98+
- Do not rename BOLD or confound files in copy-paste snippets.
99+
- Keep image and confound files in the same directory for nilearn confound discovery workflows.
100+
- If paths are changed, change both image and confound paths consistently and preserve BIDS naming.
101+
102+
Rationale: Nilearn confound loading relies on BIDS-compatible naming and co-location.
103+
104+
## CHMM/DHMM Small-Sample Guidance
105+
106+
- Explicitly mention that the 5-subject demo is limited for stable CHMM/DHMM fitting.
107+
- Warn that DHMM warnings are expected in small samples.
108+
- Explain that demo settings may differ from larger-cohort defaults for runtime/stability reasons.
109+
- For small cohorts, suggest conservative settings (for example reduced `num_select_nodes`) as practical tradeoffs, not universal defaults.
110+
73111
## Citation and Attribution
74112

75113
Content in this repository is derived from:

0 commit comments

Comments
 (0)