FineReport 初始化
Overview
Use this skill to collect explicit user input for FineReport project setup and turn it into a validated .codex config set. It is the only standard entrypoint for missing or stale FineReport project configuration.
Conversation Mode
- Use natural-language dialogue to collect init information gradually.
- Do not dump a JSON template, code block, or field list and ask the user to fill it manually.
- Ask only one small group of related fields at a time.
- Do not ask the user to confirm after every answer or every round.
- Collect the needed inputs first, then present one final summary for confirmation.
- After all fields are confirmed, run
fr-init to validate the supplied values.
- If validation fails, explain the failed fields and reasons in natural language, then re-ask only those fields.
Precheck
- Check whether
.codex/fr-config.json already exists.
- If it exists, ask the user:
发现已有 .codex/fr-config.json,是否重新生成?
- If the user answers
否, stop immediately and keep the existing config.
- If the user answers
是, continue initialization and overwrite the init outputs.
- If
.codex/fr-config.json does not exist, continue initialization directly.
Required Fields
Collect these fields from the user explicitly. Do not infer them through local probing or remote investigation.
designer_root
decision_url
username
password
workspace_root
See references/init-fields.md for field meaning, validation, and output rules.
Derived Fields
These fields are not user-required during init:
project_name
- Derive from
workspace_root directory name unless the user explicitly provides one.
remote_root
- Default to
reportlets unless the user explicitly overrides it.
task_type
- Default to
未指定 unless the user explicitly provides one.
Recommended Dialogue Order
- Round 1:
designer_root and workspace_root
- Round 2:
decision_url
- Round 3:
username and password
Once all inputs are collected, present one final summary, including derived defaults, and ask for the last confirmation before running the validator.
Execution
- macOS / Linux:
python3 .codex/skills/fr-init/scripts/run.py --config-path .codex/fr-config.json
- Windows:
py .codex\\skills\\fr-init\\scripts\\run.py --config-path .codex\\fr-config.json
Example Index
EXAMPLES.md
- 先看这里,按“字段含义 / 初始化后下一步”选入口
references/init-fields.md
- 需要确认字段含义、校验规则、哪些问题不属于 init 时看这个
Init Rules
fr-init only collects, echoes, validates, and writes initialization fields.
- Do not inspect local FineReport installation details beyond checking whether the user-provided path exists.
- Do not infer values from logs, local files, database metadata, remote directories, or existing reportlets.
- Do not log into Decision during init.
- Do not probe remote directories, connections, datasets, SQL, logs, or reportlets during init.
- Do not replace missing user input with guesses.
- If a field is invalid, explain why and ask only for the invalid field again.
Expected Evidence
- Existing config check result
- User confirmation on whether regeneration is needed
- Final summary confirmation
- Structured field confirmation
- Per-field validation result
- Per-field validation reason
- Retry list for invalid fields
- Generated or updated init output list
Follow-up
After all fields pass validation, continue with these outputs and next actions:
- Write or update
.codex/fr-config.json
- Prepare or refresh the project init artifacts under
.codex/
- Hand off environment probing to
fr-status-check
Environment checks, Decision login, datasource probing, and remote reportlets checks belong to fr-status-check, not fr-init.
Failure Handling
- Stop if the user declines regeneration of an existing config
- Stop if the user refuses to provide required fields
- Stop if required fields remain invalid after retry
Next Skill
1---2name: fr-init3description: Use when starting or reinitializing a FineReport project and `.codex/fr-config.json` is missing, incomplete, stale, or the user explicitly asks to regenerate the project config.4---56# FineReport 初始化78## Overview910Use this skill to collect explicit user input for FineReport project setup and turn it into a validated `.codex` config set. It is the only standard entrypoint for missing or stale FineReport project configuration.1112## Conversation Mode1314- Use natural-language dialogue to collect init information gradually.15- Do not dump a JSON template, code block, or field list and ask the user to fill it manually.16- Ask only one small group of related fields at a time.17- Do not ask the user to confirm after every answer or every round.18- Collect the needed inputs first, then present one final summary for confirmation.19- After all fields are confirmed, run `fr-init` to validate the supplied values.20- If validation fails, explain the failed fields and reasons in natural language, then re-ask only those fields.2122## Precheck2324- Check whether `.codex/fr-config.json` already exists.25- If it exists, ask the user: `发现已有 .codex/fr-config.json,是否重新生成?`26- If the user answers `否`, stop immediately and keep the existing config.27- If the user answers `是`, continue initialization and overwrite the init outputs.28- If `.codex/fr-config.json` does not exist, continue initialization directly.2930## Required Fields3132Collect these fields from the user explicitly. Do not infer them through local probing or remote investigation.3334- `designer_root`35- `decision_url`36- `username`37- `password`38- `workspace_root`3940See `references/init-fields.md` for field meaning, validation, and output rules.4142## Derived Fields4344These fields are not user-required during init:4546- `project_name`47 - Derive from `workspace_root` directory name unless the user explicitly provides one.48- `remote_root`49 - Default to `reportlets` unless the user explicitly overrides it.50- `task_type`51 - Default to `未指定` unless the user explicitly provides one.5253## Recommended Dialogue Order5455- Round 1: `designer_root` and `workspace_root`56- Round 2: `decision_url`57- Round 3: `username` and `password`5859Once all inputs are collected, present one final summary, including derived defaults, and ask for the last confirmation before running the validator.6061## Execution6263- macOS / Linux: `python3 .codex/skills/fr-init/scripts/run.py --config-path .codex/fr-config.json`64- Windows: `py .codex\\skills\\fr-init\\scripts\\run.py --config-path .codex\\fr-config.json`6566## Example Index6768- `EXAMPLES.md`69 - 先看这里,按“字段含义 / 初始化后下一步”选入口70- `references/init-fields.md`71 - 需要确认字段含义、校验规则、哪些问题不属于 init 时看这个7273## Init Rules7475- `fr-init` only collects, echoes, validates, and writes initialization fields.76- Do not inspect local FineReport installation details beyond checking whether the user-provided path exists.77- Do not infer values from logs, local files, database metadata, remote directories, or existing reportlets.78- Do not log into Decision during init.79- Do not probe remote directories, connections, datasets, SQL, logs, or reportlets during init.80- Do not replace missing user input with guesses.81- If a field is invalid, explain why and ask only for the invalid field again.8283## Expected Evidence8485- Existing config check result86- User confirmation on whether regeneration is needed87- Final summary confirmation88- Structured field confirmation89- Per-field validation result90- Per-field validation reason91- Retry list for invalid fields92- Generated or updated init output list9394## Follow-up9596After all fields pass validation, continue with these outputs and next actions:9798- Write or update `.codex/fr-config.json`99- Prepare or refresh the project init artifacts under `.codex/`100- Hand off environment probing to `fr-status-check`101102Environment checks, Decision login, datasource probing, and remote `reportlets` checks belong to `fr-status-check`, not `fr-init`.103104## Failure Handling105106- Stop if the user declines regeneration of an existing config107- Stop if the user refuses to provide required fields108- Stop if required fields remain invalid after retry109110## Next Skill111112- `fr-status-check`