Read and normalize human-provided input from inline text or files for any layer workflow. Use when processing requirements, stories, notices, release scopes, or change requests.
Version: 0.2.0
Read and normalize human-provided input across all layers — requirements, stories, notices, release scopes, and change requests — producing a consistent plain-text representation for downstream skills.
No special format is required from the human. The agent infers input type and intent from the content itself.
| Parameter | Type | Required | Description |
|---|---|---|---|
inline_text | string | Conditional | Natural language input provided directly by the user |
file_path | string | Conditional | Path to a .md, , , or file |
.txt.pdf.docxcontext_layer | string | No | Layer hint (domain, architecture, process, dev, qa) used to improve intent inference |
expected_input_types | array | No | Optional allowed types (requirement, story, notice, change-request, release-scope) |
At least one of inline_text or file_path must be provided. If both are provided, merge them with file_path content taking precedence, and note the merge in the output metadata.
{
"status": "ok" | "error",
"source": "inline" | "file" | "merged",
"file_path": "<path or null>",
"input_type": "requirement" | "story" | "notice" | "change-request" | "release-scope" | "unknown",
"inferred_intent": "initialization" | "update" | "validation" | "query" | "unknown",
"resolved_references": {
"story_ids": ["STORY-<id>", "..."],
"procedure_ids": ["PROC-<id>", "..."],
"architecture_refs": ["<artifact-id>", "..."],
"files": ["<resolved path>", "..."]
},
"content": "<normalized plain text>",
"error": "<error message or null>"
}
Determine source:
file_path is provided, attempt to read the file.status: error and return immediately.inline_text is also provided alongside a valid file, merge both and set source: merged.Normalize content:
Infer input type and intent:
input_type from structure and keywords (Story ID, CR format, propagation notice marker, release scope wording).inferred_intent from requested operation (initialization, update, validation, query).expected_input_types is provided and inferred type is outside the allowed set, set status: error.unknown and ask the user to clarify.Resolve references (when applicable):
STORY-<id>, resolve to Story file paths.PROC-<id>, resolve to Procedure file paths.status: error and ask for clarification.Return output object.
| Check | Rule |
|---|---|
| At least one input provided | If both inline_text and file_path are null, return status: error |
| File is readable | File exists, is non-empty, and is a supported format |
| Content is non-empty | Normalized content must contain at least one non-whitespace character |
| Code | Meaning |
|---|---|
ERR_NO_INPUT | Neither inline text nor file path was provided |
ERR_FILE_NOT_FOUND | Specified file path does not exist |
ERR_FILE_EMPTY | File exists but contains no readable content |
ERR_FORMAT_UNSUPPORTED | File format is not .md, .txt, .pdf, or .docx |
ERR_UNEXPECTED_INPUT_TYPE | Inferred input type is not in expected_input_types |
ERR_REFERENCE_UNRESOLVED | Required Story/Procedure/architecture reference cannot be resolved |