Skip to content

feat: path-scoped auto-discovery + dynamic context injection#90

Merged
harrymunro merged 3 commits intomainfrom
feat/path-scoped-auto-discovery
Apr 10, 2026
Merged

feat: path-scoped auto-discovery + dynamic context injection#90
harrymunro merged 3 commits intomainfrom
feat/path-scoped-auto-discovery

Conversation

@harrymunro
Copy link
Copy Markdown
Collaborator

Summary

  • Add paths: [".nelson/**"] to SKILL.md frontmatter for automatic Nelson activation when a .nelson/ directory exists
  • Add dynamic context injection via ! code block that runs nelson-data.py status against the most recent mission, injecting fleet status as a briefing prefix on skill load
  • Enhance cmd_status output with mission name, per-ship hull status, completed ship detection, relative elapsed time, and conditional blocked count
  • Make --mission-dir optional on the status parser for graceful no-op when no missions exist
  • Update structured-data.md reference documentation with new format and example output

Test plan

  • All 71 existing tests pass (no regressions)
  • 5 new tests added for enhanced status output (per-ship, completed ships, mission name, no-mission-dir, blocked count)
  • Updated existing test_status_after_checkpoint to assert new format
  • Manual: verify paths: triggers auto-activation in a project with .nelson/ directory
  • Manual: verify ! block injects fleet status on skill load
  • Manual: verify silent no-op when no .nelson/ directory exists

Closes #80

Add paths: [".nelson/**"] to SKILL.md frontmatter so Nelson auto-activates
when a .nelson/ directory is detected. Inject current fleet status as a
dynamic briefing prefix via a ! code block that runs nelson-data.py status
against the most recent mission directory.

Enhance cmd_status output to show mission name, per-ship hull status with
completed ship detection, relative elapsed time since last checkpoint, and
blocked task count. Make --mission-dir optional for graceful handling when
no missions exist.

Closes #80
…d elapsed tests

- Quote $() subshell and {skill-dir} path in SKILL.md ! block to prevent
  word splitting on directory names with spaces
- Remove outer 2>/dev/null to surface real Python errors (|| fallback
  already handles the no-mission case)
- Use :.0f format for budget percentage to match documented output (45%
  not 45.0%)
- Add 9 parametrized unit tests for _format_elapsed() covering empty
  input, unparseable strings, future timestamps, seconds/minutes/hours,
  combined hours+minutes, and Zulu suffix parsing
@harrymunro harrymunro merged commit 26bbb7e into main Apr 10, 2026
6 checks passed
harrymunro added a commit that referenced this pull request Apr 10, 2026
Integrate six PRs merged to main since this branch diverged:
- PR #89: formation consolidation (form, headless commands)
- PR #90: path-scoped auto-discovery
- PR #91: typed handoff packet
- PR #92: hook enforcement layer
- PR #93: deterministic phase engine
- PR #96: task list visibility

Port new commands (form, headless, handoff, recover) into the
modular architecture. Add phase field support to lifecycle commands
for compatibility with the phase engine. All 234 tests pass.
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.

Path-scoped auto-discovery + dynamic context injection

1 participant