@hasna/instructions 0.4.5 → 0.4.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md
CHANGED
|
@@ -189,8 +189,9 @@ before mutating managed files.
|
|
|
189
189
|
`instructions init` and `bun run seed` also seed
|
|
190
190
|
`global-agent-rules-standard`, the managed global/system prompt source for
|
|
191
191
|
session renaming, task-scoped worktrees, PR-first landing, protected-branch
|
|
192
|
-
push safety,
|
|
193
|
-
|
|
192
|
+
push safety, no brittle hardcoding when source-of-truth or reusable abstractions
|
|
193
|
+
exist, autonomous repair, Hasna CLI source-of-truth usage, conversation surface
|
|
194
|
+
routing, and unbudgeted Codewith goals unless a user asks for budgets.
|
|
194
195
|
|
|
195
196
|
## Machine-aware Profiles
|
|
196
197
|
|
package/dist/cli/index.js
CHANGED
|
@@ -6861,6 +6861,7 @@ async function ensurePlatformProfiles(store = resolveConfigStore()) {
|
|
|
6861
6861
|
// src/lib/global-agent-rules-standard.ts
|
|
6862
6862
|
init_config_store();
|
|
6863
6863
|
var GLOBAL_AGENT_RULES_STANDARD_SLUG = "global-agent-rules-standard";
|
|
6864
|
+
var NO_BRITTLE_HARDCODING_RULE = "Do not hardcode brittle values, paths, provider names, config, business logic, environment-specific IDs, or one-off mappings when a source-of-truth, schema/config-driven, package-owned, reusable, or cleaner abstraction exists. This is especially strict in medium and large applications. Explicit constants, fixtures, tests, and temporary compatibility shims are allowed only when scoped, named, and justified.";
|
|
6864
6865
|
var GLOBAL_AGENT_RULES_STANDARD_CONTENT = `# Global Coding Agent Rules Standard
|
|
6865
6866
|
|
|
6866
6867
|
This standard is managed global/system prompt source content for Hasna coding
|
|
@@ -6885,24 +6886,25 @@ policy source supersedes them.
|
|
|
6885
6886
|
request before landing.
|
|
6886
6887
|
5. Never push directly to \`main\`, the default branch, or any protected branch
|
|
6887
6888
|
unless the user explicitly instructs that exact repo and operation.
|
|
6889
|
+
6. ${NO_BRITTLE_HARDCODING_RULE}
|
|
6888
6890
|
|
|
6889
6891
|
## Autonomy and Source-of-Truth Tools
|
|
6890
6892
|
|
|
6891
|
-
|
|
6893
|
+
7. Act autonomously. Diagnose, repair, validate, and iterate on the owning
|
|
6892
6894
|
CLIs, packages, and workflows before asking the user. Ask only when blocked
|
|
6893
6895
|
by destructive decisions, secret-bearing decisions, user-only authority, or
|
|
6894
6896
|
external state the agent cannot safely obtain.
|
|
6895
|
-
|
|
6897
|
+
8. Use Hasna CLIs/packages as the source of truth: \`todos\`, \`conversations\`,
|
|
6896
6898
|
\`mementos\`, \`knowledge\`, \`projects\`, \`repos\`, \`accounts\`,
|
|
6897
6899
|
\`instructions\`, \`machines\`, \`secrets\`, and \`access\`.
|
|
6898
|
-
|
|
6900
|
+
9. Secrets safety is mandatory. Never expose secrets in prompts, tasks,
|
|
6899
6901
|
memories, conversations, manifests, reports, logs, PR text, or any other
|
|
6900
6902
|
agent-visible output. Reference vault item names, secret identifiers, and
|
|
6901
6903
|
access grants only; never print credential values.
|
|
6902
6904
|
|
|
6903
6905
|
## Conversation Surfaces
|
|
6904
6906
|
|
|
6905
|
-
|
|
6907
|
+
10. Use default conversation surfaces correctly: \`announcements\` for policy,
|
|
6906
6908
|
freeze, breaking, cutover, and release notices; \`incidents\` for outages,
|
|
6907
6909
|
crash loops, data risk, or security exposure; \`git-publishing\` before and
|
|
6908
6910
|
after package publishes; \`git-prs\`, \`git-commits\`, and \`git-releases\`
|
package/dist/index.js
CHANGED
|
@@ -3213,6 +3213,7 @@ async function ensurePlatformProfiles(store = resolveConfigStore()) {
|
|
|
3213
3213
|
}
|
|
3214
3214
|
// src/lib/global-agent-rules-standard.ts
|
|
3215
3215
|
var GLOBAL_AGENT_RULES_STANDARD_SLUG = "global-agent-rules-standard";
|
|
3216
|
+
var NO_BRITTLE_HARDCODING_RULE = "Do not hardcode brittle values, paths, provider names, config, business logic, environment-specific IDs, or one-off mappings when a source-of-truth, schema/config-driven, package-owned, reusable, or cleaner abstraction exists. This is especially strict in medium and large applications. Explicit constants, fixtures, tests, and temporary compatibility shims are allowed only when scoped, named, and justified.";
|
|
3216
3217
|
var GLOBAL_AGENT_RULES_STANDARD_CONTENT = `# Global Coding Agent Rules Standard
|
|
3217
3218
|
|
|
3218
3219
|
This standard is managed global/system prompt source content for Hasna coding
|
|
@@ -3237,24 +3238,25 @@ policy source supersedes them.
|
|
|
3237
3238
|
request before landing.
|
|
3238
3239
|
5. Never push directly to \`main\`, the default branch, or any protected branch
|
|
3239
3240
|
unless the user explicitly instructs that exact repo and operation.
|
|
3241
|
+
6. ${NO_BRITTLE_HARDCODING_RULE}
|
|
3240
3242
|
|
|
3241
3243
|
## Autonomy and Source-of-Truth Tools
|
|
3242
3244
|
|
|
3243
|
-
|
|
3245
|
+
7. Act autonomously. Diagnose, repair, validate, and iterate on the owning
|
|
3244
3246
|
CLIs, packages, and workflows before asking the user. Ask only when blocked
|
|
3245
3247
|
by destructive decisions, secret-bearing decisions, user-only authority, or
|
|
3246
3248
|
external state the agent cannot safely obtain.
|
|
3247
|
-
|
|
3249
|
+
8. Use Hasna CLIs/packages as the source of truth: \`todos\`, \`conversations\`,
|
|
3248
3250
|
\`mementos\`, \`knowledge\`, \`projects\`, \`repos\`, \`accounts\`,
|
|
3249
3251
|
\`instructions\`, \`machines\`, \`secrets\`, and \`access\`.
|
|
3250
|
-
|
|
3252
|
+
9. Secrets safety is mandatory. Never expose secrets in prompts, tasks,
|
|
3251
3253
|
memories, conversations, manifests, reports, logs, PR text, or any other
|
|
3252
3254
|
agent-visible output. Reference vault item names, secret identifiers, and
|
|
3253
3255
|
access grants only; never print credential values.
|
|
3254
3256
|
|
|
3255
3257
|
## Conversation Surfaces
|
|
3256
3258
|
|
|
3257
|
-
|
|
3259
|
+
10. Use default conversation surfaces correctly: \`announcements\` for policy,
|
|
3258
3260
|
freeze, breaking, cutover, and release notices; \`incidents\` for outages,
|
|
3259
3261
|
crash loops, data risk, or security exposure; \`git-publishing\` before and
|
|
3260
3262
|
after package publishes; \`git-prs\`, \`git-commits\`, and \`git-releases\`
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { Config } from "../types/index.js";
|
|
2
2
|
import { type ConfigStore } from "../data/config-store.js";
|
|
3
3
|
export declare const GLOBAL_AGENT_RULES_STANDARD_SLUG = "global-agent-rules-standard";
|
|
4
|
-
export declare const
|
|
4
|
+
export declare const NO_BRITTLE_HARDCODING_RULE = "Do not hardcode brittle values, paths, provider names, config, business logic, environment-specific IDs, or one-off mappings when a source-of-truth, schema/config-driven, package-owned, reusable, or cleaner abstraction exists. This is especially strict in medium and large applications. Explicit constants, fixtures, tests, and temporary compatibility shims are allowed only when scoped, named, and justified.";
|
|
5
|
+
export declare const GLOBAL_AGENT_RULES_STANDARD_CONTENT = "# Global Coding Agent Rules Standard\n\nThis standard is managed global/system prompt source content for Hasna coding\nagents. Rendered agents must receive these rules unless a newer authorized\npolicy source supersedes them.\n\n## Session and Planning Defaults\n\n1. Use automatic session renaming when the agent supports it. Rename the\n session early to match the active task; if the task materially pivots, rename\n it again so operators can identify the run.\n2. Never set Codewith goal/token budgets or goal-plan budgets unless the user\n explicitly asks for a budget. Durable goals and goal plans are unbudgeted by\n default.\n\n## Repository Mutation and Landing\n\n3. Repo mutation must happen in a task-scoped worktree. First inspect the canonical worktree root\n `$HOME/.hasna/repos/worktrees`; prefer Hasna repo/project worktree\n mechanisms when available; otherwise use `git worktree`. Never mutate shared checkouts.\n4. PR-first landing: normal changes go through a branch/worktree and pull\n request before landing.\n5. Never push directly to `main`, the default branch, or any protected branch\n unless the user explicitly instructs that exact repo and operation.\n6. Do not hardcode brittle values, paths, provider names, config, business logic, environment-specific IDs, or one-off mappings when a source-of-truth, schema/config-driven, package-owned, reusable, or cleaner abstraction exists. This is especially strict in medium and large applications. Explicit constants, fixtures, tests, and temporary compatibility shims are allowed only when scoped, named, and justified.\n\n## Autonomy and Source-of-Truth Tools\n\n7. Act autonomously. Diagnose, repair, validate, and iterate on the owning\n CLIs, packages, and workflows before asking the user. Ask only when blocked\n by destructive decisions, secret-bearing decisions, user-only authority, or\n external state the agent cannot safely obtain.\n8. Use Hasna CLIs/packages as the source of truth: `todos`, `conversations`,\n `mementos`, `knowledge`, `projects`, `repos`, `accounts`,\n `instructions`, `machines`, `secrets`, and `access`.\n9. Secrets safety is mandatory. Never expose secrets in prompts, tasks,\n memories, conversations, manifests, reports, logs, PR text, or any other\n agent-visible output. Reference vault item names, secret identifiers, and\n access grants only; never print credential values.\n\n## Conversation Surfaces\n\n10. Use default conversation surfaces correctly: `announcements` for policy,\n freeze, breaking, cutover, and release notices; `incidents` for outages,\n crash loops, data risk, or security exposure; `git-publishing` before and\n after package publishes; `git-prs`, `git-commits`, and `git-releases`\n for repository landing events; `hq` for broad coordination;\n `agent-policy` for agent operating-rule discussion; project/product\n channels for normal work; and `conversations blockers` for blocker\n discovery. Do not invent or refer to a literal blockers channel.\n";
|
|
5
6
|
export declare function ensureGlobalAgentRulesStandardConfig(store?: ConfigStore): Promise<Config>;
|
|
6
7
|
//# sourceMappingURL=global-agent-rules-standard.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"global-agent-rules-standard.d.ts","sourceRoot":"","sources":["../../src/lib/global-agent-rules-standard.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAsB,KAAK,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAE/E,eAAO,MAAM,gCAAgC,gCAAgC,CAAC;AAE9E,eAAO,MAAM,mCAAmC,
|
|
1
|
+
{"version":3,"file":"global-agent-rules-standard.d.ts","sourceRoot":"","sources":["../../src/lib/global-agent-rules-standard.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAsB,KAAK,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAE/E,eAAO,MAAM,gCAAgC,gCAAgC,CAAC;AAE9E,eAAO,MAAM,0BAA0B,8ZAA8Z,CAAC;AAEtc,eAAO,MAAM,mCAAmC,g+FAkD/C,CAAC;AAEF,wBAAsB,oCAAoC,CAAC,KAAK,GAAE,WAAkC,GAAG,OAAO,CAAC,MAAM,CAAC,CA6BrH"}
|
package/dist/mcp/index.js
CHANGED
|
@@ -2113,7 +2113,7 @@ var init_sync_dir = __esm(() => {
|
|
|
2113
2113
|
var require_package = __commonJS((exports, module) => {
|
|
2114
2114
|
module.exports = {
|
|
2115
2115
|
name: "@hasna/instructions",
|
|
2116
|
-
version: "0.4.
|
|
2116
|
+
version: "0.4.6",
|
|
2117
2117
|
description: "AI coding agent instruction & configuration manager \u2014 store, version, apply, and share all your AI coding configs. CLI + MCP + HTTP API (instructions-serve) + generated SDK + Dashboard.",
|
|
2118
2118
|
type: "module",
|
|
2119
2119
|
main: "dist/index.js",
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hasna/instructions",
|
|
3
|
-
"version": "0.4.
|
|
4
|
-
"description": "AI coding agent instruction & configuration manager
|
|
3
|
+
"version": "0.4.6",
|
|
4
|
+
"description": "AI coding agent instruction & configuration manager — store, version, apply, and share all your AI coding configs. CLI + MCP + HTTP API (instructions-serve) + generated SDK + Dashboard.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
7
7
|
"types": "dist/index.d.ts",
|
package/dashboard/README.md
DELETED
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
# React + TypeScript + Vite
|
|
2
|
-
|
|
3
|
-
This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.
|
|
4
|
-
|
|
5
|
-
Currently, two official plugins are available:
|
|
6
|
-
|
|
7
|
-
- [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react) uses [Babel](https://babeljs.io/) (or [oxc](https://oxc.rs) when used in [rolldown-vite](https://vite.dev/guide/rolldown)) for Fast Refresh
|
|
8
|
-
- [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react-swc) uses [SWC](https://swc.rs/) for Fast Refresh
|
|
9
|
-
|
|
10
|
-
## React Compiler
|
|
11
|
-
|
|
12
|
-
The React Compiler is not enabled on this template because of its impact on dev & build performances. To add it, see [this documentation](https://react.dev/learn/react-compiler/installation).
|
|
13
|
-
|
|
14
|
-
## Expanding the ESLint configuration
|
|
15
|
-
|
|
16
|
-
If you are developing a production application, we recommend updating the configuration to enable type-aware lint rules:
|
|
17
|
-
|
|
18
|
-
```js
|
|
19
|
-
export default defineConfig([
|
|
20
|
-
globalIgnores(['dist']),
|
|
21
|
-
{
|
|
22
|
-
files: ['**/*.{ts,tsx}'],
|
|
23
|
-
extends: [
|
|
24
|
-
// Other configs...
|
|
25
|
-
|
|
26
|
-
// Remove tseslint.configs.recommended and replace with this
|
|
27
|
-
tseslint.configs.recommendedTypeChecked,
|
|
28
|
-
// Alternatively, use this for stricter rules
|
|
29
|
-
tseslint.configs.strictTypeChecked,
|
|
30
|
-
// Optionally, add this for stylistic rules
|
|
31
|
-
tseslint.configs.stylisticTypeChecked,
|
|
32
|
-
|
|
33
|
-
// Other configs...
|
|
34
|
-
],
|
|
35
|
-
languageOptions: {
|
|
36
|
-
parserOptions: {
|
|
37
|
-
project: ['./tsconfig.node.json', './tsconfig.app.json'],
|
|
38
|
-
tsconfigRootDir: import.meta.dirname,
|
|
39
|
-
},
|
|
40
|
-
// other options...
|
|
41
|
-
},
|
|
42
|
-
},
|
|
43
|
-
])
|
|
44
|
-
```
|
|
45
|
-
|
|
46
|
-
You can also install [eslint-plugin-react-x](https://github.com/Rel1cx/eslint-react/tree/main/packages/plugins/eslint-plugin-react-x) and [eslint-plugin-react-dom](https://github.com/Rel1cx/eslint-react/tree/main/packages/plugins/eslint-plugin-react-dom) for React-specific lint rules:
|
|
47
|
-
|
|
48
|
-
```js
|
|
49
|
-
// eslint.config.js
|
|
50
|
-
import reactX from 'eslint-plugin-react-x'
|
|
51
|
-
import reactDom from 'eslint-plugin-react-dom'
|
|
52
|
-
|
|
53
|
-
export default defineConfig([
|
|
54
|
-
globalIgnores(['dist']),
|
|
55
|
-
{
|
|
56
|
-
files: ['**/*.{ts,tsx}'],
|
|
57
|
-
extends: [
|
|
58
|
-
// Other configs...
|
|
59
|
-
// Enable lint rules for React
|
|
60
|
-
reactX.configs['recommended-typescript'],
|
|
61
|
-
// Enable lint rules for React DOM
|
|
62
|
-
reactDom.configs.recommended,
|
|
63
|
-
],
|
|
64
|
-
languageOptions: {
|
|
65
|
-
parserOptions: {
|
|
66
|
-
project: ['./tsconfig.node.json', './tsconfig.app.json'],
|
|
67
|
-
tsconfigRootDir: import.meta.dirname,
|
|
68
|
-
},
|
|
69
|
-
// other options...
|
|
70
|
-
},
|
|
71
|
-
},
|
|
72
|
-
])
|
|
73
|
-
```
|