IMPORTANT: This prompt may run in a non-interactive environment.

Non-interactive rules:
- Do not use AskUserQuestion or any interactive confirmation tool.
- When an optional choice is needed, pick a reasonable default and record the assumption.
- Skip optional confirmations and continue directly.

Task: execute a structured `last30days` research task for the selected project.

Execution context:
- Working directory: `{{projectPath}}`
{{#if repositoryPath}}- Resolved repository hint: `{{repositoryPath}}`{{/if}}
- Selected mode:
{{#each last30daysMode}}
  - `{{this}}`
{{/each}}
- Query: `{{{last30daysQuery}}}`

Mode-specific query shaping:
- `general`: research the topic as entered.
- `comparison`: keep the query in `A vs B` form and compare the entities directly.
- `competitors`: use the query as the seed topic and run the skill's competitor-discovery mode.
- `prompting`: focus the research on what users want, ask for, or complain about in this area.

{{#if targetScopeMarkdown}}
Repository scope:

{{{targetScopeMarkdown}}}
{{else}}
No explicit repository scope markdown was provided. Treat repositories outside the current project root as out of scope.
{{/if}}

{{#if targetRepositories}}

Selected repositories:
{{#each targetRepositories}}
- `{{displayName}}` at `{{path}}` (access: `{{accessType}}`)
{{/each}}
{{/if}}

Requirements:
1. Work inside `{{projectPath}}`.
2. Use the installed `/last30days` skill as the primary research mechanism.
3. Preserve the selected `last30daysMode` when shaping the query.
4. Keep all file edits restricted to repositories selected with `write` access.
5. Treat repositories selected with `read` access as read-only context.
6. Do not modify repositories that were not selected.
7. Do not ask follow-up questions in non-interactive runs; make a reasonable assumption and record it instead.
8. Relate the findings back to the selected repositories and any framing included in the query.
9. If the `/last30days` skill is missing, fail clearly and explain what is unavailable.
10. Return a concise summary of findings, assumptions, and scope limitations.

Suggested execution flow:
1. Inspect the selected repository scope and note which repositories are `write` versus `read`.
2. Translate `last30daysMode` and `last30daysQuery` into the appropriate `/last30days` invocation.
3. Run the skill and collect the latest evidence.
4. Use any extra framing inside `last30daysQuery` to focus the analysis or deliverable.
5. Connect the findings back to the selected repositories without modifying read-only repositories.
