Loading...
Loading...
Compare original and translation side by side
/imperatives # default: ai-workspace/rules/*.md + AGENTS.md
/imperatives .claude/rules/*.md # specific globs
/imperatives --output imperatives.jsonl # write to file/imperatives # 默认路径:ai-workspace/rules/*.md + AGENTS.md
/imperatives .claude/rules/*.md # 指定通配符路径
/imperatives --output imperatives.jsonl # 写入文件ai-workspace/rules/*.mdAGENTS.mdnode --import tsx scripts/extract-imperatives.ts <files...> --output /tmp/imperatives-pass1.jsonlRead. Here are the imperatives already extracted by the script for this file:<file><pass 1 JSONL lines where source.file matches>Identify additional imperative statements the regex missed. Look for:
- Implicit obligations hidden in prose (e.g., "The workflow is a menu, not a pipeline" implies MUST NOT enforce order)
- Contextual constraints (e.g., section context that makes a statement imperative)
- Conditional rules not triggered by keyword patterns
For each new imperative found, output one JSON line (same schema — id, level, polarity, subject, predicate, when, source, tool_scope, tags, raw). Do NOT duplicate entries already in pass 1. If none found, output nothing.
subagent_type: "explorer"raw--output <path>leveltool_scope/policy-algebra/distillai-workspace/rules/*.mdAGENTS.mdnode --import tsx scripts/extract-imperatives.ts <files...> --output /tmp/imperatives-pass1.jsonl读取。以下是脚本已从该文件中提取的命令式语句:<file><pass 1中source.file匹配的JSONL行>识别正则表达式遗漏的其他命令式语句。请查找:
- 隐藏在散文式文本中的隐含义务(例如:“工作流是菜单而非流水线”意味着MUST NOT强制顺序)
- 上下文约束(例如:使语句成为命令式的章节上下文)
- 未被关键词模式触发的条件规则
对于每个找到的新命令式语句,输出一行JSON(遵循相同的 schema — id、level、polarity、subject、predicate、when、source、tool_scope、tags、raw)。 请勿重复第一轮中已有的条目。如果未找到任何新条目,请输出空内容。
subagent_type: "explorer"raw--output <path>leveltool_scope| Condition | Behavior |
|---|---|
| No files matched | Error message. Stop. |
| File not found | Script warns on stderr, continues with remaining files. |
| Zero imperatives | Report zero. Not an error. |
| Script exits non-zero | Surface stderr to user. |
| 条件 | 行为 |
|---|---|
| 未匹配到任何文件 | 输出错误信息并终止。 |
| 文件未找到 | 脚本在stderr中发出警告,继续处理剩余文件。 |
| 未提取到任何命令式语句 | 报告数量为零,不视为错误。 |
| 脚本非零退出 | 将stderr内容展示给用户。 |