Skip to content

Fix ambient.json field documentation to match platform#92

Open
jwm4 wants to merge 2 commits intoambient-code:mainfrom
jwm4:docs/fix-ambient-json-schema-docs
Open

Fix ambient.json field documentation to match platform#92
jwm4 wants to merge 2 commits intoambient-code:mainfrom
jwm4:docs/fix-ambient-json-schema-docs

Conversation

@jwm4
Copy link
Copy Markdown
Contributor

@jwm4 jwm4 commented Mar 29, 2026

Summary

  • Audited all ambient.json fields against the actual platform runner code (ambient-runner) and corrected documentation that didn't match reality
  • startupPrompt: Documented that it's sent TO the agent as a hidden user message (not displayed to the user). Updated all examples to directive style.
  • greeting, enabled, rubric: Removed — these fields are either not implemented or only partially implemented in the platform and don't fit the long-term strategy of keeping ambient.json lightweight
  • results: Clarified it's informational only — not read by the platform at runtime
  • Removed fictional optional fields (version, author, tags, icon) from FIELD_REFERENCE docs and workflow-creator skill
  • Fixed stale code paths (claude-code-runnerambient-runner)

Files changed

  • AMBIENT_JSON_SCHEMA.md — main schema reference (largest changes)
  • AGENTS.md — field table, examples, modification guidance
  • WORKFLOW_DEVELOPMENT_GUIDE.md — field table, example, checklist
  • .claude/skills/workflow-creator/SKILL.md — template generation, field reference section
  • workflows/triage/FIELD_REFERENCE.md — field descriptions
  • workflows/cve-fixer/FIELD_REFERENCE.md — field descriptions, removed fictional fields
  • internal-workflows/template-workflow/.ambient/ambient.json — rewrite startupPrompt as directive

Test plan

  • Verify no production workflow behavior changed (only docs and internal-workflows touched)
  • Review that AMBIENT_JSON_SCHEMA.md accurately reflects platform code
  • Confirm workflow-creator skill generates correct templates without results or removed fields

🤖 Generated with Claude Code

This comment comes from Claude Code under the supervision of Bill Murdock.

Audited all ambient.json fields against the platform runner code
(ambient-runner) and corrected documentation that didn't match:

- startupPrompt: Document that it's sent TO the agent as a hidden user
  message, not displayed to the user. Update all examples to use
  directive style instead of canned greetings.
- greeting: Remove — field is not implemented in the platform.
- enabled: Remove — not read from ambient.json by the runner.
- rubric: Remove — only partially implemented, doesn't fit long-term
  strategy of keeping ambient.json lightweight and portable.
- results: Clarify it's informational only, not read by the platform
  at runtime.
- Remove fictional optional fields (version, author, tags, icon) from
  FIELD_REFERENCE docs and workflow-creator skill.
- Fix stale code paths (claude-code-runner → ambient-runner).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Mar 29, 2026

Walkthrough

This pull request redefines startupPrompt as a hidden agent-only session-start directive (user sees only the agent response) and marks results as informational-only (not consumed at runtime). Documentation and workflow templates across the repo were updated to reflect these semantics and to move artifact-path guidance to systemPrompt.

Changes

Cohort / File(s) Summary
Skill Template & Documentation
\.claude/skills/workflow-creator/SKILL.md
Removed results from the ambient template, redefined startupPrompt as a hidden agent directive, and updated guidance to use systemPrompt for artifact output paths.
Agent & Schema Guides
AGENTS.md, AMBIENT_JSON_SCHEMA.md, WORKFLOW_DEVELOPMENT_GUIDE.md
Clarified startupPrompt is sent as a hidden user message at session start, changed results to informational-only, removed several optional top-level fields from docs, and updated examples/testing guidance to reference systemPrompt artifact paths.
Internal Workflow Template
internal-workflows/template-workflow/.ambient/ambient.json
Replaced startupPrompt text with a shorter agent-focused startup directive that greets, lists phases/commands, and asks the user what they want to do.
Workflow Field References
workflows/cve-fixer/FIELD_REFERENCE.md, workflows/triage/FIELD_REFERENCE.md
Updated startupPrompt and results field descriptions to the new semantics, removed examples for adding new output types and optional fields, and simplified instructions to update artifact locations via systemPrompt/command ## Output sections.
Other docs & examples
AGENTS.md (example renames/clarifications), various docs...
Renamed example headings (e.g., “Inconsistent Artifact Paths”), adjusted sample startupPrompt text, and aligned all references and test/checklist steps with the new semantics.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The PR title clearly and concisely describes the main objective: auditing and fixing documentation for ambient.json fields to match the actual platform implementation.
Description check ✅ Passed The PR description is well-organized and directly related to the changes, providing a clear summary of documentation updates, specific field changes, affected files, and a test plan.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@jwm4 jwm4 marked this pull request as ready for review March 29, 2026 20:40
@jwm4
Copy link
Copy Markdown
Contributor Author

jwm4 commented Mar 29, 2026

@coderabbitai review

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Mar 29, 2026

✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
workflows/cve-fixer/FIELD_REFERENCE.md (1)

63-71: ⚠️ Potential issue | 🟡 Minor

Incomplete cleanup: orphaned JSON content.

Lines 67-71 contain JSON fragments that don't relate to the new content at lines 65-66 about updating systemPrompt and command files. This appears to be leftover environment-based configuration content that should have been removed per the PR's objective to simplify customization instructions.

