Skip to content

Commit b9d42b6

Browse files
committed
Update steering docs with schema storage, related issues, and project references
1 parent 7a4ce56 commit b9d42b6

File tree

3 files changed

+116
-0
lines changed

3 files changed

+116
-0
lines changed
Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
---
2+
inclusion: always
3+
---
4+
5+
# Project Management
6+
7+
## General
8+
9+
- Use the `gh` CLI for all GitHub operations when possible
10+
- Never delete or change the status of issues or pull requests unless explicitly
11+
requested
12+
13+
## Issues
14+
15+
- Always assign an issue type when creating issues: `Task`, `Bug`, `Feature`,
16+
`Epic`, or `Spike`
17+
- Use context from the codebase or the web to fill in additional detail when
18+
creating issues
19+
- Only apply labels from the existing set; do not create new labels
20+
- Do not add or remove labels unless explicitly requested
21+
22+
## Sub-Issues
23+
24+
Create a sub-issue (child) under a parent issue:
25+
26+
```bash
27+
PARENT_ID=$(gh issue view <parent-number> --json id --jq '.id')
28+
CHILD_ID=$(gh issue view <child-number> --json id --jq '.id')
29+
gh api graphql \
30+
-H "GraphQL-Features: sub_issues" \
31+
-f query="mutation { addSubIssue(input: { issueId: \"$PARENT_ID\", subIssueId: \"$CHILD_ID\" }) { issue { title } subIssue { title } } }"
32+
```
33+
34+
Note: `gh issue create` does not support `--parent`. Create the issue first,
35+
then link it via the GraphQL API as shown above.
36+
37+
## Related Issues
38+
39+
When an issue or PR relates to another issue or PR, add a "Related Issues"
40+
section with a list of linked items. Always use a list format, even for a single
41+
item, because GitHub expands the reference number into the referenced item's
42+
title (e.g., `- Fixes #123` renders as "Fixes some bug #123").
43+
44+
Prefix each item with a brief relationship descriptor such as:
45+
46+
- `Fixes` or `Resolves` — closes the referenced issue
47+
- `Part of` — contributes to a larger effort
48+
- `Parent` — the parent issue or epic
49+
- `Duplicate` — duplicates another issue
50+
- Other brief descriptors as appropriate
51+
52+
Example:
53+
54+
```markdown
55+
## Related Issues
56+
57+
- Fixes #123
58+
- Part of #456
59+
```
60+
61+
## Pull Requests
62+
63+
- Follow the pull request template in `.github/pull_request_template.md`
64+
- Link to the corresponding issue when one exists (e.g., `Fixes #123`)
65+
- Keep descriptions concise
66+
- Include a bulleted list of changes at the conceptual level with reasons for
67+
each change so reviewers can scan quickly

.kiro/steering/structure.md

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,47 @@ inclusion: always
7272
- **External Data**: Graph data is queried directly from the connected graph
7373
databases and is not owned or persisted by Graph Explorer
7474

75+
## Schema Storage
76+
77+
Schema discovery is expensive in both time and database compute, so the
78+
discovered schema is persisted in IndexedDB (via localforage) as a
79+
`SchemaStorageModel`. This acts as a persistent cache per connection.
80+
81+
Key files:
82+
83+
- `src/core/StateProvider/schema.ts``SchemaStorageModel` type, Jotai atoms,
84+
and incremental update logic
85+
- `src/core/ConfigurationProvider/types.ts``EdgeConnection`,
86+
`VertexTypeConfig`, `EdgeTypeConfig`, and related types
87+
- `src/hooks/useSchemaSync.ts` — schema sync orchestration
88+
- `src/connector/queries/edgeConnectionsQuery.ts` — edge connection discovery
89+
90+
### Edge Connections
91+
92+
Edge connections (`EdgeConnection[]`) describe relationships between vertex
93+
types and are used by the Schema Explorer feature. Because the edge connection
94+
query can be expensive and unreliable, it runs separately from the main schema
95+
sync so that a failure only affects Schema Explorer — all other features work
96+
without edge connections.
97+
98+
The `edgeConnections` property on `SchemaStorageModel` has three meaningful
99+
states:
100+
101+
- `undefined` — edge connections have not been successfully discovered (query
102+
not run or errored)
103+
- `[]` (empty array) — query succeeded but no edge connections exist
104+
- populated array — query succeeded with results
105+
106+
If the edge connection query fails, the error is stored in the schema via the
107+
`edgeConnectionDiscoveryFailed` flag.
108+
109+
### Incremental Schema Growth
110+
111+
As users explore the graph, queries may return vertex/edge types or attributes
112+
not present in the initial schema sync. These are automatically merged into the
113+
stored schema via `updateSchemaFromEntities()`, causing the schema to grow more
114+
complete over time.
115+
75116
## Branded Types
76117

77118
The project uses branded types from `@/utils` for type safety. These prevent

AGENTS.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,3 +164,11 @@ src/
164164
### Testing
165165

166166
See `.kiro/steering/testing.md` for testing patterns and examples.
167+
168+
### Project Management
169+
170+
See `.kiro/steering/project-management.md` for project management guidelines.
171+
172+
### Project Organization
173+
174+
See `.kiro/steering/structure.md` for code organization patterns and conventions.

0 commit comments

Comments
 (0)