feat(schema): register complete schema for pull_request entity type#309
feat(schema): register complete schema for pull_request entity type#309castor-agent wants to merge 6 commits into
Conversation
Adds a [GITHUB ENTITY EXTRACTION] section to MCP instructions and a new docs/subsystems/github_entities.md documenting how to extract and store GitHub issue, PR, org, and project entities when encountered in email records. Also adds a pull_request entity type schema to ENTITY_SCHEMAS. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Adds an explicit [STORE-FIRST PROTOCOL] section to the MCP interaction instructions fenced block in docs/developer/mcp/instructions.md. The new section makes the external-write store-first rule binding and unambiguous: agents MUST store intent as a Neotoma entity before executing any external write action (email send, GitHub issue creation, calendar event booking, Slack post, webhook trigger, etc.), update the entity status after the action completes or fails, and never skip the store step regardless of how trivial the action appears. The section includes a three-step checklist, entity-type mapping for common external actions, on-failure behavior, and explicit FORBIDDEN rules. The existing "External tool store-first" line in [COMMUNICATION & DISPLAY] is updated to cross-reference the new section. The design-rationale section label list is updated to include the new section. Also adds a Store-first protocol section to docs/foundation/what_to_store.md explaining the three-step sequence for users and operators. Fixes #174 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Implements issue #169. - --project-local: stores init config in .neotoma/config.json in the current directory (project-scoped) instead of ~/.config/neotoma/config.json (user-scoped). Project-local config takes precedence over user-level config when readEffectiveConfig() is used. - --safe: dry-run mode that reports what init would do (create directories, write config, initialize databases) without making any changes. Outputs a human-readable checklist in pretty mode or a JSON object with dry_run=true and planned_actions[] when --json is set. Exit 0 if all planned actions would succeed. Also adds: - writeProjectLocalConfig() and projectLocalConfigPath() helpers in config.ts - readEffectiveConfig() that merges project-local over user-level config - Tests in tests/cli/cli_init_flags.test.ts covering both flags - cli_reference.md documentation with examples and runtime override tables - Updated automated test catalog Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…rting instructions Fixes #160 Changes `issues.reporting_mode` default from `consent` to `proactive` so agents file issues immediately when a reportable condition is detected, without asking for permission. Removes the "mode discovery" prompt that asked the user once to configure their preference on first encounter. Key changes in docs/developer/mcp/instructions.md [ISSUE REPORTING] section: - Default mode is now `proactive` (was `consent`) - Removed mode discovery flow (no longer asks "what reporting mode do you prefer?") - Added standing-consent statement: Neotoma installation constitutes consent - Added explicit opt-out path: preference entity with `auto_file_issues: false` - FORBIDDEN clause explicitly names the consent-prompt patterns agents must not use Also updates [QA REFLECTION] QA-driven issue filing and Issue reporting lines to reflect `proactive` as default and reference the `auto_file_issues` preference opt-out. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…158) Adds reference_fields, linked_issues field, and documentation to the pull_request schema bootstrap declaration. Specifically: - src/services/schema_definitions.ts: add linked_issues field (type: string) and reference_fields declaring author→contact, repo→github_repo, and linked_issues→issue with REFERS_TO edges. All three reference fields reference declared schema fields. Bump schema_version to 1.1. - docs/subsystems/record_types.md: add pull_request to the Productivity Schema Family table and add a full Pull Request section under 4.2 Productivity Types documenting required/optional fields, identity rule, aliases, reference fields, and schema registration location. - tests/unit/pull_request_schema.test.ts: 20 unit tests covering ENTITY_SCHEMAS registration, canonical_name_fields (number+repo composite and url fallback), temporal_fields (created_at, merged_at, closed_at with event types), reference_fields entries (author, repo, linked_issues), field declarations, merge policies, and no-dangling- reference-field constraint. - docs/testing/automated_test_catalog.md: regenerated to include the new test file. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
Claude finished @castor-agent's task —— View job PR Review In Progress
|
Missing commit dcf6235 (use git ls-files in test catalog generator). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
/create_pr skill auditAutomated audit against the Verdict: does not fully meet standards. Gaps below; recommended changes follow each item. Findings
Recommended changesUpdate the PR description to match the skill template exactly: ## Problems
- <Concrete pain point or gap.>
## Solutions
- <Concrete change made.>
## UX improvements
- <User-visible behavior change, or `No user-visible change.`>
## Documentation
- <docs/... path(s) added or updated; parameters/outputs/examples/error modes covered.>
- <`docs/site/site_doc_manifest.yaml` entry added/updated; docs service tests pass.>
- <Or: `No functional change; no user-facing docs required.`>
## Test plan
- [ ] `npm run type-check`
- [ ] `npm test`
- [ ] `npm test -- src/services/docs` (if docs changed)
- [ ] Manual verification: <steps>
## Breaking changes
No breaking changes.
## Related
- Plan: <Neotoma plan entity_id or docs/ path>
- Issue(s): <#N>
🤖 Generated with [Claude Code](https://claude.com/claude-code)Functional surfaces detected from the diff: CLI, MCP, Schema. Per the skill, the Posted by |

Fixes #158
Registers a complete schema declaration for
pull_requestentity type in the bootstrap registry with canonical name fields, temporal fields, reference fields, and merge policies.Summary
src/services/schema_definitions.ts: Addedlinked_issuesfield (type:string) andreference_fieldsarray declaring three typed edges —author→contact,repo→github_repo,linked_issues→issue— all usingREFERS_TO. Bumpedschema_versionto1.1. Existingcanonical_name_fields([{composite: ["number","repo"]}, "url"]) andtemporal_fields(created_at,merged_at,closed_at) were already present and correct.docs/subsystems/record_types.md: Addedpull_requestto the Productivity Schema Family table and documented a full Pull Request subsection under §4.2 covering required fields, optional fields, identity rule, aliases, reference fields, and schema registration location.tests/unit/pull_request_schema.test.ts: 20 unit tests covering ENTITY_SCHEMAS registration,canonical_name_fields(composite and url fallback),temporal_fields(three entries with correct event types),reference_fields(all three entries), field declarations, merge policies, and no-dangling-reference-field constraint.docs/testing/automated_test_catalog.md: Regenerated to include the new test file.Test plan
npm run type-checkpasses (no type errors)tests/unit/pull_request_schema.test.tspasses — 20/20 tests greennpm run generate:test-catalog && npm run validate:test-catalogpassesnpm run lint,npm run format:check,npm run lint:site-copyall pass🤖 Generated with Claude Code