🧹 Suggested cleanup

Remove lines 67-71 (the orphaned JSON content) so the section reads:

 ### Changing artifact location
 
 To use a different base directory, update:
 
 1. `systemPrompt` OUTPUT LOCATIONS section
 2. All command files in `.claude/commands/` to reference new paths in their ## Output sections
-  "ARTIFACTS_DIR": "artifacts/cve-fixer",
-  "SCAN_TOOLS": "snyk,npm-audit,trivy",
-  "LOG_LEVEL": "info"
-}
-```
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@workflows/cve-fixer/FIELD_REFERENCE.md` around lines 63 - 71, Remove the
orphaned JSON fragment containing the keys "ARTIFACTS_DIR", "SCAN_TOOLS", and
"LOG_LEVEL" from the FIELD_REFERENCE.md section so the guidance about updating
the systemPrompt OUTPUT LOCATIONS and the ## Output sections of command files in
.claude/commands/ stands alone; delete the stray lines that look like
environment/config JSON (the leftover JSON fragment) so the section reads
cleanly with only the instructional text.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Outside diff comments:
In `@workflows/cve-fixer/FIELD_REFERENCE.md`:
- Around line 63-71: Remove the orphaned JSON fragment containing the keys
"ARTIFACTS_DIR", "SCAN_TOOLS", and "LOG_LEVEL" from the FIELD_REFERENCE.md
section so the guidance about updating the systemPrompt OUTPUT LOCATIONS and the
## Output sections of command files in .claude/commands/ stands alone; delete
the stray lines that look like environment/config JSON (the leftover JSON
fragment) so the section reads cleanly with only the instructional text.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 69ff71eb-b572-4c67-9dcb-e7f7e4d6019f

📥 Commits

Reviewing files that changed from the base of the PR and between 1bd9d6e and 230912f.

📒 Files selected for processing (7)
  • .claude/skills/workflow-creator/SKILL.md
  • AGENTS.md
  • AMBIENT_JSON_SCHEMA.md
  • WORKFLOW_DEVELOPMENT_GUIDE.md
  • internal-workflows/template-workflow/.ambient/ambient.json
  • workflows/cve-fixer/FIELD_REFERENCE.md
  • workflows/triage/FIELD_REFERENCE.md

Address CodeRabbit review feedback: leftover JSON lines from a removed
"environment configuration" example were dangling after the artifact
path customization instructions.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@workflows/cve-fixer/FIELD_REFERENCE.md`:
- Around line 44-45: The doc now declares the `results` field is
informational-only but later sections still treat `results` as operational and
still require a `version` field; update FIELD_REFERENCE.md to remove those
contradictions by changing all occurrences that describe `results` as an
operational/required field to reflect it is informational-only (search for
mentions of `results` in the sections that describe outputs/behavior) and remove
or mark as obsolete the guidance that requires a `version` field (search for
`version` usages and related requirement language) so the document consistently
describes `results` as informational and no longer mandates `version`.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 28e87e73-0c91-4693-b7e6-3325c122a43b

📥 Commits

Reviewing files that changed from the base of the PR and between 230912f and 0365e6f.

📒 Files selected for processing (1)
  • workflows/cve-fixer/FIELD_REFERENCE.md

Comment on lines +44 to +45
- **Purpose:** Documents which artifact types the workflow produces and where
- **Note:** This field is informational only -- the platform does not read it at runtime
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

Resolve remaining contradictions after making results informational-only.

These updates conflict with later sections that still make results operational (Line 114, Line 115, Line 125, Line 137) and still require a version field (Line 127), which reintroduces removed/obsolete guidance.

Suggested doc cleanup
 ## Validation Checklist
@@
-- [ ] Output paths in `results` match those referenced in `systemPrompt`
-- [ ] Output paths in `results` match those in command files' ## Output sections
+- [ ] Output locations in `systemPrompt` match command files' ## Output sections

 ## Configuration Best Practices
@@
-3. **Maintain consistency:** Ensure artifact paths are identical across ambient.json, systemPrompt, and command files.
+3. **Maintain consistency:** Ensure output locations are consistent between `systemPrompt` and command files.
@@
-4. **Version your workflow:** Update version field when making significant changes to track evolution.
+4. **Track workflow changes:** Document significant configuration changes in this FIELD_REFERENCE and related guides.

 ## Troubleshooting Configuration Issues
@@
-**Solution:** Verify paths in `results` match actual output locations. Use glob patterns correctly (`**/*.md` for recursive).
+**Solution:** Verify output locations defined in `systemPrompt` and command files are accurate and use correct glob patterns where applicable (`**/*.md` for recursive).

As per coding guidelines, "Focus on major issues impacting performance, readability, maintainability and security. Avoid nitpicks and avoid verbosity."

Also applies to: 63-67

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@workflows/cve-fixer/FIELD_REFERENCE.md` around lines 44 - 45, The doc now
declares the `results` field is informational-only but later sections still
treat `results` as operational and still require a `version` field; update
FIELD_REFERENCE.md to remove those contradictions by changing all occurrences
that describe `results` as an operational/required field to reflect it is
informational-only (search for mentions of `results` in the sections that
describe outputs/behavior) and remove or mark as obsolete the guidance that
requires a `version` field (search for `version` usages and related requirement
language) so the document consistently describes `results` as informational and
no longer mandates `version`.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant